On loss of "wall wart" AC the switcher enables a small lithium ion battery pack. The problem is I cannot have the 8266 reset when this switchover occurs. Unfortunately the relay contact closure is not quick enough to prevent a dip in the 5 volts feeding the processor and it resets.
It also resets going back to restored AC power; which makes sense I suppose.
I tried a 10uF 16v polarized capacitor across the output thinking this might prevent the momentary DC level drop but it was not a solution. Perhaps a bigger cap is needed. ???
What would have been nice is an onboard threshold adjustment that would allow you to set the incoming voltage level that the converter switches at.
Maybe a solid state switcher that does not rely on electrical contacts will end up being necessary.
Any suggestions how to tackle this are appreciated.
Depending on the voltage levels you could have a diode from each power supply to your circuit , that switches automatically - or just have the relay disconnect the battery when mains is on , and have a big cap on the mains psu so it holds up long enough .
Switching big capacitors can be hard on relays
The spec data I found indicates it draws typically around 70 milliamps but can go towards
250 ma depending on what outputs it might be driving. In my case only a single 3 volt LED is used in my code.
The 8266 is a Wemos D1 mini version. The battery voltage is around 3.9 volts and the converter
trickle charges it with around 4.2 volts while supplying 4.9 volts to the processor while AC is present.
The D1 Mini has an onboard 3.3V linear regulator that supplies power to the ESP8266, which is a 3.3V processor. Instead of that thing with the relay, you might consider this circuit, which would automatically switch over with no dropout:
The schottky diode will drop the 4.9V to about 4.6V, but that should still be plenty of room for the 3.3V regulator. But when it's on battery, there's very little headroom for the regulator. That's why the mosfet is used - to eliminate the voltage drop that a diode would cause.
I would be interested in knowing the voltage on the D1 Mini's 3.3V pin when it's being powered by the battery.
Exactly how are supplying power to the D1?
From the schematics I see the only way is through the USB connector.
The nominal voltage for a Li-ion battery is typically 3.6V or 3.7V, is that what you are using?
Well, lithium batteries aren't supposed to be trickle charged. In any case, it doesn't appear that the eBay converter is a charger. Do you have a charger in your circuit?
Yes sir, I am employing a NI-MH for backup power; it puts out around 3.8 -3.9v. The battery
converter module provides about a 3.9v trickle charge when working off the wall wart.
The D1 mini has a +5v pin right on the corner with a GRD pin next to it. Across on the other side
is a 3.3v output pin.
The converter module has a +- DC IN and a +- Batt IN while on the other end is a +- DC OUT.
There is some voltage regulator circuitry for the trickle charge and a 5 pin SPDT micro miniature relay.
I had thought about simply replacing the existing mechanical relay with a solid state opto-coupled (SSR) unit but was not certain it would be the best approach.