Arduino Forum

Using Arduino => General Electronics => Topic started by: twang on Jan 11, 2014, 06:23 am

Title: 555 timer not resetting when connected to two relays...
Post by: twang on Jan 11, 2014, 06:23 am
Hello World!

I need to bug you again on this recent issue I have.
Attached is the circuit diagram.

The basic function is that a 555 timer oscillates a slow square wave to turn two relays ON and OFF. The relays serve as an H - Bridge to the motor. If it is ON it turns one way, if it is OFF it turns another way.

The problem that I have been running into is that when I turn on the circuit, it turns ON the relays
Good.
Then after the right amount of time (100 uf), the relay does not switch OFF but instead a faint buzzing sound is heard.

I tested the 555 circuit without the relays: it read a good 9v to 0v.
I tested the 555 circuit with one relay. It worked fine.
When I connected the second relay, both turned on, but they did not turn off. Voltage was 9v, then 2-3v, not 0v.

I've done some reading and is it a possibility that it has to do with pin 4? I tied the pin to GND and to 9v. It did not solve the problem.


I want to thank the person in advanced who will answer this question. Whoever answers with a working solution first gets 5 Dogecoins!  :smiley-mr-green: :smiley-mr-green: :smiley-mr-green: :smiley-mr-green: :smiley-mr-green:

Thank you.
Title: Re: 555 timer not resetting when connected to two relays...
Post by: michinyon on Jan 11, 2014, 06:32 am
check how much current your 555 device can provide,   it is unlikely to be enough to power a relay coil.
Title: Re: 555 timer not resetting when connected to two relays...
Post by: TomGeorge on Jan 11, 2014, 07:52 am
Hi, check where pin 4 should be connected, it is the reset pin, lookup data sheet.
Also 0.1uF cap from pin5 to neg power supply to help with bypassing.
Also diodes should be fitted across coils of relays to suppress back emf.
Diode Cathode to positive end of coil, Diode Anode to negative end of coil.

Tom... :)
Title: Re: 555 timer not resetting when connected to two relays...
Post by: MarkT on Jan 11, 2014, 05:25 pm

check how much current your 555 device can provide,   it is unlikely to be enough to power a relay coil.


200mA is the output capability of a 555, check the rating of the relay.

Never ever drive a relay coil without a flyback diode across the winding, you will
probably destroy your circuit.  Each winding needs a flyback diode across it, connected
anode to ground.  Lose the other diode in your circuit, its a mistake.

The 555 itself needs decoupling, and you need to wire it up right as has been described,
Title: Re: 555 timer not resetting when connected to two relays...
Post by: twang on Jan 11, 2014, 07:59 pm
HI all,


Now, I still need to try adding flyback diodes and a 0.1 uf capacitor; thanks for telling me!
I'm assuming I only need one diode for the two relays? The ends of the coil are connected to each other

Don't forget to include your dogecoin address!
Title: Re: 555 timer not resetting when connected to two relays...
Post by: twang on Jan 11, 2014, 08:27 pm
OK.

So I added one flyback diode for the two coils (because they are connected in parallel) and removed the diode from pin 3.

