So i’m building an RF controlled robot, or trying to at least and i just barely learned today that virtualWire absolutely does not jive with the standard servo library. so i finally got servo control through the RF with ServoTimer2, but my issue is i can only receive a signal if the to antennae are just centimeters apart. I was reading online and people are talking about reliable transmission across their whole house. are my pair just messed up? or is there some trick to making them transmit further than 2 or 3 centimeters with a 20 cm antenna?
sorry if this is in the wrong section or something, bear with me, im new.
or is there some trick to making them transmit further than 2 or 3 centimeters with a 20 cm antenna?
The real "trick" is to make sure that the antenna is the correct length, and is connected to the right kind of radio, in the right way.
None of the radios I'm familiar with use a 20 cm antenna. 17 or 34 are the normal lengths. Of course, had you provided some clue as to what that alphabet soup means (like a link), we could maybe provide more help.
Could you use an oscilloscope connect it at some point of an antenna, and then simply start cutting until you get the largest waveform? ... i've stayed away from radio....
Could you use an oscilloscope connect it at some point of an antenna, and then simply start cutting until you get the largest waveform?
I've cut it 6 times and it's still too short. 8)
20 cm antenna?
Did you provide the antenna, or was it provided with the transceiver? Is it the correct length as specified by the transceiver manufacturer?
That would be some oscilloscope for a 433MHz signal!
I can't speak for that exact module but I built a project using a similar low-cost RF module and what I found was that it was fine when the transmitter was transmitting but when the transmitter stopped, the AGC on the receiver ramped right up and it started hearing a load of noise. To overcome this, I implemented a simple protocol where the receiver listened for a series of 5kHz pulses followed by two double width (2.5kHz) pulses. Once theses were received, in my case, the receiving Arduino did stuff but you could take whatever follows as data.
The modules I had were good to over 5m without an antenna - but it did stop my car key working!
You need to know what frequency the modules are using. A 17 cm antenna would be correct for 433 MHz, but these could be 315 MHz or something else. The approximate formula for the length of a 1/4 wave "whip" antenna is L (cm) = 7.5x10^3/f (MHz) and that should be good for a range of perhaps a hundred meters or more in a decent environment.
In any case, any antenna at all will work for a few cm of range, so if you are getting only 1-2 cm of range with a 20 cm antenna, then something else is wrong. These really cheap modules all need software to work, like the VirtualWire libary, because of the noise problem you noticed:
when the transmitter stopped, the AGC on the receiver ramped right up and it started hearing a load of noise
If you are using a preamble/sync/message/checksum transmission protocol and that isn't working, then perhaps the receiver is not tuned well enough to the transmitter frequency.
If you want reliable data transmission for a robot, you need error-correcting radios. The inexpensive 2.4 GHz Wixel modules from Pololu work extremely well up to 20 meters or so.
I am using the 433MHz XD-RF-5V in a battery operated receiver. The AGC is a fine feature, but poses a slight problem. Short question: any way to determine when AGC is maxed out? Details follow.
When my transmitter is silent the XD-RF-5V puts out a steady series of pulses, typically around the 1.5 - 2.5 kHz range. They have some jitter and some slight variations in duty cycle, but are generally steady.
Since I monitor the XD's data for a rising edge to bring my receiver gadget out of deep sleep, it never gets any sleep because of this. The DATA line never is silent for long enough to justify entering sleep.
As far as this topic goes, I have a 1/4 wave antenna on the XD, and I can change the frequency of those 'blips' by turning on or off things in the environment -- notably, LED light bulbs and so on. It's triggering on noise, I believe that is clear. Unfortunately, I don't think the 'blips' come at any predictable frequency or duty cycle, because it depends on the environment.
My software dependably detects the preamble and data pattern sent by the transmitter. The gadget has plenty of power (LM317 pushing a clean 5.02V); I gave the XD a generous 1uF decoupler; and I use a small pull-down on the DATA pins to bring the line down more promptly. I extracted the receiver from a cheap remote thermometer to compare its received data against the XD's output, and they matched very nicely -- whenever something in range was broadcasting. Both reported 'random' pulses otherwise. So hardware and firmware look good.
Does anyone have a schematic for the XD? I'm wondering if there's any way to sense when the AGC has gone to its limit, and ignore it until it starts reducing gain. Or if like some other 433MHz modules, there's a valid indication available that just wasn't brought out to the header.