Tag archives: sensors

433MHz Wireless with PIC Microcontrollers

Chip

I have decided to design a wireless sensor system in order to learn about micro controllers, wireless communication and environmental sensing.

I am currently basing my design around a master receiver and wireless transmitter modules. The transmitter is able to select an ID for a sensor and "listen" for a readout. Ultimately the system will use trancievers and will communicate using the I2C protocol.

The design of the wireless sensors will be modular consisting of a transmitter board and a sensor board or only the sensor it's self. This will allow it to be used as a foundation for most types of sensors.

The transmitter module will have a 4 data pin input. This can be expanded with the upgrading of the decode/encode chip at each end. I have selected the SM5162/SM5172 pairs to multiplex, encode, decode, and demultiplex the data. The 4 bit limit on sensors can be upgraded by updating the SM5162/72 pairs to their various models up to a maximum of 6 bits. Addressing the modules is done using the addressing pins on the SM5162/72s. They have up to 12 tri-state pins for addressing themselves. As I have selected the "-4" version of the chips I will have 4 data bits and 8 tri-state address pins. This would be reduced to 6 address pins if the data pins were increased to 6 as in the "-6" model. In reverse; when 12 pins are selected for addressing only 1 data pin is available.

These tri-state pins will only be operated in digital however. When the pins are allowed sit in the third state, or "float" the chip consumes more power. This is not what we want for battery powered wireless sensors! The jumpers that set the address will allow a "float" state to be set but this is primarily to stop jumpering from +5V to ground. This will mean a 2x3 DIL header for each addressing pin. The alternative is using a 4 way DIP switch tied to +5V with pull-down resistors to make sure that the address pins do not float. Any extra address pins will be tied to ground.

The transmitter board will be fitted with an IC socket for the SM-5162, a 6 pin molex header for use with the sensor or sensor board, a 2 pin molex header for power from the battery and a four pin SIL female header. This will be used to fit the transmitter module into. The transmitter board will have a built in +5V regulator on board.. Six pins are supplied to the sensor board/sensor they will be 4 data bits, +5V and ground - This will allow a multitude of different designs to be connected to it. The clock speed of the SM5162 will be set using a 2x4 DIL header and a single jumper to select the appropriate resistor.

The receiver board will consist of a pic16f877, an SM5172, a MAX232 level converter, a +5V regulator and their supporting components. The clock speed of the SM5172 will be set using a 2x4 DIL header and a single jumper to select the appropriate resistor. These will match with the transmitters values as per the clock speed table in the data sheet. The receiver board will communicate with the computer via RS232 Serial.

Data is logged on the computer and inserted into a MySQL database along with an address and a date stamp. Data will then be able to be reported or extracted in a number of ways and/or displayed on a website.