# Transistor replacing Relay update

#### TexasTony

Joined Jul 15, 2010
43
Hi guys,

This is a follow-up to this thread:

It's too old to post to the thread so I'm starting a new one. Page 3 shows the recommend circuit from AudioGuru that I've been using. Quick summary: I used a pair of 5v signals to drive 10 volts to a motor, one to drive forward and one signal to reverse the motor. Motor typically drew 100-200 mA.

Well, for the past year or so I've been using this design and it's done fairly well. But I've had a few circuits fail because of the stalling current burning up the transistors.

So, it's time to update the circuit and make it more robust as well as a few other changes.

Ok, so the 2 main changes: 3.3v control signal operation (was 5v) and bigger transistors. I still have the 10 volt motor voltage. The same motor, but now I need to consider that at stall the motor can draw 400-500 mA for about 5 seconds.

I like surface mount parts. On the darlington pair, I don't mind if it's two different NPN transistors. Cost-sensitive of course.

I've started looking through components. But I'm not an analog designer and thought someone might have the experience to quickly chose some parts. I'm hoping I covered the various pieces... let me know if I missed something.

Thanks as always
Tony

#### SgtWookie

Joined Jul 17, 2007
22,219
This ought to do it:

#### Attachments

• 124.8 KB Views: 150

#### SgtWookie

Joined Jul 17, 2007
22,219
The BD6221 solution vrainom posted is a good one; much smaller footprint on a PCB than the discrete solution, and practically no assembly required.

Whichever solution you go with, you should have very wide traces in order to dissipate any heat developed in the circuit. In the discrete circuit, R7 and R8 will be dissipating roughly 160mW when Q2 or Q4 are turned on (respectively). These resistors should have very wide traces also, in order to dissipate the heat.

The original schematic didn't have freewheeling diodes, which could be the reason the transistors were failing.

The transistors I selected have rather high gain. The base current for the PNP transistors is not as high as I'd like it to be, but there are limits as to how much power can be dissipated in SMD resistors. I settled for 1206 size for R7/R8, which are the big power consumers in the circuit.

#### colinb

Joined Jun 15, 2011
351
SgtWookie: would MOSFETs have an advantage over BJTs in this application? It doesn't sound like they will be switched at a high rate, so driving the FETs should be easy, and I think an inexpensive MOSFET would dissipate less power than a BJT in this switching application. But I am a novice, so I'm interested to here your comments on BJT vs. MOSFET in this instance.

#### SgtWookie

Joined Jul 17, 2007
22,219
SgtWookie: would MOSFETs have an advantage over BJTs in this application? It doesn't sound like they will be switched at a high rate, so driving the FETs should be easy, and I think an inexpensive MOSFET would dissipate less power than a BJT in this switching application. But I am a novice, so I'm interested to here your comments on BJT vs. MOSFET in this instance.
The problem here is the low voltage available. I could've looked for some very low-threshold MOSFETs to use, but the problem there is rapid obsolescence. The MOSFET scene is still evolving fairly rapidly; and as new models become available, mature versions become obsolete.

The FMMT449, FMMT549 and MMBT3904 transistors I specified are commodity parts made by multiple manufacturers, ensuring good availability for the forseeable future. They are very inexpensive due to the huge quantities in which they are produced and consumed. The most problematic portion of the circuit is the power dissipation in R7 and R8.

I suppose I could have used P-ch MOSFETs to relieve that situation, but I chose to stay with the basic circuit that had been working, use higher-rated transistors, adapt it for lower voltage control inputs, and add in the missing flywheel diodes which is likely why the failures were being experienced to begin with.

#### TexasTony

Joined Jul 15, 2010
43
Sgt,

I really appreciate this. I didn't even think about the flyback diodes... I definitely need that. Dang inductors! For those, what voltage rating would you suggest, the 20v parts?

OK, one thing on your circuit. The 2N3904 only seems to come in TO92 PTH package. Did I miss the SMT version? Any other SMT transistor you can swap out?

Thanks
Tony

#### SgtWookie

Joined Jul 17, 2007
22,219
I really appreciate this. I didn't even think about the flyback diodes... I definitely need that. Dang inductors! For those, what voltage rating would you suggest, the 20v parts?
Use the MBR0530 like I specified, both in the schematic and in the text on top. They're rated for 500mA, 30v.

The purpose of C1 is to slow the rate of change of the voltage across the motor; it'll reduce the peak currents in the flyback diodes, as well as buying some extra time for them to turn on. The turn-on time should really not be an issue, but since you were having failures in the previous driver, that needed to stop. This version should be quite a bit more robust.

