Battery backup for AutoPi

Hi there,

I’m hoping to find a way to use a battery backup to keep the AutoPi running, even after the car’s battery drains. Additionally I’d rather not run the AutoPi off that, since I think it can damage it over time.

I already have the Blackvue B-124 battery, which powers my dash cam. I’ve been thinking I want to daisy-chain another battery, then power my LTE hotspot, along with my AutoPi.

Is there a way to power the AutoPi via GPIO, or via USB? I know I’ve seen the warnings against this, but curious if there’s SOME way. Otherwise, I’d have to splice into the OBD2 cable, and install diodes. Allow 12 to come in from the car battery, and ALSO from the battery pack. This would make the power-down-at-voltage function unreliable, but ideally my AutoPi can run 24/7.

Note: I’d love for the AutoPi to still be able to see the actual vehicle battery voltage, and run the RPi3b+ off of USB/GPIO/etc, but not sure how well that would work. Perhaps some diodes could be installed to power the RPi GPIO separately.

1 Like

I think it would be great to have some type of UPS on the autopi.

In my case, when the car is turned on the starter motor pulls all the current from the battery, which then briefly forces the autopi to lose power.

Shipping batteries around the world are considered dangerous goods, so it wouldn’t be economical to ship devices with any large enough batteries for a AutoPi UPS.

Maybe if there were another plug on the OBD2 PCB inside the autopi, to allow future UPS support where future models could support this natively.

The GPIO pins on the raspberrypi don’t have any circuitry protection, and directly hooking up another battery without the necessary protections will likely damage the Pi and the AutoPi OBD2 pcb.

It could possibly be done if there were another PCB between the Pi and the AutoPi OBD2 PCB for the current versions, where the Pi is powered via the UPS PCB, then the UPS circuit is powered by the OBD2 pcb and then powered by the battery in the car.

The OBD2 PCB could then have a secondary powersource to keep itself running when the power may be lost as the car starts up

I’d love this too. I’ve got nearly 7kWh of lithium batteries in the van it could run off and ideally I’d like the Auto-Pi on 24/7 to use as a hotspot.

Is it going to damage the AutoPi if it’s powered via the GPIO header?

The autopi is powered through the GPIO already, but you’re going to want to power through the OBD port, using a simple resistor.

Sorry, missed your reply. Do you know what value is resistor is required and why it would be required?

I couldn’t find the info after Googling for it.

I thought it should just be 12V on the OBD2 power pin.

Ah whoops, I meant to say diode. You’d need to find something that does not allow any power to flow back at all otherwise you’d be simply charging your entire car battery, and wasting your time. (Might as well just attach your extra batteries to the main cell at that point.)

Now, if you wanted to get creative, you could use some sort of power-combiner/splitter, relays, etc to achieve various desired results. Depends on your personal needs.

In my case, I am moving any ‘advanced’ features off of my AutoPi unit, onto a secondary unit, and some Jetson hardware, so this is less relevant for me.

If I was still pursuing this avenue, I would approach it like this. Just use a power-combiner circuit… 2 inputs, 1 output. First input would be the OBD2 12v power, and second input would be the 12v line from your power pack output. No diodes necessary with these circuits/devices. Another neat feature is that the highest-voltage source will always be pulled from first, (and cycle back and forth if necessary.)

In this scenario, you might want to add a circuit that cut the power coming from OBD2 after some timeout, or some voltage… The reason being is perhaps you’d want to allow the battery pack to drain MUCH lower. This would essentially give you the maximum runtime possible, while still keeping your main cell at a safe voltage.

I’m building an RPi headunit for a car which uses a LifePo4Powered UPS hat, and also cooking up a custom dual-4k dashcam. Using a combination of OpenUPS hardware, power-combiners, Blackvue battery packs+extenders, and even some SLA batteries, there’s an extensive amount of battery backup.

For me personally, I’m not sure I’ll need the AutoPi to be online 24/7, but I’m still keeping my eye on the idea, because I may come up with something relevant. Perhaps if I tie the gyro or other sensors into dashcam recording… I dunno.

Hopefully this gives you something to think about.

Thanks, diode makes sense :slight_smile:

My setup is slightly complicated since the aux battery is 24V LiFePO4 so will be using a DC-DC converter for the 12V so will probably always be lower than the starter battery.

I’ll figure something out. I can probably do something with a voltage comparator or just cut into the OBD extension cable I’m using and just wire it directly to the lithium battery. I was wondering if having it powered from a different source than the Canbus would cause an issue but hopefully they’re all isolated.

Your RPi head unit sounds cool. I’m gonna set one up using OpenAuto Pro. Hopefully, it will add Wi-Fi OBD support at some point so I can see the data from the AutoPi on it.

You could pull from OBD and DC-DC, using this. Then using a voltage-sensing relay of some kind, you could set a cut-off for the main vehicle 12v battery. Of course, you could run the AutoPi directly off the DC-DC, but you’d be missing out on quite a bit of capacity in the main battery, even letting it discharge to 12.5v. Though I can see why people would avoid that. LiFePo4 is great due to the high-cycle capacity. You could use an ignition-controlled relay AND the device I linked to in order to run the AutoPi off the alternator when possible. This would allow your pack to charge faster, or run cooler, depending on the setup.

Ditto. It looks fairly dormant, but that’s why I got the LiFePo4Powered UPS, and a few other goodies. I’ve been running Android tablets in a custom 3d printed double-din chassis for years, but looking to try something new. I’m not TOTALLY sold, but it looks decent, despite the surprising lack of activity on their forums. I think Pro/paid is a must due to that.