Driver circuit for dual latching pulse relay?

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

I have a DPDT relay which has a set / reset coil. You pulse in one direction for set and the other for reset and there is no "holding current" after the relay switched over.

I want to drive this type of relay using an AVR and a few transistors but I am wondering how it is done due to the bi-directional nature of the current needed to use the relay.

If someone has some references (could not find something good on Google) it would be much appreciated.

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

How much current does the relay coil require? If it's only a couple of hundred milliamps, you could probably use an L293D driver.

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

it's about 25mA, so if I want to use transistors I have around we're talking about building an H-bridge? :)

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

Right - a full-H bridge driver should do it.

That would make the micro interface quite simple.

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

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

for bidirectional current in the one coil, you pretty much have to go with an H bridge of some sort.

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

Great, that's actually makes a lot of sense!

Thanks!

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

What about this?
http://www.ti.com/product/tpic6b595
Seems like this can handle 4 of these relays on it's own.

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

slow_rider wrote:
I have a DPDT relay which has a set / reset coil. You pulse in one direction for set and the other for reset and there is no "holding current" after the relay switched over.
For a DPDT you need an external H-bridge, as has been mentioned.

If you have more poles (3PDT, 4PDT) you can probably use two poles of the relay contacts as the H bridge.

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

I designed this circuit back in the mid 70s for one of my drifting buoy designs.

Attachment(s): 

Ross McKenzie ValuSoft Melbourne Australia

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

Ross, that's a tricky circuit!

Slow-rider, the tpic device is not a h bridge. It has open collector outputs. These will sink current, not source them.

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

Kartman wrote:
Ross, that's a tricky circuit!
:lol: well, I couldn't find any other component to remove. Worked beautifully.

Ross McKenzie ValuSoft Melbourne Australia

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

Kartman wrote:
Ross, that's a tricky circuit!

Slow-rider, the tpic device is not a h bridge. It has open collector outputs. These will sink current, not source them.

That's true!
So how about this LED driver shift register:
http://www.ti.com/lit/ds/slis142a/slis142a.pdf

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

slow_rider wrote:
Kartman wrote:
Slow-rider, the tpic device is not a h bridge. It has open collector outputs. These will sink current, not source them.

That's true!
So how about this LED driver shift register:
http://www.ti.com/lit/ds/slis142a/slis142a.pdf

I am afraid that this has the same problem, except it has an open drain configuration instead of open collector. You need a means of reversing the current through the same coil ... or you need a dual coil latching relay (then either of those two devices could be made to work).

Ross McKenzie ValuSoft Melbourne Australia

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

valusoft wrote:
slow_rider wrote:
Kartman wrote:
Slow-rider, the tpic device is not a h bridge. It has open collector outputs. These will sink current, not source them.

That's true!
So how about this LED driver shift register:
http://www.ti.com/lit/ds/slis142a/slis142a.pdf

I am afraid that this has the same problem, except it has an open drain configuration instead of open collector. You need a means of reversing the current through the same coil ... or you need a dual coil latching relay (then either of those two devices could be made to work).

I'm probably missing out on something here... If the device has the capability to source & sink current why can't I clock in 0b10000000 with the relay leads hooked up to pins 6&7 wait for 5ms and clock in 0b00000000 to switch in one direction and clock in 0b01000000 wait for 5ms and clock in 0b00000000? Using this method it seems to me I could drive up to 4 relays using a single shift register?

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

slow_rider wrote:
I'm probably missing out on something here... If the device has the capability to source & sink current ...
... but that is your misunderstanding. The device can only sink current. Below is the output stage.

Attachment(s): 

Ross McKenzie ValuSoft Melbourne Australia

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

valusoft wrote:
slow_rider wrote:
I'm probably missing out on something here... If the device has the capability to source & sink current ...
... but that is your misunderstanding. The device can only sink current. Below is the output stage.

Ah ha!
OK I got it! So basically all of these "power" CMOS devices are current sinks only? I could not find one that can also act as a source.

Can you please explain the circuit you have posted? If this is the part count this is better than what I have found so far. The reason I was going for a readily available IC is just because space restrictions... but this might be the best available solution.

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

You mean my 2 transistor circuit? Well it was designed for a very specific set of conditions that may be entirely unsuitable for yours. But the basic operation goes like this.

Assume that the T0 condition has the capacitor uncharged. With a positive level on R1, the T1 transistor connects supply to the relay coil and cap in series. A cap cannot change state instantly, so there is a peak of charge current through the relay coil which activates the relay. As the cap charges, the relay coil current decreases towards zero. After a period of time, one second in my case, the drive to T1's base is removed leaving the cap charged to almost the supply rail and no quiescent current usage.

Three seconds later, a positive level is applied to R2 causing T2 to saturate and pull the top end of the relay coil as drawn down to ground. This causes the charged cap to discharge through the relay coil but in the opposite direction to its initial charging current direction, thus switching it back to its original T0 state.

Selection of the cap and relay is important. There should be minimal leakage current in the operating cycle timeframe, or the cap will not hold enough charge to switch the relay back.

So ... it all depends upon your circumstances if my design can be applied reliably to your requirements.

Cheers,

Ross

Ross McKenzie ValuSoft Melbourne Australia

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