OK, one thing on your circuit. The 2N3904 only seems to come in TO92 PTH package. Did I miss the SMT version? Any other SMT transistor you can swap out?
Up top I noted that the 2N3904 transistors should be replaced with MMBT3904 transistors, which are also commodity parts, and less than half the price of the FMMT449 transistors. And no, you can't replace the FMMT449 with MMBT3904 transistors, as they won't handle the necessary current.

I also noted specific part numbers for R7 and R8; they are thick-film 1/4 Watt 1206 size; nothing smaller or less power rating will work reliably.
For the other resistors, 0603 or 0805 size would be fine, thin or thick film is OK. Power dissipation won't be an issue with them.

I suggest that you re-read everything that has been typed in this thread, as you seem to have missed some important points the first time around. I even gave you a suggested supplier and quoted their prices for volume quantities. If you missed the info I posted about the trace widths, you will find yourself with resistors and transistors burning up.

#### TexasTony

Joined Jul 15, 2010
43
Sgt,

My mistake, I see where you cross referenced the MMBT3904. Got it.

And thanks for pointing me to Mouser. I've normally gotten prototype parts from digikey and realize now that they're twice the price.

I have a couple more questions. For the flyback diodes, using 4 of them is dependent on the regulator being solid. I'm using a 50cent 10v regulator. I would think that putting a pair of the diodes across the motor would be more effective. At least for my existing boards, it would be easier to add 2 zeners across the motor connector rather than 4 across an inch or so of PCB. So two questions regarding 1 pair vs 2 pair of flyback diodes: 1) for my next board spin (can go either way), and 2) more importantly for reworks to my current board .

And finally one curiosity question. Why use a 220pF cap? I can see that it will nicely flatten RF noise. Other than that, it's a tiny cap and I don't see that it will help the back EMF voltage. Just curious...

I'm ordering some parts now, so I'll be playing with this.

Again, many thanks. I owe you a beer or two.

Tony

#### SgtWookie

Joined Jul 17, 2007
22,219
And thanks for pointing me to Mouser. I've normally gotten prototype parts from digikey and realize now that they're twice the price.
It pays to shop around, but I suggest using only factory-authorized distributors for your components, particularly for the prototypes. Otherwise, you may wind up with nasty surprises.

I have a couple more questions. For the flyback diodes, using 4 of them is dependent on the regulator being solid. I'm using a 50cent 10v regulator.
Like what, a 7810?

I would think that putting a pair of the diodes across the motor would be more effective. At least for my existing boards, it would be easier to add 2 zeners across the motor connector rather than 4 across an inch or so of PCB. So two questions regarding 1 pair vs 2 pair of flyback diodes: 1) for my next board spin (can go either way), and 2) more importantly for reworks to my current board.
You could use a pair of Zeners back-to-back across the motor if you'd like. 12v would be a good number. The main thing is to keep the Vbe down below the transistors' specifications. I don't know if you're using PWM on the motors, but if you are, you'd be better off using the four Schottkys than a pair of Zeners, as the Zeners will get very hot, very quick at ~1/2 to 3/4 duty cycle.

And finally one curiosity question. Why use a 220pF cap? I can see that it will nicely flatten RF noise. Other than that, it's a tiny cap and I don't see that it will help the back EMF voltage. Just curious...
It slows the voltage rise time across the motor. It helps with RF noise, along with decreasing the peak currents through the flywheel diodes. Feel free to experiment with whatever you'd like, but I suggest that if your stated requirements are accurate, what I've recommended will likely prove to be a reliable as well as economical choice.

Keep in mind that the Zeners will need more cooling than the Schottky diodes will. Use fat traces to provide heat sinking.

You might consider using a single bidirectional TVS diode instead; something like this:

You could try retrofitting the other boards with an axial version.

I suggest you perform extensive bench testing, stopping and starting the motors frequently.

One item that will place a lot of stress on the driver is if the motor is switched from full forward to full reverse; the transistors will have to pass nearly twice the stall current. As I have no clue how you're controlling the motor inputs, that'll be up to you to prevent such a situation.

#### TexasTony

Joined Jul 15, 2010
43
Sgt,

Let me explain a little further, this should help.

This circuit controls a small regular motor (not PDM) that operates a small gate. When the gate is activated, it runs 10-20 seconds. Normally it will activate a few times a day. At most it might activate once/minute for 2-3 minutes (so 3 times in 3 minutes, total run time of 30-60 seconds in that window).

I also needed to put in some resistance to control the motor torque. There is a 16 ohm series resistor. I had a problem where in cold temperatures, there wasn't enough torque. I did a kludge of a fix on the current boards, I dropped series resistor to the 16 ohms listed above and added a 100 ohm thermistor across the motor. Yes, this is pure wasted burned power, but it works. When cold, the thermistor is hi-impedance and the motor gets the full power. When warm, the thermistor is lower impedance which burns power and prevents the motor from bending the gate.

