Automate and monitor the physical systems in your home
Relays and Sensors
The project requires both low-voltage and high-voltage relays. The low-voltage relays, acquired on eBay, are solidly built and mount to DIN rails. For high voltages, the Opto 22 120 D series relays have a footprint compatible with relays from other manufacturers and are small, well tested, and reasonably priced (Figure 2).
They also pass international safety standards, which can help you sleep at night, and can be controlled with small currents and digital logic levels – a good fit for this application.
Motion sensors for lighting and current sensors (see the "Current Sensors" box) are easily found on the web and in retail stores. The Senva C-1200 current switches chosen for this project are compact and don't require high-voltage connections. The doughnut switch has just two open/close signaling terminals – that's it. The high-voltage wires in a three- or four-way switch pass through the center of the doughnut, and, using electromagnetic induction, the sensor powers itself and does the signaling.
Current Sensors
Current sensors solve a ticklish problem: Some circuits have three-way and four-way switches. These kinds of switches show up when a device is controlled from two or more locations. A common three-way switching application is two switches that control one light. If someone says, "Turn on the light," you have to look at the light, see if it is on or off, and then decide whether or not to flip the switch. A control system is no different. If you tell the system to turn on a four-way switch, it needs to know whether the load is on or off before taking action. Current sensors make this possible.
Block Diagrams
Once the system was defined and the important hardware components identified, we created block diagrams to show all the hardware components and wires. Additionally, the diagrams identified all the virtual devices and wires supplied by the Virtual Wiring system. Much like real devices, Virtual Wiring devices are connected by wires – virtual wires, that is.
From among the many handy devices supplied by Virtual Wiring, we chose state machines, logic blocks, emailers, alarms, and timers. The state machines provide sequencing; logic blocks allow you to generate on/off-type functions from collections of inputs; emailers let you control the system by text and email; and timers turn lights and devices on and off. Virtual Wiring also has virtual Arduino devices, which give the Virtual Wiring system access to an Arduino's pins and pin functions.
In the end, the system had three Virtual Wiring systems running on three Pis: Pi1 had two Arduinos (Ruggeduinos 1 and 2; Figure 3), and Pi2 and Pi3 each had one Arduino (Ruggeduinos 3 and 4).
Buy this article as PDF
(incl. VAT)