View previous topic :: View next topic |
Author |
Message |
jgschmidt
Joined: 03 Dec 2008 Posts: 184 Location: Gresham, OR USA
|
1824/1825 won't source 25mA |
Posted: Sun Sep 01, 2013 1:48 pm |
|
|
According to the spec sheet, 16F1825 and 16LF1824 will source and sink 25mA on their I/O pins.
I'm trying to use an I/O pin to power an RF module which needs 15mA. However, I'm only getting 5mA. What am I missing? I've tried both of these parts with the same results. I'm running off 2xAA cells. Voltage at the battery terminals remains constant at 3V throughout. I've verified that the module does truly need only 15mA at 3V when connected directly to the battery.
The reason I'm doing this is so I can easily power off/on all the peripherals when I go to sleep and wake up. I know I could use a pair of mosfets to do this but since I need less than 25mA I thought I'd save on parts and complexity by powering from an I/O pin.
Any insights into this would be appreciated. _________________ Jürgen
www.jgscraft.com |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9244 Location: Greensville,Ontario
|
|
Posted: Sun Sep 01, 2013 2:28 pm |
|
|
One possible problem is that Vout will be 3V-.7 V = 2.3Volts to the device.
At this lower voltage, the device might try to draw too much current or won't turn on.
Quick test is to use a Red LED and say a 75r resistor.2.7-1.6=1.1v / .015 = 75r +-. OK, try 100r first..
See what happens..measure 'this and that'...please report back....
Jay |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Sun Sep 01, 2013 2:37 pm |
|
|
Download the latest 16F1825 data sheet:
http://ww1.microchip.com/downloads/en/DeviceDoc/41440C.pdf
Look at this graph on page 401 (page 399 in the Acrobat reader):
Quote: | FIGURE 31-43: VOH vs. IOH OVER TEMPERATURE (VDD = 3.0V) |
Look at the green curve. On this graph current increases moving to
the left. The Y-Axis on the left is Voh. Note the quick drop off in Voh
as you increase the current.
One possible suggestion is to double-up or triple-up the i/o pins. I don't
really like this and would not do it myself. I think the best thing is to
use an external switch, such as a FET.
Last edited by PCM programmer on Sun Sep 01, 2013 2:38 pm; edited 1 time in total |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19543
|
|
Posted: Sun Sep 01, 2013 2:38 pm |
|
|
Several parts.
First, the 25mA figure is an 'absolute maximum rating', not something that can actually be delivered. You'll only get that current into a dead short. delivering no voltage.
Second it drops with supply voltage. If you look at the 'output high voltage' spec, it is 0.7v below the supply rail, at 3.5mA, when running at 5v, but at only 3mA when running off 3.3v. When running off 1.8v, the same drop occurs at just 1mA. As the supply voltage falls, the output impedance of the gate increases. It behaves pretty much as a resistor, so at 5v, with 0.7v/3.5mA, into a dead short you will see (5/0.7)*3.5 = 25mA. However at 3v, you would see (3/0.7)*2.72 = 11.65mA into a short.
You'll find it quite hard to do with MOSFET's as well. 3v will require you to find ones with low Vgs ratings. Something like the FDN327N is ideal.
The PIC output, will actually deliver slightly more pulling 'down' rather than up, and this is the simpler configuration with the FET as well - N channel devices are usually slightly cheaper and have better performances than P channel types.
If you have several output pins available, you can run them in parallel to reduce the impedance. Four pins paralleled, especially if you use them as pull down, rather than pull-up, should probably work.
Best Wishes |
|
|
jgschmidt
Joined: 03 Dec 2008 Posts: 184 Location: Gresham, OR USA
|
|
Posted: Sun Sep 01, 2013 3:29 pm |
|
|
Thanks for all the great feedback.
I didn't know which graphs to look for so that helps. The LED test helps in understanding what the graphs are trying to say.
I tried using multiple pins without success.
I did find a low voltage integrated load switch from Fairchild FPF2000 which may work instead. It's designed for 1.8 - 5.5 V. I couldn't identify the voltage drop from the spec sheet, so I'll give it a try and have more fun testing.
Otherwise, I'll just have to follow Jay's oft-repeated advice and get a bigger battery
Thanks again. _________________ Jürgen
www.jgscraft.com |
|
|
asmboy
Joined: 20 Nov 2007 Posts: 2128 Location: albany ny
|
|
Posted: Mon Sep 02, 2013 6:07 pm |
|
|
If it's a pull up of 25 ma you need -
try using a 2n3904 as an emitter follower
with it's base driven through a 220 ohm resistor from
the PIC pin. |
|
|
RF_Developer
Joined: 07 Feb 2011 Posts: 839
|
|
Posted: Tue Sep 03, 2013 4:12 am |
|
|
jgschmidt wrote: |
I did find a low voltage integrated load switch from Fairchild FPF2000 which may work instead. It's designed for 1.8 - 5.5 V. I couldn't identify the voltage drop from the spec sheet. |
As is common with this sort of thing, its a high side switch with a p-channel MOSFET as the switch element. Unlike bipolar transistors that have a reasonably fixed saturation voltage, Vce(sat), FETs are specified by an "on" resistance Ron, or Rds(on). In this case 0.7Ohms typical, so the voltage drop is simply 0.7 * Load current. With FETs on their own you have to be aware that Rds(on) depends on, and is specified at fixed Vgs, but for this sort of integrated switch, that's determined by the chip's internals.
This looks like a useful family of parts: saving space and parts count. Pity they don't go up to higher voltages however. Maybe there's a related part that does. |
|
|
jgschmidt
Joined: 03 Dec 2008 Posts: 184 Location: Gresham, OR USA
|
|
Posted: Tue Sep 03, 2013 6:45 am |
|
|
Most of that is over my head. I think I did get the part about the voltage drop being proportional to current draw. In my case: 0.7 x .015 = .011 which is quite acceptable.
If you search for "load switches" or "integrated load switches" you may find some higher voltage and current parts. I came across several in my searches. _________________ Jürgen
www.jgscraft.com |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19543
|
|
Posted: Tue Sep 03, 2013 11:20 am |
|
|
As some 'comments', don't get 'hooked' on positive side switching. Whilst with high voltage stuff this obviously has safety advantages, for low voltage stuff low side is often just as good (and may have several advantages). It makes no difference whether you disconnect the +ve rail or the -ve, except to things like which 'way' the inputs to the disconnected device are pulled, and which way pins on other chips (like the PIC), are 'pulled' as the supply goes off. Now the load switch you have found, is something like 10* the price of a simple transistor. May not matter for you, but if this is something being designed for a commercial application, this can be a big difference. The other 'problem' about devices like this is that you are then 'dependent' on one manufacturer, while a simple transistor will usually have multiple sources.
May be worth 'bearing in mind' for future designs at least.
Best Wishes |
|
|
jgschmidt
Joined: 03 Dec 2008 Posts: 184 Location: Gresham, OR USA
|
|
Posted: Tue Sep 03, 2013 11:45 am |
|
|
I appreciate the ongoing comments and always learn something from them.
Yes, I'm familiar with single source and unit cost issues, having mass-produced one of my projects for over 13 years. I maintain at least 2 sources for every component. Even in one-off projects I've been bitten when I revisited them a few years later and found that some component was no longer available. In working on a new design it's easy to get lost following a single trail.
I've actually found another solution to my specific problem. I'm using transceiver modules from RFDigital. When they're configured for transmit they only use 2uA when idle. The receivers, however, are always on, using 15mA. I use the PIC to support a single power on/off button using sleep() and wake on external interrupt, among other functions. I found I can use otherwise unused I/O lines to control the RF module configuration and set the receiver to transmit mode before I go to sleep and then configure it for receive when I wake up. Problem solved!
This actually saves on other parts in addition to the power controller since I was using a single PCB for transmitter and receiver and using jumpers to configure each one. Since I now do this via software, I save some PCB space.
Thanks again. _________________ Jürgen
www.jgscraft.com |
|
|
|