I sell on Tindie

Tuesday, May 22, 2007

Atiny13 and Sharp proximity detector

This is Atiny 13 available from http://www.sparkfun.com
It is AVR microcontroller with 4 A/D channels.

And this is a Sharp GP2Y0A02YK proximity detector available from http://www.junun.org

I've decided to build a small system that turns on the light in my stairs room when someone comes. I've connected proximity detector to one of A/D inputs and connected a relay to one of outputs. After this I've written a small program that turns on relay when proximity is closer than 50 cm. And turns relay off after 1 second. Like a button next to my entry door.
This is a sensor on my door:


And system connected to light button contacts

The power (12 volt) is supplied via Ethernet cable.

Finally it looks like this:

1 comment:

Anonymous said...
This comment has been removed by a blog administrator.