strange dual relay slow release issue

Go To Last Post
48 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have a tiny12 (5v) driving 2 outputs to control two smallish 12v relays. I use a dual-NPN digital transistor package (built-in resistors) from ROHM on two I/O pins to pull down the relay coils. Flyback diodes over each relay coil.

Driven independently with a pattern these relays react like they should for the on/off cycles even for some very brief hits of 70ms.. 100ms.. yes, there's mechanical lag time lag for contacts... but generally speaking they snap the way I'd like.

Things change when they're driven exactly in unison with that same pattern. One of the relays goes non-responsive to short release periods (say 70ms) and will stay stuck on (contacts remain closed). Yet the other one does release, tapping out the pattern I'm throwing at both relays. If I drive the non-responsive relay alone with the same pattern, it will tap out the pattern. Ditto for the other relay.

I went nuts for a while thinking this was a software bug, but no, it's electrical: got out the scope and checked voltages and found logic pins were correct and doing same thing in unison, strong 0 to 5v swings mirroring each other, both transistors kept doing their jobs, both coils on the low side showed going to ground (via its transistor) when the I/O on each pin was LOW... but one doesn't release. What magic is holding it shut?

There is some interaction between a perfectly timed release of two relays that are wired pretty close to each other drawing off the same supply. .. that keeps one of them closed.

What might cause this? These relays don't draw a lot of current, I have ample supply.

Regards,
Scott

Last Edited: Wed. Sep 25, 2013 - 04:22 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Change the 10uF cap on VCC to 1000uF?

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

OK, that reply came in so fast I'm not sure it's related to my post?

I don't have a 10uF cap in the solution.

Regards,
Scott

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

scottm wrote:

There is some interaction between a perfectly timed release of two relays that are wired pretty close to each other drawing off the same supply. .. that keeps one of them closed.

What might cause this? These relays don't draw a lot of current, I have ample supply.

Easy test : try moving the relays further apart, and see if anything changes

Reason : Relays can spec a minimum spacing, to prevent magnetic field interactions.
Once closed the latching field needed is much lower.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Diagram please. That's what Bob was getting at, we can't guess.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

A couple of thoughts:

Be SURE the 12 V supply is adequate to handle both relays at the same time.

Do you have a load being switched by the relay contacts right now, during your testing phase?

If, when both relays are being switched simultaneously, the power supply is closing them slowly, there may be a bigger / longer / hotter arc on the relay contacts, essentially welding the contacts, making them stick. When the power supply has to only switch one relay at a time it snaps faster, with a "better" closure, and less contact welding.

Just a thought, no idea if this is actually part of your problem or not.

JC

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The test load on the contacts is an LED. 5mA maybe... Not welding material.

And this is problem is seen as lack of release of one relay.. On the de-energize side. Not the lack of ability to close, which is fine both relays respond fast in synch when closing, just one of them is sluggish to release for the brief off period.

These relays are snugged together.. Side by side. They're pretty small cubes. They need to be close for packaging would slipping a shim between them help I wonder? Will try.

Regards,
Scott

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

js wrote:
Diagram please. That's what Bob was getting at, we can't guess.

OK I'll draw what I'm saying in the first paragraph when I get off this tablet...

Regards,
Scott

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Try and stick a piece of copper (or something magnetic?) between them. When one is on, his stray magnetic field is putting the whammy on his buddy. I bet.

Imagecraft compiler user

Last Edited: Thu. Sep 26, 2013 - 02:22 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Here's the setup..

T12 was a sorry choice of label for the dual transistor package, as the uC on the left is a atTiny12. Don't be confused. T12 has internal bias resistors as shown and have emitters tied together internally.

Attachment(s): 

Regards,
Scott

Last Edited: Wed. Sep 25, 2013 - 02:12 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'd check the flyback diodes at first. If they are clean (in working condition, not polished!), then perform a test where you hook each relay on a separate 12V line.

Einstein was right: "Two things are unlimited: the universe and the human stupidity. But i'm not quite sure about the former..."

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

And exchange the two driver lines to the relays and see if the problem moves as well.

Einstein was right: "Two things are unlimited: the universe and the human stupidity. But i'm not quite sure about the former..."

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

