3.7V device with mains/battery switchover circuit

Customer:

I’m looking for a module that can switch a 3.7V device between two power sources: a 230V AC mains adapter when AC power is available, and a lithium battery when mains power fails. I’m not sure if this exists as a ready-made product or what it’s called. I need the circuit logic to automatically select mains power when available and switch to battery when mains is lost.

Original message (Croatian)

Imam jedan uređaj koji radi na 3.7v. Želio bih da kada ima struje u kućnoj utičnici (230v ac), da se uređaj napaja preko ispravljača preko utičnice. Kada nestane struje uređaj dobiva napon preko litijske baterije. Treba mi modul koji bi ostvario tu logiku (kad ima struje onda napajanje iz utičnice, a kada nema prebaca na bateriju). Unaprijed Vam hvala. [name removed]

Originally submitted via email support on 3 February 2022. Migrated to the forum for community visibility.

Soldered Support:

We don’t have a ready-made board for this function. You can build your own circuit using a P-channel MOSFET, a diode, and a resistor. Here’s how it works: VUSB is where you connect the adapter output, VBAT is the battery, and VCC is the output you connect to your device. A schematic diagram is provided showing how to connect these components.

Alternatively, you could use a battery charger that continuously charges the battery while mains power is available and discharges from the battery when mains is lost, but this isn’t ideal because constantly charging a lithium battery to 100% capacity creates long-term problems.

Original message (Croatian)

Možete koristiti punjač za bateriju koji bi stalno punio bateriju dok ima napajanje s ispravljača, a kada nema onda bi se napajao s baterije. Ovo nije najbolje rješenje i dugoročno bi bilo problem jer nije dobro skroz puniti bateriju na 100%. Ako želite možete složiti vlastiti uređaj koji bi odrađivao navedeno, a potreban vam je P-kanalni mosfet, dioda i jedan otpornik kako bi složili uređaj. Shema za uređaj je dana u prilogu, na VUSB dovodite napon s ispravljača, VBAT je baterija, a VCC je izlaz koji vodite prema uređaju koji želite napajati.

Attachment omitted in migration: Auto_source_selection.png

Customer:

Do the diode and MOSFET have to be the exact components shown in the schematic, or can I use other types? Do you stock the components I need?

Original message (Croatian)

Hvala vam na odgovoru.

Soldered Support:

The diode can be any type, but Schottky diodes have lower forward voltage drop. Choose the diode based on the current your circuit requires. Similarly, choose the MOSFET based on your current requirements. Pay attention to the MOSFET’s on-resistance (Rds) - if it’s high, you’ll get significant voltage drop across the MOSFET when the device is powered from the battery.

We stock both components, though they are generic components with somewhat lower parameters, but they should work. For THT packaging we have the MOSFET IRF9540N, and for SMD packaging we have a generic P-MOSFET in DPAK. For diodes, we have an SMD Schottky diode MBR0520LT1G. Unfortunately we don’t have a THT diode in stock, but you should be able to solder the SMD diode.

Original message (Croatian)

Dioda može biti bilo koja, ali Schottky ima manji pad napona, a struju koju može provoditi odaberite prema struji koja vam treba za vaš sklop. Mosfet isto tako odaberete prema struji koja vam treba, i potrebno je paziti na otpor mosfeta kada je u stanju vođenja (Rds) jer ako je on velik prilikom rada će biti veliki pad napona na mosfetu (kada se uređaj napaja s baterije onda radi mosfet).

Imamo diodu i mosfet, ali su to generic komponente i imaju malo lošije parametre, ali možete probati s njima trebalo bi raditi. Mosfet u THT pakiranju (https://e-radionica.com/hr/irf9540n-mosfet-p-tranzistor.html) te drugi u SMD pakiranju (https://e-radionica.com/hr/generic-pmos-dpak.html), dioda u SMD pakiranju (Soldered: Open-Source Electronics, Boards, Sensors & Modules – Soldered Electronics). Na žalost diodu u THT pakiranju nemamo ali mislim da bi i ovu trebali moći zalemiti.