433MHz Transceiver Problem
eacastro
Posts: 2
Hi all
I'm student and working with a small project which involves wireless transmission. I'm using the Parallax 433MHz Transceiver (OOK modulation, 2500 feet sight line) and have a problem during the transmission.
I'm using the UART from PIC16F876A with a baud rate of 2400 .Initially the MCU is only in TX mode, while my laptop is in RX mode (using Hyperterminal).
The MCU sends numbers as characters (0,1,2...).
I could receive succesfully this data in my laptop, but only if the distance between TX and RX is around 20cms. If I exceed distance, the RX receives the characters but mixed with garbage characters.
I'vet tried different baud rates (9600, 4800) but the problem is still the same, only works fine if the distance is 20cms or less, no more.
Datasheet says it works with 2500 feet.
I have no idea why I'm getting garbage characters over my strings.
This link is for the wireless transceiver:
http://www.parallax.com/Portals/0/Do...eiver-v1.1.pdf
My configuration is:
TX:
MCU (pin TX)----> RF Transmitter (pin Data, "TX/RX Sel" = High, this is TX mode).
RX:
RF Transmitter (pin Data, "TX/RX Sel" = Low, this is RX mode) --> MAX232---->RS232 PC
Using +5V for Vcc.
Thanks for your help/comments/suggestions.
I'm student and working with a small project which involves wireless transmission. I'm using the Parallax 433MHz Transceiver (OOK modulation, 2500 feet sight line) and have a problem during the transmission.
I'm using the UART from PIC16F876A with a baud rate of 2400 .Initially the MCU is only in TX mode, while my laptop is in RX mode (using Hyperterminal).
The MCU sends numbers as characters (0,1,2...).
I could receive succesfully this data in my laptop, but only if the distance between TX and RX is around 20cms. If I exceed distance, the RX receives the characters but mixed with garbage characters.
I'vet tried different baud rates (9600, 4800) but the problem is still the same, only works fine if the distance is 20cms or less, no more.
Datasheet says it works with 2500 feet.
I have no idea why I'm getting garbage characters over my strings.
This link is for the wireless transceiver:
http://www.parallax.com/Portals/0/Do...eiver-v1.1.pdf
My configuration is:
TX:
MCU (pin TX)----> RF Transmitter (pin Data, "TX/RX Sel" = High, this is TX mode).
RX:
RF Transmitter (pin Data, "TX/RX Sel" = Low, this is RX mode) --> MAX232---->RS232 PC
Using +5V for Vcc.
Thanks for your help/comments/suggestions.
Comments
Depending on what is around you, there could be other 433 interference. The 433 MHz is really susceptible to radio noise. Try relocating the setup to see if that helps with the erroneous data.
First, by mistake I wrote 2500 feet, and datasheet states 250 feet. But at the very beggining my problem was transmission problem in more than 20cms.
I was sending numbers (0,1,2) from MCU UART to the PC. The MCU had a while loop with a delay of 300mS in every loop. I think with this delay, the RX had enough chance to capture noise and mix it with my signal.
I reduced the delay from 300mS to 40mS. In this case, the communication was good, even 6 meters away with a wall as obstacle. It seems with this delay, the receiver is not able to capture de noise but my signal.
The strings were received perfectly on Hyper-terminal.
Now I'm trying in build a "protocol" for TX/RX.
The notes about receiving noise are correct. For reliable data transmission you have to do a little extra work.
The following can be done for more reliable communication:
1) Pick up the LINX IC datasheet and check out the notes regarding "squelch". The module is very susceptible to noise and squelching (done by adding resistor(s) to the appropriate pin) is helpful. For example, I used 2M Ohms. It is a compromise between noise sensitivity and reception sensitivity. Easy fix on the PCB.
2) You need to make a simple 'protocol' in which you transmit data in a formal structure with a start byte, data, and a checksum of some sort. This will allow the receiving device to know when a valid message has started and/or been received. Bad messages can be ignored or discarded
I would suggest making a little TX message buffer, filling it, then transmitting as fast as possible (via polling or interrupts) from the UART.
3) Don't forget about the "sync" bytes the LINX IC needs. (See datasheet)
4) Adding a long delay between transmissions will become irrelevant if you use a good protocol, but will not really be necessary. Also you should be able to transmit at the maximum rate (10,000bps) using your UART's 9600 rate.
I'm thinking about posting a schematic and related notes here in the forum.
Give these things a try and see how it works out.
1. 1200 baud
2. A simple checksum
3. Redundant transmission
4. 2 Radio antennae - extracted from old radio sets and mounted onto a badminton shuttle, with a AL foil ground plane - This seemed to help a lot.