OK, thanks guys I have a few plans of action to experiment:
- shim between
- diodes
- separate sources and check strength of +12 supply to K's

Regards,
Scott

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I recommend adding a BFC right on the VREG input.

Imagecraft compiler user

Last Edited: Thu. Sep 26, 2013 - 02:22 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Freewheel diodes maintain coil current, while energy is lost due to resistance. Since the holding current is often a small percentage of pull-in current, the delay can be large. To get faster response, use a zener, to let the coil voltage rise and dissipate the energy sooner. Another method is to use a coil driver mosfet or IGBT, that is avalanche protected perhaps at 60V.

I know this from working with control solenoids and fuel injectors.

Another method is to energize the relay, then PWM to maintain the lower holding current, so the energy stored in the coil is less.

It all starts with a mental vision.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Relays can also be slow to open due to magnetic remanence in the armature. That can be caused by age, heat or excessive current but more commonly from shocks while the relay is energized, e.g. a reed switch on a door frame that closes when the door containing a magnet is slammed against it. A temporary fix is to tape a small bar magnet in such a position as to oppose the residual field.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You don't mention if the relays are new or recycled. With relays that have had a lot of operation, you can get small localized magnetic remanence as dak664 suggests but also minor crystalline changes at the pole & armature interface which tend to mechanically hold (velcrose like). Ie. stiction!
This was often a problem in relay driven telephone exchanges and a small plastic shim was put glued or held by staples to the armature.

This does not quite explain your issues however.

My initial thoughts are
a) insufficient de-coupling between the 12 Volt supply & the 5V regulator. &
b) Some transient/parasitic path between the fly-back diodes. Try two discrete diodes!

Whatever you find please do let us know what the answer turns about to be!

Charles Darwin, Lord Kelvin & Murphy are always lurking about!
Lee -.-
Riddle me this...How did the serpent move around before the fall?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

How many amps does ea relay use? How many amps does the load use? Does the power supply put out this many amps? How many microfarads on the main filter cap right on the voltage regulator? I recommend 470uF. I think you have 0. Am I right so far?

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
How many amps does the load use?
Quote:
The test load on the contacts is an LED. 5mA maybe
:wink:

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

scottm wrote:
These relays are snugged together.. Side by side. They're pretty small cubes. They need to be close for packaging would slipping a shim between them help I wonder? Will try.

Easiest way to confirm magnetic crosstalk, is to separate them, even temporarily, and run some tests.

Then, you can try alternative orientations, and I'd also try reversing the coils on one.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Sooo..... Sample size one problem.

I built a couple more samples and no similar problem.

The only thing I did different was separate the relays in their same mounting holes (pcbs are done) the furthest apart they can go, creating about 3mm between to boxes.

Some facts, these relays measure about 250 ohm coils, and they draw just less than 50 mA in held position.

On the board, side by side oriented the same direction, but I run the current one way through one of them and the other way for the other one. This has not changed for the whole experiment of 3 now.

No shims tried, still using all the same parts as shown, no bad ass caps added, no different power supplies. As I say, these were done on three identical PCBs.

So... Wierd. Strange relay.

Regards,
Scott

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The sketch you posted didn't even show a little bitty cap. You need at least one Big Fat Cap. The voltage regulator needs two.

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Vreg has .33uF input .22 output uC has .1 decouple and each of two input pins has .1 as their low pass, so total capacitance on the board in form of parts I've added is .85 uF

The Vcc is measured clean, no dips or sags or jitters, just a solid bar at 5v under all operating get conditions so I don't think any more cap is required.

And for the non uC side of the circuit, the relays always pull and the load sourced from the same 12v point on the board is sufficiently driven... About 100 watts.

Regards,
Scott

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

But until that last message, none of us knew if there were any caps at all on the board. So you can imagine why I mentioned caps twice.

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I can imagine it.

I never posted a schematic... just thinking you'd expect and trust that everyone knows to put cap's where they're needed... and the first thing you suspect if logic isn't working out that maybe you're getting a reset in the middle of the program somewhere.

But by showing the logic outputs and scope traces drawn on paper mind you, that the problem I was seeing wasn't code or logic level related. It was electrical and near the relays.

