The AutoPi does not wake after sleep

Subject of the issue

Anytime I stop the car for a while (enough for the Autopi to sleep), then when I run the car, the AutoPi doesn’t wake up, and stand sleeping. If I want it to start, I have to unplug and replug-it.

Your environment

AutoPi 4G edition (use without SIM card, send the data via Wifi), 2021.03.10 release, plugged in a Peugeot 206.

Steps to reproduce

It happens when the AutoPi go to sleep, then it never wake up with car ignition.

Expected behaviour

I expect the Autopi to wake-up at ignition, and send the data via Wifi.

Actual behaviour

The AutoPi never wake up (its hotspot does not appear, it does not record any trips or information, etc).
Furthermore, I mention that there is always this event when the car stop:
event.vehicle.engine.reason: >- Unable to verify connectivity of protocol ‘auto’: Unable to connect because no supported protocol found

Output of power.status command

As long as the AutoPi does not wake up, I paste the result of the power.status command before it goes to sleep (20 minutes after the car stopped)

rpi:
uptime:
users: 1
seconds: 1697
since_t: 1616521048
days: 0
since_iso: ‘2021-03-23T17:37:28.537819’
time: ‘0:28’
stn:
battery:
state: discharging
voltage: 12.8
level: 100
last_trigger:
sleep: NONE
wake: NONE
trigger_config:
vl_wake: ’ >13.00V FOR 3 s’
vchg_wake: ’ +0.50V IN 1000 ms’
uart_sleep: ’ 900 s’
vl_sleep: ’ <12.20V FOR 240 s’
ext_sleep: ’ LOW FOR 3000 ms’
ext_wake: ’ HIGH FOR 500 ms’
spm:
last_state:
down: none
up: ‘on’
sleep_interval: 0
version: ‘2.1’
current_state: ‘on’
last_trigger:
down: none
up: spm

Do’s & dont’s

  • Do not write your unit-id anywhere.

Hi.

Was your device working earlier? In such a case you can make modifications to the Wake Trigger (Advanced → Settings → Power). There voltage level is set to 13.20 by default, however in some cases it can be necessary to lower it.

I hope I could help you, but if it does not work please get back to us.

Hi, Thank you for your answer. I already set the trigger to 13.00 V, and it doesn’t wake up unless I unplug and replug it, whereas the voltage measured in the dashboard is above 14 V at ignition !!
I will now try with the trigger set to 12.9 V, the minimum value, but I have no hope for a success by this way. I will let you know.

Hi,
I just check if lewering the wake trigger to 12.90 V would solve the issue, but it appears that it doesn’t.
In the event the autopi recognize if the engine is running or not, the voltage is about 13V, and over 14 V at ignition, but if the autopi is sleeping, then the ignition won’t wake him up.
Please help !!!

Hi @FB-CENHN,

Thank you for testing this. Can you reach out to support@autopi.io? They will give you an answer to this.

Best
Peter

Hi Peter,

Thank you for your answer, I will contact the support then.

Best regards,

Fabien

I am also having this issue.

When the car starts, the light is flashing blue and most often it doesn’t eventually turn on. Occasionally it does turn on, quite some time into the trip already (20-30 minutes into the trip)

I have spent a while mixing the power settings (turn on voltage, highest to lowest, battery check interval etc.) restored everything to default but still the same issue.

I am wondering if it is the power chip not being able to read the battery.

If I pull the power from the AutoPi then plug it back in, it then turns on as normal.

The battery reads around 14.1 when the engine is on, then 12.5 when it is not running.

When the car starts, maybe all the current is being pulled from the starter motor and maybe causing the autopi to lose power briefly when starting. Not much of an issue when the device is sleeping, but if the default trip end period is 30 minutes, it may be causing the Pi to suddenly lose power while still turned on if the car is again started within the 30 minutes.

I have lowered my settings to 2.5 minutes, giving the autopi just enough time to submit any data and safely shutdown

Hi @Daniel_Blair,

May I ask you to run the following two commands in your web terminal and send us back the results? Make sure to send us the results only ( blur the rest if it’s a screenshot :wink: ).

# This command will show the voltage calibration value of your device
# EDIT: This is not true - you aren't able to read the current voltage calibration
# with this command, instead it will reset the calibration to the default of 0000.
$ stn.volt_calibrate

# This command will show the current reading of the vehicle's OBD voltage
$ obd.battery

