Author Topic: Switching between 2 power sources with isolation.  (Read 3643 times)

0 Members and 1 Guest are viewing this topic.

Offline VEGETATopic starter

  • Super Contributor
  • ***
  • Posts: 2004
  • Country: jo
  • I am the cult of personality
    • Thundertronics
Switching between 2 power sources with isolation.
« on: September 17, 2016, 02:22:49 pm »
Hi,

I want to have 2 power sources, one is Isolated DC-DC converter (5v-to-5v, 400mA max) from USB, and the other is a normal 12v DC input (wall adapter for high current of 1A min).... to charge 2 Li-ion batteries (8.4v max).

I want a circuit to activate only one of them at a time while the isolated 5v run by default. So when you plug the 12v source, the circuit disconnects the 5v and activate the 12v one.

The problem is when someone put 2 of them at the same time (especially when the project is off) while the MCU is not yet powered... To cut it short, here is what I came up with:



As you can see, the grounds are shared (can it be not?) and I put diodes for the typical protection... but diodes alone can not operate if the 2 sources are on at the same time... well, maybe I am wrong because if that happens then the drop voltage around the D2 diode will be 5v-12v which will turn it off for sure...

I thought about making Op-Amp comparator but I think it wont work nicely.


I want the 2 sources to be protected from each other so the isolated 5v-to-5v supply is always "isolated", it must be fed to a Boost converter (MIC2288) to make the voltage 9v to charge 2-cell 18650 batteries (200mA max so it will be slow). The other 12v source is for fast charging but not isolated.

looking forward to your comments...

thanks!

Offline JS

  • Frequent Contributor
  • **
  • Posts: 947
  • Country: ar
Re: Switching between 2 power sources with isolation.
« Reply #1 on: September 17, 2016, 04:09:53 pm »
  The two power supplies will work fine with just the diodes, only the one with the higher output will drive the load. If both are "exactly" at the same voltage they will share the load (the exactly and the division of currents will depend on the particular diodes, give it or take a few mV, nothing to worry)
  In your case, with a isolated output should share the ground with the 12V and the charger, the µC and the primary side of the converter don't need to share and I'd try not to connect them unless necessary. Let's say you have the µC connected to the PC for some communication, and the ground of the charger get's shorted to somewhere nasty by accident, you blow the USB port. Not needed, not any advantages sharing that ground, unless you are interacting between the µC and the charger in an insulated way, sensing something without optocoupling or something like that.

  I don't know what you expect that transistor to do, connecting it that way is an emitter follower and the only change with whatever the µC does is the voltage in the resistor. The converter won't notice that. If you connected it in a way that it shorts the 5V without the 10k you will be doing something... SMOKE!

JS
If I don't know how it works, I prefer not to turn it on.
 
The following users thanked this post: VEGETA

Offline VEGETATopic starter

  • Super Contributor
  • ***
  • Posts: 2004
  • Country: jo
  • I am the cult of personality
    • Thundertronics
Re: Switching between 2 power sources with isolation.
« Reply #2 on: September 17, 2016, 09:08:59 pm »
So if the user connected both sources at once, nothing will happen? I mean without microcontroller controlling the charger ic?

Sharing grounds is a typical thing to do I guess, what do you suggest? both sources must charge the batteries (each at a time) and the battery negative lead is the ground of the circuit.

The USB port will be isolated at all times because I will use an isolated DC-DC converter (uses transformers).

Offline VEGETATopic starter

  • Super Contributor
  • ***
  • Posts: 2004
  • Country: jo
  • I am the cult of personality
    • Thundertronics
Re: Switching between 2 power sources with isolation.
« Reply #3 on: September 17, 2016, 09:47:13 pm »
You assumed I will connect the primary side of the isolated converter to the common ground... I won't. Only the output because it is a must for current to pass in the circuit.

the charger IC is this: http://www.skyworksinc.com/uploads/documents/AAT3663_201878C.pdf

the DC-DC converter is only 2W and can deliver 400mA. Now 5v->9v boost will give us a max of 220mA. It will be used to charge 2 18650 batteries so it will be so slow... the fast charge option is via 12v DC jack from wall adapters (a raspberry pi one can make 2.5A!) so the IC must adjust its charge current accordingly.

BTW, how to calculate charging time @ 200mA and say 1A? 4000mA battery = 4 hours @ 1A charging? how does connecting them in series help producing more usage time?


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf