|
This project comprises of a UHF Remote Transmitter PCB and a UHF Remote Receiver PCB. The two PCB's can be hardwired via a DCI connector during program development, once completed the connector can be removed and the RF remote testing can be carried out.
There is a selection of 433MHz RF transmitter and receiver modules to choose from. They are inexpensive and ideally suited for remote control applications around the home, garage and garden. Interfacing them to a PIC couldn’t be easier. Some can operate over a 200m range. One of the advantages of UHF RF remote control is that it can operate where there is no line of sight as required with infrared remote control. Classified as “Low Interference Potential Devices” (LIPD) devices have no legal protection but can be used without a licence. The 433MHz modules send data by a method known as amplitude keying (ASK). Data is transmitted as a series of '1' and '0'. A '1' is represented by the transmitter carrier being switched ON and a '0' is represented by the transmitter carrier being OFF. In order for the UHF RF modules to function satisfactorily the data rate must be btween 300 and 10K bits per second. There are certain drawbacks, noise being the main one. With no signal sent by the transmitter the receiver outputs a continuos stream of noise, due to the receivers ‘Automatic Gain Control (AGC). If a microcontroller is used as the receiver interface the noise can be supressed or ignored by the PIC program software. The other drawback is that the receiver will respond to any other 433MHz transmitter in its vicinity, again using a microcontroller the problem can be overcome with the software.
PIC Software Program
From experience have found that sending plain RS232 does not work as well as it should. Manchester Encoding the data bytes before transmission goes a long in improving reliabilty by reducing data corruption. While RS232 works on maintaining the original width of the individual pulses, for example a 9600 baud being a 105uS wide pulse, Manchester Encoding relies on HIGH to LOW (bit 0), or LOW to HIGH (bit 1) transitions, the actual width of the pulses doesn't matter particularly (within reason), this is good, because wireless does not preserve the exact width of the transmitted pulses. Since radio transmission isn't as reliable as we would like it to be, we just cant send a single byte at a time as we do for RS232, if the receiver misses the START bit then the data byte will be of no use. So it is normal to use a PACKET system, where a number of different pieces of information are transmitted after each other in the form of a packet.
The actual transmission format is as follows:
Header section :
Used to synchronise the beginning of the packet. Usually referred as the preamble consisting of about 20 bits, followed by the START bit.
Address byte(s) :
In situations where there are more than one receiver, this is a specific byte or several bytes that the receiver checks to see if it is being addressed.
Data :
At least one or more byte of data, using more data bytes in larger packets speeds things up.
Checksum :
A checksum byte, used to make sure that the data is received correctly, if it fails the data should be discarded.
|