Pi uptime UPS add-on top autopi

Hello

I had seen some concerns about keeping the pi powered on and the inconveniences that can cause. I was wondering if something like the pi uptime ups could be installed with autopi to enable 24/7 power. Of course the casing would likely be rendered useless but with a couple 3500 mah batteries and a simple solar cell you’d have a great solution.

I’m guessing the issue would be that the power for the OBD is provided by the OBD so you would anyway get the drain, And the current recommendation is to not power the Pi through anything else then the OBD port to avoid damage to the PI.

The OBD chip is always being powered by the port and just goes into low power mode, but the raspi allegedly doesn’t act the same way. Since certain functionality is hindered by the raspi’s start up time (backup cameras, remote start/controls, etc), having it be powered as close to 24/7 as possible unlocks new possibilities. I’m just saying this doesn’t seem like an impossible problem and the pi uptime ups is the most flexible solution i’ve seen for mobile power since you can integrate energy storage, solar generation, and even input power from the car while it is running all simultaneously. Couldn’t you just remove the power related gpio headers between the pi zero and the OBD board and then fit the ups hat on top?

Humm… sounds possible, not a hardware guy so wont argue with the idea :slight_smile: It would be a nice idea since I already have the added HW to do this setup and it would enable me to add the additional HW and features to enable “parking guard” surveillance possibilities in tandem with the continues temperature and extra GPS HW I´m playing around with.

I see a few different ways to do this, but each has it’s pros and cons.

To make it run off of a battery you’d need to not draw power from the OBD port, and instead use the seperate battery, this could be done using a OBD splitter cable. This means that any battery HAT won’t work, as our board needs the 12v to provide power to the different components, modems, accelerometer, power management system etc.
And if you go this route, the device loses its ability to detect when the car is started, as this is done through monitoring the voltage of the battery, but then again, if the device is always on, it shouldn’t need to know when to start. But it does also mean that the device can’t measure the battery voltage, which may be more of a showstopper.
This route would possibly also cause some unintended issues as the measured battery voltage would then instead be of the seperate battery, and the power management system uses this for a few different things, like shutting down if the voltage level goes too low. And a seperate battery may not act the same as the car battery. Fortunately all that stuff should be configurable, and if it’s not currently, it can be added.

A much easier, but but not quite the same way - If you drive the car regularly, you could also configure the device to go to sleep or hibernation after 24 hours instead of the currently configured 2 hours.

If surveillance is not required, it could be made to sleep in specific periods, so that it should always be awake when you use the car, like in the daytime, but at night, it could go to sleep.

As i can understand from your question is that you want to have control over your autopi even when your car is not running. (on contact).

I’m working on a external device based on LoRa and connect this to my autopi. i’m investigating if it is possible to send a trigger to the autopi on one of the pins. so that the device would come out of deep sleep mode.
LoRa can have it’s own battery which can last for days, weeks even months or years depending on the payload and frequency of data transmission.

What i could imagine is that i can send a downlink trigger payload via the Things Network which then gets received by a LoRa node which is connected via a analog/digital pin on the autopi. which then boots up the device. It would be even better if in the my.autopi.io portal would be a way to send the trigger to iftt or directly to thethingsnetwork. in that way you can login into the portal --> press the wakeup trigger button in the portal --> wait a sec. --> device is enabled.

Also the other way around can LoRa send information of state of the autopi to TTN network and send for example through IFTTT.

i’m developing now with a pycom fipy and a development board. next is to get a overview of the data i want to send from and too the autopi.

Ohhhhh. LoRa might be pretty nice. I’m currently exploring whether a solar trickle charger might be sufficient. (https://www.amazon.com/dp/B071ZZ2Z6X/ref=psdc_13638740011_t4_B01MYVUSRH) Using those to keep the 12v battery topped up despite constant autopi power drain would be cheap and effective. I just don’t know how it interacts and connects with a PHEV like a volt; I have an inverter tied to the 12v battery as well so I don’t want to break anything.

Since you brought up LoRa you might be interested in IOTA. They have some development activity going on regarding LoRaWan though I don’t know much about it. As a developer exploring new tools is always fun of course. :slight_smile:

you want to keep 12V on your car battery with the solar panel?? those panels have very low efficiency. not sure it will work.
I found some boot / sleep commands on the UART but i cannot use those pins. i have to look into the SPM part of autopi. Hopefully the core developers can put some documentation / examples regarding interacting with GPIO pins and the SPM (power management).

point is that the 12V is not constant (at least when a normal engine, not sure how it’s at an EV) when engine is running the battery is on ±14.4V and on standby is slowly drains. that’s why it’s difficult if you put a battery between then when the car is off you cannot measure the constant drain of the car battery. And your battery (liPo) should have a charger protection between it. because the dynamo will charge your battery on 14.4V almost constantly.

If you use a SolarPanel it charges at ±18V. but maybe not constantly (because the sun is gone for long period) capacitor is empty and cannot discharge 18V. so then again the battery can drain. you will get a lot of spikes between 18V and ±12-13V. and it does not garantee 24/7 powered autopi. lipobattery pack or solar is not a full-proof solution.
I think you need a second device which sends a trigger to autopi. so that autopi constantly just keeps “on”. like a watchdog (unless below critical battery, but then you already get triggers about that and autopi shuts down). hopefully i can figure this out. I will keep you posted.

i’m already looking into IOTA, a dutch energy company already made a IOTA proof of concept integration with charging stations and pay with IOTA and get IOTA’s by serving charging power.

It’s really interesting yes. but a lot of ongoing developments regarding Qubic’s and the posibility of Smart Contracts on IOTA chain.

The idea with the solar panel was to trickle charge to prevent excessive parasitic draw from an autopi that rarely ever sleeps. The panel I linked outputs 270-410mA which should be enough to cover the autopi’s draw, with the car being the primary way the 12v battery gets charged. I know it will be reliable I just don’t know if the different systems will clash (inverter vs car vs solar charge controller) in my particular situation since volts have a specific power management system.

You’re right though I think a watchdog as you say would be effective. I’m just under the impression that stuff like surveillance and whatnot is more challenging with a sleeping raspberry pi that has to go through a long boot cycle. Ultimately I want my car to become a generator for my home, so having to excessively cycle between boot and shutdown eventually becomes limiting. I am still theorizing though; I don’t own an autopi or anything yet.

charging you battery of and EV system is not the same battery of an petrol car. because of the nature of the battery. (battery for starting a petrol car requires high Amps.) see: https://www.youtube.com/watch?v=pu30bchGu50 a LiPo pack of an EV wil not have this issue. im not sure if they are indirectly connected via an converter (DC-DC). From my knowledge an EV also has an Lead-Accid battery (the one you have also in a normal car). for other parts of the system (lights, radio, airco). So i think there will be an PowerManagementSystem from the LiPo pack onto the other battery already (unless your building one yourself.)

if you have a normal petrol car and you are using the solarpanel with that cigarette connector, it will just charge the battery with 270-410mA (if it reaches that much current based on the weather). an inverter(read: wall charger converts AC 400V(3-phase)/230V(EU)/110V(US) to DC 350V or 400V ,depending on your model ) (as in an EV vehical) pushes DC Voltage into LiPo battery not the other battery.

So if you want to know the Voltage of the EV LiPo banks you’ll need the CAN-bus to extract that information (if that information is on the CAN) unless you have build your own batterybank then your chargecontroller / balancer should have digital outputs so you can receive them on a GPIO pin of autopi. or via a different way (maybe also put on the CAN-bus yourself)

Hopefully this explanation makes sense…