Best,
Nikola

Thanks @Nikola interesting results. The car was running at this point, yet still showed critical battery level…

image

It seems the spm is reporting quite different values compared to measuring the battery with a multimeter while the car is running and turned off.

Is there away to calibrate the spm to the actual values instead of the default calibration?

in the events, it shows:

vehicle/battery discharging event.vehicle.battery.level: 0

Hi,

Thank you for the answer. You are precisely right. Something must have happened with the calibration. You can recalibrate the STN with the same command that you used to view the current calibration status. You need to use it like the following:

$ stn.volt_calibrate value=1234

where 1234 must be the voltage that you’re measuring on the battery. To clarify if you’re seeing 12.40V you need to write value=1240, so that means the last two digits are considered after the decimal point.

Best,
Nikola

Perfect, got it thanks @Nikola

I did notice my AutoPi was running SPM firmware 2.0 originally. I’ve manually downloaded the 2.1 firmware and manually updated the firmware to match what @FB-CENHN has in their screenshot.

Was the firmware meant to be applied during the latest update?

Hi @Daniel_Blair,

The update was only meant to be set manually through the settings, but feel free to set it to the higher version.

However, I must apologize for misleading you with the commands I mentioned in my previous posts. The stn.volt_calibrate command, when run without a value keyword argument resets the voltage calibration to the default setting of 0000, so it is quite likely the voltage calibration that you’ve had before was alright. Please make sure to calibrate the STN.

Best,
Nikola

Thanks for your help @Nikola,

I seem to still have the issue, despite using calibrating the voltage from a calibrated fluke multimeter.

I have enabled the wake on accelerometer also, and set to the lowest sensitivity but I can’t get it to wake the device that way either.

I work with an electronics design and manufacturing company, if there are any modifications or replacement of components etc to be done, I am all for it and can provide some feedback, I would love to solve this issue completely but I need more of your help

So I just flashed a Buster image and I believe I’m having a similar issue. I’m using the desktop supply instead of connected to the car for setup of the Pi 4.

It appeared to register just fine on the first boot seeing 13.6V which I have so it won’t try to sleep. However it seems after I did a sudo apt update then upgrade and completed the process something caused the voltage readings to be off. It now registers 10.8 and critical_level like @Daniel_Blair reading. I’m flashing the Buster release again to see if the voltage readings return to normal.

I managed to get my calibration to stick and it’s reading the 13.6V properly now. But I can’t seem to recycle my last minion_id so I’m stuck at the moment until it can be added.

I will see how it performs in my car later as well.

Hi @Zaf9670 ,

Please reach out to support@autopi.io if this problem persists.

/Peter

Thanks @Zaf9670 & @Peter

Since mine would sometimes not power on, I decided to pull it apart and put the boards through our xray machine to confirm the soldering of the LGA ICs. Everything looked good.

I decided to run rpi-update to get the latest firmware files and perhaps fix any corruption within the boot volume, this seems to have fixed my issue for now.

To prevent it from possibly corrupting any boot files in the future, I have set the autopi to shutdown after 30 seconds after the car is turned off, and set the sleep and inactivity after sleep to do the same.

I think the autopi in the past was still turned on, then when the car was turned on, the autopi would turn off briefly when the car was starting. doing this over and over could damage the boot files.

Perhaps an add-on UPS via the OBDII connector would prevent this happening. The autopi could read pass-through voltage and car battery level, and only for a split second during car startup would it read from the UPS battery. The battery size for any AutoPi UPS would only need enough capacity to keep the autopi on for a couple minutes, enabling safe shutdown and preventing powerloss during car startup. I would happily purchase this

Hi @Daniel_Blair ,

We’re glad to hear that you have found a solution for your problem. It is true that SD card might get corrupted if the device is abruptly shut down. An UPS unit would be a great solution for this problem! However, we don’t provide an UPS device that can easily integrate with your AutoPi dongle.

What I can suggest is for you to look for such a device online to see if you can find one that suits your needs.

Best,
Dragos

Thanks @Dragos

The best I could find is the UPSIC-1205D from bicker.de using supercaps instead of batteries. It would be better if the good folk at AutoPi made something similar with OBD2 connectors.

If anyone else is interested, here is the link. The voltage output seems to be almost the same as the input voltage, thus still enabling the AutoPi to read what the car battery voltage and level is at.