Transistor replacing relay

Audioguru

Joined Dec 20, 2007
11,248
I finally wired up this circuit. And of course it's not working quite right.

For the NPN, I got a MMBT2222A. The PNP is a MMBT2907A. Transistors are SOT23, all my resistors are 0805 package.

Circuit powers up and outputs are right. Only problem is that the 33 ohm resistor starts smoking.
Transistors have a gain of 100. The load is in the 100-200 mA. So if I run 2-4 mA through the control side (33 ohm), that should saturate the transistors. 10 volts / .004 amps = 2.5 k ohm.
My circuit was designed to use low gain power transistors and supplies 3A of current. The 33 ohm resistors dissipate 3W so should be 5W wire-wound type.

Transistors need a base current of 1/10th the collector current to saturate well. (Current gain is used for linear amplifiers that have plenty of collector to emitter voltage that disappears when a transistor is saturated.)
Your collector current is up to 200mA so the 33 ohm resistors should be 500 ohms, use 470 ohms. Then the base current is 21mA. Their power dissipation is 0.2W so your little surface-mount resistors are too small.

I think you should make the H-bridge with low loss and no input current Mosfets.
 

Thread Starter

TexasTony

Joined Jul 15, 2010
43
Audioguru,

I think we're thinking alike. A couple more questions to pick your mind.

My motor typically draws 100 mA, and at stall draws 200mA. In normal use, it will only run for 10 seconds, and not sit at stall for more than 1-2 seconds. So I'm leaning toward 1k ohm for the replacement of 33 ohm. It doesn't really have the time to heat up due to the short run type. And it cycles a few types a day, not continuous.

But you also mentioned switching to FETs. Very interesting. It would address this resistor power issue, but I don't think it's much of an issue. Do you have any suggested part #'s? My priorities: #1 SMT, #2 cheap. I'm looking at 3 cents each by the reel for the NPN/PNP transistors. For any cost added, I'd just up the size of the resistor from 805 to 1206 & that should solve it (maybe that is the easier solution).

Thanks again
Tony
 

Audioguru

Joined Dec 20, 2007
11,248
Hi Tony,
I have never built anything with surface-mount parts. I never cared much about the cost of a project because I used parts that worked well, not cheap stuff.

Today, Mosfets are used to control motors because they are excellent switches. I can't remember how long ago transistors were used.

My RC electric airplanes weigh 1.0oz (29 grams) and 1.22oz (34.6 grams) with a single-cell 3.7V Li-po battery. They are a challenge to fly on windy days. They use PWM and Mosfets to control the speed of their main electric motor. The same with my RC electric helicopter.

If you use 1k for the base resistor of a transistor that drives 200mA to start a stalled motor to run then the transistors might need to be tested then sorted so that they don't have so much saturation voltage loss that the motor fails to start running. With a 470 ohm base resistor then every transistor should work well.
 

thatoneguy

Joined Feb 19, 2009
6,359
If the load is that small, why not use a SN754410 IC?

$2.33 each in qty of one, or $1.66 each for 100-499 from Digi Key (down to less than $1 in qtys over 1,000)

It has everything you are looking for. Separate motor supply voltage, shoot through protection, onboard switching FETs, etc.
 

Thread Starter

TexasTony

Joined Jul 15, 2010
43
ThatOneGuy, $1+ each? Look at MMBT2907A-FDICT-ND on digikey, 2-3 cents each when buying by the reel. I'm going to be building 100's of these, and price matters.

AudioGuru, A couple of thoughts. The motor starts at 100mA, and when it stalls I sense the higher load and shut it down within a second or so. And the motors still work all the way down to 2-3 volts (yeah, rather amazing). But I'm realizing that I'm being too cheap. The power isn't that big a deal, and I can skin this cat another way.

So you recommend 470 ohms. I'm regulating the voltage down to 10 volts, not 12 volts. So with 2 transistor B-E drops, that is (10- 2x.7) = 8.6 volts. Power on the resistor is 160 mW. It runs for a whole 10 seconds, so I'm not worried about heat. The 0805 resistor is only 125mW rated, but if I just bump it up to 1206 resistor that's 250 mW. Which will meet my needs and work just great. It'll cost me a little bit of power, but not enough to matter. It'll guarantee functionality and the heat.

I appreciate all the help. I'm working on another project, I'll have to start another thread with some questions from that...
Thanks again
Tony
 

Audioguru

Joined Dec 20, 2007
11,248
I made a schematic that works from a supply of 10V and has a 200ma output.
I don't know the supply voltage of your microcontroller (5V?) so I guess its output is about +4.5V when it drives 1.7mA.
 

Attachments

Thread Starter

TexasTony

Joined Jul 15, 2010
43
Thanks audioguru.

You're exactly right. It's a 5v controller. I notice you also changed the control input resistor, raised from 150 ohm to 1.8k. I'll play with that value. I think I have my circuit!

thx again...
Tony
 

Thread Starter

TexasTony

Joined Jul 15, 2010
43
Guys,

I'm reviving this thread. OK, I built the original circuit, worked great with a little tuning.

Turned around & had the raw cards built and was dealing with another issue. I finally got back to this circuit and realized another issue. Audioguru, you mentioned transistors are old world. Well, that's me, I'm in my 40's & I am old!

But those transistors led to another issue: leakage. Voltage supply was 10v. Control input was 4.5v (from a 5v controller). With both controls low (0v), I had 10+mA of leakage in the transistors. Yikes! I'm running on batteries, so this is huge.

OK, so my transistors are 2222a a (npn) and 2907a (pnp). I just looked back at their specs and I'm not seeing where they spec leakage. But spec'd or not, this makes these not usable.

So AudioGuru... I'm getting dragged into the 21st century kicking! Any suggestions for changing this to FETs to avoid the leakage?

Tony
 

Audioguru

Joined Dec 20, 2007
11,248
The max leakage current of a 2N2222A or a 2N2907A is as high as 10mA only when its supply voltage is too high at 50V and its base is not connected to anything to turn it off. The transistor is in breakdown.

With a normal supply voltage and something turning off the base then the leakage current is a few nA which is too low to easily measure.

Maybe you connected the collector and emitter of a transistor backwards making it a turned on 6V zener diode.
 

Ron H

Joined Apr 14, 2005
7,063
I agree with Audioguru. If you have measurable leakage, you have either a wiring error or bad part(s).
 
Last edited:

Thread Starter

TexasTony

Joined Jul 15, 2010
43
Guys,

I tracked down the leakage issue. I thought my regulator was reverse-polarity protected... My mistake (twice).

The leakage of the bridge circuit is very low. At least low enough that the linear regulators dominate my power draw.

I now need to build a few of these boards up to verify repeatability. But it looks great so far.

I really appreciate the help.

Tony
 

Thread Starter

TexasTony

Joined Jul 15, 2010
43
Guys,

Well I'm back with more questions. AudioGuru, I've been using your design and it's worked well. But I've run into a problem: cold temperature.

I did make one addition to AudioGuru's circuit. On one leg going to the motor, I put a series resistor. The idea is that it limits the power to the motor, and I sense that to know when to turn off the motor when it meets a resistance.

Here's my problem. When the motor gets really cold (<20deg F), it loses efficiency. To the point where it won't turn. I can reduce the resistance to get it to work at the low temp. Problem is that I need to drop it so much that at hot temperatures the motor will over-torque and cause damage.

So here I am, with LOTS of these circuits finally built and this problem. I'm considering several options.
1. I can use the reduced resistance and react quickly when it hits the torque limit. (I'm not sure I can do this)
2. I can add some sort of a temperature sensor/switch. For instance a circuit that adds in a parallel resistor to reduce the resistance when it's cold. An example: http://cache.national.com/ds/LM/LM26.pdf
3. Total circuit redesign. Open to suggestions
4. Suggestions?

I'm not seeing any way to make #1 work. I'd love to get some idea for #2 that I can modify onto existing circuits.

And long term do something like #3. Maybe a microcontroller with a temperature sensor that turns on transistor circuit A below freezing & circuit B for above? But I need to get this done fairly quickly.

Any help is GREATLY appreciated...
Thank you
Tony
 

wayneh

Joined Sep 9, 2010
17,498
Even if you embark on a redesign, it must still deal with the fact that your motor needs more current at low temperature. Without changing the motor, that fact won't go away.

How are you now using the high current condition to shut off the motor? It shouldn't be too tough to change the setpoint max current limit to vary depending on temperature. I'd use an LM35 to sense temperature and use an op-amp to scale the voltage output into something you can use to change the high-current cutout.
 
Top