I've got a relay switching problem.

i've got a relay problem.i made a proximity sensing tubelight that goes on/off when an object moves above it .i used 3 ic's :lm741,cd4017,and a 555 timer and i added a relay to the outputs of the cd4017 counter to the relay via a transistor to protect my ic's.however when i don't connect the 220v ac to the load of the relay it functions fine but when i connect 220v ac to the load ,the relay keeps clicking on and off.i have seen the voltage ratings for the relay .it is a 5v relay and can handle 250 v ac but it does not work properly.The whole circuitry is powered by a 9v battery.i am not sure whether it is a problem of not enough power or something else..i'm a electronics hobbyist and i need help .PLS ANSWER?.

sort by: active | newest | oldest
There is no sign of ANY capacitors for the power supply.
Can you now post a picture of the actual board ?

Your layout should be small, neat and tidy. Right where the battery connects to the board, put a big fat electrolytic cap - 100uF is ideal. Across THAT put a 100nF cap. Its also good practice to use 100nF across the logic chip.

The 741's pin 4 MUST go to ground.

The 741's pin 7 could go to pin 4 of the 555 to switch the output of the timer on and off. When the opamps putput is high, you get pulses of on/off from the 555. When its low, the 555 is off, and the relay would be off too.

AND CRITICALLY you have NO diode across your relay. The cathode (banded end) goes to the +9 rail and the anode goes to the top of the transistor.
Strontium (author)  steveastrouk4 years ago
i will also upload an image or a video soon and once again thank you
Strontium (author)  steveastrouk4 years ago
thank you for answering my question but isn't pin 7 of the lm741 the
+V pin? did you mean pin 6 .pls answer
Yes, pin 6
You are getting electronic noise from the mains into your circuit. Put some pictures of what you have made and the circuit diagram and I will are I'd we can improve things for you.
Strontium (author)  steveastrouk4 years ago
i will upload a image soon but for now try visualizing the circuit like this.a lm741 is used to compare voltages and is used as a proximity sensor that switches on a transistor with its emitter connected to
the pin 3 output of the 555 timer which is connected to the clk in pin of the 4017 counter via the collecter of the transistor . alternate outputs are seperated and tied together with a 1n4148 diode from every output so when a clock pulse is allowed by the proximity sensor into the clk pin of the counter the outputs keep changing however here i have tied the alternate outputs so that it acts as a basic on /off switch with only one set of the outputs connected and the other set left unconnected .the set of the outputs which act as the on switch go to the base of the transistor via 33k resistor to power the relay.It works fine without the 220v load connected to the load of the relay however when when the load is connected and i try switching it on through the proximity sensor ,the ac bulb keeps turning on and off ,it does'nt stay on but stays off .i am using a spdt relay.if i am getting electronic noise from the mains in to my circuit what should i do?.Pls answer
You don't REALLY expect me to work out what is happening from a VERBAL description of a circuit ? I NEED to see a circuit diagram.
Strontium (author)  steveastrouk4 years ago
well here is the diagram .if you have any doubts about it ask me and sorry for my schematic drawing skills ,i'm only 13.and sorry i could only give you my hand drawn version and not the digital one.
EXCELLENT diagram. For future reference, always TRY and make your power connections to a device so that the +ve ones are at the top, and the negative ones on the bottom of the package.
Crystal ball broken again! :-)