I have the RX3400 and SAWR 4800bps reciever/transmitter modules from sparkfun.com and am having troubling getting them to work.
I have basic receiver/transmitter code where the receiver checks for any data on the serial buffer then illuminates an Led while the transmitter continuously just sends data.
double timer1 = 0;
if(Serial.available() > 0)
double timer1 = 0;
if(millis() - timer1 > 5)
timer1 = millis();
If I just hookup the tx > rx and rx > tx lines together data is detected on the serial buffer. But when I go wireless and connect data out to rx of the receiver and tx to the data pin of the transmitter I get no detection of data on the serial buffer from the receiver.
I have the modules on separate breadboards. 5v VCC for both. The two data pins of the receiver are connected together and send to the rx pin of the atmega 328P. It should pick up any signal that operates in 434Mhz whether it's garbage or not?
Have you tried the virtualwire library?
Start with the pdf.
I suspect a wiring problem. Can you post a picture of your setup?
Also, what is the purpose of the Serial.write function call in the receiver's code?
The Serial.write() function call in the receiver was only for test purposes.
I left out the rest button since I didn't have a tac switch.
I have a similar sender and receiver. I connected mine like in Tom Igoe's book Making Things Talk.
The sender's two data lines are labeled TX (on the left) and Linear Out (on the right). The Linear out line is not connected in my setup.
There is also a 0.1uF capacitor between +5V and Gnd, on both the sender and receiver.
Looking at the code on the transmitter, I don't see that it is writing anything to pin 3, where the transmitter is connected. It doesn't appear as though you are transmitting anything. Not a surprise, then, that there is nothing to receive.
If I'm not mistaken, the 'Serial' object references to the Tx and Rx pins on the arduino duemilanove board. Tx to PD1 and Rx to PD0. Looking at the 328P datasheet, PD1 is connected to pin 3 and PD0 is connected to pin 2.
Connecting the two microcontrollers together with a wire (Tx from transmitter(pin 3) to Rx of receiver) works just fine. The LED (pin 13 on the duemilanove) turns on signifying data on the serial buffer.
I don't have an oscilloscope to directly check the transmission line. Is there any other way to debug this?
I still can't get this thing to work. Hooking them up directly works just fine and the data being sent is correct as well. Is the only other option to buy brand new transmitter/receiver modules?
Have a go at using the virtualwire library I mentioned in an earlier reply. It won't cost you anything and shipping is free.
Yea I’ve written my own wireless protocol library and wanted to use that (just for the sake of learning), but I can’t seem to detect the signal, or so I thought.
I setup the Poorman’s Oscilloscope, http://accrochages.drone.ws/en/node/90, and found that the receiver was in fact working. I think the problem is that the serial data from the receiver to the arduino serial Rx input gets corrupted; so that the 328P never registers the data as a complete serial frame, thus never setting Serial.available() above 0.
I’ve glanced at the Virtualwire pdf and it seems that they don’t use the serial input/output for wireless communication, only to print confirmation text to serial monitor/hyperterminal. I’ll try changing my code to not use the serial rx/tx lines.
I had exactly the same problem described in the first post by nonfiction, and using VirtualWire it works perfectly. Thanks FusiveResonance.
The explanation why this happens is in the documentation of VirtualWire:
"Why not just use the Arduino UART connected directly to the transmitter/receiver? As discussed in the RFM documentation, ASK receivers require a burst of training pulses to synchronize the transmitter and receiver, and also requires good balance between 0s
and 1s in the message stream in order to maintain the DC balance of the message.
UARTs do not provide these. They work a bit with ASK wireless, but not as well as this