Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 20:32 02 May 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Latching relay question....

     Page 2 of 2    
Author Message
redrok

Senior Member

Joined: 15/09/2014
Location: United States
Posts: 209
Posted: 12:22pm 22 Mar 2015
Copy link to clipboard 
Print this post

Hi larny;
  larny said  
  redrok said  Hi larny;
  larny said  
  disco4now said   In this circuit wont the two 47 ohm resistor in series (94 ohm) that are effectively in parallel with the coil suppress the back-EMF voltage?
Regards
Gerry
Yes, that's right.
Not quite.

redrok
Good morning redrok,
I don't know why you wrote "Not quite"
Gerry was right as the resistors are in parallel with the coil as far as the back EMF is concerned, i.e. 47 + 47 = 94 Ohm, thus the 94 Ohm is in parallel with the coil & the coil current decays through them.
Larny
"Not quite" right because your calculations were based on a supply of 12V whereas Grogster's circuit was based on a 5V supply and used a 4.5V Panasonic relay with a coil resistance of 135ohms.
I further showed that all values of resistance pairs, in this type of circuit, never need snubber diodes because the kickback voltage can never go below ground nor greater than 2 times the supply, 10V in this case.
redrok
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9462
Posted: 01:01pm 22 Mar 2015
Copy link to clipboard 
Print this post

Hi folks.

Nice technical discussion going on here - interesting reading.

I kept the top diodes(across the resistors), but dropped the bottom diodes(across the 337's C-E's)

Based on what is being written here, looks like I may be able to simply not install the diodes either.

Incidentally, in my prototype test of this circuit, the on pulse current is much higher then the calculations are showing it to be - around 150mA or so.

Using my schematic at the top of this page, lets look at why this is:

Assuming that you apply 3v3 to the OPEN line, then T2 switches on, drawing current through the relay coil, latching it into the desired position. However, at the same time this happens, a large current can flow via R2 to ground via T2 being on. The exact same thing happens with the CLOSE side of the relay, so it IS a thirsty circuit, and not really very efficient due to the amount of current wasted during switching.

That having been said, I have had very successful and reliable relay switching with a pulse of only 5ms, and as you are not supposed to leave juice on the control lines anyway.....

The problem with this circuit, is if you FORGET to just use the PULSE command to trip the relay one way or the other, and accidentally leave the I/O pin high on one of the two lines - it will burn out the resistor given a little time.

But again - this circuit is, by design, supposed to be PULSE-driven, not continuously driven.

Win some, lose some.

Smoke makes things work. When the smoke gets out, it stops!
 
larny
Guru

Joined: 31/10/2011
Location: Australia
Posts: 346
Posted: 02:14pm 22 Mar 2015
Copy link to clipboard 
Print this post

Thanks redrok,
I thought you were referring to the Gerry's comment which is correct.

I did not notice that the relay used by the OP is a 5 Volt one. So I assumed 12 Volt.

In general, the collector voltage does not exceed 2 Vcc or go below the saturation voltage - as you said.
 
larny
Guru

Joined: 31/10/2011
Location: Australia
Posts: 346
Posted: 02:17pm 22 Mar 2015
Copy link to clipboard 
Print this post

Grogster,
As redrok & I have shown, you don't need any diodes.
 
redrok

Senior Member

Joined: 15/09/2014
Location: United States
Posts: 209
Posted: 02:23pm 22 Mar 2015
Copy link to clipboard 
Print this post

Hi Grogster;
  Grogster said   Hi folks.

Nice technical discussion going on here - interesting reading.

I kept the top diodes(across the resistors), but dropped the bottom diodes(across the 337's C-E's)
Hmmmm, that is a bit different calculation, lets see:
The coil ON current will still be:
5V / (135ohm + 47ohm) = 27.5mA
Now the peak current will be 27.5mA across the 1 resistor will be:
27.5ma * (47ohm * 1) = 1.29V

