Running I/O s in Paralle to Source / Sink > 40 mA
Juliet Oscar Echo
Posts: 31
I know the 40 mA source / sink limitation comes up a lot when people want to drive a relay with the Propeller, but I've been wondering if it would be possible to drive a load of up to 80 mA by connecting the load to two I/Os in parallel and driving both I/Os simultaneously? I've searched the forum and haven't seen anyone suggest this approach.
I'm working on a project where I want to be able to power my GPS receiver module on and off. It draws ~32 mA at 3.3V, but can peak at over 35 mA. It's uncomfortably close to 40 mA, and I have no way of measuring instantaneous current when I first power the GPS receiver on. Using an NPN transistor switch on the low side won't work because the GPS module needs a small voltage to keep it from losing EPHEMERIS data when powered off (my GPS receiver module doesn't have a small battery commonly found on modules for this purpose). I could use a PNP transistor switch, but that's even more parts. If I can power the GPS receiver module via two I/Os in parallel to get a higher "safety margin" it will make for a much simpler approach. Thoughts?
I'm working on a project where I want to be able to power my GPS receiver module on and off. It draws ~32 mA at 3.3V, but can peak at over 35 mA. It's uncomfortably close to 40 mA, and I have no way of measuring instantaneous current when I first power the GPS receiver on. Using an NPN transistor switch on the low side won't work because the GPS module needs a small voltage to keep it from losing EPHEMERIS data when powered off (my GPS receiver module doesn't have a small battery commonly found on modules for this purpose). I could use a PNP transistor switch, but that's even more parts. If I can power the GPS receiver module via two I/Os in parallel to get a higher "safety margin" it will make for a much simpler approach. Thoughts?
Comments
-Phil
Thanks for your response. I definitely agree with needing only one PNP transistor because the load is at 3.3V and not a higher voltage. However I'm still curious to know if I can tie two I/Os together to source / sink twice the current? Why bother with a few extra components if all I need is two I/O s?
-Phil
Consider the fact that you have 28 pins. So if each is loaded at 5ma simultaneously, that is 140ma. Lets say that leaves another 160ma for actual internal Propeller operations. Seems about right with an overall package limit of roughly 300ma.
Saving a transistor and destroying an i/o pin of the Propeller really is a step backwards. If you need to drive power, do it with power components -- not with Propeller i/o. You will get a lot more satisfaction out of your projects.
A 2N2222 transistor will drive up to 500ma. If powered with 5VDC, that will supply 4.4VDC output. That should be enough for any 5VDC relay and costs pennies for protecting the Propeller i/o. If you dislike the 0.6VDC voltage drop, use a MOSfet.
And I use the 2N2222 with a 12VDC power to drive 12VDC relays which come in larger sizes and more configurations. 11.4VDC after the drop is not noticed. Most of my 12VDC relays require 60ma to drive them, so the 2N2222 work just fine.
(Yes, you might use Darlingtons. But they double the voltage drop to 1.2VDC and may run hot.)
Actually I hate lame schematics lying around in internet.
For relays use ULN2007 or similar ICs.
For noniductive load use this simple schematic (or search for ICs). It should be robust enought:
*) How much load? 10A without problems! Actually it depends on P-channel mosfet. Choose the right one! Not too big and not too small. I like VISHAY SILICONIX SI8429DB for small appications.
*) If Load supply is the same as for MCU (+5 for arduino, +3.3V for propeller), you can ommit R1,R3 and NPN transistor.
*) Increase R1 value to save power in battery-based apications applications.
*)For production try to use SMT components.
If you ever need a very compact component to handle small loads then consider dual N+P transistors with inbuilt bias resistors such as the PUMD10,115 which you can hook-up as a NPN to PNP for higher source voltages or just use it as suits. Just one tiny SOT pack. http://au.mouser.com/ProductDetail/NXP-Semiconductors/PUMD10115/?qs=sGAEpiMZZMshyDBzk1%2fWiyXIlDzPapKNsXf0xhRMDA0%3d
Connect E to 3.3V, C to GPS-VDD, B to 5K and other end of 5K to prop pin.
Low turns on and open (input Read) or high turns off.
The UNL2007 and 2008 devices are Darlington pairs and that means they have a double diode voltage drop. They also are limited to something like 60ma per channel, though I have seen devices that doubled up on the channels to get more output (my last air conditioner controller board did this and ran fine for 5 years until the cooling coils rusted out).
Everyone grabs the UNL2007 or UNL2008 for the simplicity of the package and wiring, but a 2n3906 or 2n2222 may actually perform better. MOSfet can work, but nearly all the good ones are surface mount. BJTs are still offered in TO-92 packages, along with the 2N7000 (that might work).
AND, I want to emphasis that the Propeller data sheet asserts 300ma maximum for the Propeller. Driving 8 pins at 40ma goes over that and into damage. Adding power drivers is really a requirement of long project life.
Right about everyone grabbing ULN2008s that's for sure. The trouble is the double diode drop is only on the base emitter voltage, the problem is the saturation voltage is never going to be better than 0.8V and more often over 1 volt due to the fact that the base of the second NPN of the darlington has to be fed from its collector via the first NPN, it can never ever get below the second Vbe drop + Vce(sat) of the first transistor. The current ratings given for them are extremely misleading as they are package/chip limited. Typically the datasheet says "500ma per driver" which doesn't mean 7 or 8 outputs at 500ma at all, no not at all. Number one, the saturation voltage figure at 350ma is 1.3V typical, or worse. that means there is almost 1/2 a watt of power being dissipated at 350ma per driver and if all eight were doing the same then that would mean you would have 4 watts trying to be dissipated, so the chip would not live very long at all, seconds perhaps. DIP thermal resistance is 70'C/W so at 4 watts it's a total meltdown, forget about 500ma then! So the datsheet gives you the facts but not the complete picture, you have to connect the dots to see what that picture is yourself. The TI datasheet at least says "(single output)" after stating 500ma per driver, but who would twig to what that meant?
They use these chips for things like unipolar steppers where only one output is on at a time but it's just as easy to use discretes and resnets when you do SMT, it's cheaper, takes about the same space although you can spread it out as you need to, and it can handle much higher currents on all channels at the same time.
BTW, most decent MOSFETs aren't available in TO92, the low Rds(on) devices have a larger die which doesn't suit the TO92 leadframe so ones like the venerable 2N7000 are only good for around 100ma with a 3.3V gate voltage. Practically all the safe operating range parameters are spec'd for 10V gate drive. That is why I sometimes use BJTs instead of MOSFETs at these medium current ranges as the transistors are easily driven hard from 3.3V, none of this "gate threshold voltage" which is quoted at microamp loads!!!