Alternate in-car power

I’m interested in a way to keep the AutoPi (And the onboard raspberry pi) powered on for several hours after the car is parked. I am already running a bunch of other electronics in the car and have a secondary 12V lithium battery and charger already setup in my car. Is there a straightforward way to use this instead of the car’s battery with my AutoPi?

If it helps, I am getting the DIY edition. I already have a EC25 LTE module and a Raspberry Pi Zero W on hand that I plan to use. In the past I had also installed GPS and LTE antennas in my car (for a tracker I had built myself) so I’m all set to just plug in the DIY edition.

2 Likes

Could you use a NO/NC relay?
Second (a bit worse) idea is just a bit bigger diode. You would get a 0,7 V voltage drop because of it but the Pi would be powered by it with no problems (just use a few W diode).
I just woke up so at the moment I think these could be useful ideas. Might have missed something though :smiley:

I’m sure I can rig something up. Was asking in case there is already an option on the DIY board to connect power directly and not depend on car battery. I guess once I get the board i’ll know more and could setup my own power switching circuit.

2 Likes

I know it’s been years since you started this but did you have any joy wiring up an alternative power source?

I’m in the same situation. I’d like to power it from my 7kWh lithium battery when the engine isn’t running so I can use the 4G connection as a hotspot.

Me too, some kind of switch that the obd cable can be powered by second battery would be so usefull, and hotspot can be alive 24x7.

Just a manual electric switch button would be so helpfull that switch power input.

I’m no expert in auto wiring, and am just learning this AutoPi stuff, but…
<DISCLAIMER - don’t zap your car’s electrical system, lol>

Assuming that your secondary battery is already being automatically charged/powered via some means when the engine is running (DC/DC charger, automated disconnect, etc), couldn’t you:

  • Get a sacrificial OBD II extension cable to install between your AutoPi and the Cars OBD II jack
  • Cut the “Always On” +12V power line in the sacrifical OBD II cable
  • On the “AutoPi Side” of the cut power wire connect your lithium batteries positive. Leave the “Car Side” of the cut wire unconnected.
  • Splice your lithium batteries ground to the ground wire of the OBD II cable (tying the car battery, lithium battery and autopi ground together). (Or maybe you could just connect it to your car’s chassis if that’s easier)

At that point you would also probably want to change a few settings in AutoPi to prevent it from sleeping whenever there is no CAN activity (car is off). You also probably want to change the voltage shutdown thresholds to however far you are willing to let the lithium battery discharge.

The nice thing about this approach is that the ADC voltage monitor on the AutoPi is monitoring your Lithium battery instead of the car battery, and you should still be able to monitor your cars battery via normal OBD-II battery voltage messages.

The main disadvantage is that I’m not sure if you can monitor your car’s battery when it’s not running - since I’m guessing you’re not getting OBD voltage messages when it’s off. You could probably get an off the shelf pi Hat or USB based ADC and hook it up to measure the car side of the cut OBD-II wire so you could measure the cars battery when when it is off as well.

I’m still researching this stuff, and so far this seems like a better choice than the diode solution since the diode solution:

  • Doesn’t know which battery it’s current voltage level is coming from, so it’s not as useful to measure it for automation / auto shut off. Even if you do measure it, you’ve got to put some kind of compensation in software side to account for the voltage drop.
  • The diode solution is essentially always wasting 1.5 - 2.5 watts as heat depending on how much power the AutoPi is drawing. Thats not much, but its basically the same amount that a pi zero draws. You want to be as power efficient as you can to make the battery last as long as possible.

Hrmm…

I’ve sorted this now. Just leaving info here for others reference.

I’m using one of these ​Keenso Power Supply Battery Controller, Emergency Automatic Switch Module DC 12V 24V 36V 48V 10A for Emergency Battery Switching : Amazon.co.uk: Business, Industry & Science to power the AutoPi off my 24V LiFePO4 battery 24/7. If the power on the lithium battery goes down then it reverts to the starter battery.

One neat thing is the AutoPi runs fine with 24V supplied to the power pins on the ODB port. This triggers a vehicle/battery/overcharging state in the logs and in turn, you can add this to suppress sleep regex settings in Settings > Power so it won’t go to sleep while connected to my leisure battery.

2 Likes

I did connect my AutoPi to my second battery just using the obd-ii power cable that autopi sells for 15€. It seems to work more or less ok. I can change the settings to not go to sleep if I want.

However, trips are not recorded. The position is tracked, and I can see the vehicle moves in the map, but since no “vehicle/engine/start” is detected these moves are not recorded as a “trip”.

I would like to emulate somehow this event… The battery voltage (of the second battery, the one that feeds the AutoPi) does rise more than 1v when the engine is connected. ave you found a way to do this?

Thanks!

Hi @carlos,

You can find the events that trigger the start and end of a trip under Advanced > Settings > Trip > Event. You might be able to get away with the position events. Let us know how it goes.

Hope this helps

1 Like