Aplicações
- USA – 315Mhz
- Europe – 433Mhz
Parâmetros Módulos Emissores
Working voltage: 3V-12V
Working current: 20-28mA.
Working temperatur: -10 degree to +70 degree
Resonance mode: sound wave resonance (SAW)
Modulation mode: ASK /OOK
Working frequency: 315MHz-433.92MHz, customized frequency is available.
Transmission distance:>500m,sensitivity to -103dBm, in open areas.
Transmission power: 25mW (315MHz at 12V)
frequency error: +150kHz (max)
Velocity: ≤10Kbps
Self-owned codes: negative
Parâmetros Módulos Receptores
Working voltage: 5.0VDC
Static current:4MA
Working temperatur: -10 degree to +70 degree
Working principle: single chip superregeneration receiving
Working method: OOK/ASK
Working frequency: 315MHz-433.92MHz, customized frequency is available(266-433MHZ).
Bandwidth: 2MHz (315MHz, having result from testing at lowing the sensitivity 3dBm)
Sensitivity: excel –100dBm (50Ω)
Um exemplo
Neste exemplo, o recepotr e o emissor estão ligados, cada um a um arduino independente. O emissor esta ligado no pino 12 de um arduino e o receptor tem o pino de dados ligado ao pino 11 do segundo arduino.
Os pinos de ligação do emissor e receptor podem ser alterados, mas isso deverá ser tendo em contas o datasheet do arduino e ser alterados nas livraria “virtualwire”
Iremos utilizar a livraria “virtualwire” que pode fazer o download aqui.
Código para o Arduino Emissor
/* SimpleSend This sketch transmits a short text message using the VirtualWire library connect the Transmitter data pin to Arduino pin 12 */ #include void setup() { // Initialize the IO and ISR vw_setup(2000); // Bits per sec } void loop() { send("Hello there"); delay(1000); } void send (char *message) { vw_send((uint8_t *)message, strlen(message)); vw_wait_tx(); // Wait until the whole message is gone }
Codigo para o Arduino Receptor
/* SimpleReceive This sketch displays text strings received using VirtualWire Connect the Receiver data pin to Arduino pin 11 */ #include byte message[VW_MAX_MESSAGE_LEN]; // a buffer to store the incoming messages byte messageLength = VW_MAX_MESSAGE_LEN; // the size of the message void setup() { Serial.begin(9600); Serial.println("Device is ready"); // Initialize the IO and ISR vw_setup(2000); // Bits per sec vw_rx_start(); // Start the receiver } void loop() { if (vw_get_message(message, &messageLength)) // Non-blocking { Serial.print("Received: "); for (int i = 0; i < messageLength; i++) { Serial.write(message[i]); } Serial.println(); } }