I was thinking to replace this kludge with controlling the voltage regulator to the motor. I would still need a small series resistor, just to sense when the motor stalls, but 1 or 2 ohm would suffice. Actually changing the voltage could affect the H-bridge? I will need to drop the regulator from 10v to 7v.

OK, sorry about the long write-up but thought this would help.

Voltage Regulator: For my 10v regulator, I use the NatSemi LM2937IMP-10/NOPB. It was a little light and am moving to SPX3819S-L.

Zener diodes: Given I don't have a PWM motor and the infrequent activation time, I don't think heat for the diodes will be an issue. Just to clarify, you are recommending a lower voltage zener (11-12v) and that it would be ok to have 1 pair of zeners across the terminals of the connector to the motor compared to two pair.

But for heat, I will widen all traces to the transistors and the diodes... copper traces are cheap!

BTW, the motor has a few seconds between one direction and the other, so no problem with that sort of a surge.

Thanks again
Tony

#### SgtWookie

Joined Jul 17, 2007
22,219

I don't know if efficiency is important to you, but a switching regulator will be much more efficient, and generate much less heat than the linear regulators you've been using. If you start dropping a lot of voltage across those linear regulators, they'll get mighty toasty. Pd(Watts) ~= (Vin-Vout)*Iin. If you're supplying them with 12v in, and have ~250mA current, then 7v out @ 250mA will give you around 1.25W to dissipate. That could be an issue in hot weather.

#### TexasTony

Joined Jul 15, 2010
43
Sgt,

I was wondering if you missed my questions! I DO appreciate your guidance.

OK, first to answer your question. I've thought about switching regulators. I'm not convinced that I need it (in the current design). The main reason is the amount of time that I'm drawing the higher power, typically 10-15 seconds. I looked into this again, and I definitely will beef up the copper traces around it to help pull away the heat.

But you make a good point. When I get to where I have the variable voltage, I will be doubling the power drop across the Vreg. The power efficiency of the regulator is almost insignificant (again because of the amount of time it's on). But what I will do is change the 10v regulator to one that I can disable. I'm not finding any regulators in the 10v ~500mA output with under 5 mA quiescent current, and that will be 80+% of my power draw! Ugh! Turn it off when not in use. Rather than change to a switching regulator, I can just go to a beef-ier linear regulator (is what I am thinking). Beef-ier will be more Q current, but if I can turn it off then no big deal.

Right now I power my lower-voltage regulator off the 10v regulator. If the 10v reg turns off, then I need to to power the lower-voltage regulator straight from the external battery. But to do that, the regulators I've seen have limited input voltage. I am thinking that I put a 5v zener diode in series from Vbattery to the low-voltage regulator. That circuit will never draw more than a few mA. But I've never done this. Do you see any reason why this wouldn't work?

Sgt, I know in your posts you say not email for guidance. But I would be willing to hire you for a little phone support... we could talk through quite a bit in an hour & I'd be happy to pay for it. Do you do that? If so, how should I contact you? But I need to know, is that picture really you? I'd love to hear a little more about your military service!

Thanks again
Tony

#### SgtWookie

Joined Jul 17, 2007
22,219
Hi again Tony,
I'm really short on time at the moment; have to leave in a few.

Have a look at this switching IC regulator from National:
http://www.national.com/ds/LM/LM2841.pdf
The LM2842 is capable of 600mA current, adjustable Vout, has a shutdown input leaving a shutdown current of ~16uA, and is in a small 6-pin SOT-23-6 SMD package.

Future Electronics sells these for $1.46/ea in quantities of 1000, which is a heck of a lot cheaper than Digikey: http://www.futureelectronics.com/en/technologies/semiconductors/analog/regulators-reference/switching-regulators/Pages/5629910-LM2842YMK-ADJL-NOPB.aspx Ignore the 300mA regulator rating on the site; they typoed it. Future Electronics has offices in four Texas cities: http://www.futureelectronics.com/en/company-information/contact-us/Pages/ContactUs.aspx?country=USA Austin, Dallas, El Paso, and Houston. Here's an example circuit: BOM cost is ~$1.90 in quantities >1k, efficiency is ~90%.

#### Attachments

• 26.5 KB Views: 70

#### TexasTony

Joined Jul 15, 2010
43
Sgt,

First, I was serious about paying you as a consultant for an hour or two. It would save me time and you definitely earn it. If not, that's fine. But I just wanted to be clear about my offer.

OK, I have given this more thought, and I really appreciate your recommendation. Another key factor I didn't mention is that it is typically attached to a trickle charger or a solar panel. So I do not worry about the efficiency drain on a switching regulator vs linear as it runs for 1-2 minutes per day. I looked and looked at your suggestion, but the linear reg's just make more sense at this point.

I do have another question that I started before, but let me clarify. OK, for the 10v regulator, I need to be able to disable it for power savings. That has become very apparent to me. That's ok. But then I need to run my 3.3v control straight from the input voltage. And depending on what is used, I suspect it could be anything from 11v (low battery) up to 18v (poor "12v AC/DC adapter"). For the more low-quiescent 3.3v regulators, they seem to go to 16v as their upper limit on the input voltage. I am thinking of 2 ways to solve that. See attached drawing (hopefully it's attached).

