Basic Wireless Communication for Microcontrollers
Chapter 4 - Design Project 3: 900MHz Automatic Error-Correcting Data Link
Final Hardware Design

Figure 1 - Photo of completed 900MHz Data Transceiver

Figure 2 - Schematic of 900MHz Data Transceiver
     Figure 2 shows a complete schematic for the unit, and a photo of the PCB is shown in figure 1. The PCB layout can be found here as Gerber and NC Drill files in a ZIP archive. Note that two units are needed for a complete communication link.
     As can be seen from the schematic, the circuit is very simple. Data from the PC is level-converted by the MAX233 and then fed to the PIC. The PIC drives several status LEDs via 2.2k resistors. The remaining LEDs are driven by the MAX233 (the RS-232 status LEDs) and from the power supply directly (the POWER LED). The status LEDs include the following:
- PWR - POWER
- TXR - RF Transmit (the unit is transmitting over the air)
- TXA - RX Tansmit ACK (the unit has received an ACK to a
data packet it previously transmitted)
- TXN - RF Transmit NACK (the unit has received a NACK to a
data packet it previously transmitted)
- RXR - RF Receive (the unit is receiving data from the radio)
- RXA - RF Receive ACK (the unit has received a valid data packet)
- RXN - RF Receive NACK (the unit has received an invalid data packet)
- CTS - CTS status (the unit is telling the PC not to send more data)
- RX - RS-232 Receive (the unit is receiving data from the PC)
- TX - RS-232 Transmit (the unit is sending data to the PC)
- RTS - RTS status (the PC is signalling the unit to stop sending data)
     The PIC has pin 24 (RB3/LVP) tied low via a 10k resistor, to prevent the PIC from powering up in Low Voltage Programming (LVP) mode. A 16 MHz crystal is used because it provides a clock rate which is suitable for a variety of bit rates for the hardware UART, while operating close to the PIC's maximum speed (20MHz) so the processing power is maximized. Two 33pF capacitors form the phase shift network for the crystal and a 1k resistor limits the crystal drive to considerably below 1mW (see section on Pierce oscillator design for more information on selecting these components).
     Input power can range from about 8 volts up to about 16 without a problem. The absolute maximum is determined by the power dissipation of the 7805 regulator and the maximum DC working voltage of the capacitors on the input. The PIC and MAX233 are bypassed with 0.1uF capacitors for a good compromise between low and high frequency bypass performance. The 7805 has a 47uF capacitor on its input and output, and the RF module has both 0.1uF and 47uF capacitors. The 47uF and 0.1 uF on the RF module follow the manufacturers recommendation. The capacitors on the 7805 help it to deal with transient response, such as when a large number of LEDs light suddenly. Probably, the presence of just one 47uF capacitor on the 5V supply line (the one on the RF module) would be adequate, but using several cannot hurt.
     There are a few additional things to note. First of all, the RF module has an output pin called the RSSI for Received Signal Strength Indicator. This outputs a voltage which gives a logarythmic measure of received signal strength. The datasheet gives very few details about this pin, other than its voltage range and how to convert the voltage to signal strength. This pin could be used to make a "signal present" LED or other indication of signal strength, but, empirically I have found that care must be used not to load it significantly as it has approximately a 47k output impedance. In addition, loading it down externally can cause the RF module's AGC to work improperly. It turns out that the unit internally compares the RSSI pin voltage level to some minimum and if it is below that, it will not output any received data (the RX data out pin will be held high).
     Also, on the PCB, three of the RS-232 lines are bought out to PCB pads and not connected to anything else: CD (marked DCD), DTR, and DSR. For most PCs and PC terminal programs (used to communicate over the serial port), you should be able to leave these disconnected. However, Fr. Tom McGahee in his PIC UART tutorial recommends that you connect DCD to DSR and leave DTR disconnected. This may allow even broader compatibility as some programs may check the status of these lines.
BACK   Table of Contents   
NEXT