433MHz Trådløs RF Data Sender/Modtager Module sendes som et sæt med “Sender, og “Modtager. Disse 2 moduler kan snakke sammen via 433Mhz signalet.
Tekniske detaljer:
Transmitter : (Sender)
Working voltage: 3V – 12V fo max. power use 12V
Launch distance : 5-200 meters (different voltage, different results)
Working current: max Less than 40mA max , and min 9mA
Resonance mode: (SAW)
Modulation mode: ASK
Working frequency: Eve 315MHz Or 433MHz
Transmission power: 25mW (315MHz at 12V)
Frequency error: +150kHz (max)
Velocity : less than 10Kbps
Model: MX-05V
Vigtig info: Det er vigtigt Gnd og Vcc ikke bliver byttet rundt. Dette kan skade modulet.
Receiver : (Modtager)
Working voltage: 5.0VDC +0.5V
Working current:≤5.5mA max
Working method: OOK/ASK
Working frequency: 315MHz-433.92MHz
Bandwidth: 2MHz
Sensitivity: excel –100dBm (50Ω)
Transmitting velocity: <9.6Kbps (at 315MHz and -95dBm)
Model: MX-05V
Installere Arduino IDE Software
Før du kan starte din programmering skal Arduino’s IDE software hentes. Dette program bruges til at programmere chippen.
Download fra dette link: Downlaod
Installere VirtualWire Library
- Download library (Download)
- Udpak filer
- Flyt/kopir mappen “VirtualWire” til “libraries” som findes i “Arduino IDE” mappen (C:Program Files (x86)Arduinolibraries)
- Åben Arduino IDE software og klik på “Sketch/Include library”
- Klik nu på “Add Zip. library” og find Zip filen du lige har downloaded.
- Åben “Sketch/Include library/Manage Librarys” for at opdatere library.
- Luk, og åben Arduino IDE programmet. (Genstart programmet)
- Nu er VirtualWire Library installeret
Programmering
Inden programmeringen kan udfæres skal den rigtige “COM” port findes. Klik “Værktøj/Port” – og vælg COM port.
Eksempel
Her vises er eksempel på hvordan du kan få onboard LED til at tænde/slukke ved signal fra “Transmitter” til “Receiver”.
Du skal bruge:
Transmitter:
Vcc (Module) = 5V (Arduino)
ATAD (Module) = D12 (Arduino)
Gnd (Module) =Gnd (Arduino)
Receiver:
Vcc (Module) = 5V (Arduino)
Data (Module) = D12 (Arduino)
Gnd (Module) =Gnd (Arduino)
Kode (Master – Slave)
Send data mellem 2 Arduinoer.
Transmitter:
#include <VirtualWire.h> char *controller; void setup() { pinMode(13,OUTPUT); vw_set_ptt_inverted(true); // vw_set_tx_pin(12); vw_setup(4000);// speed of data transfer Kbps } void loop(){ controller="1" ; vw_send((uint8_t *)controller, strlen(controller)); vw_wait_tx(); // Wait until the whole message is gone digitalWrite(13,1); delay(1000); controller="0" ; vw_send((uint8_t *)controller, strlen(controller)); vw_wait_tx(); // Wait until the whole message is gone digitalWrite(13,0); delay(1000); }
Receiver:
//simple Tx on pin D12 //Written By : Mohannad Rawashdeh // 3:00pm , 13/6/2013 //http://www.genotronex.com/ //.................................. #include <VirtualWire.h> void setup() { vw_set_ptt_inverted(true); // Required for DR3100 vw_set_rx_pin(12); vw_setup(4000); // Bits per sec pinMode(13, OUTPUT); vw_rx_start(); // Start the receiver PLL running } void loop() { uint8_t buf[VW_MAX_MESSAGE_LEN]; uint8_t buflen = VW_MAX_MESSAGE_LEN; if (vw_get_message(buf, &buflen)) // Non-blocking { if(buf[0]=='1'){ digitalWrite(13,1); } if(buf[0]=='0'){ digitalWrite(13,0); } } }
Kode (Master – Slave – Slave)
Send data mellem flere Arduinoer.
Transmitter:
#include <VirtualWire.h> char *controller; void setup() { pinMode(13,OUTPUT); vw_set_ptt_inverted(true); // vw_set_tx_pin(12); vw_setup(4000);// speed of data transfer Kbps } void loop(){ controller="A1" ; vw_send((uint8_t *)controller, strlen(controller)); vw_wait_tx(); // Wait until the whole message is gone digitalWrite(13,1); delay(1000); digitalWrite(13,0); delay(1000); controller="B1" ; vw_send((uint8_t *)controller, strlen(controller)); vw_wait_tx(); // Wait until the whole message is gone digitalWrite(13,1); delay(1000); digitalWrite(13,0); delay(1000); }
Receiver 1:
#include <VirtualWire.h> void setup() { vw_set_ptt_inverted(true); // Required for DR3100 vw_set_rx_pin(12); vw_setup(4000); // Bits per sec pinMode(13, OUTPUT); vw_rx_start(); // Start the receiver PLL running } void loop() { uint8_t buf[VW_MAX_MESSAGE_LEN]; uint8_t buflen = VW_MAX_MESSAGE_LEN; if (vw_get_message(buf, &buflen)) // Non-blocking { if((buf[0]=='A')&&(buf[1]=='1')){ digitalWrite(13,1); delay(1000); } } else{ digitalWrite(13,0); } }
Receiver 2:
#include <VirtualWire.h> void setup() { vw_set_ptt_inverted(true); // Required for DR3100 vw_set_rx_pin(12); vw_setup(4000); // Bits per sec pinMode(13, OUTPUT); vw_rx_start(); // Start the receiver PLL running } void loop() { uint8_t buf[VW_MAX_MESSAGE_LEN]; uint8_t buflen = VW_MAX_MESSAGE_LEN; if (vw_get_message(buf, &buflen)) // Non-blocking { if((buf[0]=='B')&&(buf[1]=='1')){ digitalWrite(13,1); delay(1000); } } else{ digitalWrite(13,0); } }
Download
Kontakt os
Du er altid velkommen til at kontakte os på info@ardustore.dk, eller sende os en besked via messenger (Klik her) og vi vil hjælpe dig.
Anmeldelser
Der er endnu ikke nogle anmeldelser.