I purchased a transmit/receive pair of modules from DX, but despite other people that have been able to get 20m range with the same type of modules, I was having no luck beyond 3-4m.
After doing some more research, I decided to take another shot at getting more distance out of the modules. The receiver supposedly has a wide bandwidth, and can be tuned with an adjusting screw (a variable inductor). I soldered some wires to a 3.5mm audio jack to listen to the output of the receiver, and wrote a small program to generate a 3.3kHz waveform:
Code:
/* output 3.3kHz tone on PORTB */
#define F_CPU 8000000L
#include <avr/io.h>
#include <util/delay.h>
#define TONEPIN 0 /*connect to transmitter data pin */
void main()
{
DDRB = (1<<TONEPIN); /* output mode */
while (1) {
PINB = (1<<TONEPIN);
_delay_us(150);
}
}
I plugged the audio jack into my computer line-in and configured it to play the audio from line-in. A set of external speakers with a 3.5mm audio jack would work just as well. I adjusted the tuning screw until I could clearly hear the 3.3kHz tone. I then took the transmitter (on a small breadboard with battery power) around the house, and outside. With the transmitter on top of my car in the driveway some 10-12m away, I could still clearly hear the tone (with a bit of static).
At short range these modules worked doing 9600bps, it seems they don't have much of a low-pass filter. So I plan to add one with a cutoff around 2kHz, then do some tests with 1200bps data.
The 315Mhz version of these modules appears to have a very similar circuit with a tuning coil, so this technique should work them as well.
No comments:
Post a Comment