Hi everyone.
I'm trying to make my circuit switch automatically between internal battery and USB. Using a circuit simulator (free/open source/online or offline) I've played with a few methods I've seen online, but none work the way I really want. This seems like it would be a pretty common task, so I'm hoping there is an industry solution and it's just my googling-skills that suck. Onwards!
Specs:
USB: 5v (obviously)
Battery: >4v (I'm looking for a method that works regardless of battery voltage above a minimum threshold)
Load: ~50 ohms, or 100mA @ 5v
Operation:
USB disconnected: Battery supplying load with minimal voltage/current drop across switching mechanism
USB connected: Battery COMPLETELY cut off, USB supplying load, again minimal voltage/current drop.
Methods:
1. Diode on each input (LINK)
This method is the most basic, but only works if your battery voltage is lower than USB voltage, otherwise when you connect the USB, the load draws from both supplies.
2. USB driving a relay (LINK)
This is also very easy, and works regardless of battery voltage. The problem is that the relay wastes juice (at least it is from USB and not battery though) and relays are just messy. I can clean it up with a capacitor and a Shotkky diode, making this solution un-sexy but usable.
3. MOSFET/JFET (LINK)
My only experience with FETs is in simulators, and I can't trust that they always model correctly. My program just yells at me 90% of the time I use JFETs. With an enhancement mode P-channel MOSFET I was able to have success, but it fails at higher battery voltages, drawing from both sources. Although realistically I'll probably be using 4AAs in series and the voltage from fresh to dead will be within 6v - 4v this solution still drops way too much voltage across the FET. Is it just a matter of using a different rating/type/configuration, or will this never reach the same effectiveness as the stupid relay? I feel like a depletion mode MOSFET might work, but my program doesn't model them and it's not like I have a bunch sitting in a drawer.
So, does anyone have some insight? I don't know why I'm struggling with this, I imagine every phone/laptop/etc uses some version of this and you can bet your ass they don't use relays. I know I can make this work with the relay, but I'm more curious as to what the industry standard method of doing this is.
Thanks!
I'm trying to make my circuit switch automatically between internal battery and USB. Using a circuit simulator (free/open source/online or offline) I've played with a few methods I've seen online, but none work the way I really want. This seems like it would be a pretty common task, so I'm hoping there is an industry solution and it's just my googling-skills that suck. Onwards!
Specs:
USB: 5v (obviously)
Battery: >4v (I'm looking for a method that works regardless of battery voltage above a minimum threshold)
Load: ~50 ohms, or 100mA @ 5v
Operation:
USB disconnected: Battery supplying load with minimal voltage/current drop across switching mechanism
USB connected: Battery COMPLETELY cut off, USB supplying load, again minimal voltage/current drop.
Methods:
1. Diode on each input (LINK)
This method is the most basic, but only works if your battery voltage is lower than USB voltage, otherwise when you connect the USB, the load draws from both supplies.
2. USB driving a relay (LINK)
This is also very easy, and works regardless of battery voltage. The problem is that the relay wastes juice (at least it is from USB and not battery though) and relays are just messy. I can clean it up with a capacitor and a Shotkky diode, making this solution un-sexy but usable.
3. MOSFET/JFET (LINK)
My only experience with FETs is in simulators, and I can't trust that they always model correctly. My program just yells at me 90% of the time I use JFETs. With an enhancement mode P-channel MOSFET I was able to have success, but it fails at higher battery voltages, drawing from both sources. Although realistically I'll probably be using 4AAs in series and the voltage from fresh to dead will be within 6v - 4v this solution still drops way too much voltage across the FET. Is it just a matter of using a different rating/type/configuration, or will this never reach the same effectiveness as the stupid relay? I feel like a depletion mode MOSFET might work, but my program doesn't model them and it's not like I have a bunch sitting in a drawer.
So, does anyone have some insight? I don't know why I'm struggling with this, I imagine every phone/laptop/etc uses some version of this and you can bet your ass they don't use relays. I know I can make this work with the relay, but I'm more curious as to what the industry standard method of doing this is.
Thanks!