Thanks for the explanation and what a clever little circuit I must add!!! I really like it although I am not sure I can use it as my operating cycles are much longer and in some cases the relay would have to stay in one position for hours and I would get worried about the cap charge state. If you add a 3rd transistor between VCC and the relay & cap junction (I think) you could charge the cap while the relay is at the set position and since almost no current will be flowing through (only the leakage from the cap through the 3rd transistor) this could be added to allow unlimited switch time and more flexible cap selection.

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

Perhaps take a look at low side N-FET driver ICs? There a number of two channel devices in 8-pin packages that can source or sink up to 1A continuous. Be aware that since FET drivers are generally expected to deliver short bursts of current to rapidly charge and discharge FET gates, peak current rating will be a prominent spec, but the continuous current rating may be harder to find and will be substantially lower.

Take a look at the IXD_604 for one example.

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

Might look here: http://www.edn.com/design/analog...

Roger

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

slow_rider wrote:
Thanks for the explanation and what a clever little circuit I must add!!! I really like it although I am not sure I can use it as my operating cycles are much longer and in some cases the relay would have to stay in one position for hours and I would get worried about the cap charge state. If you add a 3rd transistor between VCC and the relay & cap junction (I think) you could charge the cap while the relay is at the set position and since almost no current will be flowing through (only the leakage from the cap through the 3rd transistor) this could be added to allow unlimited switch time and more flexible cap selection.
All of this could be done so much simpler if your relay had 2 coils.

Ross McKenzie ValuSoft Melbourne Australia

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

That capacitor circuit can be made to work even with long timeframes between changes.
To set the relay, apply a pulse to R2 to ensure the capacitor is discharged, then apply a pulse to R1 to set the latch. To reset the latch, pulse first R1 then R2.
The initial pulse in either case merely reinforces the previous state of the relay, but has the side effect of guaranteeing the correct voltage on the capacitor for the second pulse.

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

Chris,

Thanks. That is also very clever.

Cheers,

Ross

Ross McKenzie ValuSoft Melbourne Australia

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

Here is another idea using two transistors but a single control pin:

Connect a control pin to the base of two transistors. T1 is NPN and T2 is PNP. T1's collector goes to Vcc, T1's emitter into T2's emitter and T2's collector goes to ground. From the emitter junction I connect the relay coil and a capacitor in series to ground.

When pin is high, T1 is ON (T2 is OFF) and the current flows from Vcc through the coil to the cap and this will trigger the coil in the 1st direction.

When pin is low, T2 is ON (T1 is OFF) and the cap discharges current though the coil in the reverse direction.

Might or might not need a resistor in series with the coil.

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

Sorry for missing this.

Yes, that should work also, but I don't see why you will need the series resistor.

Cheers,

Ross

Ross McKenzie ValuSoft Melbourne Australia

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

valusoft wrote:
Sorry for missing this.

Yes, that should work also, but I don't see why you will need the series resistor.

Cheers,

Ross

After doing a little math it really does seem like I won't need a series resistor as the coil resistance is "too high" as is (about 180 - 200 Ohms) so with a 100uF cap, tau is 0.02 sec, wont need much over 75% of Vcc to switch over (set) and the max current in the circuit is (a minimum) of 25mA. So all looks good with nothing additional. I also calculated the base resistor for the NPN (2N5088 in my case with pretty constant min. beta of 300) and it came out around 50K. The PNP could be the 2N5087.

Just in case anyone wants to build this circuit - it works fine, I have it here on a breadboard.

Thanks for the all the comments and circuits, they helped me get to a circuit I am happy with and seems to work great and has only a single control line!

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

However ... isn't there always a caveat?

You said that you might have the relay set for hours and then want to reset it. During that time, the cap may discharge through leakage. Chris's suggested method of use of my original design, whereby you repeat the original command (either set or reset) to restore the cap's intended charge state overcomes this "real world design defect". You cannot do that with your npn/pnp configuration.

Cheers,

Ross

Ross McKenzie ValuSoft Melbourne Australia

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

if I leave the transistor on the cap won't discharge.

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

Correct.

Ross McKenzie ValuSoft Melbourne Australia

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

If the coil does not require significant energies to switch then I think you could use IOs directly. With 5V powering that gives about 20ohms of Rds_on per IO. Parallel 4 pins for one drive and 4 pins for the other. Do not forget the clamping diodes are not designed for switching inductive loads.

No RSTDISBL, no fun!

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

Brutte wrote:
If the coil does not require significant energies to switch then I think you could use IOs directly. With 5V powering that gives about 20ohms of Rds_on per IO. Parallel 4 pins for one drive and 4 pins for the other. Do not forget the clamping diodes are not designed for switching inductive loads.

That's a very interesting idea! I have AC TVS diodes so I think the voltage spikes should be taken care of.

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

But do you have 8 spare outputs?

Ross McKenzie ValuSoft Melbourne Australia

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

Quote:
But do you have 8 spare outputs?

Parallel N pins for one drive and N pins for the other (where 1<=N<=8 ) :)

I guess the logic levels are not important in such design so just do not exceed absolute maximum ratings (40mA per IO and 400mA per power pins). For N=8 IOs as first drive and 8 IOs as second drive can switch quite beefy coils (320mA).
I have never switched such type of coil with AVR. But I have made a three phase BLDC drive from ATMega162 some time ago (driving a spindle motor from DVD).

No RSTDISBL, no fun!