loading
In this instructable i'm gonna show you how to make an analog motion activated on/off light or appliance.This can be used to switch any appliance.I made this circuit analog because i've only been a hobbyist for 2 years and i did'nt have my fair knowledge of microcontrollers and programming(not that i hate them i think microcontrollers like arduino rock).This instructable can be  easy if you have at least a little experience in circuit building and soldering.you can see the working of the circuit and how it works in the video below.



i'm entering this for the epilog  challenge V and the kit contest .So don't forget to vote for me in the contests.I would like to win one of those laser cutters to make  enclosures,  parts and engraved materials for my projects and i could defenitely use the laptop tablet and the parrot drone.Thank you for viewing and once again don't forget to vote.

Step 1: Components :

IC's:
555 timer x1
LM741 opamp x2
4017 counter. x3
 
Resistors:
1M x3
47k x1
100k x1
100 ohms x1
1k x1
1.5k x1


Capacitors:
2.2uf (microfarads) electrolytic capacitor x1
0.1uf ceramic disc capacitor x1

Diodes:
1N4148 x5

Transistors:
2n3904 x1
2n2907 x1

5v spst relay

9v battery(if you're gonna use an adapter you don't need the 9v battery and snap) 
9v battery snap

 PCB board x1(the following is only if you're gonna solder it)
solder.
solid core wire .
DIL sockets(if you're soldering)

Optional:
a breadboard(if you want to prototype it)





*the picture is for representation purposes onlyand does not represent the components used in this project  and i do not own the copyright of the image

Step 2: The Schematic:

The schematic is given below.it would be better if you built it in 3 different parts-like i have done it.
The 555 timer circuit:
-connect  pin2 to pin6
-connect pin 4 to pin v+
-connect pin 1 to V-
-connect pin 8 to V+
-connect a 47k resistor between pins 6 and 7
-connect a 100k resistor(you may have to experiment with this value)between pin 7 and V+
-connect the positive of the capacitor to pin 2 and the negative of the capacitor to V-
-connect pin3 to the emitter of the 2n2907 transistor.
______
the first part is complete


The proximity sensor:
-connect pin4 to V-
-connect pin7 to V+
-connect a 1M reistor between V+ and pin2
-connect a 1M resistor between V+ and pin3
-connect a 1M resistor between V-  and pin2
-connect the cathode(shorter lead) of the photodiode  to V-
and longer lead(anode) to pin3
-connect a 1.5k resistor between pin6 and the base of the transistor.

_______the second part is complete


The 4017 counter
-connect pin8 to V-
-connect pin16 to V+
-connect the anode(the end of the diode with no band) of 1n4148 diodes from pins 3,4,5 and 10 and connect the cathode(the banded end of the diode is cathode) of all the diodes.
-connect a 1k resistor between  the connected cathodes of the diodes and  the base of the 2n3904 transistor 
-connect the collector of the 2n2907 transistor to pin 14  
____the third part is complete 


Finishing up!
identify the pin contacts of the relay
-connect the emitter of the 2n3904 transistor to V-
-connect the collector of the transistor to either of the pin on both sides of the common pin of the relay.
-connect the other pin on the other side of the common pin of the relay to V+
-connect the cathode of the diode(banded end) to the pin where V+ goes into and the un-banded end(anode) to the collector of the transistor(pin on the other side of the common pin of the relay)*
-connect a 0.1uf capacitor between V+ and V-**
-connect a 0.1 uf capacitor between the 2 pins on both sides of the common pin of the relay**

HANDLE THIS PART OF THE CIRCUIT WITH EXTREME CAUTION :!!(-make sure you are not working with the relay when the 220v ac supply is on.)
-connect one of the two lines of the 220v ac supply to the common pin of the relay 
-connect the other line of the 220v ac supply to your bulb,cfl or appliance.
-connect the NO pin(normally open) of the relay to your appliance or bulb (if you don't understand this part see the schematic diagram)

.


Powering up!!
-connect the 9v battery with its polarity properly connected.
-in case you are using an adapter use an 100uF electrolytic capacitor between V+ and V-
-in case the circuit's not working properly  move on to the next step

*the diode is to make sure the relay does not turn off or on in case of voltage spikes
**the ceramic disc capacitor is used as a noise filter

in case you want to download  a pdf of the file the download is below,it's called AMTFL(analog motion triggered fluorescent bulb)

Step 3: Tips,Tricks ,Precautions and Sources of Error!

Tips and tricks 
-it's not that you have to switch an AC 220v load,you could even use an dc supply to light up your homemade table light or to roll up and down your venition blinds of your window.if you have made a version of this post a few images in the comment box or leave a link for me to see it.

Precautions and sources of error
Make sure you are NOT working with the relay while 220vac power suply is on.this is an absolute must.I am NOT responsible if you hurt yourself.BE  CAREFUL AND CAUTIOUS WHILE WORKING WITH AC POWER SUPPLIES.
-make sure you do not connect any two wires unwantedly .
for example:
pin4 runs over pin 3 and pin 2 to pin6 but IS NOT CONNECTED TO EITHER OF THESE CONNECTIONS .if you have any doubts leave it in the comment box ,thanks to steveastrouk and Josehf Murchison for helping me troubleshoot my circuits and once again be careful and in case i've made a mistake please notify me by leaving a comment and thanks for viewing my project.


I don't know why I can't reply posts. Vsuresh1 thanks for the explanation and I will build it immediately. Great Instructable
@Philiprocks <br>-you're welcome and if you think my instructable is good enough please vote for me in the epilog challenge and if you have any doubts with the circuit ,you can ask me and once again thank you.
<p>U have its working ?</p>
<p>block diagram of A Motion Activated On/Off Light or Electronic Appliance</p>
<p>I think(?) I see a fan in your bill of parts. What is this for? Also, can you upload bigger picture of the actual parts?</p>
<p>hey everyone: i assume this is a fake instructable, since there are so many inconsistencies between schematics and instructions, and i made this circuit and it doesn't work either way (following schems and instructions) (i'm an amateur at electronics).</p><p>but there's a nice comeback: i've learned a lot of theory of electronics, and i had to read a few books trying to solve this nonsense circuit....so....this was not an entirely negative experience for me (i mean making this non-working fake circuit). </p><p>greetings from argentina, south america.</p>
<p>Well Michel, maybe circuits don't really work in Argentina? Before you trash someone else's work be sure that you have got everything right . What with you being a genius amateur electronics hobbyist i'm sure there's no reason for you to be wrong . I'm 14 and this is one of the circuits i've ever made on a perfboard , so even if i made a mistake i can still correct it so cut me some slack man .Also if i was wrong I would be glad to accept it because that would only enrich my knowledge and it won't diminish my honour just because some person claims my work is trash </p><p>Greetings from tamilnadu, India , one of the few places where circuits work </p>
<p>hi Strontium, thank you for the reply. Please notice that i pointed an inconsistency between the schematics and the instructions a month ago. since you didn&acute;t answer my polite question at that time i had to assume that this is an abandoned thread. can you help me to make this circuit working? please read my first comment below here. thank you very much and have a beatiful day there :)</p>
<p>hi there, shouldn't it be: </p><p><strong><em>-connect a 1M resistor between V- and pin3</em></strong></p><p><strong><em>instead of:</em></strong></p><p></p><p><strong><em>-connect a 1M resistor between V- and pin2</em></strong></p><p><strong><em>?</em></strong></p><p><strong><em>:)</em></strong><br></p><p></p>
The 4017 makes a great &quot; flip flop &quot; circuit. I have used this before and have been able to go from the photo transistor direct to pin 14 of the 4017 with out any circuit in between. Altho using an op amp or transistor i think would give more stability in the long run.
@WWC <br>-you 're right ,The LM741 provides not only stability but also makes sure the relay does'nt switch itself on/off in case of a bright light source a little distance away from the sensor .i would also like to see your version of this circuit <br>
I have a doubt, &iquest;why you use de 4017?
the 4017 in this case acts as an on/off switch for the relay.the 555 timers provides clock pulses for the 4017 counter(it's actually a led chaser circuit i have modified),but the LM741 opamp does not allow the clk pulse to go into the pin14(clk in) of the 4017 counter until an object passes over the Proximity sensor and allows the transistor to allow the clk pulse into the counter.if you held your hand in front of the sensor for too long you will see that the bulb or whatever you're switching on/off would keep clicking on/off rapidly.i've tied alternate outputs of the 4017 counter so that instead of acting as an led chaser ,it acts as an simple on/off switch. <br>
handy useful circuit. thanks
@NealH <br>-you're welcome
handy useful circuit. thanks

About This Instructable

7,920views

65favorites

License:

Bio: I'm an electronics hobbyist.I have a humongous interest in electronics.I enjoy building circuits,experimenting with ICs and MCus and fiddling and opening ... More »
More by Strontium:Displaying numbers using a homemade arduino mini shield! DIY Pocket Sized Anti-Theft Alarm ! How To Make A Motion Activated On/Off Light or Electronic Appliance 
Add instructable to: