[Ovmsdev] deep sleep

Patrick Stein 4seasons-ovms at jinx.de
Sun Dec 4 18:52:09 HKT 2022


Michael,

the blue led is always off and when connected via USB I saw the powering down notifications in the log that you pointed out to look for, sorry I did no mention that.

It seems to me that the modem might be still in some kind of half ways on or down state without the led being on.

Regards, Patrick

> On 4. Dec 2022, at 08:38, Michael Balzer <dexter at expeedo.de> wrote:
> 
> Patrick,
> 
> Am 04.12.22 um 08:11 schrieb Patrick Stein:
>> maybe you are right and my setup has some flaw, I’m using different ovms modules and some sleep at a higher I started a measuement table , but I get never get near the 6V*19mA  = 114mW . The lowest I’ve seen in 288mW at 13.1V  but the three other modules are using more than 400mW when asleep.
>>>> I saw the system sleeping at 288mW and then, after some time during sleep (not waking up) use more engery. Could it be that the modem wakes up or get’s in a higher power state after some time without the esp waking?
> 
> As we already pointed out, that can only happen if you do not power down the modem.
> 
> I told you to check the blue LED, you didn't post any result yet. If the blue LED is on or flashing, the modem is powered on.
> 
> Regards,
> Michael
> 
> 
>> 
>>> On 22. Nov 2022, at 22:14, Michael Balzer <dexter at expeedo.de> wrote:
>>> 
>>> Patrick,
>>> 
>>> unless the modem really occasionally powers on by itself, my proposed auto init solution should still work. You can btw emulate that partially by a simple event script turning off the modem auto init on a power manager event.
>>> 
>>> But… I still cannot reproduce your reported behaviour on my modules. Not even at 6V supply on the 12V input & without any USB connection, exactly as in your setup.
>>> 
>>> At 6V I see a sleep consumption (including the attached GPS antenna) of 19 mA after the power down by the power management component. Every 60 seconds, there's a brief wakeup period of ~ 2-3 seconds at up to ~ 46 mA, then it goes back to sleep. That cycle has been running for about an hour now at 6.2V without a single modem power up or full boot.
>>> 
>>> In other words everything seems to work as designed, the ESP32 does not fail to recognize it's been sleeping, and the modem remains powered down.
>>> 
>>> Maybe your test setup has some hidden flaw? A circuit break, broken cable, something like that, causing the module to actually do an occasional full power cycle?
>>> 
>>> Regards,
>>> Michael
>>> 
>>> 
>>> Am 22.11.22 um 17:54 schrieb Patrick Stein:
>>>> Thanx a lot for all your feedback. That makes it clear to me that my approach to sleep the system immediately after wake as soon as it’s clear that the 12v battery is below the adjusted threshold won’t work.
>>>> It will only work when the battery settings are still in non volatile deep sleep ram.
>>>> 
>>>> The main problem is if the system is starting and not recognizing it’s coming out of sleep that approach will fail as the modem will start up and stay even when the esp is in deepsleep - right ?
>>>> 
>>>> What you do think would be the best approach here to get all devices powered off quickly and going to the lowest possible power consumption while checking every 30/60 seconds for a car wakeup ? As I bought the OVMS modules to put them in three cars (mine and two friends) detaching and attaching the device or switching it off with manual switch is not feasable.
>>>> I think reaching down to a 130mW sleep would be ok for most use cases (except vacations) but maybe it might be really easier to build something that detaches power from the OVMS module or put OVMS in the USB bus and cut the 12v obd line altogether.
>>>> 
>>>> Regards - Patrick Stein
>>>> Beste Grüße - Patrick Stein
>>>> 
>>>> 
>>>>> On 21. Nov 2022, at 20:15, Michael Balzer <dexter at expeedo.de> wrote:
>>>>> 
>>>>> Patrick, Mark is probably right assuming you've been measuring with the modem still powered on; with the modem still enabled, I also see a minimum consumption level at around 250-280 mW.
>>>>> 
>>>>> The modem is on by default on the initial boot (first power up), that's due to hardware defaults. So on an initial power up, you always need to wait for the system to power the modem down before doing measurements. That will normally take about 80-90 seconds.
>>>>> 
>>>>> You can easily see if the modem is off by observing the blue LED. From the log you can normally tell it's off by seeing these messages:
>>>>> 
>>>>> I (80323) cellular: State: Enter PoweredOff state
>>>>> D (80323) events: Signal(system.modem.poweredoff)
>>>>> 
>>>>> Another option is checking the "cellular status" command showing "State: PoweredOff".
>>>>> 
>>>>> You can also control modem power by the switch S1 on the modem board. You need to push it for 3 seconds to manually power off. Power on only needs about half a second. Be aware the driver will need some time and possibly some modem power cycles to resync if you change the power state manually when awake.
>>>>> 
>>>>> Regards,
>>>>> Michael
>>>>> 
>>>>> 
>>>>> Am 21.11.22 um 07:53 schrieb Mark Webb-Johnson:
>>>>>> It should be the other way around (particular at low power sleep). The usb serial converter chip draws current but only from usb, so when powered via 12v that should be off and not consuming anything. Without a modem and in deep sleep that made a significant difference.
>>>>>> 
>>>>>> I guess the difference you are seeing is most likely the modem. That consumes the most power, but in some cases can’t be powered by usb due to insufficient power availability (particularly over low powered usb ports on laptops, etc).
>>>>>> 
>>>>>> With the modem powered on, there are significant differences in power consumption depending on whether it is locked onto a cell tower, or searching, and the frequency / technology negotiated. 4G is pretty power hungry.
>>>>>> 
>>>>>> It is hard to get much benefit from deep sleep with the modem powered on. Some other systems get around this by putting the modem in sleep mode as well; awoken by a sms message.
>>>>>> 
>>>>>> Regards, Mark
>>>>>> 
>>>>>>> On 21 Nov 2022, at 2:01 PM, Patrick Stein <4seasons-ovms at jinx.de> wrote:
>>>>>>> 
>>>>>>> Hello Michael,
>>>>>>> 
>>>>>>> 
>>>>>>>> On 14. Nov 2022, at 17:26, Michael Balzer <dexter at expeedo.de> wrote:
>>>>>>>> 
>>>>>>>> Am 14.11.22 um 10:25 schrieb Patrick Stein:
>>>>>>>>>> As written in the issue discussion, there's a minimum load from the unswitchable components. In deep sleep mode, that's around 155 mW with the GPS antenna attached, and ~ 100 mW with GPS antenna detached. An option to control the GPS antenna could be using a simple 12V relay, either on SW_12V or on the ignition 12V line, to switch the antenna's GND connection.
>>>>>>>>>> 
>>>>>>>>> I’ve never seen such a low value - lowest I’ve seen is 250 mW in deep sleep with all my four modules.
>>>>>>>> I did the measurements using a USB power meter, just verified with a multimeter for 12V (11.6V Lipo), which gave slightly higher results:
>>>>>>>>    • base load in Wifi mode, GPS antenna attached ~ 60 mA / 700 mW
>>>>>>>>    • sleep, GPS antenna attached ~ 16 mA / 180 mW
>>>>>>>>    • sleep, GPS antenna detached ~ 11 mA / 130 mW
>>>>>>>> 
>>>>>>>> So nowhere near 250 mW. Mark, any idea about this?
>>>>>>> I now know why you have different measurements. I bought a USB power meter and it just arrived and it’s now clear. I have just tried one module (v.3.3 with the current edge software) asleep at 9 Volts and it draws around 490 mW (54-55mA) , when I switch my lab power supply off it draws 290mW at 5.1Volts (55mA) over USB.
>>>>>>> 
>>>>>>> So it seems that the module requires a lot less over USB than over OBD.
>>>>>>> 
>>>>>>> 
>>>>> -- 
>>>>> Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal
>>>>> Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
>>>>> 
>>>>> _______________________________________________
>>>>> OvmsDev mailing list
>>>>> OvmsDev at lists.openvehicles.com
>>>>> http://lists.openvehicles.com/mailman/listinfo/ovmsdev
>>>> _______________________________________________
>>>> OvmsDev mailing list
>>>> OvmsDev at lists.openvehicles.com
>>>> http://lists.openvehicles.com/mailman/listinfo/ovmsdev
>>> -- 
>>> Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal
>>> Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
>>> 
>>> _______________________________________________
>>> OvmsDev mailing list
>>> OvmsDev at lists.openvehicles.com
>>> http://lists.openvehicles.com/mailman/listinfo/ovmsdev
>> 
>> 
>> Beste Grüße - Patrick Stein
>> 
>> 
>> 
>> _______________________________________________
>> OvmsDev mailing list
>> OvmsDev at lists.openvehicles.com
>> http://lists.openvehicles.com/mailman/listinfo/ovmsdev
> 
> -- 
> Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal
> Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
> 
> _______________________________________________
> OvmsDev mailing list
> OvmsDev at lists.openvehicles.com
> http://lists.openvehicles.com/mailman/listinfo/ovmsdev



More information about the OvmsDev mailing list