Home Automation Hack Controls Lights Based On Head Count

This home automation hardware turns on and off the lights based on room occupancy. The hack is an extension of an earlier version that was only a proof of concept. [RPisces] took the idea and made it into reality by mounting the sensor hardware in a doorway.

He prototyped the device using the MSP430 launchpad. It monitors a pair of IR distance sensors which record a change when something passes between them and the opposite side of the hallway. This is a good sensor choice as it only requires hardware on one side of the passageway. Because two of them are used, it’s quite simple to figure out if a person is entering or leaving the room based on which is tripped first.

In this case [RPisces] drives a relay to switch a lamp on and off. But it could be used for just about anything. We’d enjoy seeing it trigger an audio system like the one [Quinn’s] installing in every room.

Proximity Switch For Your Mains Devices

[Ivan’s] friend built a proximity sensor to switch his LED bench lighting off every time he walked away. The idea is pretty neat, so [Ivan] decided to implement it for mains devices by making this proximity switched outlet box.

A Sharp GP2D12 infrared distance sensor is the key to the system. It has an emitter and receiver that combine to give distance feedback base on how much of the light is reflected back to the detector. This is presented as a voltage curve which is monitored by an ATtiny85 (running the Arduino bootloader). It is small enough to fit inside the outlet box along with a tiny transformer and linear regulator to power to logic circuitry. The mains are switched with a relay using an NPN transistor to protect the chip’s I/O pins.

Check out the video after the break to see this in action. It should be a snap to add a count-down timer that gives you a bit more freedom to move around the workshop. With that in place this is a fantastic alternative to some other auto-shutoff techniques for your bench outlets.

Continue reading “Proximity Switch For Your Mains Devices”

Building Sensors For The Scratch Programming Language

[Kevin Osborn] is making it a bit easier for young programmers to write programs that interact with the physical world. The device he’s holding in the picture is an Arduino based accelerometer and distance sensor meant for the Scratch language.

Scratch is a programming language developed at MIT. It has kids in mind, and focuses on graphical building blocks. This can make it quite a bit easier to introduce youngsters to programming concepts without the roadblocks and gotchas that come with learning syntax.

As you can see in the clip after the break, [Kevin’s] Arduino sketch includes hooks that automatically pull the accelerometer and distance data into the Scratch environment. We figure his example provides everything you need to get just about any type of sensor up and running, be it a magnetometer or LDR (both of which would make a nice burglar-alarm type project). Give it a try with your own hardware and see what you can accomplish.

Continue reading “Building Sensors For The Scratch Programming Language”