Question:
Transistor power leak?
?
2013-07-07 08:05:20 UTC
I am building a robot car with my raspberry pi. I am using two powered motor wheels, and two caster wheels. It goes in a straight line perfectly well but when only one motor has power, nothing happens when it is supposed to turn. I have doubled up battery packs so now each motor has 4 AA batteries and now they have enough power each, the problem is that even when both inputs are off, there is still a bit of current so the motors move slowly. I have noticed the transistors also heat up. What should I do? Change transistors?

Here is my circuit digram for each motor (I have two speed settings so I need two transistors and digital inputs for each motor): http://t.co/6hjFU3UBdh
Six answers:
Jonathan
2013-07-07 18:14:47 UTC
Are you kidding me? Where did you find that circuit?



I gather you set up two separate 3V supplies and two "switch circuits in parallel" in order to ensure enough current compliance, if I'm interpreting your words together with your circuit correctly. 4AA batteries arranged as two supplies, right?



Your NPN switches are NOT wired correctly.



I believe that the Raspberry pi uses a 3.3V supply rail for the I/O, so I'm going to assume that the outputs are 0V or 3.3V, when activated LO or HI. You appear to want two separate +3V power supplies in addition, I gather, and do not want to operate the motor bi-directionally nor to support "braking," and need a common ground rail to share in common with our microcontroller's +3.3V I/O pin supply. I'm also assuming that you are driving BOTH I/O ports in identical ways, so that if one is HI the other is HI, etc. You are using the two switches because you feel this is the best way to provide the needed current and I shouldn't debate that.



Before I start, let me say that I'm a little bothered by the idea of keeping two separate power rails for the system. You already have a +3.3V (and 5V, I think) supply rail that feeds the Raspberry pi. I'd probably attempt to use that, rather than set up a completely different (heavy) pair of 3V battery systems added to it. But let's assume this is the way you want it and that I didn't misunderstand the circumstances so far.



I don't know how much current you want into the motor. You don't state. This is important, because it bears on the right sizing of the base resistor AND even MORE because it bears on the current compliance capabilities of your I/O port to drive it. Chances are, for any significant motor current, you will EXCEED the ability of the Raspberry pi I/O ports to deliver current. I read that "GPIO input hysteresis (Schmitt trigger) can be on or off, output slew rate can be fast or limited, and source and sink current is configurable from 2 mA up to 16 mA." I do NOT know how you have configured the I/O, yourself. But it appears configurable. No more than 16mA, though, at maximum. And that is ONE I/O pin. I don't know how well it will sustain four (two for each motor) at 16mA. It may work. Don't know.



Assuming you want in the 100's of mA for your motor (or more), you pretty much need to guess that your BJTs will have to be operated with β=10 or so. With lighter loads, you can afford to use β=20 or β=30 for saturated operation. But not at currents where you feel the need for parallel operation of AA battery systems. Hold to β=10 to keep the VCE as low as possible.



One problem here is that your I/O is ground-referenced and you are setting up two separate power supplies with the motor between a shared collector and a common battery connection. So one side of your two battery systems MUST be tied together and both collectors are tied together, as well. This means the emitters MUST be isolated from each other (cannot be common to each other.) That's the only way two battery systems can work. But if you use NPN BJTs as your switches, you will want the emitters to be held in common, which you CANNOT DO. So in this case you MUST use PNP switches to keep the circuit simpler. So this means something like the 2N3906 or 2N4403.



Looking at the 2N3906 datasheet, your VCE will be at least 220mV even with β=10 (at 100mA, which is the largest Ic current the graph shows.) That's typical. You should plan on 250mV no matter what and 300mV to be safer.



With only 16mA drive at best and β=10, that's only about 150mA per switch. With two, perhaps 300mA then. Vbesat is going to be precariously close to 1V. So with the PNP switches on (I/O at 0V), you will see about 2V across the 330Ω resistors. That's about 6mA, not 16mA. So you may want to reduce the base resistor values, while you are swapping out for PNP BJTs. Perhaps 120Ω or 150Ω would be good to have around and try out.



Still, I left your 330Ω resistors in the circuit found in the following link. Try that approach and see what happens.



[Given that your drive voltage is 3.3V (I think), your BJTs will be operated with a slight reverse bias when off (about 0.3V.) This is small enough that most BJTs won't "break." But if it were to exceed a reverse voltage of about 5V, a lot of BJTs will start to "zener" and you'd need to worry. But it's okay here.]
Rambhau
2013-07-07 10:56:09 UTC
In expected operating conditions, the motors should be totally off except a leakage current. The leakage current (ICBO) will be 10nA in cold condition, may go up to few microamp in hot condition, should not be a problem. The unwanted current (which turns the motor even with both inputs off) may be because of some noise. The noise mcan be bypassed by adding a capacitor between base and emitter or base and ground (base and ground is preferred). Try 10 microfarad (tantalum or electrolytic or multilayor ceramic) and 1 microfarad multilayor ceramic, whichever gives better result. Adding the capacitor might slowdown the response by few milliseconds, should not be a problem. Adding a resistance between base and ground additionally may also help. Resistance value should be of the order of 4.7k or 10k.



The heating may be reduced by adding a heatsink. Ask for the heatsink suitable for TO-10 pack. WHAT IS THE NORMAL OPERATING MOTOR CURRENT? AND WHAT IS THE SOURCE OF THE DIGITAL SIGNAL?



EDIT on 7th July at 7:25 AM (Indian Standard time):



Adding of capacitor between base and emitter is workable if motors are switched on / off without any speed control. If PWM mode of operation is utilised for speed control, capacitance can not be added.



To protect transistors from high back emf induced in the inductive coils of the motor, a freewheeling diode is required. It should be in reverse biased condition during normal operation of the motor - Cathode connected to the emitter, anode to ground.



Have you added LEDs as shown in the sketch? With this polarity, the LEDs will not glow normally. While switching off the motor, the LED s will glow for very short time. However if the motor is operated with PWM mode, the LEDs will glow whenever the motor is operating.



The biasing of the transistors and motor connections seem to be okay. However ground of the transistor circuit must be connected to ground of the Digital input source.



Please provide following details:

Motor current

Level of the digital input and current capacity.

Whether motor is operated in PWM (Pulse width modulation) mode
2013-07-08 10:45:52 UTC
Change the transistors to ones from the TIP power range keeping the original transistors as driver transistors to provide enough gain. There is a circuit configuration known as a Sikalsi pair which can be useful in low voltage circuits such as here. Does the controller output have a true push-pull characteristic like CMOS logic circuits? If not a pull down resistor may be needed(Use ULN darlington driver ic schematic for idea of values).
Paul
2013-07-07 09:18:16 UTC
You should compare the current going to the motor with the spec. sheet emitter current. From what I can find, I think that the absolute maximum current is 600 mA. If the transistor has a metal cover, you may be able to find a press-fit heat sink to slip over the case. To block ALL current and keep the motors from turning, you may have to install a multipole switch which disconnects the power supplies AND the digital inputs. To ensure turning, you may need to install a differential in each axle. With only one motor has power, maybe the power to one motor is insufficient to move the vehicle.
amania_r
2013-07-09 05:31:51 UTC
I assume your picture is wrong and you have 2 motors each with a separate transistor and driver.



1) connect the -ve supply of each battery to the 0V of the Raspberry Pi.

2) You only need one battery pack to drive both transistors/motors

3) If you still have problems with leakage, put a diode in series with the base of each transistor. That will drop around 0.6V and will fix the problem if '0' on the Pi output is around 0.4V
2014-11-02 01:51:29 UTC
hard step. query onto a search engine. that will help!


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...