The driven transistor when turned off will have:
Since there is now a snubber diode which will have about 0.7V across it.
5V + 0.7V = 5.7V or so.
And the passive transistor will still have:
5V - 1.29V = 3.71V
And after the current collapses they will both have 5V.
  Quote  Based on what is being written here, looks like I may be able to simply not install the diodes either.
That is correct.
There is an advantage in not using the high side snubbers in this circuit. Snubber diodes reduce the series resistance for disipating the energy stored in the inductor. The lower the resistance the longer it takes to dissipate the energy. No snubbers means faster dissipation in this circuit.
  Quote  Incidentally, in my prototype test of this circuit, the on pulse current is much higher then the calculations are showing it to be - around 150mA or so.

Using my schematic at the top of this page, lets look at why this is:
Quite true. The currents we were calculating was only the coil current and kickback voltages. That load resister conducts a lot more current than the coil.
  Quote  Assuming that you apply 3v3 to the OPEN line, then T2 switches on, drawing current through the relay coil, latching it into the desired position. However, at the same time this happens, a large current can flow via R2 to ground via T2 being on. The exact same thing happens with the CLOSE side of the relay, so it IS a thirsty circuit, and not really very efficient due to the amount of current wasted during switching.
That would be a problem if this wasn't a latching relay.
  Quote  That having been said, I have had very successful and reliable relay switching with a pulse of only 5ms, and as you are not supposed to leave juice on the control lines anyway.....

The problem with this circuit, is if you FORGET to just use the PULSE command to trip the relay one way or the other, and accidentally leave the I/O pin high on one of the two lines - it will burn out the resistor given a little time.
In this case the 47ohm will dissipate:
5V^2 / 47ohm = 0.54 Watts.
  Quote  But again - this circuit is, by design, supposed to be PULSE-driven, not continuously driven.

Win some, lose some.
redrok
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9462
Posted: 02:44pm 22 Mar 2015
Copy link to clipboard 
Print this post

@ larny - OK. My PCB design has the diodes, but I can just leave them out...

  redrok said  There is an advantage in not using the high side snubbers in this circuit. Snubber diodes reduce the series resistance for disipating the energy stored in the inductor. The lower the resistance the longer it takes to dissipate the energy. No snubbers means faster dissipation in this circuit.


Acknowledged. I will leave out the high-side diodes. They are on the PCB pattern, but I just won't fit them. As they are in parallel with the load resistors, it will not affect the circuit.

You seem to know your electronic theory well - are you a teacher or something?
Smoke makes things work. When the smoke gets out, it stops!
 
redrok

Senior Member

Joined: 15/09/2014
Location: United States
Posts: 209
Posted: 04:51pm 22 Mar 2015
Copy link to clipboard 
Print this post

Hi Grogster;
  Grogster said  I will leave out the high-side diodes. They are on the PCB pattern, but I just won't fit them. As they are in parallel with the load resistors, it will not affect the circuit.
You could populate these locations with resistors, use 4 91ohm resistors instead of 2 47ohm resistors so the power dissipation is spread out more.

