Battery fallback for Onion Omega
-
I was just looking at how to make my omega Solar powered and this I found,
and a L7805CV
Thats What I bought You dont need a charge controller for 6v 2w, just the l7805cv
-
One solution might be to use this combination of charger and power booster.
https://www.adafruit.com/products/390
Solar Chargerhttps://www.adafruit.com/products/1903
Power boosterThe charger will charger the battery via solar, usb, power adapter, etc. the power booster will take the load output and boost it to 5 v for the Omega.
Just seems like a simple, inexpensive solution... They also have the 6volt solar cells.
-
Hi guys.
Been out for some days - thanks for the great contribution to this post.
One problem with battery packs seems to be that there is a short period where output is low when input connected /disconnected. I think this is because most battery packs switch from battery directly to Vin when there is input power.
This causes the Onion to crash but i need un-interrupted power also when input (car power jack) is connected / disconnected.
Also very important: I need to be able to monitor if power is delivered from battery or not because i need to shutdown the Onion before the battery pack is empty.
I found this: https://www.adafruit.com/products/1944
My technical english is not the best so may one be able to tell me if:
- power is un-interrupted when Vin is disconnected / connected (i am already pretty sure it is capable of it)
- read if output power is delivered from battery or not
- one can put this between micro-usb and computer and serial interface will still work
Cheers Ben
-
@Benjamin-Rau we've used the Adafruit Powerboost 500 with the Omega at the office with success.
To answer some of your questions:
- The power to the load is not interrupted when a microUSB power source is connected to the Powerboost PCB
- As far as I know, the output power is always being provided by the battery, even when the battery is being charged (I could be wrong though)
- No, the serial interface will not work, there is no USB data propagation on the Powerboost PCB
Just a reminder: the Onion Power Dock will be available soon, so there will be no need to use the Powerboost PCB in the future
-
Hi there.
@Lazar-Demin Thanks for your reply also. I know about the Onion Battery pack, i backed it Unfortunately it is pretty delayed and my 3 month road trip starts in 3 weeks, which my Onion is going to track and create a timelapse from it... sorry that was OT.
The Adafruit Power Board has the USB Vin extracted on the board so you can use it as GPIO i think and when its low i know that the power supply has gone and can shutdown the onion safely.
Also there is a Low Power Pin that can be used for the same reason but you can run the Onion as long as possible on battery.
I will give it a try and switch to the Onion Battery Pack later... hopefully it has such Low Battery and "is power source connected" pins also.
Cheers Ben
-
@Lazar-Demin On which pins could i connect the 5V and Ground for input power when i dont want to use microusb cable. I tried the 5V pin on the expansion board but it doesnt work. Maybe i have to connect ground to one specific pin?
-
@Benjamin-Rau I am assuming you are using an expansion dock.
I have successfully powered my Omega connected to an expansion dock from a 5v power source with the 5v connected to the expansion dock pin marked 5v near the RST pin and the ground of the power source to the GND pin at the end (next to the RST and 3.3v pins)
-
@Benjamin-Rau Either of the 5V pins and any of the three GND pins on the Expansion Dock will work (they're all connected on the PCB).
If it still doesn't work, please post a photo of your setup.
-
@Kit-Bishop @Lazar-Demin Thanks for your help. The setup is working very well.
I created a small python script that i start on boot and which monitors low battery and input power status powers the onion off before an empty battery would kill the onion hard:
https://gist.github.com/benjaminrau/1f6585591dad469aee4e0520677e91acI made use of the gpio wrapper one of the onioneers contributed:
https://community.onion.io/topic/40/simple-python-wrapper-and-demoCheers Ben
-
@Benjamin-Rau Awesome! I like the Python script that halts the Omega when the battery gets low.
Side note: there's also an Onion GPIO Python module: https://wiki.onion.io/Documentation/Libraries/GPIO-Library
-
Maybe coming up with a dumb question but "How to power on the Omega after powering it off from within the os with halt command?"
My problem now is that i power the Omega off with my script mentioned above but i dont know how to power it on again when power source recovered. The problem is that the from the Omegas perspective the power source never disconnected so i would need to "send some power on signal with HIGH..."
Cheers Ben
-
@Benjamin-Rau I think you have yourself a kind of logical conundrum Once you have halted your Omega (because power is getting low) using your script, it is now no longer running and thus will not be able to respond to any input signal you may devise.
I'm not a Python expert, but I gather that your script keeps going and does not halt unless the power low condition remains for a given period (1 minute ?). I assume that the intention is that you need to do some cleanup or tidy shut down action prior to power actually failing totally.
My best suggestion would be to not do the halt operation (but continue to do cleanup operations as required) while power is low. Then,if power is restored fully before it finally fails you will continue processing OK. If power does fail completely then (a) your system should still be in a clean state; and (b) your system should restart normally when power is restored
If this is not sufficient for your requirements, you may have to consider some external circuitry that (a) you can control to fully turn off your system when power is low for too long; and (b) which re-applies power to your system when power re-attains acceptable levels. I'm sure that something using latching relays or similar could be contrived to do this.
As an addendum to the above, as a final comment to this, in your original post you said: When i stop the car... the power is off. And mama told me that this isnt the way to shutdown a computer
The only real reason that powering off is not a good way to shut down a computer is because there may be data in memory that hasn't been physically written (flushed) to open files. Thus, so long as when you know power is getting low and may fail, you ensure that all pending output is done, you should be OK when/if power does fail.
-
Hej @Kit-Bishop, thanks for your reply.
YOu are right that was kind of a logical conundrum combined with bad english and misunderstadings
I cleared the situation now out for me and i am one step ahead.As usual another blocker:
When connecting the LowBattery (LBO) output of the Adafruid PowerBoost to any GPIO on my Omega the LB Led on the module (also if it was off before) starts shining and the GPIO is logical HIGH, even when the LED was off before.When i remove the cable from GPIO to LBO the LED is off again.
Tonight i will test the LBO with an Arduino (others in the internet report that the LBO is worked very well for them) but maybe in the meantime one has an idea why the LBO is high always when the cable is connected.
Cheers Ben
-
@Benjamin-Rau From looking at the schematics for the Adafruit PowerBost (https://learn.adafruit.com/downloads/pdf/adafruit-powerboost.pdf), its LB LED would be turned on if the LBO line is driven/held low.
- Are you sure that your Omega GPIO pin is configured as an INPUT?
Additionally, the Application Schematic for the TPS61090 chip used in the PowerBoost indicates that a pull-up resistor should be used on the LBO line (see http://www.ti.com/lit/ds/symlink/tps61090.pdf). There is no such pull-up in the PowerBoost schematics
- I would suggest a pull-up resistor on the GPIO pin used for the LBO - I guess around 10K Ohm should do.