View previous topic :: View next topic |
Author |
Message |
iso9001
Joined: 02 Dec 2003 Posts: 262
|
Sleep/Idle board drawing 22mA (!), Anything I missed ? |
Posted: Sun Jun 18, 2006 6:49 pm |
|
|
Like subject says. Maybe I missed a CCS option / fuse / basic design rule. Right about now I know what 99% are you thinking: "He's leaving a floating input". Nope.
Have a small board, 1 PIC 18F, 2 MCP2515 SPI CAN controllers and transceivers. 5V regulator being fed by 12V. A mosfet turns cuts the power to the 2515 and trans. Made certain all outputs are set to low, even the SPI pins.
When the everything is on and running my meter says its pulling 75mA, I toggle the fet and then it goes to 22mA.
I have it in Sleep(), tried with clock off and clock running, very little change.
My meter sucks, but the regulator (STM KF50BDT) is getting warm so I think it pulling a bit.
I calculated total draw should be pulling 1mA.
Code: |
.................... setup_oscillator( OSC_IDLE_MODE );
0064C: MOVLW 80
0064E: MOVWF FD3
00650: MOVF FD3,W
....................
.................... setup_timer_1(T1_DISABLED);
00640: CLRF FCD
.................... sleep();
00658: SLEEP
|
I'm stumped. Any ideas? I mean a few mA over I could understand. But 21 over is killing me.
Thanks! |
|
|
asmallri
Joined: 12 Aug 2004 Posts: 1635 Location: Perth, Australia
|
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Sun Jun 18, 2006 7:22 pm |
|
|
Can you provide a link to the data sheet for the regulator ?
If I go to the ST Microelectronics website and put into their
part search box, either KF50BDT or KF50, it comes back
and says "This query has produced no results". |
|
|
iso9001
Joined: 02 Dec 2003 Posts: 262
|
|
Posted: Sun Jun 18, 2006 7:52 pm |
|
|
Datasheet:
http://www.st.com/stonline/books/pdf/docs/4337.pdf
I'm using the DPAK version. The C13 cap is .1uF and the C12 is 2.2uF. STM's website sucks btw.
I can exactly post the whole schematic since its under company do not release orders... But I'll see what I can do.
Here is how I have the regualtor hooked up. This is from a newer sch then I made this board from but I think its the exact same.
Thanks for taking the time to look into this guys, |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Sun Jun 18, 2006 8:39 pm |
|
|
That regulator doesn't have a super low quiescent current, but it's
obviously not causing the 22 ma load.
So, the problem must be elsewhere. Somewhere there is a load
of about 220 ohms. Is it possible that there's a power-on LED with
a series resistor ? (Not likely, but just a thought).
Questions:
1. What PIC are you using ?
2. Can you post your #fuses statement ?
Things to try:
Create a circuit with just the PIC in it -- no peripheral chips.
See if you still get the problem. If you do, it could be fuses, or
it could be internal modules in the PIC that haven't been disabled.
One other note:
Your reverse protection diode (shown in the schematic) should come
before all the capacitors. In your existing circuit, if you had reverse
voltage, that polarized capacitor would get zapped. |
|
|
iso9001
Joined: 02 Dec 2003 Posts: 262
|
|
Posted: Mon Jun 19, 2006 12:53 am |
|
|
I checked a few differnet boards so I know its not a fluke regulator or anything like that.
Nope, no leds are on. I just have 1 and its pretty obvious when its on.
I'm using an 18F4680. I'm using the H4, NoBrownout, Protect, NoWDT, I cant rmember if its set to PUT or not. I can't confirm that till morning.
It looks like I'll have to do some desoldering to test this :(
I made sure to disable all the peripherals I'm using. Except SPI actually, I just realized that. I'm not even sure if its possible to disable SPI like that. Even so I doubt its 22mA load causing.
Thats a really good note about the reverse diode! Thank You. I'll make sure to draw that change and make sure it goes into other designs. |
|
|
asmallri
Joined: 12 Aug 2004 Posts: 1635 Location: Perth, Australia
|
|
Posted: Mon Jun 19, 2006 12:58 am |
|
|
If you cannot post the circuit then if you like you can email it to me and I'll have a look. _________________ Regards, Andrew
http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!! |
|
|
Storic
Joined: 03 Dec 2005 Posts: 182 Location: Australia SA
|
|
Posted: Mon Jun 19, 2006 4:24 am |
|
|
I had a similar problem some time ago, not that I was going to sleep mode to reduce power, it was I needed to be able to have 40V dc in reg to 5V, I found that original reg I was using was drawing up to 50ma before the circuit got any current. when I change the reg i was using to a buck switch (LM2594) and reduce the current. I even tried it on a smaller DC (12V) to 5v dc. still draw less then the standard 7805.
(I went from 110ma to 50ma by changing the reg type)
I have not experience the reg you have suggested however maybe you can try another reg type or even check your caps. A reverse polarity cap may seem to work however will draw unnecessary current. _________________ What has been learnt if you make the same mistake? |
|
|
Ttelmah Guest
|
|
Posted: Mon Jun 19, 2006 5:19 am |
|
|
Things that might be happening:
First, try letting the processor pins float, and with a resistor, try pulling each line that you are pulling 'low', low in turn. One obvious thought is that one of the lines is pulled high by something, and pulling the line low, is resulting in a lot of current.
Second, if you have a scope, look at the output of the regulator. Many 'low dropout' regulators, are prone to oscillation, and in this case draw excessive current. Stopping this comes down to careful layout/component choice round the regulator. Is the regulator specified to work with a diode on the input, with no decoupling capacitor right by the input pin?. I'd uggest moving the input capacitors tothe right of the diode, and ensuring that they are as close as possible to the chip.
Third, as a 'comment', do you need the very low dropout performance of this part?. If not, then depending on what your 12v 'source' is, look at the possibility of using a more rugged design, with more voltage margin.
Best Wishes |
|
|
SherpaDoug
Joined: 07 Sep 2003 Posts: 1640 Location: Cape Cod Mass USA
|
|
Posted: Mon Jun 19, 2006 7:57 am |
|
|
iso9001 wrote: | Datasheet:
http://www.st.com/stonline/books/pdf/docs/4337.pdf
I'm using the DPAK version. The C13 cap is .1uF and the C12 is 2.2uF. STM's website sucks btw.
I can exactly post the whole schematic since its under company do not release orders... But I'll see what I can do.
Here is how I have the regualtor hooked up. This is from a newer sch then I made this board from but I think its the exact same.
Thanks for taking the time to look into this guys, |
If that diode is to protect the product from a reverse polarity input, you should move the input electrolytic cap inside the diode. Otherwise if the customer connects the power backwards the cap will short, make a bad smell, maybe leak electrolyte, and your product will end up in the dumpster. The cap may take a few minutes to fail, but believe me it will fail. If the boards are made and can't be changed consider just removing the electrolytic cap and making the non-polar cap as big as possible. _________________ The search for better is endless. Instead simply find very good and get the job done. |
|
|
iso9001
Joined: 02 Dec 2003 Posts: 262
|
|
Posted: Mon Jun 19, 2006 1:08 pm |
|
|
I put the whole unit on the scope, checked the regulator for oscillations. No luck, looks very stable.
Caps are properly placed and working well.
I don't have a reverse protecion diode on this board but I'll update the design for the next build.
So I was about to go look at another project when I dropped the scope probe on my mosfet's drain (I gave it a rather large section of pcb space so it could stay cool).... 1.5V with it off. I tested over and over, I got values from 1.5V to 2.1V with the 5V to the P-Ch's gate. Its hard to test the gate since when I do the probe triggers the gate.
So... I don't know if my fet is causing the problem. If not then maybe something is backfeeding all the way to the drain on my fet ?
This is a daigram of the fet, I'm using it to shut down the rest of the pcb while not in use:
Now, I don't know if this is the problem, but it seems likely since 1-2V would mean a voltage drop somewhere, voltage drop means losing current. |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Mon Jun 19, 2006 1:22 pm |
|
|
Quote: | to the P-Ch's gate |
Your schematic shows an N-channel FET.
What is the manufacturer and part number of your FET ? |
|
|
iso9001
Joined: 02 Dec 2003 Posts: 262
|
|
Posted: Mon Jun 19, 2006 1:48 pm |
|
|
FDT434P
http://www.fairchildsemi.com/ds/FD/FDT434P.pdf
Sorry about that, my stupid design program didn't have a prebuilt component for P-Ch mosfet (!?), so I uded this one as a temp. Just changed programs. Haven't added all my parts in yet.
The pin labels are right, just not the diagram. |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Mon Jun 19, 2006 2:48 pm |
|
|
Quote: |
I dropped the scope probe on my mosfet's drain.
I got values from 1.5V to 2.1V with the 5V to the P-Ch's gate.
|
So the FET has +5v on the Source pin, and you measured 5v on the
gate. The FET should be completely turned off with those voltages.
If it isn't, there are several possible reasons:
1. The FET may be bad.
2. The FET may not be connected correctly.
3. The FET may be a different part number than what you think it is.
4. There may be some other source of voltage into the accessory
side of the circuit, besides the FET. |
|
|
Storic
Joined: 03 Dec 2005 Posts: 182 Location: Australia SA
|
|
Posted: Mon Jun 19, 2006 8:25 pm |
|
|
With the P channel FET, I use a 1k pull up resistor from Gate to source, this will ensure the fet is off. ACC_VCC = 0v
I then use a n channel fet to gnd the gate of the P FET to switch on the P FET On.
ANdrew _________________ What has been learnt if you make the same mistake? |
|
|
|