Wireless Relay Control with XBee
Many times you need to remotely control a relay, electrovalve or some other electronic or electromechanical device, and many times wirelessly. With XBee modules things become very easy. Very versatile and having small dimensions it is easy to add it to your projects.
In this demonstration the modules are set to wirelessly control two types of relays, standard and latched. To achieve this you will need to configure the analog inputs of the Xbee to digital I/O. In the given schematics the standard relay is driven by a general purpose NPN transistor T1. Some relays already have the protection diode incorporated, if not you will need to use D1 as shown.
The latch relay is driven by a hex inverter IC connected as a buffer. Each inverter changes the logic level from high to low and from low to high so you must cascade two inverters to preserve the logic level. This type of relay is activated by pulses so it needs a small amount of current. Even so the output capability of a single inverter might not be enough so the remaining inverters are connected in parallel.
On the transmitter side you have two push buttons connected between ground and the digital I/O ports of the XBee. There is no need for pull-up resistors because this is done internally in the Xbee.
This demonstration has lots of practical applications. You can connect almost anything to those relays or use the digital output of the module with a buffer to control other devices or transmit information.









April 28th, 2009 at 6:01 pm
[...] different ground. Also these inputs are very helpful if you want to use a wireless module like the XBee. A PNP transistor is used to drive these inputs without any [...]
January 22nd, 2010 at 11:57 pm
Hey, that was very cool. I have a project to make a swimming pool filter and heater controller. I am thinking about going your way. But I also need to take water and air temperature. I am thinking about using Arduino, Xbees and an LCD display. Any idea how to hook up sensors to Xbees?
January 23rd, 2010 at 12:07 am
A starting point is to get 2 arduinos, use one on the remote site with the sensors, relays and xbee, and one local with the LCD and xbee.
January 23rd, 2010 at 12:30 am
I was hoping that there was a way to simply hookup one Xbee to the water temperature sensor, another one to the air temp sensor, two other xbees for two relays, and have them report and listen to the remote Arduino/Xbee. Basically one controller. B/C often pool, filter, heater wont be close to each other. I have also a very limited budget, $100.