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 ?

  • \$\begingroup\$ check out node.wickeddevice.com / receivershield.wickeddevice.com ... they might be a good fit on price / performance depending on what you want to do \$\endgroup\$
    – vicatcu
    Commented Jun 27, 2013 at 13:14
  • \$\begingroup\$ How are you going to apply power to the window/door sensors? Battery powered? How long will batteries last? \$\endgroup\$
    – Andy aka
    Commented Jun 27, 2013 at 13:19
  • \$\begingroup\$ @Andy aka batteries, and I hope I can expand later with tiny solar panels to rechargeable batteries. Also I plan to work on lowering the power consumption. \$\endgroup\$
    – Radolino
    Commented Jun 27, 2013 at 13:39

3 Answers 3


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.

  • \$\begingroup\$ I don't want to use an avr for every transmitter because this is going to increase too much the cost and the construction time. \$\endgroup\$
    – Radolino
    Commented Jun 27, 2013 at 19:07
  • 1
    \$\begingroup\$ @RobertoDelgazzo The ATtiny5 costs about 75cents from what I can see and a single way only transmitter maybe about $3 - do you have your cost priorities correct? \$\endgroup\$
    – Andy aka
    Commented Jun 27, 2013 at 19:13
  • \$\begingroup\$ how is going ATtiny5 to be powered ? \$\endgroup\$
    – Radolino
    Commented Jun 27, 2013 at 19:58
  • \$\begingroup\$ I have some spare ATTiny26 and ATtiny45 in my drawer, so it seems a nice idea I could say... but I am still thinking, If the tiny's are going to consume much energy and drain the battery. Also, considering that I choose this path to implement my project, what else should I need? I mean, can I order a pack of 10 receivers/transmitters from ebay and keep only one receiver when all transmitters send data in one receiver at the same frequency ? \$\endgroup\$
    – Radolino
    Commented Jun 27, 2013 at 20:12
  • \$\begingroup\$ Supervision is the key. You have to find a way of switching off the radio transmitter and MCU so that long periods they consume no current. The ATTiny can run from internal RC (I think so please check) and this means, from power-up it can transmit a data preamble and then data in maybe 10 to 20 msecs. You should be able to find a source of transmitters and buy only one receiver. I am confident this can be done. Think about probablity - if all transmitters "send" on a slightly different timeframe, collisions will happen but be minimal. \$\endgroup\$
    – Andy aka
    Commented Jun 27, 2013 at 21:08

You have several options, and two of them are ::

  • use a simple TX-RX modules on the frequency you want, but you have to do the modulation/demodulation and packet codec

  • use a TX-RX chip modems where everything is taken care for you, you just have to setup the internal registers and send fill the transmission buffer to TX or read the reception buffer to RX. It has handshaking, auto ACK and retransmission... eg: Nordic nRF24L01+ or HopeRF

  • \$\begingroup\$ what about jeenodes? \$\endgroup\$
    – Radolino
    Commented Jun 27, 2013 at 12:44
  • \$\begingroup\$ also, is hope rf and nordic nRF24L01+ able to work without an arduino as transmitters? I mean, having 10 DS18B20 digital temperature sensors and an rf transmitter will each require an arduino to work or are they stand-alone ? Firstly I am interested in simple on/off information (from magnetic window contacts) but I keep an eye for the future also :) \$\endgroup\$
    – Radolino
    Commented Jun 27, 2013 at 12:54
  • \$\begingroup\$ Indeed you will need a uC to pair with them. Nordic has the nRF24LE1 that is a uC+RF on the same package, i think an 8051 core with the radio on the side, very neat and easy to program. TI, Silabs and others have similar solutions. \$\endgroup\$ Commented Jun 27, 2013 at 13:06
  • \$\begingroup\$ Is it worth it, I mean the programming ? All I want is a simple on/off wireless switch. \$\endgroup\$
    – Radolino
    Commented Jun 27, 2013 at 13:34

I did a similar project last year, in which i used an arduino BT board. Though, my sensor were not wireless, i found that i would be able to connect 9 sensors (simultaneously) to a single arduino board, using all available pins (digital as well as analog). Then i controlled all those sensor using mobile application.

Okay so that was mine project, now lets talk about yours, you want to use around 20 sensors, so you can go for pin multiplexing, like you can assign a single pin for 3/4 sensors, in this way, you will be able to control all of them using single arduino board.

Here is the link for Arduino Bt board

I think using arduino Bt would be simpler and cost effective solution.

Also later, you can have sensor data on your mobile application from BT board, and you will not need led's anymore.

  • \$\begingroup\$ the problem is that I want to spread 20 sensors in different areas of the house. I mean, 10 windows (small or large ones), one main door and several others, so I can't have one arduino in each place or run down then wall cables to interface some kind of one arduino in each room/4 sensors on it. \$\endgroup\$
    – Radolino
    Commented Jun 27, 2013 at 13:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.