BTW, there is a component not mentioned here, the capacitor. Since the 5mS current pulse is a bit high at:
( 5V / 47ohm ) + ( 5V / ( 135ohm + 47ohm ) = 134mA
And lets assume the voltage drop is limited to 0.5V
deltaA * deltaS / deltaV = C in farads
134mA * 5mS / 0.5V = 1340uF
Assuming all the current is coming from the capacitor. In the real world some of the current can come from the regulator which can reduce the capacitor value proportionately.

Yes, this seems like a big capacitor but that's the tradeoff for not using an H-Bridge where the capacitor would be:
37mA * 5mS / 0.5V = 370uF

You may be interested in a simple H-Bridge I invented. This is ideal for use with a micro.
  Quote  You seem to know your electronic theory well - are you a teacher or something?
No, just a circuit designer. I worked at Unisys for 37 years.
Full disclosure, I do not have an engineering ticket, mostly self taught.
I love circuit design though.
redrok
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9462
Posted: 05:06pm 22 Mar 2015
Copy link to clipboard 
Print this post

So, are you saying there should be a cap in the area of 2200uF on the supply line on this module?

Perhaps you could clarify for me, the capacitor issue a little more.

I will have a play to see how short a pulse I can get this down to, and still reliably operate the relays. I can probably do better then 5ms. If I can get it down to 1ms, then the 220uF cap I have on the board supply is probably gonna fit well, based on your example calculations....

EDIT: Correction - I don't have any cap on the supply to this board - did not think it was needed at the time.
Edited by Grogster 2015-03-24
Smoke makes things work. When the smoke gets out, it stops!
 
redrok

Senior Member

Joined: 15/09/2014
Location: United States
Posts: 209
Posted: 05:19pm 22 Mar 2015
Copy link to clipboard 
Print this post

Hi Grogster;

What is the current capability of the 5V regulator.
Actually what is the excess current capability of the regulator after powering everything else.
If the excess is 150mA or so you wouldn't need the large capacitor to supply the pulse current.

You really should have a reasonably large filter cap anyway. I always have at least a 100uF cap.
redrok
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9462
Posted: 06:39pm 22 Mar 2015
Copy link to clipboard 
Print this post

Okey dokey. I normally put 220uF on the input of just about everything, but ironically, did not on this board, as I did not think it would care about a smooth supply rail - completely forgot about surge current of this arrangement.

The regulators are usually 1703-33's, which are good for up to 250mA.
If not them, then I tend to use 3940 linears, which are good for up to 1A.
There is always plenty of decoupling caps around my PSU stages.

Thanks for your comments - very insightful.
Smoke makes things work. When the smoke gets out, it stops!
 
redrok

Senior Member

Joined: 15/09/2014
Location: United States
Posts: 209
Posted: 01:51am 23 Mar 2015
Copy link to clipboard 
Print this post

Hi Grogster;
  Grogster said  Okey dokey. I normally put 220uF on the input of just about everything, but ironically, did not on this board, as I did not think it would care about a smooth supply rail - completely forgot about surge current of this arrangement.

The regulators are usually 1703-33's, which are good for up to 250mA.
If not them, then I tend to use 3940 linears, which are good for up to 1A.
There is always plenty of decoupling caps around my PSU stages.

Thanks for your comments - very insightful.
Don't forget the required 1uF close to the MCP1703-33regulator output.
And the LM3940 requires .47uF on the input and at least 33uF on the output.

Both of these are "High Performance" regulators and require special precautions when using them.
Read the datasheet carefully especially with regard to the capacitor ESR ratings.
redrok
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9462
Posted: 02:27am 23 Mar 2015
Copy link to clipboard 
Print this post

Yep, I use 1uF X5R MLC's within 1mm of the input and output pins. I also have 100n MLC's on input and output too. I have never had a problem with the 1703 series - yet - and I have used hundreds of them now.
Smoke makes things work. When the smoke gets out, it stops!
 
redrok

Senior Member

Joined: 15/09/2014
Location: United States
Posts: 209
Posted: 08:37am 23 Mar 2015
Copy link to clipboard 
Print this post

Hi Grogster;

I know your circuitry is already designed but I would be remiss if I didn't show a very nice all MOSFET H-Bridge:

The high side DMP2215L-7 MOSFET would work well at 3.3V.
The 2 diodes guarantee minimal shoot through in case both MOSFETs are enabled at the same time.

When running it at higher voltages make sure the high side MOSFET maximum gate voltage is not exceeded.
redrok
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9462
Posted: 12:50pm 23 Mar 2015
Copy link to clipboard 
Print this post

Cool.

Printed for future reference.
Smoke makes things work. When the smoke gets out, it stops!
 
     Page 2 of 2    
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025