USB / DC / Solar Lithium Charger input switching

Breakout boards, sensors, other Adafruit kits, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
taby1
 
Posts: 7
Joined: Thu Jan 23, 2014 9:01 pm

USB / DC / Solar Lithium Charger input switching

Post by taby1 »

Hey guys,

I've gotten the USB / DC / Solar Lithium ion/polymer charger (I'm just gonna call that the Solar Charger). The Solar Charger's page says that having anything in the DC barrel connector (I'm not sure how it can tell) mechanically disconnects the USB jack (Not mechanically, strictly speaking, since there are not relays or other 'physical' disconnects). The page proceeds to mention that the header pins can be used to provide power, but these pins are not polarity protected. This leads me to believe that the USB port and DC Barrel jack feed power into the same place, with measures to ensure that both are not connected at the same time. However, no further mention is give to the header pins, which don't have any continuity to either the USB port or the DC barrel, as far as I have been able to tell through a quick continuity check.

The desired operation I would like to have of the Solar Charger is that the USB port is given priority, and otherwise the power from the header or DC barrel is used. Lacking a further understanding of how the charger works, the only plan I can come up with is to leach some of the power off the USB port to flip a relay or something which disconnects the solar panel (DC barrel jack or header pins) when something is plugged in.

Thanks for any help,
--Patrick

User avatar
adafruit_support_mike
 
Posts: 67485
Joined: Thu Feb 11, 2010 2:51 pm

Re: USB / DC / Solar Lithium Charger input switching

Post by adafruit_support_mike »

The DC barrel jack has an internal plug-detection switch.

The spring clip that makes contact with the outside of a plug presses against a metal stop, and the other end of that stop leaves the jack's shell as a third pin. When the jack is empty, the third pin is shorted to GND. When a plug enters the jack, it lifts the spring clip off the stop, disconnecting the third pin from GND.

We route the USB jack's GND connection through that switch, so plugging in a barrel jack physically disconnects the USB jack from the GND rail.

The DCIN pads don't go through that connection, so you have to be careful about managing the interaction between that and the other power connections.

The behavior you want runs counter to the board's design. You can make it happen, but it would require an external circuit to manage the connections and priorities.

User avatar
taby1
 
Posts: 7
Joined: Thu Jan 23, 2014 9:01 pm

Re: USB / DC / Solar Lithium Charger input switching

Post by taby1 »

Sorry this is kinda late. I hadn't really thought much about the electronic design since I posted the first post.

I have a fairly shakey concept of how transistors work - I know how to wire them, and the basics of how they operate, but am unsure about how they would behave in certain situations. Here, for instance. Could a transistor be used to switch the power coming from the solar panels to the DC In header, simply turning the transistor off when voltage is detected on the USB port (wouldn't need a uC, but I'm planning on having one anyway to monitor battery levels)? Or would I have to use a more robust switching method like a relay?

Thanks for your help,
--Taby

User avatar
adafruit_support_mike
 
Posts: 67485
Joined: Thu Feb 11, 2010 2:51 pm

Re: USB / DC / Solar Lithium Charger input switching

Post by adafruit_support_mike »

Yeah, that will work.

The most common solution is to use P-mosfets to control a VCC line. Mosfets have high resistance when they're turned off (around 10M) but low resistance when they're turned on (as low as 0.01 ohms for some power mosfets). That's barely more resistance than a piece of wire, so mosfets make good electrically-controlled switches.

A P-mosfet turns on when its gate voltage is lower than its source voltage, so you basically turn them on by connecting the gate to GND. Any standard logic circuit can produce the necessary signals, or you can use comparators (op amps designed for yes/no output) to control them.

Development boards like the Arduino use that kind of circuit to manage the power connections.

User avatar
taby1
 
Posts: 7
Joined: Thu Jan 23, 2014 9:01 pm

Re: USB / DC / Solar Lithium Charger input switching

Post by taby1 »

Ok. So, I've thought about it, and I want this to be pretty small, so it's easy to carry around. The largest components so far, apart from the capacitor and PCB itself, are things like the JST headers, DC Barrel jack, and mini USB port. I'd like to cut all of these off. I've noticed that both JST headers appear to have through-hole headers (is that what they're called?) next to them, and there's the header for DC in. If I just cut off the JST headers, Barrel jack, and (maybe) mini USB port and just connect through the holes, will everything work correctly? What I'm most worried about is the DC jack, although as far as I can tell all it will do if I just cut it off is disconnect the mini USB port.

Also, unrelated, but what are the PG and PS pins on the Verter?

Thanks,
--Taby

User avatar
adafruit_support_mike
 
Posts: 67485
Joined: Thu Feb 11, 2010 2:51 pm

Re: USB / DC / Solar Lithium Charger input switching

Post by adafruit_support_mike »

You can remove the connectors and use a dedicated connection through the DC IN holes, yes.

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Products from Adafruit”