0
\$\begingroup\$

I implemented a circuit very similar to the following (original source: 8051 - Can an NPN transistor be driven? ) to control power to a vibration motor from my micro.

switch

I made the following modifications:

  1. Power supply is 5V DC regulated, not 3.3V
  2. R1 is changed to 100K (to try to save battery power)
  3. R2 is changed to 1K (to pass GPIO pin value to transistor easier)
  4. Q2 is TIP31
  5. PowerV is not a separate supply. Instead it is replaced with a 51 ohm 1/2 watt resistor connected to the same 5V DC regulated supply to prevent the rest of the circuitry from overheating or shutting down

I ran tests using a voltmeter with the motor physically disconnected. In my software on the micro, I can choose to make the GPIO pin high-impedance or grounded. This part works. What doesn't work is the voltage reading at the "Load". It's always stuck around 5V no matter what the value of the GPIO pin state is.

I have tested the motor by connecting it directly to 4 AA batteries that are at 75% good status (not weak) and the motor runs flawlessly in that setup so the motor isn't at fault.

I also ran a conductivity test on the motors and that was normal.

What's the best way to fix this without hogging power? The only thing I could think of is that my R1 and R2 ratio is terrible and that I should just make R2 24K since I multiplied R1 by 10 in my design?

\$\endgroup\$
  • 1
    \$\begingroup\$ What do you see at the base of Q1 when your uC is outputting low? What about the base of Q2? \$\endgroup\$ – The Photon Jul 19 at 2:21
  • \$\begingroup\$ @Sparky256, consider the schematic included in the question. It uses an external transistor to solve that problem. \$\endgroup\$ – The Photon Jul 19 at 2:27
  • \$\begingroup\$ @Mike, when you say "the voltage reading at the "Load". It's always stuck around 5V", do you mean the collector of Q2 always has 5 V? What did you replace the motor with when you removed the motor? Did you short the collector of Q2 to 5 V? Or did you just remove the motor, making an open circuit? What happens if you put a resistor (100 to 10k ohms) in place of the motor? \$\endgroup\$ – The Photon Jul 19 at 2:29
  • \$\begingroup\$ @Sparky256, read the linked question. The issue they're trying to solve is the 8051 GPIO can sink much more current than it can source. (OK, so use a MOSFET. But we seem to be doing 1980's design here) \$\endgroup\$ – The Photon Jul 19 at 2:38
  • \$\begingroup\$ If you want to debug this, you must start by measuring the voltages at key intermediate nodes and adding that to your post \$\endgroup\$ – Chris Stratton Jul 19 at 3:02
1
\$\begingroup\$

The circuit you're building is ... well, kind of complicated for what you're trying to do. Answer? Cheat! Use an n-FET instead, which doesn't have the drive requirements of the TIP41. A logic-level FET like this one: https://www.onsemi.com/pub/Collateral/FQD7N10L-D.pdf. Rds(on) at 5V is a mere 0.3 ohm. Bonus: no Vce(sat), more swing for your motor, less power dissipation in the driver.

If it's a small current - 200mA say - two BSS138 in parallel would even do it. They're small: SOT-23 size.

Don't forget to put a freewheel diode across the motor if it's a brush type.

\$\endgroup\$
  • \$\begingroup\$ That pdf link requires a password... odd \$\endgroup\$ – Mike Jul 20 at 17:02
  • \$\begingroup\$ Also, I already made this circuit on PCB so I need to be careful with replacing parts. The only thing that came to my mind was replacing the first transistor with one that accepts a lower voltage input. I used 2n3905 in my design, but I plan to replace it with 2n2907 or 2n4403. I'm not sure which of those two are best because in LTspice, both accept the same lower voltage for turn-on. so I think my transistor choices is an issue \$\endgroup\$ – Mike Jul 20 at 17:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.