Sunday 1 November 2015

arduino - Transistor as switch dropping voltage


I'm using an Arduino to drive two hobby servos but they draw too much current when not in use so I'm trying to use a transistor as a switch to cut the power to them when not needed.


schematic


simulate this circuit – Schematic created using CircuitLab


I've tried using the transistor both high and low side with no luck. The peak current of a 2n2222 is only 600mA so I tried a TIP 31 that I had lying around as well with no luck either. The circuit has enough power to drive the servos when the transistor isn't used but when inserted into the circuit I can hear them humming when they're supposed to be activated but there's not enough power to turn them. If I put my multimeter probe from the emitter to ground there's only 2V drop, rather than the 5V from the battery.




Answer



A big problem is that the emitter follower BJT does what it says on the can - the emitter voltage follows the base voltage and because there is always a diode drop, the emitter, under load conditions will always be about 0.5 to 0.8V below the base voltage. If you are using Vcc=5V then it is likely the drive to the servos will be about 4.3V. If you are using 3V3 logic the drive will be a paltrey 2.6V despite having a 5V battery.


To overcome this you need a better drive circuit like this: -


enter image description here


Ignore the 5.5V input voltage - this circuit will work as low as a couple of volts should it needed to be. The MCU pin needs a little over a volt to turn on the BC547 which will, in turn pull the P channel MOSFET's gate to the 0V rail. This will turn on the FET and drop hardly any voltage at all for reasonable loads.


You need to choose the P channel FET with a little care though. Firstly, it needs to have a low Vgs(threshold), probably below 2V (for a 5V battery). Low Vgs(threshold) means it can almost fully turn on with a voltage difference between gate and source of probably about twice the threshold value. There will be graphs in the documents for the FETs that you look at that give more detailed scenarios of supply voltage, current, Vgs(th) and on-resistance.


It also needs to have low on-resistance to suit the current drawn by the servos. I'd look for something like 50 milli ohm max.


No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...