I'm trying to get the 315MHz 4800bps RF links (WRL-08947 & WRL-08945) from Sparkfun to work. If I hook up the TX of one Arduino straight to the RX of the other Arduino with wire, my tests work. After I've attached the TX to a transmitter and the RX to a receiver, my test does nothing, zip.
I've tried all the examples that I could find, including those linked from the product page and a few using SoftwareSerial to free up the Serial port for printing via USB to a computer.
I've tested with antennae, both 23.5cm long, and without antennae. The Arduinos - one Mega one Duemilanove - are sitting next to each other on the table, so antennae shouldn't be needed. I've also tried making both antennae into loops, putting one loop inside the other as a comment on the product page suggested.
I can't even get any garbled input to show up. I'm trying to pick up the signal on the Mega's Serial1 port (pin 19), and printing it to its Serial port, so that I can see anything that comes through, garbled or not.
So, I'm thinking that maybe one of the RF components isn't working properly, but how could I test that? I have a multimeter, no scope.
I have the same exact RF set and notice the receiver is inverted. Also, the data sheet shows 20ms at VCC turn on time but I have needed some dummy bytes at each transmission start along with a CRC byte at the end.
It's rock solid after that but I use a software method so it's more flexible to filter noise. I connect everything straight pin to pin with no pull up/down resistors.
I went from almost smashing it with a hammer to being extremely pleased within an hour so just stick with it.
Have you try the VirtualWire lib in the playground?
Yes, I've tried VirtualWire and get no data on the receiver. If I try VirtualWire with an actual wire connection, it works.
I have the same exact RF set and notice the receiver is inverted
How did you find that out and remedy it, if I may ask? And did it mean that you weren't getting Serial.available() at the receiving end until you figured it out?
I use software to transmit with a 4 byte protocol. It uses longer start/stop bits so the RX knows when it has the full signal. To check it on the receiver side you can just use the pulseIn to capture an array of LOW pulses and see long and short for 0 and 1. Decrease the timing in the bit_tx function until it becomes unstable then you can figure out the maximum reliable rate for your application. Keep in mind the inverted signal so with the data on the HIGH TX side it will be LOW on the RX.
This transmits MSB first, I had a reason for that but I can't remember what it was. It acts as a beacon that pings every 500ms and the receiver can listen at any random window and get the full data stream. I use the UART for something else so this is all in software.
int tx=6;//TX pin
byte tx_val[4]={B10001001,B11010001,B11011111,B1111111};//4 data bytes
unsigned long tx_time;
Hi again, I've gotten further. I've now gone back to VirtualWire and it does indeed work just fine with these modules. Thanks Mike McCauley for making this awesome library!
I had commented out the following line in the receiver.pde and transmitter.pde files:
vw_set_ptt_inverted(true); // Required for DR3100
But in fact this line was very important The signal is indeed inverted on the receiver as savitch pointed out.
So yes. VirtualWire examples are all go. You have to add this though (assuming Arduino software version 0016):
#include <WProgram.h>
And that's before the "include <VirtualWire.h>" line. Then you can set the pin numbers in the setup() function for transmitter and receiver respectively like this:
Hi editkid
Is there anything else you changed from the examples given. I'm using the jaycar rf tx and rf rx given as examples in the pdf for virtualwire and though it compiles and seems to run nothing is coming through on the receiver. I think I've got the wiring right I used the default pins for vw_set_XXX_pin. I put an LED in for pin 13 and it goes on and off like the example code says it should but nothing on the receiver side. Bit at a loss on how to debug it.
Thanks
No, I didn't change anything else. Mind you that I did have conflicts with a Wii Nunchuck library at some point, and it took me a fair amount of time to realise that.
Some good things to do when debugging are:
set up a test file with nothing in it but the TX/RX code, so as to not cause any conflicts
try savitch's code he posted in this thread together with a graphing solution, like the Graph example that comes with Arduino - if you look at the receiving end in Processing, you should see steady patterns when you are transmitting - then you'll know that at least your RF links are working - when you stop transmitting you should see a very noisy graph
put a blinking LED on the receiver side when something is received, rather than debugging to the Serial monitor - that's the most basic and most reliable way to debug - once that works, you can try Serial monitoring
Hmm that's all I can think of for now. You're not in the vicinity of Wellington, NZ are you? Because if so I could possibly give you a hand in person.
Could not get anything across the VirtualWire library using the example Transmitter and Receiver sketch...
I m using some other brand of 433Mhz and found the pinout below:-
TX :
RX :
I hv the Arduino/Processing Graphing and confirm that the Transmitter is working... the high/low signals ( 1 & 0 ) output from the TX pin is also received on the antenna hole in the Transmitter..
On the receiver side, I'm a bit clueless on how to troubleshoot...
Got a lot of signal from the RX pin but the pattern does not match the TX and with some noise ( some half wave instead of square wave digital shape )
Could NOT get one matching message from the VirtualWire...
Tried all speed, from the default 200, 4800, 9600... nothing works..