Regards,
Scott

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So, at this point I guess one pulls out a compass to see how much residual magnetism exists on the faulty relay.

JC

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
you'd expect and trust that everyone knows to put cap's where they're needed
:lol: not here! We see some horrible things.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
just thinking you'd expect and trust that everyone knows to put cap's where they're needed

Yes, quite correct! In fact you quite often see this in university text books. However, students & others don't know the details of the unknown circuitry that is required to make things work & they build the circuit verbatim. Some time later they come here on AVRFreaks and post "Help, my circuit doesn't work". Remember, assume = ASS U ME!

Quote:
Vreg has .33uF input .22 output uC has .1 decouple == .85 uF

That might be the total capacitance soldered on the board, but that is not the capacitance on the circuit where it matters.
I would suggest at least 100uF, at the input of the regulator & 10uF at the output and as close as possible to the in, out & common pins. (Where you put the decoupling is also critical & never mentioned in text books, despite that it is in the data sheets).
There is a lot of gain in those regulator packages & if they are insufficiently decoupled and the wrong (or should that be right) conditions they will "take off", obeying the Barkhausen criteria! Been there, done that!

Charles Darwin, Lord Kelvin & Murphy are always lurking about!
Lee -.-
Riddle me this...How did the serpent move around before the fall?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The whole space of PCB is 1.5 sq.in. Double sided so the decoupling and vreg caps are mounted literally underneath the component of interest with vias poking through as close to pins as you can mount parts.

Thanks for all the suggestions and ideas.

Regards,
Scott

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Okay, the problem comes back... As sample size grows the pb pops up again. Definitely related to the pick of the barrel relay...

Also found the solution: delete the free wheeling or flyback diodes over the relay coils. When I do that even the poor choice or unlucky relays start doing the right pulse thing with anything I throw at them.

I think someone on this thread already mentioned, these diodes delay the release of a relay. They make 'em stick longer.

I'm not too worried about the implications of the voltage spike of the coil flying at the transistor, there's not much energy on these little relays. I think the transistor sees maybe 35 volt spike on the collector when it let's go. Have to get out the scope and watch again, and check the specs onthe Rohm device again to be sure I'm not torturing it.

Regards,
Scott

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
maybe 35 volt
Maybe 10 or 100 times higher without anything loading it like a probe.

A good test, put your finger on the hot side of the relay and then release the relay coil.....

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Scott - you assume too much. As John intimates, you'll easily exceed 35V and your transistor will die over time.
To speed up the relay release you can use varistors instead of diodes.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

thanks for the varistor idea, I'll look at some other ones in the post too..

first off, from wiki (source of all truth :roll:)

Depending on the application and equipment involved, some voltage surges can be upwards of 10 times the voltage of the power source, so it is critical to not underestimate the energy contained within an energized inductor.
When used with a DC coil relay, a flyback diode can cause delayed drop-out of the contacts when power is removed, due to the continued circulation of current in the relay coil and diode. When rapid opening of the contacts is important, a low value resistor can be placed in series with the diode to help dissipate the coil energy faster, at the expense of higher voltage at the switch.

Choices:

1. diode across coil is too sluggish to release. Varistor suggested.

I noticed in some automobile relays have built-in resistors in parallel with the coil. Got a Ford relay here, going to see what value the resistor is for the characteristics of the coil on that relay.

This is not in series with the diode (as wiki suggests), but would be in parallel.

2. pro's / con's to a parallel resistor to the coil. Why would Ford do that?

A few other possibilities come to mind:

3. flyback diode across the transistor itself, cathode at collector anode at emitter / ground. Would like slow the release of the relay?

4. a resistor across the transistor, like above, just providing a path for energy to ground. Not enough of a resistor to pull the relay of course. Would this slow the release of the relay?

5. a capacitor across the coil, with a resistor to ground like 4, to temporarily take the hit then bleed it off.

Regards,
Scott

Last Edited: Tue. Nov 19, 2013 - 08:07 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What makes you suggest it is a resistor? It is more likely to be a voltage dependant resistor ie: varistor.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Kartman wrote:
What makes you suggest it is a resistor? It is more likely to be a voltage dependant resistor ie: varistor.

