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”

Parts: Analog Distance Sensors (Sharp GP2D12/2Y0A02)

[youtube=http://www.youtube.com/watch?v=iGiRK0vmcUw]

Sharp GP2D12 and 2Y0A02 infrared rangers output a voltage proportionate to the distance of an object from the sensor.  The GPD12 senses objects at a distance of 10-80cm, while the 2Y0A02 has twice the range.

We’ve previously looked at the Sharp GP2Y0D02 digital proximity sensor. It only signals the presence of objects, while the GP2D12 and 2Y0A02 measure distance to them. If you’ve got a GP2YoD02, it might still be possible to tap the analog output. We’ll show you how use these sensors below.

Continue reading “Parts: Analog Distance Sensors (Sharp GP2D12/2Y0A02)”