Monday, January 25, 2016

Motion activated switch mains modification

A 3 Watt  LED is fine for a night light but wouldn't it be better to be able to switch a bigger load like the lights connected to the mains. Well I redesigned to act as 220 Volt motion activated switch, taking into consideration that I have a lot of junk laying around in my lab taking up space. So with the help of an old 5.7 Volt Nokia cell phone charger and a low voltage drop regulator (AMS1117 5V) I had exactly 5 Volts for the motion sensing sensor. The thing with that sensor is that it is a dirt cheap ebay ordered sensor with little to almost no documentation. In order to isolate the low voltage circuit from the high voltage circuit I used a MOC3061 from my stash and a BTA16 to do the actual switching. MOC3061 needs 15mA to signal the BTA16 to turn on which is not a lot so I figured that it is something the sensor's output could handle. I was wrong. The voltage rised to 1V when the sensor's output was high which very low for MOC3061 that needs at least 1.5V. Next step was to find something to amplify the signal, and what's better than the old trusty 2N2222A that a number of them I have in my possession for about 20 years. I actually bought them when I was in High school. One resistor to the base of the transistor and we are rolling. The motion sensor switch is now switching a big 30W CFL light bulb. This is the schematic diagram :
And here is a photo :

Wednesday, January 20, 2016

Motion activated night light

Last night our neighbors were robbed while being inside the house. Tonight I was feeling uneasy and wanted some way to be able to know if someone is in the house. So I searched my lab and found a motion sensor I had ordered a couple of years ago and a 3 Watt white LED. Laying around was also a 12 Volt power supply from an old router, a dirt cheap DC-DC converter that I had ordered in bulk and some resistors. There was only one ingredient missing, the MOSFET. I have an envelope filled with all kinds of electronic components in a TO-220 package. After a while and many 7805 regulators I found one that luckily could work with the 3.3V output of the motion sensor. I connected the power supply to the DC-DC converter and configured it to 4V accounting for the losses from the transistor. The converter's negative pin was connected to the sensor's negative pin and the transistor's source pin. The converter's positive pin was connected to the sensor's positive pin and the LED's positive pin. The sensor's output was connected to the translator's gate through a 220 Ohm resistor. Finally the LED's negative pin was connected to the transistor's drain pin. I double checked the connections and plugged it to the mains. And voila, a motion activated night light. Now I can sleep a little easier. Here is a picture of the contraption