aHhh I'll have a closer look when I get to the bench to examine one of them

suppose it's unmarked, is there a simple test to see if it's a varistor vs. resistor?

Regards,
Scott

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I just noticed the schematic I posted on page 1 of this thread doesn't complete the picture of more parts I've got on the supply side that add to this conversation. And the flyback is not directly to the other terminal of the relay coil... it's via a low value resistor.

I'll post that up.

Attachment(s): 

Regards,
Scott

Last Edited: Tue. Nov 19, 2013 - 08:33 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So, as you can see, I do have a series resistor with that flyback diode in the original design. Maybe it needs to be its own series resistor not sharing the one designed into the power input section to the Vreg (which would appear off to the right of that junction, if I were to continue drawing the Vcc section).
Maybe 100R is not significant enough for dilation purpose of dissipating coil juice... and should be more resistance. In which case, it must be its own resistor not sharing with the power supply section's diode.

But also, there's a transorb there! You'd think that would snuff large voltage dumps... that's its job. Hm.

Regards,
Scott

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I fiddled just a bit and got this back to a working state and still have protection diodes in place protecting the transistor.

The issue was that my diodes were not directly connected across the coil. I had cathodes going off as shown up through a 100R to positive.

I took the smt dual diode off the PCB and placed an axial leaded diode across each relay coil's terminals... you cant get a tighter path. And it's all back to working.

The combination of that transorb, 100R resistor, and the PCB path taken to it were doing me no favors.

One PCB trace change on the next batch will solve this one and no new parts.

Regards,
Scott

Last Edited: Wed. Nov 20, 2013 - 03:56 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

js wrote:
Quote:
maybe 35 volt
Maybe 10 or 100 times higher without anything loading it like a probe.

A good test, put your finger on the hot side of the relay and then release the relay coil.....

Test result: no shock. I even licked my finger and tried various body part shorts: directly across the coil, another finger on ground, another finger on +12 supply... no shock, not even a buzz. I was a little disappointed.

I was tempted but did not stick my tongue on the coil. Even I have limits. I save that for my 9v battery tests.
:roll:

Regards,
Scott

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

so basically this

Quote:
5. a capacitor across the coil, with a resistor to ground like 4, to temporarily take the hit then bleed it off.

Nice to see you can get this as a one part package.

If I were dealing with higher inductances here I might be tempted to throw this component at it. However I've found that simple diodes placed correctly do the job for this particular circuit.

Regards,
Scott

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
so basically this

5. a capacitor across the coil, with a resistor to ground like 4, to temporarily take the hit then bleed it off.

No. A series rc network across the coil. The resistor dissipates the energy and the capacitor keeps the resistor out of the circuit under steady state conditions. Look at the first 2 rows of images on the page I linked to. The diode still might be needed.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

As a matter of curiosity can you please tell us the relay type and brand? Maybe you did already.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

These are Chinese branded relays, and I think they're called miniature automotive in the eagle library I used to get the footprint. They're about the size and shape of a sugar cube.

Regards,
Scott

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
These are Chinese branded relays,
Datasheet please :-) as you are not being zapped I'm suspecting built is diodes across the coils, maybe not but we don't know.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

js wrote:
Quote:
These are Chinese branded relays,
Datasheet please :-) as you are not being zapped I'm suspecting built is diodes across the coils, maybe not but we don't know.

Nope, no diodes because we do know this:

Quote:

Some facts, these relays measure about 250 ohm coils, and they draw just less than 50 mA in held position.

On the board, side by side oriented the same direction, but I run the current one way through one of them and the other way for the other one. This has not changed...

The coils are not "sexed" with polarity.

But not to say there could be somthing else inside, like a resistor or varistor.

What's the (nondestructive in-circuit) test for a varistor across a coil like this, to know it's a varistor (if I find something in there unmarked value).

Thanks!

Regards,
Scott

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Regards,
Scott

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If there is a varistor, it will clamp the inductive spike. You can see this when you open the circuit to the coil. With no protection, the voltage will peak at a few hundred volts. An easy way is to make a buzzer circuit with the relay and scope the coil voltage. If there is no protection on the foul, you can observe the changes when a diode or varistor is added.