My first project

Ok this is my first project :astonished: and I need some advice. So what I want to put together Is a lamp and a fan on my desk that will turn on when I sit in my desk chair. I also want it to turn off 30 sec after I leave my desk.

I'm thinking about using a ping sensor for detecting if someone is sitting in the chair. Where I need help is with the lamp and fan. I'm not sure how I need to wire these. Should I get some 12v relays?

Thanks for the help in advance.


With only 2 things to switch you can do it with a 2-relay board that will run from the 5V on the arduino itself. Like one of these:Opto-Isolated 2 Channel Relay Board This type relay draws about 80 ma so 3 or 4 is the max relays you can run before you need a separate 5V supply..

The ping sensor could be good. It's more of an 'occupancy' sensor and will not turn off if you doze off like a motion sensor.

Take a look about Arduino Power here:

DISCLAIMER: Mentioned stuff from my own shop...