[Ovmsdev] my little OVMS better sleep story

Patrick Stein 4seasons-ovms at jinx.de
Wed Jan 25 01:17:01 HKT 2023


Dear all,

as I’ve written before I had the problem with OVMS using too much power when sleeping. I updated the battery calibration code for better recognizing the correct voltage as I have 4 modules under my control and they are in 0.1 voltage range around the 11-13 volt after calibration ( a range I think might be better than the 195.7 factor used by OVMS in the past.

As I’ve seen the module sometimes still boot I changed the idf core module that when the module one started and read the calibration if would keep sleeping even before a second core was beeing started when it was below the set sleep voltage but above 6 volts ( so the module would not sleep in usb mode).

In sleep the modules would still draw 200 mWatts - I suspect the modem sleep mode is not correctly working. The sleep code was working fine and in the code I wrote in a 4k memory block the current voltage and how often that voltage was seen before the next voltage change ( two bytes each ,so  the bytes 120 136 would mean 120 times 13.6 volts )  , so I could see the voltage droping after a couple of hours. 

The i3 Battery drained at about 0.2 Volts in 12 hours - too much for my liking as my i3 does stand for a couple days in a row sometimes in an underground garage with no easy access to the 12v battery.

 So I finally decided a hardware solution - I solderd myself a zero power adapter for the db9 ODB-OVMS cable and plugged the ovms module into the usb plug of the i3. 
Now everything I need works perfectly as power to the USB bus is quit by the car after a few minutes the car is parked.

I’m using the MQTT Interface to send data to my MQTT Server where the data is aggregated with the bmw connected drive data - were I found out that mqtt can bus mileage is off by 1 to the bmw connected drive and the display. From there I feed a little self written iOS program where I can now continue to see location, soh and journeys and get immediately get a push notification for charge start and stop events. 

I have pushed the idf and ovms changes to my clones of the ovms repositories onto github.com/jollyjinx , but as I no longer need them there is no need to cleanup the code and write a pull request for me. And as I’m no longer writing c-code day in day out there are probably many bugs in them, but for someone in need might find this post in the future for reference.

A few impressions what I can now see with OVMS data (before I only used connected drive and could not see all values e.g.chargespeed ) which is great.

Many thanks to Michael Balzer for his feedback  - Patrick





-------------- next part --------------
A non-text attachment was scrubbed...
Name: IMG_2157.PNG
Type: image/png
Size: 268617 bytes
Desc: not available
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20230124/6cdc18e3/attachment-0005.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: IMG_2155.PNG
Type: image/png
Size: 404228 bytes
Desc: not available
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20230124/6cdc18e3/attachment-0006.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: IMG_2152.PNG
Type: image/png
Size: 425493 bytes
Desc: not available
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20230124/6cdc18e3/attachment-0007.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: IMG_2153.PNG
Type: image/png
Size: 424302 bytes
Desc: not available
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20230124/6cdc18e3/attachment-0008.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: IMG_2156.PNG
Type: image/png
Size: 266837 bytes
Desc: not available
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20230124/6cdc18e3/attachment-0009.png>


More information about the OvmsDev mailing list