![](templates/subSilver/images/CCSLogo.jpg) |
![CCS C Software and Maintenance Offers](templates/subSilver/images/forumAd6.jpg) |
View previous topic :: View next topic |
Author |
Message |
trauma
Joined: 27 Nov 2008 Posts: 2
|
Dual Power Circuit Problem (USB Battery switch) |
Posted: Thu Nov 27, 2008 4:34 pm |
|
|
Hi,
we are working on a Dual Power circuit from the PIC18F4550-I/ML datasheet with the difference that we switched VBus and VSelf, so that the usb bus replaces the power of the battery.
However we're facing some problems, and I hope to get an answer here.
First, we got power from the battery leaking to the attach sense. Also, when detaching usb power, we got a small power drop on the emiter till the voltage gets to the output of the battery, which skrews somehow the sdCard attached to the PIC.
I am unsure about the values of the resistors and now also about the capacitor. Does anybody has a proposition which resistors and capacitors values to take?
datasheet: http://ww1.microchip.com/downloads/en/DeviceDoc/39632b.pdf
our circuit:
cheers,
Ulf |
|
![](templates/subSilver/images/spacer.gif) |
asmallri
Joined: 12 Aug 2004 Posts: 1634 Location: Perth, Australia
|
Re: Dual Power Circuit Problem (USB Battery switch) |
Posted: Thu Nov 27, 2008 10:27 pm |
|
|
trauma wrote: | we got power from the battery leaking to the attach sense. |
The rest of your schematic would be helpful.
Quote: | Also, when detaching usb power, we got a small power drop on the emiter till the voltage gets to the output of the battery, which skrews somehow the sdCard attached to the PIC. |
When disconnecting the USB the emitter voltage should drop to zero. I am guessing you may have powered the rest of the circuit incorrectly. The power source for the rest of the logic should be connected to the capacitor. I also think there should be a schottky diode from the sense I/O pin (Anode) to the capacitor (Cathode) however the 100K resistor may be sufficient to limit any potential latchup current.
Quote: | I am unsure about the values of the resistors and now also about the capacitor. Does anybody has a proposition which resistors and capacitors values to take? |
The size of the capacitor will depend on the rest of the logic. If there is no other significant devices other than the SD card and the level conversion logic to/from the card, then as a minimum, you need something of the order of 22uF low ESR capacitor (tantalum) plus the usual decoupling capacitors.
Similarly the resistors depend on the current consumption of the circuit and the DC gain of the transistor. From my tests, an SD card can draw a peek current of 100mA versus 25mA for a microSD - your results may vary. The average current for the SD card will be much lower and is a function of the write time. I would try 1Kohm for each of the resistors. _________________ Regards, Andrew
http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!! |
|
![](templates/subSilver/images/spacer.gif) |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|