Sadly, it did not change anything :(

Does anyone know why it would work on Arduino blink but not the 555 timer?
Title: Re: 555 timer not resetting when connected to two relays...
Post by: MarkT on Jan 11, 2014, 09:44 pm
As I said you've likely destroyed your circuit by not having the diodes present, you'll
have to check everything is working without the relays, then check the relays take 200mA
or less when powered direct from the supply, and always always have those diodes across
the terminals - you can destroy your power supply even.

A relay coil stores a lot of magnetic energy when active, trying to switch it off without
providing an alternate route for the current (via the diode) can lead to 100's or 1000's of
volts spike, enough to trash most semiconductor devices immediately.
Title: Re: 555 timer not resetting when connected to two relays...
Post by: twang on Jan 11, 2014, 10:45 pm
Quote
As I said you've likely destroyed your circuit by not having the diodes present, you'll
have to check everything is working without the relays, then check the relays take 200mA
or less when powered direct from the supply, and always always have those diodes across
the terminals - you can destroy your power supply even.

A relay coil stores a lot of magnetic energy when active, trying to switch it off without
providing an alternate route for the current (via the diode) can lead to 100's or 1000's of
volts spike, enough to trash most semiconductor devices immediately.


Thanks MarkT for your recommendation!

I disconnected pin 3 from the relay. It still goes from 7v to 0v (My 9v battery seems to be dying). So that is still working

I tested the pin 3 with each of the coils individually with a flyback diode. IT WASN'T WORKING.
I apologize for the confusion at the beginning of the forum post; my memory was jogged wrong. It worked on the Arduino for one relay, but I never tested 555 with one relay. The 555 could turn on the one relay but it could not turn it off.

SO I found another clue
Code: [Select]
digitalWrite(13, LOW);
Even though that does not really matter to me, I wanted to say it just in case the forum made any use of this.
I should also mention that I have tried using pulldown and pullup resistors to the relay / pin 3. That did not help.

I don't think this will help but will it help if I mention that the chip that I am using is rather old? The HA17555 is what I'm using, and I'm assuming it's pretty much compatible with any other NE555 or NM555 or LMC555 or whatever555.

SO in conclusion from what MarkT recommended me to do, the 555 circuit is not damaged, but I realized that the 555 circuit does not even work with ONE relay. I can turn on ONE relay but I cannot turn it off.

I hope there are more problems with the circuit that people can find, because I feel like we are running out of solutions!
Title: Re: 555 timer not resetting when connected to two relays...
Post by: TomGeorge on Jan 11, 2014, 10:49 pm
Reply #2
Quote
Also 0.1uF cap from pin5 to neg power supply to help with bypassing.

Have you tried that?
You could also put 100uF Cap across the supply pins of the 555 as well.
See you are trying to get 50% duty by using 1K for Ra, from what I have found when you have high values of C the discharge pin 7 has problems discharging the cap through 10K with 1K to supply.
There is a special circuit configuration for 50%.
Replace the 1K with a 10K, the frequency will be lower and the duty cycle will not be 50%, but it will check the theory

Tom... :)
Title: Re: 555 timer not resetting when connected to two relays...
Post by: MAS3 on Jan 11, 2014, 10:56 pm
HA17555 was Hitachi's (hence the HA in the typenumber) equivalent to NE555.
Hitachi has put it's chip division in a new company called Renesas some time ago, and this company has merged several other brands into Renesas since.
You can find this information in the datasheet (http://documentation.renesas.com/doc/products/linear/rej03d0681_ha17555.pdf) for this part.
Title: Re: 555 timer not resetting when connected to two relays...
Post by: twang on Jan 11, 2014, 11:01 pm
Hey Tom,

I just tried that a minute ago, attaching 104 from 5 to GND and a 470uf from Vcc to GND (I ran out of 100 uf).

It did not affect it, except the buzzing/whining sound starts of more articulated than it did before... I'm not sure if that is progress but if it is then cool!  :P

EDIT: Then I tried switching 1k to 10k. It is definitely slower, and the buzzing/whining noise is much lower. It sounds like the relay is stuck or something; some oscillation going on of course.

Thanks MAS3 for verifying that I can use this 555 timer!
Still not solved :(
Title: Re: 555 timer not resetting when connected to two relays...
Post by: twang on Jan 11, 2014, 11:15 pm
IMO, I think that the relay not resetting is because the 555 timer is for some reason not grounding pin 3 when it is connected to the coil
It usually grounds after the set amount of time, but when connected to the coil, even with a flyback diode, it doesn't.

So I'm assuming it has something to do with the relay or coil... And I am not sure what.
Title: Re: 555 timer not resetting when connected to two relays...
Post by: TomGeorge on Jan 11, 2014, 11:26 pm
Hi, the relays you are using are they 9V or 5V, the spec you linked to says 5V.
Put the relay coils in series, they might operate with 4.5V on each.

Tom..... :)
Title: Re: 555 timer not resetting when connected to two relays...
Post by: twang on Jan 11, 2014, 11:38 pm
Quote
Hi, the relays you are using are they 9V or 5V, the spec you linked to says 5V.
Put the relay coils in series, they might operate with 4.5V on each.


Thanks Tom,

I just did that. I definitely notice a extremely short delay between relay clicks when compared to parallel.

After that click and the amount of time, instead of hearing a whining/buzzing I barely hear this extremely faint sort of hiss that lasts for a fraction of a second, then nothing.

The relay is still not turning off...

EDIT: I'm pretty sure it's not a (lack of) power issue, or my floating (now not floating) pin 4 and 5.

Still an enigma...
Title: Re: 555 timer not resetting when connected to two relays...
Post by: polymorph on Jan 12, 2014, 04:46 am
Is that one of those 9V transistor radio batteries? Sorry, don't know what else to call it. A rectangular 9V battery with snap connectors on the end?

If so, the relays are probably drawing the battery down too far for the circuit to operate correctly.

What you posted was a pictorial. Could you post either a redrawn pictorial or preferably a schematic, the version of the way your circuit is connected now?

The way you had the diode in series with the coils provides no protection at all. The diode must be in parallel with the relay coil, placed so it is normally reverse biased when the relay is powered. With the relays in parallel, you'll only need one diode.

(http://www.learnabout-electronics.org/ac_theory/images/Protection-Diode.gif)

Title: Re: 555 timer not resetting when connected to two relays...
Post by: twang on Jan 12, 2014, 04:53 am
hey polymorph,

Yes, I am using the 9v battery.
Are you saying that the relays are drawing too much power? If so, I think that the relays work just fine without the 555 circuit. These are 5vdc relays

Sorry about the pictorial, I am very accustomed to my SCH drawing software. I'll draw another one of what it is now.

I understand the diode I added did nothing, I have them parallel now.


But say... you have a transistor there to ground it. I'm using the 555 timer to send HIGH pulses straight to the coil. Are you suggesting that I should be sending HIGH pulses to ground the coil using the transistors?

Title: Re: 555 timer not resetting when connected to two relays...
Post by: twang on Jan 12, 2014, 05:13 am
To all:

After I followed all of your suggestions this is what the circuit came out to be: http://i.imgur.com/FawPWnN.jpg (http://i.imgur.com/FawPWnN.jpg)

I'm still running into the same problem ... :(

It works on arduino as a clock, but not as 555.
I have not tried using 555 to use transistor to switch relay yet however; should it make a difference?
weeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee!


Wow this marquee thing is cool.
Title: Re: 555 timer not resetting when connected to two relays...
Post by: polymorph on Jan 12, 2014, 06:38 am
What are the coils of the relay rated at? 5V, OK, but what current?

I just grabbed an image from the internet to illustrate how the diode is connected. Whether or not the 555 can drive two relays without a driver transistor depends on three things: A robust battery of the -correct- voltage, how much current the relays require, and which version of the 555 is this? The TLC555 is CMOS (some others are, too) and won't source or sink enough current for any relay. The venerable TTL version of the 555 can source and sink 100mA or more. But there are probably 10 different versions of the 555 timer, all with slightly different characteristics.

Have you tried measuring battery voltage while this is operating? I would normally expect a stiff 9V supply to burn up a 5V relay coil.

Pin 4 -must- be connected to Vcc. It might work for a short time without doing so, but it will fail. That is the Enable pin.

Much clearer pictorial.
Title: Re: 555 timer not resetting when connected to two relays...
Post by: TomGeorge on Jan 12, 2014, 06:49 am
Hi, relay is 5V coil, 55R  so   5/55= 90mA.
So in series with 9V,  9/110= 81mA, so 555 should handle current.

Tom.... :)
Title: Re: 555 timer not resetting when connected to two relays...
Post by: polymorph on Jan 12, 2014, 06:55 am
But if not in series, 27 ohms on 9V is over 300mA, more that any 555 is rated to handle. And way more than a little 9V battery can handle.

If it is 7V without a load now, it is dead.

Put them in series as suggested with a new battery. We still need to know which 555 - SN555? NE555? TLC555? Some other variety?
Title: Re: 555 timer not resetting when connected to two relays...
Post by: twang on Jan 12, 2014, 02:42 pm
Hi,

I guess this forum has been long :P
Earlier I mentioned that I am using the KE17555.

Also, I ak pretty sure the circuit can handle the coil; I tried connecting pin 3 to the relays in parallel and in series, and I get pretty much the same results.

The 555 timer can turn ON the relays, but it cannot turn it off. How I enterpret this is that the 555 timer has enough power, if it can activate the coil.
I think I am misunderstanding something? Its likely that the folks helping me.are.saying something that is going right over my head...

Thanks!
Title: Re: 555 timer not resetting when connected to two relays...
Post by: twang on Jan 12, 2014, 02:47 pm
And also, I have tried earlier connecting pin 4 to power, and it did not change anything. I will try one more time, as soon as I'm home.

But isn't pin 4 connected to Vcc internally, with a 100k resistor?
Title: Re: 555 timer not resetting when connected to two relays...
Post by: cjdelphi on Jan 12, 2014, 02:51 pm
Your schematic does not look right.

Pin 2 detects a low signal.
Pin 6 detects high (causing pin 7 to discharge it)

Title: Re: 555 timer not resetting when connected to two relays...
Post by: cjdelphi on Jan 12, 2014, 02:53 pm
(http://www.eleccircuit.com/wp-content/uploads/2009/08/simple-pulse-generator-by-ic-555-timer.jpg)
Title: Re: 555 timer not resetting when connected to two relays...
Post by: cjdelphi on Jan 12, 2014, 02:57 pm
I believe this is a wiring issue.

But really though, dump the relays for Transistors.
Title: Re: 555 timer not resetting when connected to two relays...
Post by: twang on Jan 12, 2014, 03:02 pm
Huh...

It works without the relays though... If I were.to connect an LED with a resistor after pin 3 instead of a relay, it blinks fine.

I know that this circuit is not really common; I'm using a sort of extremely simplified version with less components. If you look at my original schematic at the beginning, you might notice it seems lacking, but it does work. I've used this minimalist circuit in other applications.
Title: Re: 555 timer not resetting when connected to two relays...
Post by: cjdelphi on Jan 12, 2014, 03:10 pm
Then it has to be a current issue then!

Measure the voltage drop of the battery when in atable.
Title: Re: 555 timer not resetting when connected to two relays...
Post by: twang on Jan 12, 2014, 03:10 pm
And about the relays to transistors,

I guess I could, but the whole point was to use the relay as the h-bridge, and not transistors, which would heat up and drop current. I also am on a budget so I don't want to buy any h-bridges


I think I should mentioned again that it works on Arduino With the blink sketch... If this circuit is not working should I just use arduino instead?
Title: Re: 555 timer not resetting when connected to two relays...
Post by: twang on Jan 12, 2014, 04:33 pm

Then it has to be a current issue then!

Measure the voltage drop of the battery when in atable.


I'm a bit confused... The 555 timer is capable of activating the coils but NOT turning them off... There is enough power: voltage for sure, and current I'm assuming there is enough because the coils do activate.

It doesn't turn off. Instead it drops to something around 3 volts and you hear a faint  buzzing sound from the relay as if it really wants to turn off but cannot...
Title: Re: 555 timer not resetting when connected to two relays...
Post by: twang on Jan 12, 2014, 04:47 pm
Wait a minute I think I'm starting to understand: the 555 may have enough current to turn on the relay, but the current draw screws with the 555 and the 555 cannot turn pin 3 off?

Is that what everyone is trying to say?
Title: Re: 555 timer not resetting when connected to two relays...
Post by: MAS3 on Jan 12, 2014, 06:58 pm
The 555 charges a capacitor.
If it is at a certain level, the output is changed and the capacitor is discharged,

Your relays may draw too much current and cause the circuit to oscillate (which it was designed to do anyway, but at a different frequency).
That would be caused by an instable power to the entire circuit, triggered b y the relay current.
This oscillation is probably what you hear as the buzzing noise.
A diode can be compared to a transistor.
Why don't you try to use a transistor to switch the relays and see what that does for you?

A H bridge consists of transistors, but it can not be  built with just a single transistor.
Title: Re: 555 timer not resetting when connected to two relays...
Post by: twang on Jan 12, 2014, 07:16 pm
I think I finally get it now!
I will add a transistor and I will post about the results


Why don't you try to use a transistor to switch the relays and see what that does for you?

A H bridge consists of transistors, but it can not be  built with just a single transistor.



I did not understand when it was mentioned to use transistors; I thought that I was being told to replace the relays with a 4 transistor h-bridge. I built this h-bridge before and I didn't like it. It drew too much current.

So this is what I plan to do with the transistor, the picture polymorph showed:
(http://www.learnabout-electronics.org/ac_theory/images/Protection-Diode.gif)

I'm not that transistor savvy :smiley-sweat: ; I'm planning on using a 2n2222 with a 1k resistor before the base?
The last time I used the 2n2222 with 9v I ended up using the TIP 31 instead...
Title: Re: 555 timer not resetting when connected to two relays...
Post by: MAS3 on Jan 12, 2014, 07:22 pm
That should do.

Maybe it would be a good idea to play a bit more with transistors, because understanding those will be of great help to you in future projects.
Title: Re: 555 timer not resetting when connected to two relays...
Post by: twang on Jan 12, 2014, 07:51 pm
Yea thanks a lot MAS3,

I've played with the 2n2222 before, but one project got me extremely confused.
I understand that by applying current to base (a small current; a signal) it will connect collector to emitter.
One project I applied small current to base and small current went through the collector to emitter; only when I had the same current did it flow properly.

The TIP 31 worked the way I expected it to.

I guess I will start playing with transistors more and try to learn the math.
wow, V=IR is still something hard for me to comprehend.

I will add a transistor soon and follow up with the results.
Title: Re: 555 timer not resetting when connected to two relays...
Post by: polymorph on Jan 13, 2014, 06:34 am
You keep saying "but it is working", but it is not or you wouldn't be here. Since you won't believe any of us about connecting pin 4 to Vcc:

http://www.555-timer-circuits.com/common-mistakes.html

Quote
3. The reset pin (pin 4) is internally tied HIGH via approx 100k but it should not be left floating as stray pulses may reset the chip.


I cannot find any information on a KE17555 timer. I am familiar with the 7555 from a variety of manufacturers, they are CMOS 555 timers and don't do well with big loads on pin 3.
Title: Re: 555 timer not resetting when connected to two relays...
Post by: twang on Jan 13, 2014, 06:43 am
Thanks, polymorph,

I was misunderstanding the "current issue" the whole time it was mentioned  :smiley-sweat:
I'll tie pin 4 to Vcc and I will add a transistor... as soon as I can get my hands on this circuit again.

Title: Re: 555 timer not resetting when connected to two relays...
Post by: twang on Jan 18, 2014, 06:45 pm
Hey it works!

Thank you everyone for helping me out with this.

You can see what I was doing here:
http://www.instructables.com/id/Another-Chemical-Agitator/ (http://www.instructables.com/id/Another-Chemical-Agitator/)
http://tsjwang.blogspot.com/2014/01/pcb-agitator.html (http://tsjwang.blogspot.com/2014/01/pcb-agitator.html)

I really want to thank you all for helping. If you have a dogecoin address you can reply with it.

Thanks, it is solved.