Thursday 13 April 2017

rf - How to connect 20 wireless sensors in one receiver with arduino?


I live in a house with many doors and windows and I plan - as an easy project - to be able to detect and see which door/window is open using simple leds. What I do not want to do is to have 2 or 3 wires for each sensor hanging on the wall or be on the floor... so I am searching for a way to connect simple wireless window/door contacts (rf 433mhz usually) sold very cheap on ebay. Also I do not want to have 1 receiver for each transmitter because it seems foolish, power & space consuming..



XBee is a very expensive way to do this. Bluetooth could be another option. What's your opinion ?



Answer



The sensors are battery powered and so to preserve power the sensor circuit must remain "off" most of the time. This means that the sensor only transmits when needing to transmit i.e. when the door or window opens or closes. This can be achieved with a low power 433MHz transmitter and a low power micro like a PIC. The PIC wakes up when the door or window switch changes state OR just wakes up every 5 minutes or so based on a low power timer oscillator.


All the windows and doors use the same methodology and transmission frequency. One receiver picks up the transmission and because sensors only transmit infrequently, collisions are few. However if collisions do happen this is unknown to the transmitter so, each transmitter should wake up on a slightly different timebase to avoid continual collisions and give the system a decent chance of working.


Each transmitter/sensor needs to encode it's own address in the data being transmitted so the receiver knows which device is sending data. It can even transmit a bit that communicates the battery status or using a lower power ADC the battery voltage can be transmitted.


The receiving radio stays on all the time and presents a micro with serial information that is decoded to light the various LEDs. Not a trivial project but a good one to do.


I did a freezer alarm system for a shop based on this very system. each freezer used a 433MHz transmitter and PIC and each transmitted based on a 20 minute period. Should one freezer start to defrost, a central control activated an alarm.


No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...