Core Electronics Forum

Onion Omega2S+ Pro - Reboots when AC power is lost whilst using liPo battery

Hi

We live off-grid in rural NSW and we like using the Omega2 product. We are using the Omega2S+ Pro boards for things like power monitoring and generator control etc. Our main AC power comes from a battery and inverter solar system.

If there is anyone who has an Onion Omega2 Pro and is using it with a LiPO battery attached could they confirm an issue that I am having?

My configuration is:-
A USB adapter is plugged into the mains supplying the Omega and I have a 1100mAh LiPO battery attached as a backup.

This part works:-
If I unplug the USB cable from either the Omega or the USB adapter whilst leaving the USB adaptor connected to the mains there is no problem, the Omega runs perfectly.

This does not work:-
If I simulate the AC disappearing by either unplugging the USB adapter from the mains or switching it off at the wall switch the Omega reboots. This is consistent no matter what is providing the USB power e.g I tried the following USB adators Netgear, Apple, Samsung, or even a decent size laptop plug pack that has a USB power output. Also, if I turn of the inverter to the house it still reboots.

I would like to see if this happens for people that are not off-grid and have stable mains supply to use to rule out the power supply to the house being the cause of the problem.

Any help would be appreciated.

3 Likes

Hi Phillip,

If only Onion boards were open source! That way I could find out what this BMIC is, and check whether its datasheet mentions anything about “power path management” which is what power management ICs use to refer to the always-on functionality you’re after. This is mentioned in the Onion docs though, so I’m wondering if this functionality on your board is meant to work, but isn’t due to a hardware fault.

One way I can see around this is just using a separate battery charger-booster IC like the Powerboost series from Adafruit:

Since the SoM on your board can draw up to 800mA peak, the powerboost should cover it.

Keen to hear what onion users come up with!
-James

1 Like

Hi Phillip.
One way which may be a bit exotic and expensive is to give your Onion system its own private little UPS. Have a battery and charger with a sine wave 12V to 240VAC inverter connected and have your Onion supply plugged into that. Your Onion supply would be powered by the inverter at all times so if the 240V mains fail the battery would keep the Onion powered.You would need a low voltage shut off to prevent battery damage should the mains be off for a longer period than anticipated. The battery/charger/inverter sizing will depend on max current draw and expected outage time.

Don’t forget if the battery goes flat the charger would have to power the inverter and charge the battery at the same time. That is where some smaller charging/power systems fall over. They will do either task in isolation but not both together.

A little bit inefficient but usually works and if the Onion operation is critical to your operation you can usually put up with a little bit of wasted power.
Cheers Bob

3 Likes

Hi James
I appreciate your thoughts and suggestions on this. I did think it may not be a use case they had in mind but then I thought without it, the battery just provides a simple portable option which is not that useful for my applications.
Would you be able to provide a link to the Onion doc that you referred to, I could not find it?
Phil

4 Likes

Hi Bob
Being off-grid for the last ten year as you likely imagined I have a number of inverters and batteries hanging around so I could certainly implement your suggestion. I just think the Omega boards are so close to just what I need in a small package at a reasonable cost for the performance that a was hanging out for this to work. As James said in his replay this may not be a use case they designed in.
Thank you for your great suggestion and if I don’t get this sorted via a simple solution I may just go your way.
Kind regards
Phil

4 Likes

Further investigation.

Looking at this from the viewpoint of the DC voltage at the USB port on the Pro board. I can see by using a DC PSU to supply the USB port with power, that if the voltage is slowly turned down from a good 5VDC, at around 3.4VDC the board resets. This to me suggests that the functionality of the Power Path Management (Thanks to James for the terminology) was not designed in the way I was hoping. If the USB VDC is a clean solid 4-5V when the USB is inserted into or removed from the board the power management copes and switches over. However, if the VDC at the USB port drops ungracefully as it would if the AC is pulled then it does not cope.

So I will think along these lines and see if any ideas show up.

Thanks, everyone for your thoughts and ideas so far.

Kind regards

Phil

4 Likes

H Phillip
That suggests that a sensor of some sort to detect the start of a possible “brown out” or a “graceful” drop say at 4 - 4.5V and switch off the power abruptly may work. Something like an under voltage shut down. I think some of these are settable in the shut down and recovery point. ie; some hysteresis. The down side is that most of these devices seem to be able to cater for lots of amps like a caravan or similar but there must be some low current ones around which are not so physically large.
Cheers Bob

4 Likes

Nice! I will research and see what I find. I will post if I find anything interesting.
Thanks!

3 Likes

Hi Bob
FYI
I have taken two additional steps to try and confirm that this is a power management issue.
If I use a relay and switch the VDC to the USB port on and off it works fine. If I remove the VDC from the USB port by just taking the +wire off the benchtop power supply it does not like that and reboots possibly because it is NOT taken away cleanly.

I am now looking at a circuit that might be able to drop a relay as the power comes down but before it gets to 4VDC. Not sure if this is likely to work but I will let you know.

Phil

4 Likes

Hi Phillip
Here is a little circuit you might like to try


IMPORTANT EDIT.
Refer to add - on post below. Replace the transistor with a Mosfet. Recommend Relay/mosfet board by Pololu. CoreElectronics SKU Pololu - 2480.

Based on a LM393 dual comparator. This is a useful device as it has an uncommitted (open) collector output so whatever it drives can be any voltage up to the IC limit (30V) and is completely separate from any inputs or sensing circuits. Under these conditions a common ground is required.

Ideally it would be nice to power the whole thing except for the monitoring bit (R4 & R5) with an always on reliable supply (battery back up) but if you are going to do that you may as well power the whole thing from such a supply.

This should work. There are a few things you will have to determine, V Ref, R3, R4, T1. Note positive feedback via R2, This is to provide hysteresis to improve switching time and prevent chatter while going past switching point. This hysteresis is set by R2 and R1. With a supply of 5V and V Ref of 2.5V the values shown should provide a hysteresis of about 0.5V. The calc for this are here. https://www.allaboutcircuits.com/tools/hysteresis-comparator-calculator/
The hysteresis can be changed with R2 value.
R3 is selected to suit whatever you use as a reference. Don’t forget it has to maintain the reference right down to a bit below where you want the circuit to switch. R4 sets the actual switching point and will depend on what voltage you use for a reference and at what supply voltage you want it to switch. You could even have something like about a 1k resistor and 10k 10 turn pot in series to make it adjustable. You will have to do some experimenting so a pot may not be a bad idea anyway.
Ti has to have enough grunt to drive the relay selected and should be a switching type. R6 sets the base current for T1 and will be dependant on T1 gain. I wouldn’t go below 5k1 and above 10 or 15k. The LM393 collector is good for about 16mA sinking so that will limit the lower value.

The system should be set to switch above a supply of 3.75V or there is a chance the 5V relay will start to sag at the lower voltages and cause strife. Of course you could use a higher voltage relay and relay supply here. That is the advantage of the uncommitted collector of the LM393.

Will leave you to have a play
Happy experimenting
Cheers Bob
PS: If you are struggling for a reference try about 3 X 1N4148 (1n914) diodes in series. That will give you about 1.8V and diodes are usually quite stable over a fair current range. If the switch point is settable the exact voltage does not matter as long as it is stable.
Also the positive feedback will influence any calculated voltage at pin 3 of the IC so keep that in mind if measuring. That is how the hysteresis is obtained.

3 Likes

Hi Phillip
Add on to my reply above.
I have made a HUGE mistake. That circuit will not work. The hysteresis depends on the LM393 output being at 5V when transistor is off. That circuit will be 0.6V (base/emitter junction). The transistor will have to be replaced by a Mosfet. A pretty good choice would be a little relay board by Pololu. It has the relay, Mosfet, diodes and all the bits on it. CoreElctronics SKU Pololu-2480. As a little precaution fit a 330Ω resistor in series with the gate connection. This fixes up the relay and driver all in one go.

Did a couple of sums a little while ago if you are interested.
Use 3 X 1N4148 diodes in series for your reference. R3 = 470Ω. This is not critical as long as there are a few mA through the diodes to be stable.
R4 = 15kΩ
With R2 = 150kΩ switch off should occur at supply 3.96V and switch back on at 4.8V.
A better value for R2 for you might be 180kΩ. Switch off should be 4.05V and back on at 4.75V.

You will have to do the experiment to verify this. I only did the sums but it should be close.
Cheers Bob
PS Must have had a Senior moment. But maybe I am allowed one at times.

3 Likes

Hey Phil,

I think I took a screenshot, then didn’t post it, oops!
Here’s what I meant to send with that first post:


https://onion.io/omega2-pro/

Seems they have sanded off the chip numbers in that photo. Are yours sanded on your board?

If you’re up to making something yourself, check out the excellent BQ24075 from TI:

The example circuits should be all you need to plug straight in between a battery and your battery input port on your onion. I believe the BQ spits out a little less voltage than what goes in, but does all the BMIC stuff. I have a simple design done up in Kicad for another breakout I was planning, so lemme know if you need that.

-James