First I didn't draw an in-line series diode to prevent reverse connections for either drawing. But for Option A, I put a series resistor from the rail (current limiter, load won't go over a few mA). Then a zener diode in parallel with the regulator, maybe a 12v zener to keep the regulator from ever seeing more than 16 input. Bad thing with this design is that if an 18v source is used, it'll always burn power (60 mW?).

Then I thought of Opt B. Put maybe a 5v zener in series with the incoming rail. If there is an 18v source, then the regulator will see 13v. And if it's an 11v source, the regulator will see 6v. I think this is cleaner. But have you ever done this, and do you see any disadvantage to doing something like this?

Thanks again
Tony

#### Attachments

• 28.3 KB Views: 41

#### SgtWookie

Joined Jul 17, 2007
22,219
I have given this more thought, and I really appreciate your recommendation. Another key factor I didn't mention is that it is typically attached to a trickle charger or a solar panel. So I do not worry about the efficiency drain on a switching regulator vs linear as it runs for 1-2 minutes per day. I looked and looked at your suggestion, but the linear reg's just make more sense at this point.
I see. Well, without the shutdown feature, you'll be draining the battery, or cutting down on solar charging efficiency, or whatever. That might be taken care of by using an N-ch MOSFET to disconnect the ground (return) side of the regulator AND the motor when it's not needed. Of course, that will add some expense and control circuitry, but not much. Prices will have to be checked.

I do have another question that I started before, but let me clarify. OK, for the 10v regulator, I need to be able to disable it for power savings. That has become very apparent to me. That's ok.
Mentioned in my last paragraph.

But then I need to run my 3.3v control straight from the input voltage. And depending on what is used, I suspect it could be anything from 11v (low battery) up to 18v (poor "12v AC/DC adapter"). For the more low-quiescent 3.3v regulators, they seem to go to 16v as their upper limit on the input voltage. I am thinking of 2 ways to solve that. See attached drawing (hopefully it's attached).

First I didn't draw an in-line series diode to prevent reverse connections for either drawing. But for Option A, I put a series resistor from the rail (current limiter, load won't go over a few mA). Then a zener diode in parallel with the regulator, maybe a 12v zener to keep the regulator from ever seeing more than 16 input. Bad thing with this design is that if an 18v source is used, it'll always burn power (60 mW?).

Then I thought of Opt B. Put maybe a 5v zener in series with the incoming rail. If there is an 18v source, then the regulator will see 13v. And if it's an 11v source, the regulator will see 6v. I think this is cleaner. But have you ever done this, and do you see any disadvantage to doing something like this?
Option B isn't so good. There's no protection for the input voltage exceeding the limit if there's a spike on the line. Option A will consume power, but only if the input voltage is out of range anyway.[/QUOTE]

#### TexasTony

Joined Jul 15, 2010
43
Sgt,

OK, good point. Opt B is flat wrong. But what do you think of opt A?

I did a little # crunching. OK, on my current circuit I only need 2 mA for the controller. Assume I can tolerate a 11-18v input range and use 3.3v output with the regulator having a 16v input limit.

Components:
100 ohm series resistor, 1206 package
14v zener, .5w rated

At 18v input, the resistor will drop 4 volts, or 160 mW power worst case. Easy enough with a 1206 package and heavy copper I would think... maybe 1210. The power drop on the zener is the current (4v/100ohm = 40mA). So 40 mA with 14v drop, the power drop will be (14v x .04A) .56 watt. Need lots of copper to pull that heat away. One factor: I do have a series diode to protect from reverse polarity on the incoming power. It is rated as a 1v drop. So if I want to tolerate 18v on the input, it becomse 17v on the input of this circuit. So the resistor only draws 3v or 90mW power. And the current becomes 30 mA, so the zener power drop lowers to .42 watt. That buys me a bit of margin, I'm ok with that. And I will spec my input rail to 16v to give a little more margin.

While with a fully charged battery (13v), the zener will drop nothing.

Now if somebody uses a 20v input, well at some point things will go poof.

In worst case, assume 11v battery nearly drained. Zener draws nothing. If 2 mA across 100 ohms, that is a .2v drop. So 10.8v into the regulator, good enough.

Do you see anything wrong with my approach or math?
Thanks
Tony