Mark, List, yesterday my Twizy was temporarily dead... because of the OVMS power usage. I had not driven for 5 days. The Twizy has a very small 12V battery with only 14 Ah capacity, and it only gets charged while charging the Twizy and while driving (from the main battery). The OVMS with GPS activated needs a constant current of ~110 mA according to my measurement, thus sucking that battery empty within 4-5 days, maybe fewer. I'll make the power warning much more prominent in the Twizy user guide. Have there been any considerations yet about using the sleep mode of the PIC and/or SIM chipset? Regards, Michael -- Michael Balzer * Paradestr. 8 * D-42107 Wuppertal Fon 0202 / 272 2201 * Handy 0176 / 206 989 26
Michael, Urgh. Glad that you managed to recover it. The TMC forums have a few theads at the moment of Model S cars with 12V battery issues, and the Tesla Roadster's little 12V battery seems to need replacing every 13 to 25 months. For Roadsters, OVMS is not run off that little 12V battery, so we haven't seen this issue. The good news is that we did anticipate this sort of thing (except were expecting to see it more on ICE cars with OBDII monitoring). We added 12V power line monitoring, through an ADC, into the v2 hardware. Looking at your logs for the past few days is interesting (I don't think there is anything private in their apart from the vehicleid and odometer, which I have obscured, so hope you don't mind me posting here). The 12v line reading is the second to last column: 2013-01-14 06:39:53.930886 -0500 info main: #34 C XXXXXXX rx msg D 128,0,0,13,17,4,0,YYYY9,28,0,-127,0,120,-1,15.0,0 2013-01-14 06:59:54.871517 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.7,0 2013-01-14 07:05:26.666203 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.7,0 2013-01-14 07:05:46.498420 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.7,0 2013-01-14 07:06:04.864927 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.7,0 2013-01-14 07:30:07.228738 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.6,0 2013-01-14 08:29:57.461316 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.5,0 2013-01-14 09:29:48.441380 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.4,0 2013-01-14 11:29:30.755176 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.3,0 2013-01-14 15:05:36.688666 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.2,0 2013-01-14 16:05:35.111552 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.7,0 2013-01-14 16:36:35.755630 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.2,0 2013-01-14 18:38:18.404933 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.2,0 2013-01-14 21:04:47.187479 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.1,0 2013-01-15 02:04:22.801440 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.0,0 2013-01-15 09:03:13.233483 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.9,0 2013-01-15 11:02:54.400624 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.7,0 2013-01-15 12:02:44.724576 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.9,0 2013-01-15 13:02:34.285593 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.8,0 2013-01-15 16:02:09.372087 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.7,0 2013-01-15 17:02:00.235001 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.8,0 2013-01-15 19:01:41.695938 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.7,0 2013-01-16 02:00:40.126355 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.6,0 2013-01-16 06:00:03.073862 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.5,0 2013-01-16 11:59:01.907094 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.4,0 2013-01-16 15:58:22.520731 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 17:22:48.691426 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 17:30:10.701329 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 17:30:21.837740 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.2,0 2013-01-16 17:36:37.811552 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 17:46:01.164994 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 17:48:35.257576 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 17:56:49.565932 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 18:01:15.186127 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 18:02:46.866156 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 18:02:54.217581 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 18:10:29.930408 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 18:10:38.723483 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.2,0 2013-01-16 18:11:12.459758 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.2,0 2013-01-16 18:18:31.863177 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 18:19:03.123286 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 18:43:55.355803 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 18:58:43.567326 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.2,0 2013-01-16 22:58:15.314101 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.1,0 2013-01-17 01:57:50.181011 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.0,0 2013-01-17 02:57:40.587918 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,10.9,0 2013-01-17 03:57:30.418056 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,10.8,0 2013-01-17 04:57:19.241415 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,10.6,0 2013-01-17 05:57:10.622186 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,10.3,0 2013-01-17 06:32:32.593533 -0500 info main: #55 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,10.0,0 2013-01-17 07:32:23.932656 -0500 info main: #55 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,9.4,0 2013-01-17 08:32:13.374380 -0500 info main: #55 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,7.9,0 2013-01-17 09:32:03.204557 -0500 info main: #55 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,7.2,0 2013-01-17 10:31:52.551362 -0500 info main: #55 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,6.5,0 2013-01-17 11:31:41.821330 -0500 info main: #55 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,6.7,0 2013-01-17 12:58:48.540906 -0500 info main: #60 C XXXXXXX rx msg D 128,0,0,13,1,2,0,ZZZZ8,0,0,-127,0,120,-1,15.1,0 It shows 15v at the start (I guess when the car is on and charging it), then 12.7v at 2013-01-14 06am EST, then falls gradually to 11.0v at 2013-01-17 01am EST. At that point it seems to fall faster, down to the last report (just 10 hours later) 6.7v at 2013-01-17 11am EST. My original thought to handle this was to have two thresholds. At the first threshold, the PIC would turn off the modem and re-awake only once every 12 hours, for 2 minutes, before going back to sleep. At the second threshold, the PIC would turn off the modem, and go to a deep sleep itself. In this mode, once power was restored it would reset itself. Exit from either mode would be the 12v power line going back above the first threshold plus some safety margin. This weekend, I'll get some exact power measurements from the v2 hardware module, so we know what we are dealing with: Just the PIC (modem powered down) PIC + MODEM PIC + MODEM + GPS Last time I tested this, on v1 hardware without GPS, these were the figures for PIC + MODEM: Idle: 40mA @12V Cellular Network Registration: 100mA @12V Network activity: 80mA @12V Regards, Mark. On 18 Jan, 2013, at 10:47 PM, Michael Balzer <dexter@expeedo.de> wrote:
Mark, List,
yesterday my Twizy was temporarily dead... because of the OVMS power usage.
I had not driven for 5 days. The Twizy has a very small 12V battery with only 14 Ah capacity, and it only gets charged while charging the Twizy and while driving (from the main battery).
The OVMS with GPS activated needs a constant current of ~110 mA according to my measurement, thus sucking that battery empty within 4-5 days, maybe fewer. I'll make the power warning much more prominent in the Twizy user guide.
Have there been any considerations yet about using the sleep mode of the PIC and/or SIM chipset?
Regards, Michael
-- Michael Balzer * Paradestr. 8 * D-42107 Wuppertal Fon 0202 / 272 2201 * Handy 0176 / 206 989 26
<dexter.vcf>_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
Here are the power usage figures from my bench, using v1 hardware: PIC (normal mode) on, modem powered down (by power toggle switch): 35mA - 42mA PIC (normal mode) on, modem on, gps off: 75mA PIC (normal mode) on, modem on,gps on: 120mA Very short-lived bursts to 160mA at times, presumably while transmitting on GSM Playing with AT+CSCLK=2, the modem seems to drop to almost no power usage (perhaps 45mA), with a CR on the async port waking it up. Looking at the PIC18F2685 data sheet, it seems that with an external 20MHz oscillator, the normal power consumption is around 30mA to 40mA. Switching to an internal 4MHz oscillator reduces that to 5.3mA, and internal 1MHz oscillator to 3mA. Sleep mode is 2µA. I'll play around with it. So far, it seems it is quite easy to go into low-power sleep mode. It is getting back out that is the tricky bit. Regards, Mark. On 19 Jan, 2013, at 8:50 AM, Mark Webb-Johnson <mark@webb-johnson.net> wrote:
Michael,
Urgh. Glad that you managed to recover it.
The TMC forums have a few theads at the moment of Model S cars with 12V battery issues, and the Tesla Roadster's little 12V battery seems to need replacing every 13 to 25 months.
For Roadsters, OVMS is not run off that little 12V battery, so we haven't seen this issue.
The good news is that we did anticipate this sort of thing (except were expecting to see it more on ICE cars with OBDII monitoring). We added 12V power line monitoring, through an ADC, into the v2 hardware. Looking at your logs for the past few days is interesting (I don't think there is anything private in their apart from the vehicleid and odometer, which I have obscured, so hope you don't mind me posting here). The 12v line reading is the second to last column:
2013-01-14 06:39:53.930886 -0500 info main: #34 C XXXXXXX rx msg D 128,0,0,13,17,4,0,YYYY9,28,0,-127,0,120,-1,15.0,0 2013-01-14 06:59:54.871517 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.7,0 2013-01-14 07:05:26.666203 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.7,0 2013-01-14 07:05:46.498420 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.7,0 2013-01-14 07:06:04.864927 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.7,0 2013-01-14 07:30:07.228738 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.6,0 2013-01-14 08:29:57.461316 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.5,0 2013-01-14 09:29:48.441380 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.4,0 2013-01-14 11:29:30.755176 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.3,0 2013-01-14 15:05:36.688666 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.2,0 2013-01-14 16:05:35.111552 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.7,0 2013-01-14 16:36:35.755630 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.2,0 2013-01-14 18:38:18.404933 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.2,0 2013-01-14 21:04:47.187479 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.1,0 2013-01-15 02:04:22.801440 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.0,0 2013-01-15 09:03:13.233483 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.9,0 2013-01-15 11:02:54.400624 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.7,0 2013-01-15 12:02:44.724576 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.9,0 2013-01-15 13:02:34.285593 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.8,0 2013-01-15 16:02:09.372087 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.7,0 2013-01-15 17:02:00.235001 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.8,0 2013-01-15 19:01:41.695938 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.7,0 2013-01-16 02:00:40.126355 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.6,0 2013-01-16 06:00:03.073862 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.5,0 2013-01-16 11:59:01.907094 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.4,0 2013-01-16 15:58:22.520731 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 17:22:48.691426 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 17:30:10.701329 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 17:30:21.837740 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.2,0 2013-01-16 17:36:37.811552 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 17:46:01.164994 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 17:48:35.257576 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 17:56:49.565932 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 18:01:15.186127 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 18:02:46.866156 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 18:02:54.217581 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 18:10:29.930408 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 18:10:38.723483 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.2,0 2013-01-16 18:11:12.459758 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.2,0 2013-01-16 18:18:31.863177 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 18:19:03.123286 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 18:43:55.355803 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 18:58:43.567326 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.2,0 2013-01-16 22:58:15.314101 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.1,0 2013-01-17 01:57:50.181011 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.0,0 2013-01-17 02:57:40.587918 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,10.9,0 2013-01-17 03:57:30.418056 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,10.8,0 2013-01-17 04:57:19.241415 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,10.6,0 2013-01-17 05:57:10.622186 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,10.3,0 2013-01-17 06:32:32.593533 -0500 info main: #55 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,10.0,0 2013-01-17 07:32:23.932656 -0500 info main: #55 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,9.4,0 2013-01-17 08:32:13.374380 -0500 info main: #55 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,7.9,0 2013-01-17 09:32:03.204557 -0500 info main: #55 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,7.2,0 2013-01-17 10:31:52.551362 -0500 info main: #55 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,6.5,0 2013-01-17 11:31:41.821330 -0500 info main: #55 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,6.7,0 2013-01-17 12:58:48.540906 -0500 info main: #60 C XXXXXXX rx msg D 128,0,0,13,1,2,0,ZZZZ8,0,0,-127,0,120,-1,15.1,0
It shows 15v at the start (I guess when the car is on and charging it), then 12.7v at 2013-01-14 06am EST, then falls gradually to 11.0v at 2013-01-17 01am EST. At that point it seems to fall faster, down to the last report (just 10 hours later) 6.7v at 2013-01-17 11am EST.
My original thought to handle this was to have two thresholds.
At the first threshold, the PIC would turn off the modem and re-awake only once every 12 hours, for 2 minutes, before going back to sleep.
At the second threshold, the PIC would turn off the modem, and go to a deep sleep itself. In this mode, once power was restored it would reset itself.
Exit from either mode would be the 12v power line going back above the first threshold plus some safety margin.
This weekend, I'll get some exact power measurements from the v2 hardware module, so we know what we are dealing with:
Just the PIC (modem powered down) PIC + MODEM PIC + MODEM + GPS
Last time I tested this, on v1 hardware without GPS, these were the figures for PIC + MODEM:
Idle: 40mA @12V Cellular Network Registration: 100mA @12V Network activity: 80mA @12V
Regards, Mark.
On 18 Jan, 2013, at 10:47 PM, Michael Balzer <dexter@expeedo.de> wrote:
Mark, List,
yesterday my Twizy was temporarily dead... because of the OVMS power usage.
I had not driven for 5 days. The Twizy has a very small 12V battery with only 14 Ah capacity, and it only gets charged while charging the Twizy and while driving (from the main battery).
The OVMS with GPS activated needs a constant current of ~110 mA according to my measurement, thus sucking that battery empty within 4-5 days, maybe fewer. I'll make the power warning much more prominent in the Twizy user guide.
Have there been any considerations yet about using the sleep mode of the PIC and/or SIM chipset?
Regards, Michael
-- Michael Balzer * Paradestr. 8 * D-42107 Wuppertal Fon 0202 / 272 2201 * Handy 0176 / 206 989 26
<dexter.vcf>_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
Mark, for the Twizy and maybe other cars, a wakeup from activity on the CAN bus could also be an option. I remember reading about that in the SIM908 manual. The OVMS could generally sleep while the Twizy is off, maybe with an optional timed wakeup every 10-15 minutes for 1-2 minutes to detect GPS position changes. Btw, the SIM908 hardware design contains detailed info on the sleep modes and power usages: http://www.mt-system.ru/sites/default/files/sim908-c_hardware_design_v1.03.p... Thanks for bringing the 12V monitoring to my attention. I'll now first add an SMS alert on the 12V power line getting too low, that's easy to implement and will remind users to charge. Regards, Michael Am 19.01.2013 10:47, schrieb Mark Webb-Johnson:
Here are the power usage figures from my bench, using v1 hardware:
* PIC (normal mode) on, modem powered down (by power toggle switch): 35mA - 42mA * PIC (normal mode) on, modem on, gps off: 75mA * PIC (normal mode) on, modem on,gps on: 120mA * Very short-lived bursts to 160mA at times, presumably while transmitting on GSM
Playing with AT+CSCLK=2, the modem seems to drop to almost no power usage (perhaps 45mA), with a CR on the async port waking it up.
Looking at the PIC18F2685 data sheet, it seems that with an external 20MHz oscillator, the normal power consumption is around 30mA to 40mA. Switching to an internal 4MHz oscillator reduces that to 5.3mA, and internal 1MHz oscillator to 3mA. Sleep mode is 2µA.
I'll play around with it. So far, it seems it is quite easy to go into low-power sleep mode. It is getting back out that is the tricky bit.
Regards, Mark.
On 19 Jan, 2013, at 8:50 AM, Mark Webb-Johnson <mark@webb-johnson.net <mailto:mark@webb-johnson.net>> wrote:
Michael,
Urgh. Glad that you managed to recover it.
The TMC forums have a few theads at the moment of Model S cars with 12V battery issues, and the Tesla Roadster's little 12V battery seems to need replacing every 13 to 25 months.
For Roadsters, OVMS is not run off that little 12V battery, so we haven't seen this issue.
The good news is that we did anticipate this sort of thing (except were expecting to see it more on ICE cars with OBDII monitoring). We added 12V power line monitoring, through an ADC, into the v2 hardware. Looking at your logs for the past few days is interesting (I don't think there is anything private in their apart from the vehicleid and odometer, which I have obscured, so hope you don't mind me posting here). The 12v line reading is the second to last column:
2013-01-14 06:39:53.930886 -0500 info main: #34 C XXXXXXX rx msg D 128,0,0,13,17,4,0,YYYY9,28,0,-127,0,120,-1,15.0,0 2013-01-14 06:59:54.871517 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.7,0 2013-01-14 07:05:26.666203 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.7,0 2013-01-14 07:05:46.498420 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.7,0 2013-01-14 07:06:04.864927 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.7,0 2013-01-14 07:30:07.228738 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.6,0 2013-01-14 08:29:57.461316 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.5,0 2013-01-14 09:29:48.441380 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.4,0 2013-01-14 11:29:30.755176 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.3,0 2013-01-14 15:05:36.688666 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.2,0 2013-01-14 16:05:35.111552 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.7,0 2013-01-14 16:36:35.755630 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.2,0 2013-01-14 18:38:18.404933 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.2,0 2013-01-14 21:04:47.187479 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.1,0 2013-01-15 02:04:22.801440 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.0,0 2013-01-15 09:03:13.233483 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.9,0 2013-01-15 11:02:54.400624 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.7,0 2013-01-15 12:02:44.724576 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.9,0 2013-01-15 13:02:34.285593 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.8,0 2013-01-15 16:02:09.372087 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.7,0 2013-01-15 17:02:00.235001 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.8,0 2013-01-15 19:01:41.695938 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.7,0 2013-01-16 02:00:40.126355 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.6,0 2013-01-16 06:00:03.073862 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.5,0 2013-01-16 11:59:01.907094 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.4,0 2013-01-16 15:58:22.520731 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 17:22:48.691426 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 17:30:10.701329 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 17:30:21.837740 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.2,0 2013-01-16 17:36:37.811552 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 17:46:01.164994 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 17:48:35.257576 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 17:56:49.565932 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 18:01:15.186127 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 18:02:46.866156 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 18:02:54.217581 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 18:10:29.930408 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 18:10:38.723483 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.2,0 2013-01-16 18:11:12.459758 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.2,0 2013-01-16 18:18:31.863177 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 18:19:03.123286 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 18:43:55.355803 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 18:58:43.567326 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.2,0 2013-01-16 22:58:15.314101 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.1,0 2013-01-17 01:57:50.181011 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.0,0 2013-01-17 02:57:40.587918 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,10.9,0 2013-01-17 03:57:30.418056 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,10.8,0 2013-01-17 04:57:19.241415 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,10.6,0 2013-01-17 05:57:10.622186 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,10.3,0 2013-01-17 06:32:32.593533 -0500 info main: #55 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,10.0,0 2013-01-17 07:32:23.932656 -0500 info main: #55 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,9.4,0 2013-01-17 08:32:13.374380 -0500 info main: #55 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,7.9,0 2013-01-17 09:32:03.204557 -0500 info main: #55 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,7.2,0 2013-01-17 10:31:52.551362 -0500 info main: #55 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,6.5,0 2013-01-17 11:31:41.821330 -0500 info main: #55 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,6.7,0 2013-01-17 12:58:48.540906 -0500 info main: #60 C XXXXXXX rx msg D 128,0,0,13,1,2,0,ZZZZ8,0,0,-127,0,120,-1,15.1,0
It shows 15v at the start (I guess when the car is on and charging it), then 12.7v at 2013-01-14 06am EST, then falls gradually to 11.0v at 2013-01-17 01am EST. At that point it seems to fall faster, down to the last report (just 10 hours later) 6.7v at 2013-01-17 11am EST.
My original thought to handle this was to have two thresholds.
At the first threshold, the PIC would turn off the modem and re-awake only once every 12 hours, for 2 minutes, before going back to sleep.
At the second threshold, the PIC would turn off the modem, and go to a deep sleep itself. In this mode, once power was restored it would reset itself.
Exit from either mode would be the 12v power line going back above the first threshold plus some safety margin.
This weekend, I'll get some exact power measurements from the v2 hardware module, so we know what we are dealing with:
* Just the PIC (modem powered down) * PIC + MODEM * PIC + MODEM + GPS
Last time I tested this, on v1 hardware without GPS, these were the figures for PIC + MODEM:
* Idle: 40mA @12V * Cellular Network Registration: 100mA @12V * Network activity: 80mA @12V
Regards, Mark.
On 18 Jan, 2013, at 10:47 PM, Michael Balzer <dexter@expeedo.de <mailto:dexter@expeedo.de>> wrote:
Mark, List,
yesterday my Twizy was temporarily dead... because of the OVMS power usage.
I had not driven for 5 days. The Twizy has a very small 12V battery with only 14 Ah capacity, and it only gets charged while charging the Twizy and while driving (from the main battery).
The OVMS with GPS activated needs a constant current of ~110 mA according to my measurement, thus sucking that battery empty within 4-5 days, maybe fewer. I'll make the power warning much more prominent in the Twizy user guide.
Have there been any considerations yet about using the sleep mode of the PIC and/or SIM chipset?
Regards, Michael
-- Michael Balzer * Paradestr. 8 * D-42107 Wuppertal Fon 0202 / 272 2201 * Handy 0176 / 206 989 26
<dexter.vcf>_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk <mailto:OvmsDev@lists.teslaclub.hk> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
-- Michael Balzer * Paradestr. 8 * D-42107 Wuppertal Fon 0202 / 272 2201 * Handy 0176 / 206 989 26
Mark, I just checked in the 12V alert function. It's straight forward and compiles ok, but I cannot test if it triggers and resets correctly under real use conditions -- I've got no power supply with adjustable voltage. As most 12V batteries will be standard lead acid ones, I've set the trigger thresholds to reasonable values for these: The alert will be triggered on voltage drop below 11.5 V and reset on voltage above 11.9 V. Regards, Michael Am 19.01.2013 11:10, schrieb Michael Balzer:
Mark,
for the Twizy and maybe other cars, a wakeup from activity on the CAN bus could also be an option. I remember reading about that in the SIM908 manual. The OVMS could generally sleep while the Twizy is off, maybe with an optional timed wakeup every 10-15 minutes for 1-2 minutes to detect GPS position changes.
Btw, the SIM908 hardware design contains detailed info on the sleep modes and power usages: http://www.mt-system.ru/sites/default/files/sim908-c_hardware_design_v1.03.p...
Thanks for bringing the 12V monitoring to my attention.
I'll now first add an SMS alert on the 12V power line getting too low, that's easy to implement and will remind users to charge.
Regards, Michael
Am 19.01.2013 10:47, schrieb Mark Webb-Johnson:
Here are the power usage figures from my bench, using v1 hardware:
* PIC (normal mode) on, modem powered down (by power toggle switch): 35mA - 42mA * PIC (normal mode) on, modem on, gps off: 75mA * PIC (normal mode) on, modem on,gps on: 120mA * Very short-lived bursts to 160mA at times, presumably while transmitting on GSM
Playing with AT+CSCLK=2, the modem seems to drop to almost no power usage (perhaps 45mA), with a CR on the async port waking it up.
Looking at the PIC18F2685 data sheet, it seems that with an external 20MHz oscillator, the normal power consumption is around 30mA to 40mA. Switching to an internal 4MHz oscillator reduces that to 5.3mA, and internal 1MHz oscillator to 3mA. Sleep mode is 2µA.
I'll play around with it. So far, it seems it is quite easy to go into low-power sleep mode. It is getting back out that is the tricky bit.
Regards, Mark.
On 19 Jan, 2013, at 8:50 AM, Mark Webb-Johnson <mark@webb-johnson.net <mailto:mark@webb-johnson.net>> wrote:
Michael,
Urgh. Glad that you managed to recover it.
The TMC forums have a few theads at the moment of Model S cars with 12V battery issues, and the Tesla Roadster's little 12V battery seems to need replacing every 13 to 25 months.
For Roadsters, OVMS is not run off that little 12V battery, so we haven't seen this issue.
The good news is that we did anticipate this sort of thing (except were expecting to see it more on ICE cars with OBDII monitoring). We added 12V power line monitoring, through an ADC, into the v2 hardware. Looking at your logs for the past few days is interesting (I don't think there is anything private in their apart from the vehicleid and odometer, which I have obscured, so hope you don't mind me posting here). The 12v line reading is the second to last column:
2013-01-14 06:39:53.930886 -0500 info main: #34 C XXXXXXX rx msg D 128,0,0,13,17,4,0,YYYY9,28,0,-127,0,120,-1,15.0,0 2013-01-14 06:59:54.871517 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.7,0 2013-01-14 07:05:26.666203 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.7,0 2013-01-14 07:05:46.498420 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.7,0 2013-01-14 07:06:04.864927 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.7,0 2013-01-14 07:30:07.228738 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.6,0 2013-01-14 08:29:57.461316 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.5,0 2013-01-14 09:29:48.441380 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.4,0 2013-01-14 11:29:30.755176 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.3,0 2013-01-14 15:05:36.688666 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.2,0 2013-01-14 16:05:35.111552 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.7,0 2013-01-14 16:36:35.755630 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.2,0 2013-01-14 18:38:18.404933 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.2,0 2013-01-14 21:04:47.187479 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.1,0 2013-01-15 02:04:22.801440 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.0,0 2013-01-15 09:03:13.233483 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.9,0 2013-01-15 11:02:54.400624 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.7,0 2013-01-15 12:02:44.724576 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.9,0 2013-01-15 13:02:34.285593 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.8,0 2013-01-15 16:02:09.372087 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.7,0 2013-01-15 17:02:00.235001 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.8,0 2013-01-15 19:01:41.695938 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.7,0 2013-01-16 02:00:40.126355 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.6,0 2013-01-16 06:00:03.073862 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.5,0 2013-01-16 11:59:01.907094 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.4,0 2013-01-16 15:58:22.520731 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 17:22:48.691426 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 17:30:10.701329 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 17:30:21.837740 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.2,0 2013-01-16 17:36:37.811552 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 17:46:01.164994 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 17:48:35.257576 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 17:56:49.565932 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 18:01:15.186127 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 18:02:46.866156 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 18:02:54.217581 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 18:10:29.930408 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 18:10:38.723483 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.2,0 2013-01-16 18:11:12.459758 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.2,0 2013-01-16 18:18:31.863177 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 18:19:03.123286 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 18:43:55.355803 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 18:58:43.567326 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.2,0 2013-01-16 22:58:15.314101 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.1,0 2013-01-17 01:57:50.181011 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.0,0 2013-01-17 02:57:40.587918 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,10.9,0 2013-01-17 03:57:30.418056 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,10.8,0 2013-01-17 04:57:19.241415 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,10.6,0 2013-01-17 05:57:10.622186 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,10.3,0 2013-01-17 06:32:32.593533 -0500 info main: #55 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,10.0,0 2013-01-17 07:32:23.932656 -0500 info main: #55 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,9.4,0 2013-01-17 08:32:13.374380 -0500 info main: #55 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,7.9,0 2013-01-17 09:32:03.204557 -0500 info main: #55 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,7.2,0 2013-01-17 10:31:52.551362 -0500 info main: #55 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,6.5,0 2013-01-17 11:31:41.821330 -0500 info main: #55 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,6.7,0 2013-01-17 12:58:48.540906 -0500 info main: #60 C XXXXXXX rx msg D 128,0,0,13,1,2,0,ZZZZ8,0,0,-127,0,120,-1,15.1,0
It shows 15v at the start (I guess when the car is on and charging it), then 12.7v at 2013-01-14 06am EST, then falls gradually to 11.0v at 2013-01-17 01am EST. At that point it seems to fall faster, down to the last report (just 10 hours later) 6.7v at 2013-01-17 11am EST.
My original thought to handle this was to have two thresholds.
At the first threshold, the PIC would turn off the modem and re-awake only once every 12 hours, for 2 minutes, before going back to sleep.
At the second threshold, the PIC would turn off the modem, and go to a deep sleep itself. In this mode, once power was restored it would reset itself.
Exit from either mode would be the 12v power line going back above the first threshold plus some safety margin.
This weekend, I'll get some exact power measurements from the v2 hardware module, so we know what we are dealing with:
* Just the PIC (modem powered down) * PIC + MODEM * PIC + MODEM + GPS
Last time I tested this, on v1 hardware without GPS, these were the figures for PIC + MODEM:
* Idle: 40mA @12V * Cellular Network Registration: 100mA @12V * Network activity: 80mA @12V
Regards, Mark.
On 18 Jan, 2013, at 10:47 PM, Michael Balzer <dexter@expeedo.de <mailto:dexter@expeedo.de>> wrote:
Mark, List,
yesterday my Twizy was temporarily dead... because of the OVMS power usage.
I had not driven for 5 days. The Twizy has a very small 12V battery with only 14 Ah capacity, and it only gets charged while charging the Twizy and while driving (from the main battery).
The OVMS with GPS activated needs a constant current of ~110 mA according to my measurement, thus sucking that battery empty within 4-5 days, maybe fewer. I'll make the power warning much more prominent in the Twizy user guide.
Have there been any considerations yet about using the sleep mode of the PIC and/or SIM chipset?
Regards, Michael
-- Michael Balzer * Paradestr. 8 * D-42107 Wuppertal Fon 0202 / 272 2201 * Handy 0176 / 206 989 26
<dexter.vcf>_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk <mailto:OvmsDev@lists.teslaclub.hk> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
-- Michael Balzer * Paradestr. 8 * D-42107 Wuppertal Fon 0202 / 272 2201 * Handy 0176 / 206 989 26
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
-- Michael Balzer * Paradestr. 8 * D-42107 Wuppertal Fon 0202 / 272 2201 * Handy 0176 / 206 989 26
Michael, I checked the Sleep() function. Turning off the SIM908 and going to Sleep() seemed to bring overall usage down to 25mA. Your code for alert seems to be ok, but I think the thresholds may be too high. The ADC reading is dependent on individual resistor variation (it is just a voltage divider) and I doubt whether it is accurate to more than 0.5V or so. It will scale linearly, but the offset will be wrong. For example, my car shows 11.5V as the nominal voltage. Perhaps lower the threshold to 11V? Regards, Mark. On 19 Jan, 2013, at 9:36 PM, Michael Balzer <dexter@expeedo.de> wrote:
Mark,
I just checked in the 12V alert function.
It's straight forward and compiles ok, but I cannot test if it triggers and resets correctly under real use conditions -- I've got no power supply with adjustable voltage.
As most 12V batteries will be standard lead acid ones, I've set the trigger thresholds to reasonable values for these: The alert will be triggered on voltage drop below 11.5 V and reset on voltage above 11.9 V.
Regards, Michael
Am 19.01.2013 11:10, schrieb Michael Balzer:
Mark,
for the Twizy and maybe other cars, a wakeup from activity on the CAN bus could also be an option. I remember reading about that in the SIM908 manual. The OVMS could generally sleep while the Twizy is off, maybe with an optional timed wakeup every 10-15 minutes for 1-2 minutes to detect GPS position changes.
Btw, the SIM908 hardware design contains detailed info on the sleep modes and power usages: http://www.mt-system.ru/sites/default/files/sim908-c_hardware_design_v1.03.p...
Thanks for bringing the 12V monitoring to my attention.
I'll now first add an SMS alert on the 12V power line getting too low, that's easy to implement and will remind users to charge.
Regards, Michael
Am 19.01.2013 10:47, schrieb Mark Webb-Johnson:
Here are the power usage figures from my bench, using v1 hardware:
PIC (normal mode) on, modem powered down (by power toggle switch): 35mA - 42mA PIC (normal mode) on, modem on, gps off: 75mA PIC (normal mode) on, modem on,gps on: 120mA Very short-lived bursts to 160mA at times, presumably while transmitting on GSM
Playing with AT+CSCLK=2, the modem seems to drop to almost no power usage (perhaps 45mA), with a CR on the async port waking it up.
Looking at the PIC18F2685 data sheet, it seems that with an external 20MHz oscillator, the normal power consumption is around 30mA to 40mA. Switching to an internal 4MHz oscillator reduces that to 5.3mA, and internal 1MHz oscillator to 3mA. Sleep mode is 2µA.
I'll play around with it. So far, it seems it is quite easy to go into low-power sleep mode. It is getting back out that is the tricky bit.
Regards, Mark.
On 19 Jan, 2013, at 8:50 AM, Mark Webb-Johnson <mark@webb-johnson.net> wrote:
Michael,
Urgh. Glad that you managed to recover it.
The TMC forums have a few theads at the moment of Model S cars with 12V battery issues, and the Tesla Roadster's little 12V battery seems to need replacing every 13 to 25 months.
For Roadsters, OVMS is not run off that little 12V battery, so we haven't seen this issue.
The good news is that we did anticipate this sort of thing (except were expecting to see it more on ICE cars with OBDII monitoring). We added 12V power line monitoring, through an ADC, into the v2 hardware. Looking at your logs for the past few days is interesting (I don't think there is anything private in their apart from the vehicleid and odometer, which I have obscured, so hope you don't mind me posting here). The 12v line reading is the second to last column:
2013-01-14 06:39:53.930886 -0500 info main: #34 C XXXXXXX rx msg D 128,0,0,13,17,4,0,YYYY9,28,0,-127,0,120,-1,15.0,0 2013-01-14 06:59:54.871517 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.7,0 2013-01-14 07:05:26.666203 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.7,0 2013-01-14 07:05:46.498420 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.7,0 2013-01-14 07:06:04.864927 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.7,0 2013-01-14 07:30:07.228738 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.6,0 2013-01-14 08:29:57.461316 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.5,0 2013-01-14 09:29:48.441380 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.4,0 2013-01-14 11:29:30.755176 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.3,0 2013-01-14 15:05:36.688666 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.2,0 2013-01-14 16:05:35.111552 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.7,0 2013-01-14 16:36:35.755630 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.2,0 2013-01-14 18:38:18.404933 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.2,0 2013-01-14 21:04:47.187479 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.1,0 2013-01-15 02:04:22.801440 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.0,0 2013-01-15 09:03:13.233483 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.9,0 2013-01-15 11:02:54.400624 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.7,0 2013-01-15 12:02:44.724576 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.9,0 2013-01-15 13:02:34.285593 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.8,0 2013-01-15 16:02:09.372087 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.7,0 2013-01-15 17:02:00.235001 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.8,0 2013-01-15 19:01:41.695938 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.7,0 2013-01-16 02:00:40.126355 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.6,0 2013-01-16 06:00:03.073862 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.5,0 2013-01-16 11:59:01.907094 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.4,0 2013-01-16 15:58:22.520731 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 17:22:48.691426 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 17:30:10.701329 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 17:30:21.837740 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.2,0 2013-01-16 17:36:37.811552 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 17:46:01.164994 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 17:48:35.257576 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 17:56:49.565932 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 18:01:15.186127 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 18:02:46.866156 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 18:02:54.217581 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 18:10:29.930408 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 18:10:38.723483 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.2,0 2013-01-16 18:11:12.459758 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.2,0 2013-01-16 18:18:31.863177 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 18:19:03.123286 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 18:43:55.355803 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 18:58:43.567326 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.2,0 2013-01-16 22:58:15.314101 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.1,0 2013-01-17 01:57:50.181011 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.0,0 2013-01-17 02:57:40.587918 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,10.9,0 2013-01-17 03:57:30.418056 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,10.8,0 2013-01-17 04:57:19.241415 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,10.6,0 2013-01-17 05:57:10.622186 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,10.3,0 2013-01-17 06:32:32.593533 -0500 info main: #55 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,10.0,0 2013-01-17 07:32:23.932656 -0500 info main: #55 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,9.4,0 2013-01-17 08:32:13.374380 -0500 info main: #55 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,7.9,0 2013-01-17 09:32:03.204557 -0500 info main: #55 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,7.2,0 2013-01-17 10:31:52.551362 -0500 info main: #55 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,6.5,0 2013-01-17 11:31:41.821330 -0500 info main: #55 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,6.7,0 2013-01-17 12:58:48.540906 -0500 info main: #60 C XXXXXXX rx msg D 128,0,0,13,1,2,0,ZZZZ8,0,0,-127,0,120,-1,15.1,0
It shows 15v at the start (I guess when the car is on and charging it), then 12.7v at 2013-01-14 06am EST, then falls gradually to 11.0v at 2013-01-17 01am EST. At that point it seems to fall faster, down to the last report (just 10 hours later) 6.7v at 2013-01-17 11am EST.
My original thought to handle this was to have two thresholds.
At the first threshold, the PIC would turn off the modem and re-awake only once every 12 hours, for 2 minutes, before going back to sleep.
At the second threshold, the PIC would turn off the modem, and go to a deep sleep itself. In this mode, once power was restored it would reset itself.
Exit from either mode would be the 12v power line going back above the first threshold plus some safety margin.
This weekend, I'll get some exact power measurements from the v2 hardware module, so we know what we are dealing with:
Just the PIC (modem powered down) PIC + MODEM PIC + MODEM + GPS
Last time I tested this, on v1 hardware without GPS, these were the figures for PIC + MODEM:
Idle: 40mA @12V Cellular Network Registration: 100mA @12V Network activity: 80mA @12V
Regards, Mark.
On 18 Jan, 2013, at 10:47 PM, Michael Balzer <dexter@expeedo.de> wrote:
Mark, List,
yesterday my Twizy was temporarily dead... because of the OVMS power usage.
I had not driven for 5 days. The Twizy has a very small 12V battery with only 14 Ah capacity, and it only gets charged while charging the Twizy and while driving (from the main battery).
The OVMS with GPS activated needs a constant current of ~110 mA according to my measurement, thus sucking that battery empty within 4-5 days, maybe fewer. I'll make the power warning much more prominent in the Twizy user guide.
Have there been any considerations yet about using the sleep mode of the PIC and/or SIM chipset?
Regards, Michael
-- Michael Balzer * Paradestr. 8 * D-42107 Wuppertal Fon 0202 / 272 2201 * Handy 0176 / 206 989 26
<dexter.vcf>_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
-- Michael Balzer * Paradestr. 8 * D-42107 Wuppertal Fon 0202 / 272 2201 * Handy 0176 / 206 989 26
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
-- Michael Balzer * Paradestr. 8 * D-42107 Wuppertal Fon 0202 / 272 2201 * Handy 0176 / 206 989 26 <dexter.vcf>_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
Mark, 11V is normally recommended as the absolute minimum for lead acid, below 11V sulfation may occur. The discharge curve of the Twizy also shows it begins to drop very fast from 11V, so if someone misses the alert over night that could already hurt the battery. I can implement a calibration for the 12V reading, but that will need 1 byte RAM... hm... I noticed the voltage currently is an int, intentionally? If that's not needed I could change that, so overall RAM usage will not change. Regards, Michael Am 20.01.2013 07:22, schrieb Mark Webb-Johnson:
Michael,
I checked the Sleep() function. Turning off the SIM908 and going to Sleep() seemed to bring overall usage down to 25mA.
Your code for alert seems to be ok, but I think the thresholds may be too high. The ADC reading is dependent on individual resistor variation (it is just a voltage divider) and I doubt whether it is accurate to more than 0.5V or so. It will scale linearly, but the offset will be wrong. For example, my car shows 11.5V as the nominal voltage.
Perhaps lower the threshold to 11V?
Regards, Mark.
On 19 Jan, 2013, at 9:36 PM, Michael Balzer <dexter@expeedo.de <mailto:dexter@expeedo.de>> wrote:
Mark,
I just checked in the 12V alert function.
It's straight forward and compiles ok, but I cannot test if it triggers and resets correctly under real use conditions -- I've got no power supply with adjustable voltage.
As most 12V batteries will be standard lead acid ones, I've set the trigger thresholds to reasonable values for these: The alert will be triggered on voltage drop below 11.5 V and reset on voltage above 11.9 V.
Regards, Michael
Am 19.01.2013 11:10, schrieb Michael Balzer:
Mark,
for the Twizy and maybe other cars, a wakeup from activity on the CAN bus could also be an option. I remember reading about that in the SIM908 manual. The OVMS could generally sleep while the Twizy is off, maybe with an optional timed wakeup every 10-15 minutes for 1-2 minutes to detect GPS position changes.
Btw, the SIM908 hardware design contains detailed info on the sleep modes and power usages: http://www.mt-system.ru/sites/default/files/sim908-c_hardware_design_v1.03.p...
Thanks for bringing the 12V monitoring to my attention.
I'll now first add an SMS alert on the 12V power line getting too low, that's easy to implement and will remind users to charge.
Regards, Michael
Am 19.01.2013 10:47, schrieb Mark Webb-Johnson:
Here are the power usage figures from my bench, using v1 hardware:
* PIC (normal mode) on, modem powered down (by power toggle switch): 35mA - 42mA * PIC (normal mode) on, modem on, gps off: 75mA * PIC (normal mode) on, modem on,gps on: 120mA * Very short-lived bursts to 160mA at times, presumably while transmitting on GSM
Playing with AT+CSCLK=2, the modem seems to drop to almost no power usage (perhaps 45mA), with a CR on the async port waking it up.
Looking at the PIC18F2685 data sheet, it seems that with an external 20MHz oscillator, the normal power consumption is around 30mA to 40mA. Switching to an internal 4MHz oscillator reduces that to 5.3mA, and internal 1MHz oscillator to 3mA. Sleep mode is 2µA.
I'll play around with it. So far, it seems it is quite easy to go into low-power sleep mode. It is getting back out that is the tricky bit.
Regards, Mark.
On 19 Jan, 2013, at 8:50 AM, Mark Webb-Johnson <mark@webb-johnson.net <mailto:mark@webb-johnson.net>> wrote:
Michael,
Urgh. Glad that you managed to recover it.
The TMC forums have a few theads at the moment of Model S cars with 12V battery issues, and the Tesla Roadster's little 12V battery seems to need replacing every 13 to 25 months.
For Roadsters, OVMS is not run off that little 12V battery, so we haven't seen this issue.
The good news is that we did anticipate this sort of thing (except were expecting to see it more on ICE cars with OBDII monitoring). We added 12V power line monitoring, through an ADC, into the v2 hardware. Looking at your logs for the past few days is interesting (I don't think there is anything private in their apart from the vehicleid and odometer, which I have obscured, so hope you don't mind me posting here). The 12v line reading is the second to last column:
2013-01-14 06:39:53.930886 -0500 info main: #34 C XXXXXXX rx msg D 128,0,0,13,17,4,0,YYYY9,28,0,-127,0,120,-1,15.0,0 2013-01-14 06:59:54.871517 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.7,0 2013-01-14 07:05:26.666203 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.7,0 2013-01-14 07:05:46.498420 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.7,0 2013-01-14 07:06:04.864927 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.7,0 2013-01-14 07:30:07.228738 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.6,0 2013-01-14 08:29:57.461316 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.5,0 2013-01-14 09:29:48.441380 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.4,0 2013-01-14 11:29:30.755176 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.3,0 2013-01-14 15:05:36.688666 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.2,0 2013-01-14 16:05:35.111552 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.7,0 2013-01-14 16:36:35.755630 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.2,0 2013-01-14 18:38:18.404933 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.2,0 2013-01-14 21:04:47.187479 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.1,0 2013-01-15 02:04:22.801440 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.0,0 2013-01-15 09:03:13.233483 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.9,0 2013-01-15 11:02:54.400624 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.7,0 2013-01-15 12:02:44.724576 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.9,0 2013-01-15 13:02:34.285593 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.8,0 2013-01-15 16:02:09.372087 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.7,0 2013-01-15 17:02:00.235001 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.8,0 2013-01-15 19:01:41.695938 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.7,0 2013-01-16 02:00:40.126355 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.6,0 2013-01-16 06:00:03.073862 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.5,0 2013-01-16 11:59:01.907094 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.4,0 2013-01-16 15:58:22.520731 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 17:22:48.691426 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 17:30:10.701329 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 17:30:21.837740 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.2,0 2013-01-16 17:36:37.811552 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 17:46:01.164994 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 17:48:35.257576 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 17:56:49.565932 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 18:01:15.186127 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 18:02:46.866156 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 18:02:54.217581 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 18:10:29.930408 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 18:10:38.723483 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.2,0 2013-01-16 18:11:12.459758 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.2,0 2013-01-16 18:18:31.863177 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 18:19:03.123286 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 18:43:55.355803 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 18:58:43.567326 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.2,0 2013-01-16 22:58:15.314101 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.1,0 2013-01-17 01:57:50.181011 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.0,0 2013-01-17 02:57:40.587918 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,10.9,0 2013-01-17 03:57:30.418056 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,10.8,0 2013-01-17 04:57:19.241415 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,10.6,0 2013-01-17 05:57:10.622186 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,10.3,0 2013-01-17 06:32:32.593533 -0500 info main: #55 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,10.0,0 2013-01-17 07:32:23.932656 -0500 info main: #55 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,9.4,0 2013-01-17 08:32:13.374380 -0500 info main: #55 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,7.9,0 2013-01-17 09:32:03.204557 -0500 info main: #55 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,7.2,0 2013-01-17 10:31:52.551362 -0500 info main: #55 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,6.5,0 2013-01-17 11:31:41.821330 -0500 info main: #55 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,6.7,0 2013-01-17 12:58:48.540906 -0500 info main: #60 C XXXXXXX rx msg D 128,0,0,13,1,2,0,ZZZZ8,0,0,-127,0,120,-1,15.1,0
It shows 15v at the start (I guess when the car is on and charging it), then 12.7v at 2013-01-14 06am EST, then falls gradually to 11.0v at 2013-01-17 01am EST. At that point it seems to fall faster, down to the last report (just 10 hours later) 6.7v at 2013-01-17 11am EST.
My original thought to handle this was to have two thresholds.
At the first threshold, the PIC would turn off the modem and re-awake only once every 12 hours, for 2 minutes, before going back to sleep.
At the second threshold, the PIC would turn off the modem, and go to a deep sleep itself. In this mode, once power was restored it would reset itself.
Exit from either mode would be the 12v power line going back above the first threshold plus some safety margin.
This weekend, I'll get some exact power measurements from the v2 hardware module, so we know what we are dealing with:
* Just the PIC (modem powered down) * PIC + MODEM * PIC + MODEM + GPS
Last time I tested this, on v1 hardware without GPS, these were the figures for PIC + MODEM:
* Idle: 40mA @12V * Cellular Network Registration: 100mA @12V * Network activity: 80mA @12V
Regards, Mark.
On 18 Jan, 2013, at 10:47 PM, Michael Balzer <dexter@expeedo.de <mailto:dexter@expeedo.de>> wrote:
Mark, List,
yesterday my Twizy was temporarily dead... because of the OVMS power usage.
I had not driven for 5 days. The Twizy has a very small 12V battery with only 14 Ah capacity, and it only gets charged while charging the Twizy and while driving (from the main battery).
The OVMS with GPS activated needs a constant current of ~110 mA according to my measurement, thus sucking that battery empty within 4-5 days, maybe fewer. I'll make the power warning much more prominent in the Twizy user guide.
Have there been any considerations yet about using the sleep mode of the PIC and/or SIM chipset?
Regards, Michael
-- Michael Balzer * Paradestr. 8 * D-42107 Wuppertal Fon 0202 / 272 2201 * Handy 0176 / 206 989 26
<dexter.vcf>_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk <mailto:OvmsDev@lists.teslaclub.hk> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
-- Michael Balzer * Paradestr. 8 * D-42107 Wuppertal Fon 0202 / 272 2201 * Handy 0176 / 206 989 26
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
-- Michael Balzer * Paradestr. 8 * D-42107 Wuppertal Fon 0202 / 272 2201 * Handy 0176 / 206 989 26 <dexter.vcf>_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk <mailto:OvmsDev@lists.teslaclub.hk> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
-- Michael Balzer * Paradestr. 8 * D-42107 Wuppertal Fon 0202 / 272 2201 * Handy 0176 / 206 989 26
Michael, How do you suggest to calibrate? At the moment, what I did was to put a few modules on the bench at 12V, then read the ADC value from the code, then set the scaling factor as the average of those. See inputs.c: float inputs_voltage(void) { ADCON0=0x00; ADCON0=0; //Select ADC Channel #0 ADCON0bits.ADON=1; //switch on the adc module ADCON0bits.GO=1; //Start conversion while(ADCON0bits.GO); //wait for the conversion to finish ADCON0bits.ADON=0; //switch off adc return (0.0+ADRES)/47.0; } The magic number 47.0 is thus really rough, and I suspect not at all good. I also don't think this needs to be a float. We only need 1 decimal digit, so storing 10ths of a volt would give us up to 25.5Volts in an unsigned char, which should be fine. Sorry, but that code is quite rough. It was implemented as a proof-of-concept, in a rush, when the work on the v2 hardware was finishing and the factory in China needed test code overnight. Given that we don't actually know the voltage in the car (without measuring with a voltmeter), and the resistor network we use is going to have some variation between modules, I'm not really sure how we can auto-calibrate this. Regards, Mark. On 20 Jan, 2013, at 5:25 PM, Michael Balzer <dexter@expeedo.de> wrote:
Mark,
11V is normally recommended as the absolute minimum for lead acid, below 11V sulfation may occur.
The discharge curve of the Twizy also shows it begins to drop very fast from 11V, so if someone misses the alert over night that could already hurt the battery.
I can implement a calibration for the 12V reading, but that will need 1 byte RAM... hm... I noticed the voltage currently is an int, intentionally? If that's not needed I could change that, so overall RAM usage will not change.
Regards, Michael
Am 20.01.2013 07:22, schrieb Mark Webb-Johnson:
Michael,
I checked the Sleep() function. Turning off the SIM908 and going to Sleep() seemed to bring overall usage down to 25mA.
Your code for alert seems to be ok, but I think the thresholds may be too high. The ADC reading is dependent on individual resistor variation (it is just a voltage divider) and I doubt whether it is accurate to more than 0.5V or so. It will scale linearly, but the offset will be wrong. For example, my car shows 11.5V as the nominal voltage.
Perhaps lower the threshold to 11V?
Regards, Mark.
On 19 Jan, 2013, at 9:36 PM, Michael Balzer <dexter@expeedo.de> wrote:
Mark,
I just checked in the 12V alert function.
It's straight forward and compiles ok, but I cannot test if it triggers and resets correctly under real use conditions -- I've got no power supply with adjustable voltage.
As most 12V batteries will be standard lead acid ones, I've set the trigger thresholds to reasonable values for these: The alert will be triggered on voltage drop below 11.5 V and reset on voltage above 11.9 V.
Regards, Michael
Am 19.01.2013 11:10, schrieb Michael Balzer:
Mark,
for the Twizy and maybe other cars, a wakeup from activity on the CAN bus could also be an option. I remember reading about that in the SIM908 manual. The OVMS could generally sleep while the Twizy is off, maybe with an optional timed wakeup every 10-15 minutes for 1-2 minutes to detect GPS position changes.
Btw, the SIM908 hardware design contains detailed info on the sleep modes and power usages: http://www.mt-system.ru/sites/default/files/sim908-c_hardware_design_v1.03.p...
Thanks for bringing the 12V monitoring to my attention.
I'll now first add an SMS alert on the 12V power line getting too low, that's easy to implement and will remind users to charge.
Regards, Michael
Am 19.01.2013 10:47, schrieb Mark Webb-Johnson:
Here are the power usage figures from my bench, using v1 hardware:
PIC (normal mode) on, modem powered down (by power toggle switch): 35mA - 42mA PIC (normal mode) on, modem on, gps off: 75mA PIC (normal mode) on, modem on,gps on: 120mA Very short-lived bursts to 160mA at times, presumably while transmitting on GSM
Playing with AT+CSCLK=2, the modem seems to drop to almost no power usage (perhaps 45mA), with a CR on the async port waking it up.
Looking at the PIC18F2685 data sheet, it seems that with an external 20MHz oscillator, the normal power consumption is around 30mA to 40mA. Switching to an internal 4MHz oscillator reduces that to 5.3mA, and internal 1MHz oscillator to 3mA. Sleep mode is 2µA.
I'll play around with it. So far, it seems it is quite easy to go into low-power sleep mode. It is getting back out that is the tricky bit.
Regards, Mark.
On 19 Jan, 2013, at 8:50 AM, Mark Webb-Johnson <mark@webb-johnson.net> wrote:
Michael,
Urgh. Glad that you managed to recover it.
The TMC forums have a few theads at the moment of Model S cars with 12V battery issues, and the Tesla Roadster's little 12V battery seems to need replacing every 13 to 25 months.
For Roadsters, OVMS is not run off that little 12V battery, so we haven't seen this issue.
The good news is that we did anticipate this sort of thing (except were expecting to see it more on ICE cars with OBDII monitoring). We added 12V power line monitoring, through an ADC, into the v2 hardware. Looking at your logs for the past few days is interesting (I don't think there is anything private in their apart from the vehicleid and odometer, which I have obscured, so hope you don't mind me posting here). The 12v line reading is the second to last column:
2013-01-14 06:39:53.930886 -0500 info main: #34 C XXXXXXX rx msg D 128,0,0,13,17,4,0,YYYY9,28,0,-127,0,120,-1,15.0,0 2013-01-14 06:59:54.871517 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.7,0 2013-01-14 07:05:26.666203 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.7,0 2013-01-14 07:05:46.498420 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.7,0 2013-01-14 07:06:04.864927 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.7,0 2013-01-14 07:30:07.228738 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.6,0 2013-01-14 08:29:57.461316 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.5,0 2013-01-14 09:29:48.441380 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.4,0 2013-01-14 11:29:30.755176 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.3,0 2013-01-14 15:05:36.688666 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.2,0 2013-01-14 16:05:35.111552 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.7,0 2013-01-14 16:36:35.755630 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.2,0 2013-01-14 18:38:18.404933 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.2,0 2013-01-14 21:04:47.187479 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.1,0 2013-01-15 02:04:22.801440 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.0,0 2013-01-15 09:03:13.233483 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.9,0 2013-01-15 11:02:54.400624 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.7,0 2013-01-15 12:02:44.724576 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.9,0 2013-01-15 13:02:34.285593 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.8,0 2013-01-15 16:02:09.372087 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.7,0 2013-01-15 17:02:00.235001 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.8,0 2013-01-15 19:01:41.695938 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.7,0 2013-01-16 02:00:40.126355 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.6,0 2013-01-16 06:00:03.073862 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.5,0 2013-01-16 11:59:01.907094 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.4,0 2013-01-16 15:58:22.520731 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 17:22:48.691426 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 17:30:10.701329 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 17:30:21.837740 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.2,0 2013-01-16 17:36:37.811552 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 17:46:01.164994 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 17:48:35.257576 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 17:56:49.565932 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 18:01:15.186127 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 18:02:46.866156 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 18:02:54.217581 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 18:10:29.930408 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 18:10:38.723483 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.2,0 2013-01-16 18:11:12.459758 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.2,0 2013-01-16 18:18:31.863177 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 18:19:03.123286 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 18:43:55.355803 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 18:58:43.567326 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.2,0 2013-01-16 22:58:15.314101 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.1,0 2013-01-17 01:57:50.181011 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.0,0 2013-01-17 02:57:40.587918 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,10.9,0 2013-01-17 03:57:30.418056 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,10.8,0 2013-01-17 04:57:19.241415 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,10.6,0 2013-01-17 05:57:10.622186 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,10.3,0 2013-01-17 06:32:32.593533 -0500 info main: #55 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,10.0,0 2013-01-17 07:32:23.932656 -0500 info main: #55 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,9.4,0 2013-01-17 08:32:13.374380 -0500 info main: #55 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,7.9,0 2013-01-17 09:32:03.204557 -0500 info main: #55 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,7.2,0 2013-01-17 10:31:52.551362 -0500 info main: #55 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,6.5,0 2013-01-17 11:31:41.821330 -0500 info main: #55 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,6.7,0 2013-01-17 12:58:48.540906 -0500 info main: #60 C XXXXXXX rx msg D 128,0,0,13,1,2,0,ZZZZ8,0,0,-127,0,120,-1,15.1,0
It shows 15v at the start (I guess when the car is on and charging it), then 12.7v at 2013-01-14 06am EST, then falls gradually to 11.0v at 2013-01-17 01am EST. At that point it seems to fall faster, down to the last report (just 10 hours later) 6.7v at 2013-01-17 11am EST.
My original thought to handle this was to have two thresholds.
At the first threshold, the PIC would turn off the modem and re-awake only once every 12 hours, for 2 minutes, before going back to sleep.
At the second threshold, the PIC would turn off the modem, and go to a deep sleep itself. In this mode, once power was restored it would reset itself.
Exit from either mode would be the 12v power line going back above the first threshold plus some safety margin.
This weekend, I'll get some exact power measurements from the v2 hardware module, so we know what we are dealing with:
Just the PIC (modem powered down) PIC + MODEM PIC + MODEM + GPS
Last time I tested this, on v1 hardware without GPS, these were the figures for PIC + MODEM:
Idle: 40mA @12V Cellular Network Registration: 100mA @12V Network activity: 80mA @12V
Regards, Mark.
On 18 Jan, 2013, at 10:47 PM, Michael Balzer <dexter@expeedo.de> wrote:
> Mark, List, > > yesterday my Twizy was temporarily dead... because of the OVMS power usage. > > I had not driven for 5 days. The Twizy has a very small 12V battery with only 14 Ah capacity, and it only gets charged while charging the Twizy and while driving (from the main battery). > > The OVMS with GPS activated needs a constant current of ~110 mA according to my measurement, thus sucking that battery empty within 4-5 days, maybe fewer. I'll make the power warning much more prominent in the Twizy user guide. > > Have there been any considerations yet about using the sleep mode of the PIC and/or SIM chipset? > > Regards, > Michael > > -- > Michael Balzer * Paradestr. 8 * D-42107 Wuppertal > Fon 0202 / 272 2201 * Handy 0176 / 206 989 26 > > <dexter.vcf>_______________________________________________ > OvmsDev mailing list > OvmsDev@lists.teslaclub.hk > http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
-- Michael Balzer * Paradestr. 8 * D-42107 Wuppertal Fon 0202 / 272 2201 * Handy 0176 / 206 989 26
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
-- Michael Balzer * Paradestr. 8 * D-42107 Wuppertal Fon 0202 / 272 2201 * Handy 0176 / 206 989 26 <dexter.vcf>_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
-- Michael Balzer * Paradestr. 8 * D-42107 Wuppertal Fon 0202 / 272 2201 * Handy 0176 / 206 989 26 <dexter.vcf>_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
Mark, I've not been into the details yet. My first idea was taking the voltage readout at the first defined state encountered (e.g. charging / car switched on), or alternatively by collecting the maximum voltage. The max would for example be 15.1 for my Twizy and 13.1 for your roadster. Not sure yet if that's sufficient, maybe building a mean value over some time would be an option too. Regards, Michael Am 20.01.2013 10:36, schrieb Mark Webb-Johnson:
Michael,
How do you suggest to calibrate? At the moment, what I did was to put a few modules on the bench at 12V, then read the ADC value from the code, then set the scaling factor as the average of those. See inputs.c:
float inputs_voltage(void) { ADCON0=0x00; ADCON0=0; //Select ADC Channel #0 ADCON0bits.ADON=1; //switch on the adc module ADCON0bits.GO=1; //Start conversion while(ADCON0bits.GO); //wait for the conversion to finish ADCON0bits.ADON=0; //switch off adc
return (0.0+ADRES)/47.0; }
The magic number 47.0 is thus really rough, and I suspect not at all good.
I also don't think this needs to be a float. We only need 1 decimal digit, so storing 10ths of a volt would give us up to 25.5Volts in an unsigned char, which should be fine.
Sorry, but that code is quite rough. It was implemented as a proof-of-concept, in a rush, when the work on the v2 hardware was finishing and the factory in China needed test code overnight.
Given that we don't actually know the voltage in the car (without measuring with a voltmeter), and the resistor network we use is going to have some variation between modules, I'm not really sure how we can auto-calibrate this.
Regards, Mark.
On 20 Jan, 2013, at 5:25 PM, Michael Balzer <dexter@expeedo.de <mailto:dexter@expeedo.de>> wrote:
Mark,
11V is normally recommended as the absolute minimum for lead acid, below 11V sulfation may occur.
The discharge curve of the Twizy also shows it begins to drop very fast from 11V, so if someone misses the alert over night that could already hurt the battery.
I can implement a calibration for the 12V reading, but that will need 1 byte RAM... hm... I noticed the voltage currently is an int, intentionally? If that's not needed I could change that, so overall RAM usage will not change.
Regards, Michael
Am 20.01.2013 07:22, schrieb Mark Webb-Johnson:
Michael,
I checked the Sleep() function. Turning off the SIM908 and going to Sleep() seemed to bring overall usage down to 25mA.
Your code for alert seems to be ok, but I think the thresholds may be too high. The ADC reading is dependent on individual resistor variation (it is just a voltage divider) and I doubt whether it is accurate to more than 0.5V or so. It will scale linearly, but the offset will be wrong. For example, my car shows 11.5V as the nominal voltage.
Perhaps lower the threshold to 11V?
Regards, Mark.
On 19 Jan, 2013, at 9:36 PM, Michael Balzer <dexter@expeedo.de <mailto:dexter@expeedo.de>> wrote:
Mark,
I just checked in the 12V alert function.
It's straight forward and compiles ok, but I cannot test if it triggers and resets correctly under real use conditions -- I've got no power supply with adjustable voltage.
As most 12V batteries will be standard lead acid ones, I've set the trigger thresholds to reasonable values for these: The alert will be triggered on voltage drop below 11.5 V and reset on voltage above 11.9 V.
Regards, Michael
Am 19.01.2013 11:10, schrieb Michael Balzer:
Mark,
for the Twizy and maybe other cars, a wakeup from activity on the CAN bus could also be an option. I remember reading about that in the SIM908 manual. The OVMS could generally sleep while the Twizy is off, maybe with an optional timed wakeup every 10-15 minutes for 1-2 minutes to detect GPS position changes.
Btw, the SIM908 hardware design contains detailed info on the sleep modes and power usages: http://www.mt-system.ru/sites/default/files/sim908-c_hardware_design_v1.03.p...
Thanks for bringing the 12V monitoring to my attention.
I'll now first add an SMS alert on the 12V power line getting too low, that's easy to implement and will remind users to charge.
Regards, Michael
Am 19.01.2013 10:47, schrieb Mark Webb-Johnson:
Here are the power usage figures from my bench, using v1 hardware:
* PIC (normal mode) on, modem powered down (by power toggle switch): 35mA - 42mA * PIC (normal mode) on, modem on, gps off: 75mA * PIC (normal mode) on, modem on,gps on: 120mA * Very short-lived bursts to 160mA at times, presumably while transmitting on GSM
Playing with AT+CSCLK=2, the modem seems to drop to almost no power usage (perhaps 45mA), with a CR on the async port waking it up.
Looking at the PIC18F2685 data sheet, it seems that with an external 20MHz oscillator, the normal power consumption is around 30mA to 40mA. Switching to an internal 4MHz oscillator reduces that to 5.3mA, and internal 1MHz oscillator to 3mA. Sleep mode is 2µA.
I'll play around with it. So far, it seems it is quite easy to go into low-power sleep mode. It is getting back out that is the tricky bit.
Regards, Mark.
On 19 Jan, 2013, at 8:50 AM, Mark Webb-Johnson <mark@webb-johnson.net <mailto:mark@webb-johnson.net>> wrote:
> Michael, > > Urgh. Glad that you managed to recover it. > > The TMC forums have a few theads at the moment of Model S cars > with 12V battery issues, and the Tesla Roadster's little 12V > battery seems to need replacing every 13 to 25 months. > > For Roadsters, OVMS is not run off that little 12V battery, so > we haven't seen this issue. > > The good news is that we did anticipate this sort of thing > (except were expecting to see it more on ICE cars with OBDII > monitoring). We added 12V power line monitoring, through an ADC, > into the v2 hardware. Looking at your logs for the past few days > is interesting (I don't think there is anything private in their > apart from the vehicleid and odometer, which I have obscured, so > hope you don't mind me posting here). The 12v line reading is > the second to last column: > > 2013-01-14 06:39:53.930886 -0500 info main: #34 C XXXXXXX > rx msg D 128,0,0,13,17,4,0,YYYY9,28,0,-127,0,120,-1,15.0,0 > 2013-01-14 06:59:54.871517 -0500 info main: #34 C XXXXXXX > rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.7,0 > 2013-01-14 07:05:26.666203 -0500 info main: #34 C XXXXXXX > rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.7,0 > 2013-01-14 07:05:46.498420 -0500 info main: #34 C XXXXXXX > rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.7,0 > 2013-01-14 07:06:04.864927 -0500 info main: #34 C XXXXXXX > rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.7,0 > 2013-01-14 07:30:07.228738 -0500 info main: #34 C XXXXXXX > rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.6,0 > 2013-01-14 08:29:57.461316 -0500 info main: #34 C XXXXXXX > rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.5,0 > 2013-01-14 09:29:48.441380 -0500 info main: #34 C XXXXXXX > rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.4,0 > 2013-01-14 11:29:30.755176 -0500 info main: #34 C XXXXXXX > rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.3,0 > 2013-01-14 15:05:36.688666 -0500 info main: #54 C XXXXXXX > rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.2,0 > 2013-01-14 16:05:35.111552 -0500 info main: #54 C XXXXXXX > rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.7,0 > 2013-01-14 16:36:35.755630 -0500 info main: #54 C XXXXXXX > rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.2,0 > 2013-01-14 18:38:18.404933 -0500 info main: #54 C XXXXXXX > rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.2,0 > 2013-01-14 21:04:47.187479 -0500 info main: #54 C XXXXXXX > rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.1,0 > 2013-01-15 02:04:22.801440 -0500 info main: #54 C XXXXXXX > rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.0,0 > 2013-01-15 09:03:13.233483 -0500 info main: #54 C XXXXXXX > rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.9,0 > 2013-01-15 11:02:54.400624 -0500 info main: #54 C XXXXXXX > rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.7,0 > 2013-01-15 12:02:44.724576 -0500 info main: #54 C XXXXXXX > rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.9,0 > 2013-01-15 13:02:34.285593 -0500 info main: #54 C XXXXXXX > rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.8,0 > 2013-01-15 16:02:09.372087 -0500 info main: #54 C XXXXXXX > rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.7,0 > 2013-01-15 17:02:00.235001 -0500 info main: #54 C XXXXXXX > rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.8,0 > 2013-01-15 19:01:41.695938 -0500 info main: #54 C XXXXXXX > rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.7,0 > 2013-01-16 02:00:40.126355 -0500 info main: #54 C XXXXXXX > rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.6,0 > 2013-01-16 06:00:03.073862 -0500 info main: #54 C XXXXXXX > rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.5,0 > 2013-01-16 11:59:01.907094 -0500 info main: #54 C XXXXXXX > rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.4,0 > 2013-01-16 15:58:22.520731 -0500 info main: #54 C XXXXXXX > rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 > 2013-01-16 17:22:48.691426 -0500 info main: #54 C XXXXXXX > rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 > 2013-01-16 17:30:10.701329 -0500 info main: #54 C XXXXXXX > rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 > 2013-01-16 17:30:21.837740 -0500 info main: #54 C XXXXXXX > rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.2,0 > 2013-01-16 17:36:37.811552 -0500 info main: #54 C XXXXXXX > rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 > 2013-01-16 17:46:01.164994 -0500 info main: #54 C XXXXXXX > rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 > 2013-01-16 17:48:35.257576 -0500 info main: #54 C XXXXXXX > rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 > 2013-01-16 17:56:49.565932 -0500 info main: #54 C XXXXXXX > rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 > 2013-01-16 18:01:15.186127 -0500 info main: #54 C XXXXXXX > rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 > 2013-01-16 18:02:46.866156 -0500 info main: #54 C XXXXXXX > rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 > 2013-01-16 18:02:54.217581 -0500 info main: #54 C XXXXXXX > rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 > 2013-01-16 18:10:29.930408 -0500 info main: #54 C XXXXXXX > rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 > 2013-01-16 18:10:38.723483 -0500 info main: #54 C XXXXXXX > rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.2,0 > 2013-01-16 18:11:12.459758 -0500 info main: #54 C XXXXXXX > rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.2,0 > 2013-01-16 18:18:31.863177 -0500 info main: #54 C XXXXXXX > rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 > 2013-01-16 18:19:03.123286 -0500 info main: #54 C XXXXXXX > rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 > 2013-01-16 18:43:55.355803 -0500 info main: #54 C XXXXXXX > rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 > 2013-01-16 18:58:43.567326 -0500 info main: #54 C XXXXXXX > rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.2,0 > 2013-01-16 22:58:15.314101 -0500 info main: #54 C XXXXXXX > rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.1,0 > 2013-01-17 01:57:50.181011 -0500 info main: #54 C XXXXXXX > rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.0,0 > 2013-01-17 02:57:40.587918 -0500 info main: #54 C XXXXXXX > rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,10.9,0 > 2013-01-17 03:57:30.418056 -0500 info main: #54 C XXXXXXX > rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,10.8,0 > 2013-01-17 04:57:19.241415 -0500 info main: #54 C XXXXXXX > rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,10.6,0 > 2013-01-17 05:57:10.622186 -0500 info main: #54 C XXXXXXX > rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,10.3,0 > 2013-01-17 06:32:32.593533 -0500 info main: #55 C XXXXXXX > rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,10.0,0 > 2013-01-17 07:32:23.932656 -0500 info main: #55 C XXXXXXX > rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,9.4,0 > 2013-01-17 08:32:13.374380 -0500 info main: #55 C XXXXXXX > rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,7.9,0 > 2013-01-17 09:32:03.204557 -0500 info main: #55 C XXXXXXX > rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,7.2,0 > 2013-01-17 10:31:52.551362 -0500 info main: #55 C XXXXXXX > rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,6.5,0 > 2013-01-17 11:31:41.821330 -0500 info main: #55 C XXXXXXX > rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,6.7,0 > 2013-01-17 12:58:48.540906 -0500 info main: #60 C XXXXXXX > rx msg D 128,0,0,13,1,2,0,ZZZZ8,0,0,-127,0,120,-1,15.1,0 > > > It shows 15v at the start (I guess when the car is on and > charging it), then 12.7v at 2013-01-14 06am EST, then falls > gradually to 11.0v at 2013-01-17 01am EST. At that point it > seems to fall faster, down to the last report (just 10 hours > later) 6.7v at 2013-01-17 11am EST. > > My original thought to handle this was to have two thresholds. > > At the first threshold, the PIC would turn off the modem and > re-awake only once every 12 hours, for 2 minutes, before going > back to sleep. > > At the second threshold, the PIC would turn off the modem, and > go to a deep sleep itself. In this mode, once power was restored > it would reset itself. > > Exit from either mode would be the 12v power line going back > above the first threshold plus some safety margin. > > This weekend, I'll get some exact power measurements from the v2 > hardware module, so we know what we are dealing with: > > * Just the PIC (modem powered down) > * PIC + MODEM > * PIC + MODEM + GPS > > > Last time I tested this, on v1 hardware without GPS, these were > the figures for PIC + MODEM: > > * Idle: 40mA @12V > * Cellular Network Registration: 100mA @12V > * Network activity: 80mA @12V > > > Regards, Mark. > > On 18 Jan, 2013, at 10:47 PM, Michael Balzer <dexter@expeedo.de > <mailto:dexter@expeedo.de>> wrote: > >> Mark, List, >> >> yesterday my Twizy was temporarily dead... because of the OVMS >> power usage. >> >> I had not driven for 5 days. The Twizy has a very small 12V >> battery with only 14 Ah capacity, and it only gets charged >> while charging the Twizy and while driving (from the main battery). >> >> The OVMS with GPS activated needs a constant current of ~110 mA >> according to my measurement, thus sucking that battery empty >> within 4-5 days, maybe fewer. I'll make the power warning much >> more prominent in the Twizy user guide. >> >> Have there been any considerations yet about using the sleep >> mode of the PIC and/or SIM chipset? >> >> Regards, >> Michael >> >> -- >> Michael Balzer * Paradestr. 8 * D-42107 Wuppertal >> Fon 0202 / 272 2201 * Handy 0176 / 206 989 26 >> >> <dexter.vcf>_______________________________________________ >> OvmsDev mailing list >> OvmsDev@lists.teslaclub.hk <mailto:OvmsDev@lists.teslaclub.hk> >> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev >
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
-- Michael Balzer * Paradestr. 8 * D-42107 Wuppertal Fon 0202 / 272 2201 * Handy 0176 / 206 989 26
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
-- Michael Balzer * Paradestr. 8 * D-42107 Wuppertal Fon 0202 / 272 2201 * Handy 0176 / 206 989 26 <dexter.vcf>_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk <mailto:OvmsDev@lists.teslaclub.hk> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
-- Michael Balzer * Paradestr. 8 * D-42107 Wuppertal Fon 0202 / 272 2201 * Handy 0176 / 206 989 26 <dexter.vcf>_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk <mailto:OvmsDev@lists.teslaclub.hk> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
-- Michael Balzer * Paradestr. 8 * D-42107 Wuppertal Fon 0202 / 272 2201 * Handy 0176 / 206 989 26
I reviewed the voltage divider circuit: Assuming Vin +12V, and plugging in the figures for the divider resistors, gives us +2.769V to the ADC. Let's look at some others: +9V gives +2.077V +10V gives +2.308V +11V gives +2.538V +12V gives +2.769V +13V gives +3.000V +14V gives +3.231V +15V gives +3.462V In general, for every 1V of input voltage, we get 0.231V to the ADC. The ADC is 10bit, and we use the output of the +5V power regulator as the reference voltage. +12V in, voltage divided down to 2.769V, compared to 5V, should give us (2.769/5)*1024 = 566. 566 / 47 = 12.042 (as a float). The most accurate factor appears to be 47.166. That said, the accuracy of the system depends on (a) how close the reference voltage is to +5V, (b) variations in resistor R28, and (c) variations in resistor R30. For example, if both R28 and R30 are off by +5% and -5%, the voltage divider would give 2.562V for 12V in, and the ADC would read that as 524 / 47 = 11.1V! Even a 1% variation gives 2.727V for 12V in, and that would be 558 / 47 = 11.87V. The 5V regulator we use is accurate to about 4%. Looking at all the V2 modules we have today in the field today, in Tesla Roadsters, for recent days, I see the following spread of voltages: Count Voltage ======= ======= 1 10.0 1 10.3 2 10.6 1 10.8 1 10.9 1 11.0 1 11.1 4 11.2 17 11.3 210 11.4 234 11.5 616 11.6 2699 11.7 1583 11.8 124 11.9 3 12.0 5 12.1 11 12.2 8 12.3 13 12.4 54 12.5 61 12.6 65 12.7 48 12.8 448 12.9 152 13.0 457 13.1 901 13.2 669 13.3 60 13.4 104 13.5 19 13.6 9 13.7 11 13.8 3 13.9 2 14.0 5 14.1 9 14.2 8 14.3 2 14.4 3 14.5 3 14.6 11 14.7 13 14.8 13 14.9 12 15.0 5 15.1 16 15.2 10 15.3 Interesting double-peak, but I'm not sure what else to make of it. Regards, Mark. On 20 Jan, 2013, at 6:12 PM, Michael Balzer <dexter@expeedo.de> wrote:
Mark,
I've not been into the details yet. My first idea was taking the voltage readout at the first defined state encountered (e.g. charging / car switched on), or alternatively by collecting the maximum voltage.
The max would for example be 15.1 for my Twizy and 13.1 for your roadster. Not sure yet if that's sufficient, maybe building a mean value over some time would be an option too.
Regards, Michael
Am 20.01.2013 10:36, schrieb Mark Webb-Johnson:
Michael,
How do you suggest to calibrate? At the moment, what I did was to put a few modules on the bench at 12V, then read the ADC value from the code, then set the scaling factor as the average of those. See inputs.c:
float inputs_voltage(void) { ADCON0=0x00; ADCON0=0; //Select ADC Channel #0 ADCON0bits.ADON=1; //switch on the adc module ADCON0bits.GO=1; //Start conversion while(ADCON0bits.GO); //wait for the conversion to finish ADCON0bits.ADON=0; //switch off adc
return (0.0+ADRES)/47.0; }
The magic number 47.0 is thus really rough, and I suspect not at all good.
I also don't think this needs to be a float. We only need 1 decimal digit, so storing 10ths of a volt would give us up to 25.5Volts in an unsigned char, which should be fine.
Sorry, but that code is quite rough. It was implemented as a proof-of-concept, in a rush, when the work on the v2 hardware was finishing and the factory in China needed test code overnight.
Given that we don't actually know the voltage in the car (without measuring with a voltmeter), and the resistor network we use is going to have some variation between modules, I'm not really sure how we can auto-calibrate this.
Regards, Mark.
On 20 Jan, 2013, at 5:25 PM, Michael Balzer <dexter@expeedo.de> wrote:
Mark,
11V is normally recommended as the absolute minimum for lead acid, below 11V sulfation may occur.
The discharge curve of the Twizy also shows it begins to drop very fast from 11V, so if someone misses the alert over night that could already hurt the battery.
I can implement a calibration for the 12V reading, but that will need 1 byte RAM... hm... I noticed the voltage currently is an int, intentionally? If that's not needed I could change that, so overall RAM usage will not change.
Regards, Michael
Am 20.01.2013 07:22, schrieb Mark Webb-Johnson:
Michael,
I checked the Sleep() function. Turning off the SIM908 and going to Sleep() seemed to bring overall usage down to 25mA.
Your code for alert seems to be ok, but I think the thresholds may be too high. The ADC reading is dependent on individual resistor variation (it is just a voltage divider) and I doubt whether it is accurate to more than 0.5V or so. It will scale linearly, but the offset will be wrong. For example, my car shows 11.5V as the nominal voltage.
Perhaps lower the threshold to 11V?
Regards, Mark.
On 19 Jan, 2013, at 9:36 PM, Michael Balzer <dexter@expeedo.de> wrote:
Mark,
I just checked in the 12V alert function.
It's straight forward and compiles ok, but I cannot test if it triggers and resets correctly under real use conditions -- I've got no power supply with adjustable voltage.
As most 12V batteries will be standard lead acid ones, I've set the trigger thresholds to reasonable values for these: The alert will be triggered on voltage drop below 11.5 V and reset on voltage above 11.9 V.
Regards, Michael
Am 19.01.2013 11:10, schrieb Michael Balzer:
Mark,
for the Twizy and maybe other cars, a wakeup from activity on the CAN bus could also be an option. I remember reading about that in the SIM908 manual. The OVMS could generally sleep while the Twizy is off, maybe with an optional timed wakeup every 10-15 minutes for 1-2 minutes to detect GPS position changes.
Btw, the SIM908 hardware design contains detailed info on the sleep modes and power usages: http://www.mt-system.ru/sites/default/files/sim908-c_hardware_design_v1.03.p...
Thanks for bringing the 12V monitoring to my attention.
I'll now first add an SMS alert on the 12V power line getting too low, that's easy to implement and will remind users to charge.
Regards, Michael
Am 19.01.2013 10:47, schrieb Mark Webb-Johnson: > > Here are the power usage figures from my bench, using v1 hardware: > > PIC (normal mode) on, modem powered down (by power toggle switch): 35mA - 42mA > PIC (normal mode) on, modem on, gps off: 75mA > PIC (normal mode) on, modem on,gps on: 120mA > Very short-lived bursts to 160mA at times, presumably while transmitting on GSM > > Playing with AT+CSCLK=2, the modem seems to drop to almost no power usage (perhaps 45mA), with a CR on the async port waking it up. > > Looking at the PIC18F2685 data sheet, it seems that with an external 20MHz oscillator, the normal power consumption is around 30mA to 40mA. Switching to an internal 4MHz oscillator reduces that to 5.3mA, and internal 1MHz oscillator to 3mA. Sleep mode is 2µA. > > I'll play around with it. So far, it seems it is quite easy to go into low-power sleep mode. It is getting back out that is the tricky bit. > > Regards, Mark. > > On 19 Jan, 2013, at 8:50 AM, Mark Webb-Johnson <mark@webb-johnson.net> wrote: > >> Michael, >> >> Urgh. Glad that you managed to recover it. >> >> The TMC forums have a few theads at the moment of Model S cars with 12V battery issues, and the Tesla Roadster's little 12V battery seems to need replacing every 13 to 25 months. >> >> For Roadsters, OVMS is not run off that little 12V battery, so we haven't seen this issue. >> >> The good news is that we did anticipate this sort of thing (except were expecting to see it more on ICE cars with OBDII monitoring). We added 12V power line monitoring, through an ADC, into the v2 hardware. Looking at your logs for the past few days is interesting (I don't think there is anything private in their apart from the vehicleid and odometer, which I have obscured, so hope you don't mind me posting here). The 12v line reading is the second to last column: >> >> 2013-01-14 06:39:53.930886 -0500 info main: #34 C XXXXXXX rx msg D 128,0,0,13,17,4,0,YYYY9,28,0,-127,0,120,-1,15.0,0 >> 2013-01-14 06:59:54.871517 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.7,0 >> 2013-01-14 07:05:26.666203 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.7,0 >> 2013-01-14 07:05:46.498420 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.7,0 >> 2013-01-14 07:06:04.864927 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.7,0 >> 2013-01-14 07:30:07.228738 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.6,0 >> 2013-01-14 08:29:57.461316 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.5,0 >> 2013-01-14 09:29:48.441380 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.4,0 >> 2013-01-14 11:29:30.755176 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.3,0 >> 2013-01-14 15:05:36.688666 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.2,0 >> 2013-01-14 16:05:35.111552 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.7,0 >> 2013-01-14 16:36:35.755630 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.2,0 >> 2013-01-14 18:38:18.404933 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.2,0 >> 2013-01-14 21:04:47.187479 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.1,0 >> 2013-01-15 02:04:22.801440 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.0,0 >> 2013-01-15 09:03:13.233483 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.9,0 >> 2013-01-15 11:02:54.400624 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.7,0 >> 2013-01-15 12:02:44.724576 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.9,0 >> 2013-01-15 13:02:34.285593 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.8,0 >> 2013-01-15 16:02:09.372087 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.7,0 >> 2013-01-15 17:02:00.235001 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.8,0 >> 2013-01-15 19:01:41.695938 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.7,0 >> 2013-01-16 02:00:40.126355 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.6,0 >> 2013-01-16 06:00:03.073862 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.5,0 >> 2013-01-16 11:59:01.907094 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.4,0 >> 2013-01-16 15:58:22.520731 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 >> 2013-01-16 17:22:48.691426 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 >> 2013-01-16 17:30:10.701329 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 >> 2013-01-16 17:30:21.837740 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.2,0 >> 2013-01-16 17:36:37.811552 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 >> 2013-01-16 17:46:01.164994 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 >> 2013-01-16 17:48:35.257576 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 >> 2013-01-16 17:56:49.565932 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 >> 2013-01-16 18:01:15.186127 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 >> 2013-01-16 18:02:46.866156 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 >> 2013-01-16 18:02:54.217581 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 >> 2013-01-16 18:10:29.930408 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 >> 2013-01-16 18:10:38.723483 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.2,0 >> 2013-01-16 18:11:12.459758 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.2,0 >> 2013-01-16 18:18:31.863177 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 >> 2013-01-16 18:19:03.123286 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 >> 2013-01-16 18:43:55.355803 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 >> 2013-01-16 18:58:43.567326 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.2,0 >> 2013-01-16 22:58:15.314101 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.1,0 >> 2013-01-17 01:57:50.181011 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.0,0 >> 2013-01-17 02:57:40.587918 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,10.9,0 >> 2013-01-17 03:57:30.418056 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,10.8,0 >> 2013-01-17 04:57:19.241415 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,10.6,0 >> 2013-01-17 05:57:10.622186 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,10.3,0 >> 2013-01-17 06:32:32.593533 -0500 info main: #55 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,10.0,0 >> 2013-01-17 07:32:23.932656 -0500 info main: #55 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,9.4,0 >> 2013-01-17 08:32:13.374380 -0500 info main: #55 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,7.9,0 >> 2013-01-17 09:32:03.204557 -0500 info main: #55 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,7.2,0 >> 2013-01-17 10:31:52.551362 -0500 info main: #55 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,6.5,0 >> 2013-01-17 11:31:41.821330 -0500 info main: #55 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,6.7,0 >> 2013-01-17 12:58:48.540906 -0500 info main: #60 C XXXXXXX rx msg D 128,0,0,13,1,2,0,ZZZZ8,0,0,-127,0,120,-1,15.1,0 >> >> It shows 15v at the start (I guess when the car is on and charging it), then 12.7v at 2013-01-14 06am EST, then falls gradually to 11.0v at 2013-01-17 01am EST. At that point it seems to fall faster, down to the last report (just 10 hours later) 6.7v at 2013-01-17 11am EST. >> >> My original thought to handle this was to have two thresholds. >> >> At the first threshold, the PIC would turn off the modem and re-awake only once every 12 hours, for 2 minutes, before going back to sleep. >> >> At the second threshold, the PIC would turn off the modem, and go to a deep sleep itself. In this mode, once power was restored it would reset itself. >> >> Exit from either mode would be the 12v power line going back above the first threshold plus some safety margin. >> >> This weekend, I'll get some exact power measurements from the v2 hardware module, so we know what we are dealing with: >> >> Just the PIC (modem powered down) >> PIC + MODEM >> PIC + MODEM + GPS >> >> Last time I tested this, on v1 hardware without GPS, these were the figures for PIC + MODEM: >> >> Idle: 40mA @12V >> Cellular Network Registration: 100mA @12V >> Network activity: 80mA @12V >> >> Regards, Mark. >> >> On 18 Jan, 2013, at 10:47 PM, Michael Balzer <dexter@expeedo.de> wrote: >> >>> Mark, List, >>> >>> yesterday my Twizy was temporarily dead... because of the OVMS power usage. >>> >>> I had not driven for 5 days. The Twizy has a very small 12V battery with only 14 Ah capacity, and it only gets charged while charging the Twizy and while driving (from the main battery). >>> >>> The OVMS with GPS activated needs a constant current of ~110 mA according to my measurement, thus sucking that battery empty within 4-5 days, maybe fewer. I'll make the power warning much more prominent in the Twizy user guide. >>> >>> Have there been any considerations yet about using the sleep mode of the PIC and/or SIM chipset? >>> >>> Regards, >>> Michael >>> >>> -- >>> Michael Balzer * Paradestr. 8 * D-42107 Wuppertal >>> Fon 0202 / 272 2201 * Handy 0176 / 206 989 26 >>> >>> <dexter.vcf>_______________________________________________ >>> OvmsDev mailing list >>> OvmsDev@lists.teslaclub.hk >>> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev >> > > > > _______________________________________________ > OvmsDev mailing list > OvmsDev@lists.teslaclub.hk > http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
-- Michael Balzer * Paradestr. 8 * D-42107 Wuppertal Fon 0202 / 272 2201 * Handy 0176 / 206 989 26
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
-- Michael Balzer * Paradestr. 8 * D-42107 Wuppertal Fon 0202 / 272 2201 * Handy 0176 / 206 989 26 <dexter.vcf>_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
-- Michael Balzer * Paradestr. 8 * D-42107 Wuppertal Fon 0202 / 272 2201 * Handy 0176 / 206 989 26 <dexter.vcf>_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
-- Michael Balzer * Paradestr. 8 * D-42107 Wuppertal Fon 0202 / 272 2201 * Handy 0176 / 206 989 26 <dexter.vcf>_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
Michael, I checked the Sleep() function. Turning off the SIM908 and going to Sleep() seemed to bring overall usage down to 25mA. Your code for alert seems to be ok, but I think the thresholds may be too high. The ADC reading is dependent on individual resistor variation (it is just a voltage divider) and I doubt whether it is accurate to more than 0.5V or so. It will scale linearly, but the offset will be wrong. For example, my car shows 11. Regards, Mark. On 19 Jan, 2013, at 9:36 PM, Michael Balzer <dexter@expeedo.de> wrote:
Mark,
I just checked in the 12V alert function.
It's straight forward and compiles ok, but I cannot test if it triggers and resets correctly under real use conditions -- I've got no power supply with adjustable voltage.
As most 12V batteries will be standard lead acid ones, I've set the trigger thresholds to reasonable values for these: The alert will be triggered on voltage drop below 11.5 V and reset on voltage above 11.9 V.
Regards, Michael
Am 19.01.2013 11:10, schrieb Michael Balzer:
Mark,
for the Twizy and maybe other cars, a wakeup from activity on the CAN bus could also be an option. I remember reading about that in the SIM908 manual. The OVMS could generally sleep while the Twizy is off, maybe with an optional timed wakeup every 10-15 minutes for 1-2 minutes to detect GPS position changes.
Btw, the SIM908 hardware design contains detailed info on the sleep modes and power usages: http://www.mt-system.ru/sites/default/files/sim908-c_hardware_design_v1.03.p...
Thanks for bringing the 12V monitoring to my attention.
I'll now first add an SMS alert on the 12V power line getting too low, that's easy to implement and will remind users to charge.
Regards, Michael
Am 19.01.2013 10:47, schrieb Mark Webb-Johnson:
Here are the power usage figures from my bench, using v1 hardware:
PIC (normal mode) on, modem powered down (by power toggle switch): 35mA - 42mA PIC (normal mode) on, modem on, gps off: 75mA PIC (normal mode) on, modem on,gps on: 120mA Very short-lived bursts to 160mA at times, presumably while transmitting on GSM
Playing with AT+CSCLK=2, the modem seems to drop to almost no power usage (perhaps 45mA), with a CR on the async port waking it up.
Looking at the PIC18F2685 data sheet, it seems that with an external 20MHz oscillator, the normal power consumption is around 30mA to 40mA. Switching to an internal 4MHz oscillator reduces that to 5.3mA, and internal 1MHz oscillator to 3mA. Sleep mode is 2µA.
I'll play around with it. So far, it seems it is quite easy to go into low-power sleep mode. It is getting back out that is the tricky bit.
Regards, Mark.
On 19 Jan, 2013, at 8:50 AM, Mark Webb-Johnson <mark@webb-johnson.net> wrote:
Michael,
Urgh. Glad that you managed to recover it.
The TMC forums have a few theads at the moment of Model S cars with 12V battery issues, and the Tesla Roadster's little 12V battery seems to need replacing every 13 to 25 months.
For Roadsters, OVMS is not run off that little 12V battery, so we haven't seen this issue.
The good news is that we did anticipate this sort of thing (except were expecting to see it more on ICE cars with OBDII monitoring). We added 12V power line monitoring, through an ADC, into the v2 hardware. Looking at your logs for the past few days is interesting (I don't think there is anything private in their apart from the vehicleid and odometer, which I have obscured, so hope you don't mind me posting here). The 12v line reading is the second to last column:
2013-01-14 06:39:53.930886 -0500 info main: #34 C XXXXXXX rx msg D 128,0,0,13,17,4,0,YYYY9,28,0,-127,0,120,-1,15.0,0 2013-01-14 06:59:54.871517 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.7,0 2013-01-14 07:05:26.666203 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.7,0 2013-01-14 07:05:46.498420 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.7,0 2013-01-14 07:06:04.864927 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.7,0 2013-01-14 07:30:07.228738 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.6,0 2013-01-14 08:29:57.461316 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.5,0 2013-01-14 09:29:48.441380 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.4,0 2013-01-14 11:29:30.755176 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.3,0 2013-01-14 15:05:36.688666 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.2,0 2013-01-14 16:05:35.111552 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.7,0 2013-01-14 16:36:35.755630 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.2,0 2013-01-14 18:38:18.404933 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.2,0 2013-01-14 21:04:47.187479 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.1,0 2013-01-15 02:04:22.801440 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.0,0 2013-01-15 09:03:13.233483 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.9,0 2013-01-15 11:02:54.400624 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.7,0 2013-01-15 12:02:44.724576 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.9,0 2013-01-15 13:02:34.285593 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.8,0 2013-01-15 16:02:09.372087 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.7,0 2013-01-15 17:02:00.235001 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.8,0 2013-01-15 19:01:41.695938 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.7,0 2013-01-16 02:00:40.126355 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.6,0 2013-01-16 06:00:03.073862 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.5,0 2013-01-16 11:59:01.907094 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.4,0 2013-01-16 15:58:22.520731 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 17:22:48.691426 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 17:30:10.701329 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 17:30:21.837740 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.2,0 2013-01-16 17:36:37.811552 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 17:46:01.164994 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 17:48:35.257576 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 17:56:49.565932 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 18:01:15.186127 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 18:02:46.866156 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 18:02:54.217581 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 18:10:29.930408 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 18:10:38.723483 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.2,0 2013-01-16 18:11:12.459758 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.2,0 2013-01-16 18:18:31.863177 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 18:19:03.123286 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 18:43:55.355803 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 18:58:43.567326 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.2,0 2013-01-16 22:58:15.314101 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.1,0 2013-01-17 01:57:50.181011 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.0,0 2013-01-17 02:57:40.587918 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,10.9,0 2013-01-17 03:57:30.418056 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,10.8,0 2013-01-17 04:57:19.241415 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,10.6,0 2013-01-17 05:57:10.622186 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,10.3,0 2013-01-17 06:32:32.593533 -0500 info main: #55 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,10.0,0 2013-01-17 07:32:23.932656 -0500 info main: #55 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,9.4,0 2013-01-17 08:32:13.374380 -0500 info main: #55 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,7.9,0 2013-01-17 09:32:03.204557 -0500 info main: #55 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,7.2,0 2013-01-17 10:31:52.551362 -0500 info main: #55 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,6.5,0 2013-01-17 11:31:41.821330 -0500 info main: #55 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,6.7,0 2013-01-17 12:58:48.540906 -0500 info main: #60 C XXXXXXX rx msg D 128,0,0,13,1,2,0,ZZZZ8,0,0,-127,0,120,-1,15.1,0
It shows 15v at the start (I guess when the car is on and charging it), then 12.7v at 2013-01-14 06am EST, then falls gradually to 11.0v at 2013-01-17 01am EST. At that point it seems to fall faster, down to the last report (just 10 hours later) 6.7v at 2013-01-17 11am EST.
My original thought to handle this was to have two thresholds.
At the first threshold, the PIC would turn off the modem and re-awake only once every 12 hours, for 2 minutes, before going back to sleep.
At the second threshold, the PIC would turn off the modem, and go to a deep sleep itself. In this mode, once power was restored it would reset itself.
Exit from either mode would be the 12v power line going back above the first threshold plus some safety margin.
This weekend, I'll get some exact power measurements from the v2 hardware module, so we know what we are dealing with:
Just the PIC (modem powered down) PIC + MODEM PIC + MODEM + GPS
Last time I tested this, on v1 hardware without GPS, these were the figures for PIC + MODEM:
Idle: 40mA @12V Cellular Network Registration: 100mA @12V Network activity: 80mA @12V
Regards, Mark.
On 18 Jan, 2013, at 10:47 PM, Michael Balzer <dexter@expeedo.de> wrote:
Mark, List,
yesterday my Twizy was temporarily dead... because of the OVMS power usage.
I had not driven for 5 days. The Twizy has a very small 12V battery with only 14 Ah capacity, and it only gets charged while charging the Twizy and while driving (from the main battery).
The OVMS with GPS activated needs a constant current of ~110 mA according to my measurement, thus sucking that battery empty within 4-5 days, maybe fewer. I'll make the power warning much more prominent in the Twizy user guide.
Have there been any considerations yet about using the sleep mode of the PIC and/or SIM chipset?
Regards, Michael
-- Michael Balzer * Paradestr. 8 * D-42107 Wuppertal Fon 0202 / 272 2201 * Handy 0176 / 206 989 26
<dexter.vcf>_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
-- Michael Balzer * Paradestr. 8 * D-42107 Wuppertal Fon 0202 / 272 2201 * Handy 0176 / 206 989 26
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
-- Michael Balzer * Paradestr. 8 * D-42107 Wuppertal Fon 0202 / 272 2201 * Handy 0176 / 206 989 26 <dexter.vcf>_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
I recently had to leave my Roadster parked at the office, unplugged, for a week. Here are the battery readings for that week: 2013-01-01 20:22:26.923603 -0500 96,11.5 2013-01-01 21:22:15.624878 -0500 96,11.5 2013-01-01 22:22:05.146086 -0500 96,11.5 2013-01-01 23:21:54.709419 -0500 96,11.5 2013-01-02 00:21:44.212950 -0500 96,11.5 2013-01-02 00:35:03.407857 -0500 96,11.5 2013-01-02 01:34:52.152265 -0500 96,11.5 2013-01-02 02:05:55.866262 -0500 96,11.5 2013-01-02 02:34:42.615839 -0500 96,11.5 2013-01-02 03:34:31.278724 -0500 96,11.5 2013-01-02 04:34:21.519750 -0500 96,11.5 2013-01-02 05:34:11.823266 -0500 96,11.5 2013-01-02 06:34:00.568228 -0500 96,11.5 2013-01-02 07:33:50.070666 -0500 96,11.5 2013-01-02 08:33:39.669595 -0500 96,11.5 2013-01-02 09:33:29.755095 -0500 96,11.5 2013-01-02 10:33:18.195746 -0500 96,11.5 2013-01-02 11:33:07.820184 -0500 96,11.5 2013-01-02 12:32:58.008407 -0500 96,11.5 2013-01-02 13:32:47.990289 -0500 96,11.5 2013-01-02 14:32:37.511346 -0500 96,11.5 2013-01-02 15:32:27.014930 -0500 96,11.5 2013-01-02 16:32:16.114612 -0500 96,11.5 2013-01-02 17:32:05.138319 -0500 96,11.5 2013-01-02 18:31:54.142461 -0500 96,11.5 2013-01-02 19:15:04.893501 -0500 96,11.5 2013-01-02 19:31:44.364578 -0500 96,11.5 2013-01-02 20:31:33.866749 -0500 96,11.5 2013-01-02 21:31:24.389765 -0500 96,11.5 2013-01-02 22:31:14.372931 -0500 96,11.5 2013-01-02 23:31:04.037353 -0500 96,11.5 2013-01-03 00:30:53.478292 -0500 96,11.5 2013-01-03 01:30:42.621136 -0500 96,11.5 2013-01-03 02:11:41.843208 -0500 96,11.5 2013-01-03 02:30:33.643162 -0500 96,11.5 2013-01-03 03:30:23.007915 -0500 96,11.5 2013-01-03 04:30:12.187474 -0500 96,11.5 2013-01-03 05:30:01.714430 -0500 96,11.5 2013-01-03 06:29:51.416419 -0500 96,11.5 2013-01-03 07:29:40.421859 -0500 96,11.5 2013-01-03 08:29:29.665247 -0500 96,11.5 2013-01-03 09:29:19.268315 -0500 96,11.5 2013-01-03 10:29:09.111278 -0500 96,11.5 2013-01-03 11:28:57.655025 -0500 96,11.5 2013-01-03 12:28:46.336519 -0500 96,11.5 2013-01-03 13:28:36.018903 -0500 96,11.5 2013-01-03 14:28:25.419441 -0500 96,11.5 2013-01-03 15:28:15.484466 -0500 96,11.5 2013-01-03 16:28:04.566549 -0500 96,11.4 2013-01-03 17:27:54.507512 -0500 96,11.5 2013-01-03 18:12:02.892766 -0500 96,11.5 2013-01-03 18:27:46.368161 -0500 96,11.5 2013-01-03 19:27:36.313751 -0500 96,11.5 2013-01-03 20:27:26.033952 -0500 96,11.5 2013-01-03 21:27:15.880196 -0500 96,11.5 2013-01-03 22:27:05.681468 -0500 96,11.5 2013-01-03 23:26:55.383234 -0500 96,11.5 2013-01-04 00:26:44.908669 -0500 96,11.4 2013-01-04 01:26:34.289421 -0500 96,11.5 2013-01-04 02:26:23.910867 -0500 96,11.4 2013-01-04 03:26:14.014214 -0500 96,11.5 2013-01-04 04:26:02.734992 -0500 96,11.5 2013-01-04 05:25:53.155530 -0500 96,11.5 2013-01-04 06:25:42.796107 -0500 96,10.4 2013-01-04 07:25:32.760298 -0500 96,11.5 2013-01-04 08:25:21.823414 -0500 96,11.5 2013-01-04 09:25:11.765772 -0500 96,11.5 2013-01-04 10:25:01.463177 -0500 96,11.5 2013-01-04 11:24:50.907855 -0500 96,11.5 2013-01-04 12:24:41.470951 -0500 96,11.5 2013-01-04 13:24:28.892149 -0500 96,11.5 2013-01-04 14:24:21.633161 -0500 96,11.5 2013-01-04 15:24:08.142659 -0500 96,11.5 2013-01-04 16:23:57.864816 -0500 96,11.5 2013-01-04 17:23:47.484055 -0500 96,11.5 2013-01-04 18:23:37.525224 -0500 96,11.5 2013-01-04 19:23:27.028642 -0500 96,11.5 2013-01-04 20:23:17.369954 -0500 96,11.5 2013-01-04 20:33:18.041979 -0500 96,11.5 2013-01-04 21:23:07.951543 -0500 96,11.5 2013-01-04 22:22:57.412097 -0500 96,11.5 2013-01-04 23:22:46.615118 -0500 96,11.5 2013-01-05 00:22:35.698201 -0500 96,11.5 2013-01-05 01:22:25.781258 -0500 96,11.5 2013-01-05 02:22:14.740766 -0500 96,11.5 2013-01-05 03:22:04.202315 -0500 96,11.5 2013-01-05 04:21:54.305630 -0500 96,11.5 2013-01-05 05:21:43.988091 -0500 96,11.5 2013-01-05 06:21:32.871999 -0500 96,11.5 2013-01-05 07:21:21.913381 -0500 96,11.5 2013-01-05 07:53:26.313127 -0500 96,11.5 2013-01-05 08:21:12.736217 -0500 96,11.5 2013-01-05 09:21:01.620820 -0500 96,11.5 2013-01-05 10:20:51.133476 -0500 96,11.5 2013-01-05 11:20:41.224586 -0500 96,11.5 2013-01-05 12:20:30.889997 -0500 96,11.5 2013-01-05 13:20:20.168375 -0500 96,11.5 2013-01-05 14:20:09.952553 -0500 96,11.5 2013-01-05 15:19:59.338571 -0500 96,11.5 2013-01-05 16:19:48.933248 -0500 96,11.5 2013-01-05 17:19:38.495012 -0500 96,11.5 2013-01-05 18:19:28.141092 -0500 96,11.5 2013-01-05 19:19:17.661549 -0500 96,11.5 2013-01-05 20:19:07.182492 -0500 96,11.5 2013-01-05 21:18:56.806870 -0500 96,11.5 2013-01-05 22:18:46.888931 -0500 96,11.5 2013-01-05 23:18:36.212883 -0500 96,11.5 2013-01-06 00:18:24.996546 -0500 96,11.5 2013-01-06 00:43:06.273802 -0500 96,11.5 2013-01-06 00:43:22.750973 -0500 96,11.5 2013-01-06 00:44:24.051883 -0500 96,11.5 2013-01-06 00:45:25.489912 -0500 96,11.5 2013-01-06 00:46:26.929616 -0500 96,11.5 2013-01-06 00:47:28.206753 -0500 96,11.5 2013-01-06 00:48:29.405702 -0500 96,11.5 2013-01-06 00:49:31.006407 -0500 96,11.5 2013-01-06 00:50:37.545370 -0500 96,11.4 2013-01-06 00:51:23.868079 -0500 96,11.4 2013-01-06 01:18:34.315606 -0500 96,11.5 2013-01-06 02:15:01.233371 -0500 96,11.5 2013-01-06 02:15:29.124870 -0500 96,11.5 2013-01-06 02:18:28.539661 -0500 96,11.4 2013-01-06 03:18:18.482330 -0500 96,11.5 2013-01-06 04:18:07.887115 -0500 96,11.5 2013-01-06 05:17:57.409816 -0500 96,11.5 2013-01-06 06:17:46.928066 -0500 96,11.5 2013-01-06 06:43:57.673036 -0500 96,11.5 2013-01-06 06:43:59.607964 -0500 96,11.5 2013-01-06 06:44:08.669816 -0500 96,11.5 2013-01-06 06:44:46.405582 -0500 96,11.5 2013-01-06 06:45:47.748353 -0500 96,11.5 2013-01-06 06:46:49.102297 -0500 96,11.5 2013-01-06 06:47:50.825145 -0500 96,11.5 2013-01-06 06:48:51.759516 -0500 96,11.5 2013-01-06 06:49:53.119067 -0500 96,11.5 2013-01-06 06:50:54.600294 -0500 96,11.5 2013-01-06 06:51:56.045998 -0500 96,11.5 2013-01-06 06:52:57.298238 -0500 96,11.5 2013-01-06 06:53:58.654932 -0500 96,11.5 2013-01-06 06:55:00.076332 -0500 96,11.5 2013-01-06 06:56:01.533135 -0500 96,11.5 2013-01-06 06:57:02.712172 -0500 96,11.5 2013-01-06 06:58:04.194365 -0500 96,11.5 2013-01-06 06:59:05.428364 -0500 96,11.5 2013-01-06 07:00:06.911308 -0500 96,11.5 2013-01-06 07:01:08.346012 -0500 96,11.5 2013-01-06 07:02:09.810039 -0500 96,11.5 2013-01-06 07:03:11.289052 -0500 96,11.5 2013-01-06 07:18:08.254874 -0500 96,11.5 2013-01-06 08:17:58.094481 -0500 96,11.5 2013-01-06 09:17:47.415481 -0500 96,11.5 2013-01-06 10:01:48.320508 -0500 96,11.5 2013-01-06 10:02:11.837785 -0500 96,11.5 2013-01-06 10:02:20.464164 -0500 96,11.5 2013-01-06 10:17:41.177026 -0500 96,11.5 2013-01-06 11:17:30.703207 -0500 96,11.5 2013-01-06 12:17:20.302401 -0500 96,11.5 2013-01-06 13:17:09.546655 -0500 96,11.5 2013-01-06 14:16:58.466960 -0500 96,11.5 2013-01-06 15:16:47.592883 -0500 96,11.5 2013-01-06 16:16:37.153814 -0500 96,11.5 2013-01-06 17:16:26.734515 -0500 96,11.5 2013-01-06 18:16:16.296670 -0500 96,11.5 2013-01-06 18:42:43.097779 -0500 96,11.5 2013-01-06 19:16:06.579365 -0500 96,11.5 2013-01-06 20:15:55.822643 -0500 96,11.5 2013-01-06 21:15:45.462512 -0500 96,11.5 2013-01-06 22:15:34.485987 -0500 96,11.5 2013-01-06 23:15:24.088644 -0500 96,11.5 2013-01-06 23:58:15.292864 -0500 96,11.5 2013-01-06 23:58:19.247947 -0500 96,11.1 2013-01-06 23:59:20.386948 -0500 96,11.5 2013-01-06 23:59:36.818649 -0500 96,11.5 2013-01-07 00:04:39.364948 -0500 96,11.5 2013-01-07 00:05:23.021923 -0500 96,11.5 2013-01-07 00:06:25.960536 -0500 96,11.5 2013-01-07 00:06:53.159868 -0500 96,11.5 2013-01-07 00:07:11.228074 -0500 96,11.5 2013-01-07 00:07:21.003401 -0500 96,11.5 2013-01-07 00:07:31.377835 -0500 96,13.1 2013-01-07 00:07:34.798216 -0500 96,13.1 2013-01-07 00:08:33.637288 -0500 96,13.1 2013-01-07 00:15:36.273516 -0500 96,11.5 2013-01-07 00:32:22.624208 -0500 96,11.5 2013-01-07 00:32:36.513650 -0500 96,11.5 2013-01-07 00:33:39.656253 -0500 96,11.5 2013-01-07 00:34:50.953027 -0500 96,11.5 2013-01-07 00:35:52.230555 -0500 96,11.5 2013-01-07 00:36:53.609060 -0500 96,11.5 2013-01-07 00:37:54.929301 -0500 96,11.5 2013-01-07 00:38:56.390702 -0500 96,11.5 2013-01-07 00:39:57.830068 -0500 96,11.5 2013-01-07 00:40:59.005800 -0500 96,11.5 2013-01-07 01:15:53.674526 -0500 96,11.5 2013-01-07 02:15:43.134515 -0500 96,11.5 2013-01-07 03:15:32.559693 -0500 96,11.5 2013-01-07 03:44:17.435281 -0500 96,11.5 2013-01-07 03:44:30.312736 -0500 96,11.5 2013-01-07 03:45:31.511302 -0500 96,11.5 2013-01-07 03:46:32.850338 -0500 96,11.5 2013-01-07 03:47:34.209250 -0500 96,11.5 First column is door status 1 (parked), second column is 12v ADC reading. Seems rocks solid at 11.5v for the entire week (although there was one single reading at 10.4v). I think the Roadster (v2.x at least) is not going to be affected by this 12v issue. If anyone has a 1.x roadster with a v2 hardware module, and has recently parked it for some days, it would be helpful if you could send me the date/time range and your vehicleid. Regards, Mark. On 19 Jan, 2013, at 5:47 PM, Mark Webb-Johnson <mark@webb-johnson.net> wrote:
Here are the power usage figures from my bench, using v1 hardware:
PIC (normal mode) on, modem powered down (by power toggle switch): 35mA - 42mA PIC (normal mode) on, modem on, gps off: 75mA PIC (normal mode) on, modem on,gps on: 120mA Very short-lived bursts to 160mA at times, presumably while transmitting on GSM
Playing with AT+CSCLK=2, the modem seems to drop to almost no power usage (perhaps 45mA), with a CR on the async port waking it up.
Looking at the PIC18F2685 data sheet, it seems that with an external 20MHz oscillator, the normal power consumption is around 30mA to 40mA. Switching to an internal 4MHz oscillator reduces that to 5.3mA, and internal 1MHz oscillator to 3mA. Sleep mode is 2µA.
I'll play around with it. So far, it seems it is quite easy to go into low-power sleep mode. It is getting back out that is the tricky bit.
Regards, Mark.
On 19 Jan, 2013, at 8:50 AM, Mark Webb-Johnson <mark@webb-johnson.net> wrote:
Michael,
Urgh. Glad that you managed to recover it.
The TMC forums have a few theads at the moment of Model S cars with 12V battery issues, and the Tesla Roadster's little 12V battery seems to need replacing every 13 to 25 months.
For Roadsters, OVMS is not run off that little 12V battery, so we haven't seen this issue.
The good news is that we did anticipate this sort of thing (except were expecting to see it more on ICE cars with OBDII monitoring). We added 12V power line monitoring, through an ADC, into the v2 hardware. Looking at your logs for the past few days is interesting (I don't think there is anything private in their apart from the vehicleid and odometer, which I have obscured, so hope you don't mind me posting here). The 12v line reading is the second to last column:
2013-01-14 06:39:53.930886 -0500 info main: #34 C XXXXXXX rx msg D 128,0,0,13,17,4,0,YYYY9,28,0,-127,0,120,-1,15.0,0 2013-01-14 06:59:54.871517 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.7,0 2013-01-14 07:05:26.666203 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.7,0 2013-01-14 07:05:46.498420 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.7,0 2013-01-14 07:06:04.864927 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.7,0 2013-01-14 07:30:07.228738 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.6,0 2013-01-14 08:29:57.461316 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.5,0 2013-01-14 09:29:48.441380 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.4,0 2013-01-14 11:29:30.755176 -0500 info main: #34 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.3,0 2013-01-14 15:05:36.688666 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.2,0 2013-01-14 16:05:35.111552 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.7,0 2013-01-14 16:36:35.755630 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.2,0 2013-01-14 18:38:18.404933 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.2,0 2013-01-14 21:04:47.187479 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.1,0 2013-01-15 02:04:22.801440 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,12.0,0 2013-01-15 09:03:13.233483 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.9,0 2013-01-15 11:02:54.400624 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.7,0 2013-01-15 12:02:44.724576 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.9,0 2013-01-15 13:02:34.285593 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.8,0 2013-01-15 16:02:09.372087 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.7,0 2013-01-15 17:02:00.235001 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.8,0 2013-01-15 19:01:41.695938 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.7,0 2013-01-16 02:00:40.126355 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.6,0 2013-01-16 06:00:03.073862 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.5,0 2013-01-16 11:59:01.907094 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.4,0 2013-01-16 15:58:22.520731 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 17:22:48.691426 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 17:30:10.701329 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 17:30:21.837740 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.2,0 2013-01-16 17:36:37.811552 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 17:46:01.164994 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 17:48:35.257576 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 17:56:49.565932 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 18:01:15.186127 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 18:02:46.866156 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 18:02:54.217581 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 18:10:29.930408 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 18:10:38.723483 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.2,0 2013-01-16 18:11:12.459758 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.2,0 2013-01-16 18:18:31.863177 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 18:19:03.123286 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 18:43:55.355803 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.3,0 2013-01-16 18:58:43.567326 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.2,0 2013-01-16 22:58:15.314101 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.1,0 2013-01-17 01:57:50.181011 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,11.0,0 2013-01-17 02:57:40.587918 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,10.9,0 2013-01-17 03:57:30.418056 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,10.8,0 2013-01-17 04:57:19.241415 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,10.6,0 2013-01-17 05:57:10.622186 -0500 info main: #54 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,10.3,0 2013-01-17 06:32:32.593533 -0500 info main: #55 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,10.0,0 2013-01-17 07:32:23.932656 -0500 info main: #55 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,9.4,0 2013-01-17 08:32:13.374380 -0500 info main: #55 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,7.9,0 2013-01-17 09:32:03.204557 -0500 info main: #55 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,7.2,0 2013-01-17 10:31:52.551362 -0500 info main: #55 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,6.5,0 2013-01-17 11:31:41.821330 -0500 info main: #55 C XXXXXXX rx msg D 0,0,0,14,15,4,0,ZZZZ0,0,0,-127,0,0,-1,6.7,0 2013-01-17 12:58:48.540906 -0500 info main: #60 C XXXXXXX rx msg D 128,0,0,13,1,2,0,ZZZZ8,0,0,-127,0,120,-1,15.1,0
It shows 15v at the start (I guess when the car is on and charging it), then 12.7v at 2013-01-14 06am EST, then falls gradually to 11.0v at 2013-01-17 01am EST. At that point it seems to fall faster, down to the last report (just 10 hours later) 6.7v at 2013-01-17 11am EST.
My original thought to handle this was to have two thresholds.
At the first threshold, the PIC would turn off the modem and re-awake only once every 12 hours, for 2 minutes, before going back to sleep.
At the second threshold, the PIC would turn off the modem, and go to a deep sleep itself. In this mode, once power was restored it would reset itself.
Exit from either mode would be the 12v power line going back above the first threshold plus some safety margin.
This weekend, I'll get some exact power measurements from the v2 hardware module, so we know what we are dealing with:
Just the PIC (modem powered down) PIC + MODEM PIC + MODEM + GPS
Last time I tested this, on v1 hardware without GPS, these were the figures for PIC + MODEM:
Idle: 40mA @12V Cellular Network Registration: 100mA @12V Network activity: 80mA @12V
Regards, Mark.
On 18 Jan, 2013, at 10:47 PM, Michael Balzer <dexter@expeedo.de> wrote:
Mark, List,
yesterday my Twizy was temporarily dead... because of the OVMS power usage.
I had not driven for 5 days. The Twizy has a very small 12V battery with only 14 Ah capacity, and it only gets charged while charging the Twizy and while driving (from the main battery).
The OVMS with GPS activated needs a constant current of ~110 mA according to my measurement, thus sucking that battery empty within 4-5 days, maybe fewer. I'll make the power warning much more prominent in the Twizy user guide.
Have there been any considerations yet about using the sleep mode of the PIC and/or SIM chipset?
Regards, Michael
-- Michael Balzer * Paradestr. 8 * D-42107 Wuppertal Fon 0202 / 272 2201 * Handy 0176 / 206 989 26
<dexter.vcf>_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
on 1/19/13 10:08 PM, Mark Webb-Johnson wrote:
If anyone has a 1.x roadster with a v2 hardware module, and has recently parked it for some days, it would be helpful if you could send me the date/time range and your vehicleid.
I don't think the v1.5 Roadster has a 12V battery. It's my understanding that it uses a DC-to-DC converter on one of the ESS sheets to power the 12V systems when the car is off. Tom
Tom, My understanding is that the 2.x cars work the same way. The 12V battery is just for emergency systems. Presumably if the main pack fails (fuse blows, whatever), the 1.5 cars have no way of running hazard warning lights, brake lights, etc. It would still be useful to see the stability of that 12V line, on the v1.5 Tesla Roadsters. Regards, Mark. On 21 Jan, 2013, at 12:48 AM, Tom Saxton <tom@idleloop.com> wrote:
on 1/19/13 10:08 PM, Mark Webb-Johnson wrote:
If anyone has a 1.x roadster with a v2 hardware module, and has recently parked it for some days, it would be helpful if you could send me the date/time range and your vehicleid.
I don't think the v1.5 Roadster has a 12V battery. It's my understanding that it uses a DC-to-DC converter on one of the ESS sheets to power the 12V systems when the car is off.
Tom
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
Mark, Tom, I just checked in the auto calibration implementation. It works by taking the maximum voltage reading while the car is off and not charging as the reference voltage, so it should adapt to all possible variations. Alert is triggered if current reading is at/below ref - 1.3V, which should fit for all cases. The alert now also includes the reference, and it can be queried by the "DIAG" SMS command. It's also now included as a new field in the environment message ("D"). Regards, Michael Am 22.01.2013 04:19, schrieb Mark Webb-Johnson:
Tom,
My understanding is that the 2.x cars work the same way. The 12V battery is just for emergency systems.
Presumably if the main pack fails (fuse blows, whatever), the 1.5 cars have no way of running hazard warning lights, brake lights, etc.
It would still be useful to see the stability of that 12V line, on the v1.5 Tesla Roadsters.
Regards, Mark.
On 21 Jan, 2013, at 12:48 AM, Tom Saxton <tom@idleloop.com> wrote:
on 1/19/13 10:08 PM, Mark Webb-Johnson wrote:
If anyone has a 1.x roadster with a v2 hardware module, and has recently parked it for some days, it would be helpful if you could send me the date/time range and your vehicleid. I don't think the v1.5 Roadster has a 12V battery. It's my understanding that it uses a DC-to-DC converter on one of the ESS sheets to power the 12V systems when the car is off.
Tom
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
-- Michael Balzer * Paradestr. 8 * D-42107 Wuppertal Fon 0202 / 272 2201 * Handy 0176 / 206 989 26
Michael, Seems like a sensible approach. Your car is now showing "11.9,0,12.2". I'll try it in my car over the weekend. Regards, Mark. On 25 Jan, 2013, at 9:16 PM, Michael Balzer <dexter@expeedo.de> wrote:
Mark, Tom,
I just checked in the auto calibration implementation.
It works by taking the maximum voltage reading while the car is off and not charging as the reference voltage, so it should adapt to all possible variations.
Alert is triggered if current reading is at/below ref - 1.3V, which should fit for all cases.
The alert now also includes the reference, and it can be queried by the "DIAG" SMS command. It's also now included as a new field in the environment message ("D").
Regards, Michael
Am 22.01.2013 04:19, schrieb Mark Webb-Johnson:
Tom,
My understanding is that the 2.x cars work the same way. The 12V battery is just for emergency systems.
Presumably if the main pack fails (fuse blows, whatever), the 1.5 cars have no way of running hazard warning lights, brake lights, etc.
It would still be useful to see the stability of that 12V line, on the v1.5 Tesla Roadsters.
Regards, Mark.
On 21 Jan, 2013, at 12:48 AM, Tom Saxton <tom@idleloop.com> wrote:
on 1/19/13 10:08 PM, Mark Webb-Johnson wrote:
If anyone has a 1.x roadster with a v2 hardware module, and has recently parked it for some days, it would be helpful if you could send me the date/time range and your vehicleid. I don't think the v1.5 Roadster has a 12V battery. It's my understanding that it uses a DC-to-DC converter on one of the ESS sheets to power the 12V systems when the car is off.
Tom
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
-- Michael Balzer * Paradestr. 8 * D-42107 Wuppertal Fon 0202 / 272 2201 * Handy 0176 / 206 989 26
<dexter.vcf>_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
I've got a flaw in there: as the code begins taking ref max values right after charging ends, the ref gets too high. After charging my current ref is now 14.7 due to that bug, should be around 12.7. I need to factor in the voltage decay after end of charge. I'll see if I can get that in without introducing a new timer variable... @Mikeljo: "> 13" is correct (just ensures ref-13 > 0), your change to "> 130" is not correct, as the ref can be much lower. ...also consider using stp_l2f() for the STAT message, see the DIAG message for a copy source. I really should document the stp functions... Regards, Michael Am 25.01.2013 17:16, schrieb Mark Webb-Johnson:
Michael,
Seems like a sensible approach.
Your car is now showing "11.9,0,12.2".
I'll try it in my car over the weekend.
Regards, Mark.
On 25 Jan, 2013, at 9:16 PM, Michael Balzer <dexter@expeedo.de> wrote:
Mark, Tom,
I just checked in the auto calibration implementation.
It works by taking the maximum voltage reading while the car is off and not charging as the reference voltage, so it should adapt to all possible variations.
Alert is triggered if current reading is at/below ref - 1.3V, which should fit for all cases.
The alert now also includes the reference, and it can be queried by the "DIAG" SMS command. It's also now included as a new field in the environment message ("D").
Regards, Michael
Am 22.01.2013 04:19, schrieb Mark Webb-Johnson:
Tom,
My understanding is that the 2.x cars work the same way. The 12V battery is just for emergency systems.
Presumably if the main pack fails (fuse blows, whatever), the 1.5 cars have no way of running hazard warning lights, brake lights, etc.
It would still be useful to see the stability of that 12V line, on the v1.5 Tesla Roadsters.
Regards, Mark.
On 21 Jan, 2013, at 12:48 AM, Tom Saxton <tom@idleloop.com> wrote:
on 1/19/13 10:08 PM, Mark Webb-Johnson wrote:
If anyone has a 1.x roadster with a v2 hardware module, and has recently parked it for some days, it would be helpful if you could send me the date/time range and your vehicleid. I don't think the v1.5 Roadster has a 12V battery. It's my understanding that it uses a DC-to-DC converter on one of the ESS sheets to power the 12V systems when the car is off.
Tom
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev -- Michael Balzer * Paradestr. 8 * D-42107 Wuppertal Fon 0202 / 272 2201 * Handy 0176 / 206 989 26
<dexter.vcf>_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
-- Michael Balzer * Paradestr. 8 * D-42107 Wuppertal Fon 0202 / 272 2201 * Handy 0176 / 206 989 26
Done :-) Also, as the Twizy (and I suppose other cars as well) charges the 12V battery further on as long as it's plugged in, I now use the plug in status (car_linevoltage + car_chargecurrent) to detect a 12V charge status. After plug-out, the OVMS waits for 10 minutes (time for the 12V battery to calm down) until taking the new ref voltage. That will still be a bit above the nominal voltage, but the span should be short enough to allow for taking a new ref even if taking the car for the next drive soon after charging. I hope this will work on other cars as well without change/config, but it will now need the car_linevoltage and car_chargecurrent reflecting the actual plugin status. If a car cannot provide this info, we can introduce a new vehicle hook for a function that checks for a valid calibration time. Regards, Michael Am 26.01.2013 22:05, schrieb Michael Balzer:
I've got a flaw in there: as the code begins taking ref max values right after charging ends, the ref gets too high. After charging my current ref is now 14.7 due to that bug, should be around 12.7.
I need to factor in the voltage decay after end of charge. I'll see if I can get that in without introducing a new timer variable...
@Mikeljo: "> 13" is correct (just ensures ref-13 > 0), your change to "> 130" is not correct, as the ref can be much lower. ...also consider using stp_l2f() for the STAT message, see the DIAG message for a copy source.
I really should document the stp functions...
Regards, Michael
Am 25.01.2013 17:16, schrieb Mark Webb-Johnson:
Michael,
Seems like a sensible approach.
Your car is now showing "11.9,0,12.2".
I'll try it in my car over the weekend.
Regards, Mark.
On 25 Jan, 2013, at 9:16 PM, Michael Balzer <dexter@expeedo.de> wrote:
Mark, Tom,
I just checked in the auto calibration implementation.
It works by taking the maximum voltage reading while the car is off and not charging as the reference voltage, so it should adapt to all possible variations.
Alert is triggered if current reading is at/below ref - 1.3V, which should fit for all cases.
The alert now also includes the reference, and it can be queried by the "DIAG" SMS command. It's also now included as a new field in the environment message ("D").
Regards, Michael
Am 22.01.2013 04:19, schrieb Mark Webb-Johnson:
Tom,
My understanding is that the 2.x cars work the same way. The 12V battery is just for emergency systems.
Presumably if the main pack fails (fuse blows, whatever), the 1.5 cars have no way of running hazard warning lights, brake lights, etc.
It would still be useful to see the stability of that 12V line, on the v1.5 Tesla Roadsters.
Regards, Mark.
On 21 Jan, 2013, at 12:48 AM, Tom Saxton <tom@idleloop.com> wrote:
on 1/19/13 10:08 PM, Mark Webb-Johnson wrote:
If anyone has a 1.x roadster with a v2 hardware module, and has recently parked it for some days, it would be helpful if you could send me the date/time range and your vehicleid. I don't think the v1.5 Roadster has a 12V battery. It's my understanding that it uses a DC-to-DC converter on one of the ESS sheets to power the 12V systems when the car is off.
Tom
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev -- Michael Balzer * Paradestr. 8 * D-42107 Wuppertal Fon 0202 / 272 2201 * Handy 0176 / 206 989 26
<dexter.vcf>_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
-- Michael Balzer * Paradestr. 8 * D-42107 Wuppertal Fon 0202 / 272 2201 * Handy 0176 / 206 989 26
Michael, To determine if the car is charging or not, the best way is: unsigned char car_doors1 [bit 4] This bit is set to 1 if the vehicle is currently charging, else 0. Alternatively, if you want to pickup "able to charge" rather than "charging": unsigned char car_doors1 [bit 3] This bit is set to 1 if the pilot signal is present, else 0. This would normally indicated that the vehicle is connected to external power and either charging or ready to charge. Seems a better solution than linevoltage/current. Regards, Mark. On 29 Jan, 2013, at 5:05 AM, Michael Balzer wrote:
Done :-)
Also, as the Twizy (and I suppose other cars as well) charges the 12V battery further on as long as it's plugged in, I now use the plug in status (car_linevoltage + car_chargecurrent) to detect a 12V charge status.
After plug-out, the OVMS waits for 10 minutes (time for the 12V battery to calm down) until taking the new ref voltage. That will still be a bit above the nominal voltage, but the span should be short enough to allow for taking a new ref even if taking the car for the next drive soon after charging.
I hope this will work on other cars as well without change/config, but it will now need the car_linevoltage and car_chargecurrent reflecting the actual plugin status. If a car cannot provide this info, we can introduce a new vehicle hook for a function that checks for a valid calibration time.
Regards, Michael
Am 26.01.2013 22:05, schrieb Michael Balzer:
I've got a flaw in there: as the code begins taking ref max values right after charging ends, the ref gets too high. After charging my current ref is now 14.7 due to that bug, should be around 12.7.
I need to factor in the voltage decay after end of charge. I'll see if I can get that in without introducing a new timer variable...
@Mikeljo: "> 13" is correct (just ensures ref-13 > 0), your change to "> 130" is not correct, as the ref can be much lower. ...also consider using stp_l2f() for the STAT message, see the DIAG message for a copy source.
I really should document the stp functions...
Regards, Michael
Am 25.01.2013 17:16, schrieb Mark Webb-Johnson:
Michael,
Seems like a sensible approach.
Your car is now showing "11.9,0,12.2".
I'll try it in my car over the weekend.
Regards, Mark.
On 25 Jan, 2013, at 9:16 PM, Michael Balzer <dexter@expeedo.de> wrote:
Mark, Tom,
I just checked in the auto calibration implementation.
It works by taking the maximum voltage reading while the car is off and not charging as the reference voltage, so it should adapt to all possible variations.
Alert is triggered if current reading is at/below ref - 1.3V, which should fit for all cases.
The alert now also includes the reference, and it can be queried by the "DIAG" SMS command. It's also now included as a new field in the environment message ("D").
Regards, Michael
Am 22.01.2013 04:19, schrieb Mark Webb-Johnson:
Tom,
My understanding is that the 2.x cars work the same way. The 12V battery is just for emergency systems.
Presumably if the main pack fails (fuse blows, whatever), the 1.5 cars have no way of running hazard warning lights, brake lights, etc.
It would still be useful to see the stability of that 12V line, on the v1.5 Tesla Roadsters.
Regards, Mark.
On 21 Jan, 2013, at 12:48 AM, Tom Saxton <tom@idleloop.com> wrote:
on 1/19/13 10:08 PM, Mark Webb-Johnson wrote:
> If anyone has a 1.x roadster with a v2 hardware module, and has recently > parked it for some days, it would be helpful if you could send me the > date/time range and your vehicleid. I don't think the v1.5 Roadster has a 12V battery. It's my understanding that it uses a DC-to-DC converter on one of the ESS sheets to power the 12V systems when the car is off.
Tom
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev -- Michael Balzer * Paradestr. 8 * D-42107 Wuppertal Fon 0202 / 272 2201 * Handy 0176 / 206 989 26
<dexter.vcf>_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
-- Michael Balzer * Paradestr. 8 * D-42107 Wuppertal Fon 0202 / 272 2201 * Handy 0176 / 206 989 26 <dexter.vcf>_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
Mark, I completely misunderstood bit 3 "pilot present" as a driver detection (seat pressure), good you explained that now :-) I may have been unclear. I tried to use bit 4 before, but the 12V battery charge process is decoupled from the main battery charge process. That's for the Twizy, of course, but I suppose that's on other cars as well, as it seems to make sense to charge the 12V battery independantly. I first thought about extending the doors flags to introduce a separate "12V charging" flag, but then thought the combination car_linevoltage + car_chargecurrent normally implies this. But "pilot signal present" is also not quite the same as "charging 12V"... So, would you still say we can generally use bit 3 for this, or shall I rather introduce a new vehicle hook, as this needs to be vehicle dependant? Thanks, Michael Am 29.01.2013 02:24, schrieb Mark Webb-Johnson:
Michael,
To determine if the car is charging or not, the best way is:
*
unsigned char car_doors1 [bit 4] This bit is set to 1 if the vehicle is currently charging, else 0.
Alternatively, if you want to pickup "able to charge" rather than "charging":
*
unsigned char car_doors1 [bit 3]
This bit is set to 1 if the pilot signal is present, else 0. This would normally indicated that the vehicle is connected to external power and either charging or ready to charge.
Seems a better solution than linevoltage/current.
Regards, Mark. On 29 Jan, 2013, at 5:05 AM, Michael Balzer wrote:
Done :-)
Also, as the Twizy (and I suppose other cars as well) charges the 12V battery further on as long as it's plugged in, I now use the plug in status (car_linevoltage + car_chargecurrent) to detect a 12V charge status.
After plug-out, the OVMS waits for 10 minutes (time for the 12V battery to calm down) until taking the new ref voltage. That will still be a bit above the nominal voltage, but the span should be short enough to allow for taking a new ref even if taking the car for the next drive soon after charging.
I hope this will work on other cars as well without change/config, but it will now need the car_linevoltage and car_chargecurrent reflecting the actual plugin status. If a car cannot provide this info, we can introduce a new vehicle hook for a function that checks for a valid calibration time.
Regards, Michael
Am 26.01.2013 22:05, schrieb Michael Balzer:
I've got a flaw in there: as the code begins taking ref max values right after charging ends, the ref gets too high. After charging my current ref is now 14.7 due to that bug, should be around 12.7.
I need to factor in the voltage decay after end of charge. I'll see if I can get that in without introducing a new timer variable...
@Mikeljo: "> 13" is correct (just ensures ref-13 > 0), your change to "> 130" is not correct, as the ref can be much lower. ...also consider using stp_l2f() for the STAT message, see the DIAG message for a copy source.
I really should document the stp functions...
Regards, Michael
Am 25.01.2013 17:16, schrieb Mark Webb-Johnson:
Michael,
Seems like a sensible approach.
Your car is now showing "11.9,0,12.2".
I'll try it in my car over the weekend.
Regards, Mark.
On 25 Jan, 2013, at 9:16 PM, Michael Balzer <dexter@expeedo.de> wrote:
Mark, Tom,
I just checked in the auto calibration implementation.
It works by taking the maximum voltage reading while the car is off and not charging as the reference voltage, so it should adapt to all possible variations.
Alert is triggered if current reading is at/below ref - 1.3V, which should fit for all cases.
The alert now also includes the reference, and it can be queried by the "DIAG" SMS command. It's also now included as a new field in the environment message ("D").
Regards, Michael
Am 22.01.2013 04:19, schrieb Mark Webb-Johnson:
Tom,
My understanding is that the 2.x cars work the same way. The 12V battery is just for emergency systems.
Presumably if the main pack fails (fuse blows, whatever), the 1.5 cars have no way of running hazard warning lights, brake lights, etc.
It would still be useful to see the stability of that 12V line, on the v1.5 Tesla Roadsters.
Regards, Mark.
On 21 Jan, 2013, at 12:48 AM, Tom Saxton <tom@idleloop.com> wrote:
> on 1/19/13 10:08 PM, Mark Webb-Johnson wrote: > >> If anyone has a 1.x roadster with a v2 hardware module, and has >> recently >> parked it for some days, it would be helpful if you could send >> me the >> date/time range and your vehicleid. > I don't think the v1.5 Roadster has a 12V battery. It's my > understanding > that it uses a DC-to-DC converter on one of the ESS sheets to > power the 12V > systems when the car is off. > > Tom > > > _______________________________________________ > OvmsDev mailing list > OvmsDev@lists.teslaclub.hk > http://lists.teslaclub.hk/mailman/listinfo/ovmsdev _______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev -- Michael Balzer * Paradestr. 8 * D-42107 Wuppertal Fon 0202 / 272 2201 * Handy 0176 / 206 989 26
<dexter.vcf>_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
-- Michael Balzer * Paradestr. 8 * D-42107 Wuppertal Fon 0202 / 272 2201 * Handy 0176 / 206 989 26 <dexter.vcf>_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk <mailto:OvmsDev@lists.teslaclub.hk> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
-- Michael Balzer * Paradestr. 8 * D-42107 Wuppertal Fon 0202 / 272 2201 * Handy 0176 / 206 989 26
Michael, We have another signal: unsigned char car_doors3 [bit 1] This bit is set to 1 to indicate the vehicle is awake, and operational, else 0. For some cars, this would indicate that cooling systems are working, but for most cars it should just be set to 1 if the car is ‘awake’ in any way. On the roadster, that is set when the cooling pump is on, and all systems in the car are 'alive'. Is that suitable for this? If not, it is probably best to include a new car_door5 (which we need anyway for rear-left, rear-right door bits) and include a bit on that to signify 12V battery charging. Regards, Mark. On 29 Jan, 2013, at 11:45 PM, Michael Balzer wrote:
Mark,
I completely misunderstood bit 3 "pilot present" as a driver detection (seat pressure), good you explained that now :-)
I may have been unclear. I tried to use bit 4 before, but the 12V battery charge process is decoupled from the main battery charge process. That's for the Twizy, of course, but I suppose that's on other cars as well, as it seems to make sense to charge the 12V battery independantly.
I first thought about extending the doors flags to introduce a separate "12V charging" flag, but then thought the combination car_linevoltage + car_chargecurrent normally implies this.
But "pilot signal present" is also not quite the same as "charging 12V"...
So, would you still say we can generally use bit 3 for this, or shall I rather introduce a new vehicle hook, as this needs to be vehicle dependant?
Thanks, Michael
Am 29.01.2013 02:24, schrieb Mark Webb-Johnson:
Michael,
To determine if the car is charging or not, the best way is: unsigned char car_doors1 [bit 4] This bit is set to 1 if the vehicle is currently charging, else 0.
Alternatively, if you want to pickup "able to charge" rather than "charging": unsigned char car_doors1 [bit 3]
This bit is set to 1 if the pilot signal is present, else 0. This would normally indicated that the vehicle is connected to external power and either charging or ready to charge.
Seems a better solution than linevoltage/current.
Regards, Mark. On 29 Jan, 2013, at 5:05 AM, Michael Balzer wrote:
Done :-)
Also, as the Twizy (and I suppose other cars as well) charges the 12V battery further on as long as it's plugged in, I now use the plug in status (car_linevoltage + car_chargecurrent) to detect a 12V charge status.
After plug-out, the OVMS waits for 10 minutes (time for the 12V battery to calm down) until taking the new ref voltage. That will still be a bit above the nominal voltage, but the span should be short enough to allow for taking a new ref even if taking the car for the next drive soon after charging.
I hope this will work on other cars as well without change/config, but it will now need the car_linevoltage and car_chargecurrent reflecting the actual plugin status. If a car cannot provide this info, we can introduce a new vehicle hook for a function that checks for a valid calibration time.
Regards, Michael
Am 26.01.2013 22:05, schrieb Michael Balzer:
I've got a flaw in there: as the code begins taking ref max values right after charging ends, the ref gets too high. After charging my current ref is now 14.7 due to that bug, should be around 12.7.
I need to factor in the voltage decay after end of charge. I'll see if I can get that in without introducing a new timer variable...
@Mikeljo: "> 13" is correct (just ensures ref-13 > 0), your change to "> 130" is not correct, as the ref can be much lower. ...also consider using stp_l2f() for the STAT message, see the DIAG message for a copy source.
I really should document the stp functions...
Regards, Michael
Am 25.01.2013 17:16, schrieb Mark Webb-Johnson:
Michael,
Seems like a sensible approach.
Your car is now showing "11.9,0,12.2".
I'll try it in my car over the weekend.
Regards, Mark.
On 25 Jan, 2013, at 9:16 PM, Michael Balzer <dexter@expeedo.de> wrote:
Mark, Tom,
I just checked in the auto calibration implementation.
It works by taking the maximum voltage reading while the car is off and not charging as the reference voltage, so it should adapt to all possible variations.
Alert is triggered if current reading is at/below ref - 1.3V, which should fit for all cases.
The alert now also includes the reference, and it can be queried by the "DIAG" SMS command. It's also now included as a new field in the environment message ("D").
Regards, Michael
Am 22.01.2013 04:19, schrieb Mark Webb-Johnson: > Tom, > > My understanding is that the 2.x cars work the same way. The 12V battery is just for emergency systems. > > Presumably if the main pack fails (fuse blows, whatever), the 1.5 cars have no way of running hazard warning lights, brake lights, etc. > > It would still be useful to see the stability of that 12V line, on the v1.5 Tesla Roadsters. > > Regards, Mark. > > On 21 Jan, 2013, at 12:48 AM, Tom Saxton <tom@idleloop.com> wrote: > >> on 1/19/13 10:08 PM, Mark Webb-Johnson wrote: >> >>> If anyone has a 1.x roadster with a v2 hardware module, and has recently >>> parked it for some days, it would be helpful if you could send me the >>> date/time range and your vehicleid. >> I don't think the v1.5 Roadster has a 12V battery. It's my understanding >> that it uses a DC-to-DC converter on one of the ESS sheets to power the 12V >> systems when the car is off. >> >> Tom >> >> >> _______________________________________________ >> OvmsDev mailing list >> OvmsDev@lists.teslaclub.hk >> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev > _______________________________________________ > OvmsDev mailing list > OvmsDev@lists.teslaclub.hk > http://lists.teslaclub.hk/mailman/listinfo/ovmsdev -- Michael Balzer * Paradestr. 8 * D-42107 Wuppertal Fon 0202 / 272 2201 * Handy 0176 / 206 989 26
<dexter.vcf>_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
-- Michael Balzer * Paradestr. 8 * D-42107 Wuppertal Fon 0202 / 272 2201 * Handy 0176 / 206 989 26 <dexter.vcf>_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
-- Michael Balzer * Paradestr. 8 * D-42107 Wuppertal Fon 0202 / 272 2201 * Handy 0176 / 206 989 26 <dexter.vcf>_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
Mark, what about the unused bits in doors1..4, it seems these are not currently in use: doors1 bit 5 doors2 bits 0..2 + 5 doors3 all except bit 1 doors4 all except bit 2 That's 19 bits we could use for new flags, or am I missing something? Regards, Michael Am 30.01.2013 01:16, schrieb Mark Webb-Johnson:
Michael,
We have another signal:
*
unsigned char car_doors3 [bit 1]
This bit is set to 1 to indicate the vehicle is awake, and operational, else 0. For some cars, this would indicate that cooling systems are working, but for most cars it should just be set to 1 if the car is 'awake' in any way.
On the roadster, that is set when the cooling pump is on, and all systems in the car are 'alive'.
Is that suitable for this?
If not, it is probably best to include a new car_door5 (which we need anyway for rear-left, rear-right door bits) and include a bit on that to signify 12V battery charging.
Regards, Mark.
On 29 Jan, 2013, at 11:45 PM, Michael Balzer wrote:
Mark,
I completely misunderstood bit 3 "pilot present" as a driver detection (seat pressure), good you explained that now :-)
I may have been unclear. I tried to use bit 4 before, but the 12V battery charge process is decoupled from the main battery charge process. That's for the Twizy, of course, but I suppose that's on other cars as well, as it seems to make sense to charge the 12V battery independantly.
I first thought about extending the doors flags to introduce a separate "12V charging" flag, but then thought the combination car_linevoltage + car_chargecurrent normally implies this.
But "pilot signal present" is also not quite the same as "charging 12V"...
So, would you still say we can generally use bit 3 for this, or shall I rather introduce a new vehicle hook, as this needs to be vehicle dependant?
Thanks, Michael
Am 29.01.2013 02:24, schrieb Mark Webb-Johnson:
Michael,
To determine if the car is charging or not, the best way is:
*
unsigned char car_doors1 [bit 4] This bit is set to 1 if the vehicle is currently charging, else 0.
Alternatively, if you want to pickup "able to charge" rather than "charging":
*
unsigned char car_doors1 [bit 3]
This bit is set to 1 if the pilot signal is present, else 0. This would normally indicated that the vehicle is connected to external power and either charging or ready to charge.
Seems a better solution than linevoltage/current.
Regards, Mark. On 29 Jan, 2013, at 5:05 AM, Michael Balzer wrote:
Done :-)
Also, as the Twizy (and I suppose other cars as well) charges the 12V battery further on as long as it's plugged in, I now use the plug in status (car_linevoltage + car_chargecurrent) to detect a 12V charge status.
After plug-out, the OVMS waits for 10 minutes (time for the 12V battery to calm down) until taking the new ref voltage. That will still be a bit above the nominal voltage, but the span should be short enough to allow for taking a new ref even if taking the car for the next drive soon after charging.
I hope this will work on other cars as well without change/config, but it will now need the car_linevoltage and car_chargecurrent reflecting the actual plugin status. If a car cannot provide this info, we can introduce a new vehicle hook for a function that checks for a valid calibration time.
Regards, Michael
Am 26.01.2013 22:05, schrieb Michael Balzer:
I've got a flaw in there: as the code begins taking ref max values right after charging ends, the ref gets too high. After charging my current ref is now 14.7 due to that bug, should be around 12.7.
I need to factor in the voltage decay after end of charge. I'll see if I can get that in without introducing a new timer variable...
@Mikeljo: "> 13" is correct (just ensures ref-13 > 0), your change to "> 130" is not correct, as the ref can be much lower. ...also consider using stp_l2f() for the STAT message, see the DIAG message for a copy source.
I really should document the stp functions...
Regards, Michael
Am 25.01.2013 17:16, schrieb Mark Webb-Johnson:
Michael,
Seems like a sensible approach.
Your car is now showing "11.9,0,12.2".
I'll try it in my car over the weekend.
Regards, Mark.
On 25 Jan, 2013, at 9:16 PM, Michael Balzer <dexter@expeedo.de> wrote:
> Mark, Tom, > > I just checked in the auto calibration implementation. > > It works by taking the maximum voltage reading while the car is > off and not charging as the reference voltage, so it should > adapt to all possible variations. > > Alert is triggered if current reading is at/below ref - 1.3V, > which should fit for all cases. > > The alert now also includes the reference, and it can be queried > by the "DIAG" SMS command. It's also now included as a new field > in the environment message ("D"). > > Regards, > Michael > > > Am 22.01.2013 04:19, schrieb Mark Webb-Johnson: >> Tom, >> >> My understanding is that the 2.x cars work the same way. The >> 12V battery is just for emergency systems. >> >> Presumably if the main pack fails (fuse blows, whatever), the >> 1.5 cars have no way of running hazard warning lights, brake >> lights, etc. >> >> It would still be useful to see the stability of that 12V line, >> on the v1.5 Tesla Roadsters. >> >> Regards, Mark. >> >> On 21 Jan, 2013, at 12:48 AM, Tom Saxton <tom@idleloop.com> wrote: >> >>> on 1/19/13 10:08 PM, Mark Webb-Johnson wrote: >>> >>>> If anyone has a 1.x roadster with a v2 hardware module, and >>>> has recently >>>> parked it for some days, it would be helpful if you could >>>> send me the >>>> date/time range and your vehicleid. >>> I don't think the v1.5 Roadster has a 12V battery. It's my >>> understanding >>> that it uses a DC-to-DC converter on one of the ESS sheets to >>> power the 12V >>> systems when the car is off. >>> >>> Tom >>> >>> >>> _______________________________________________ >>> OvmsDev mailing list >>> OvmsDev@lists.teslaclub.hk >>> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev >> _______________________________________________ >> OvmsDev mailing list >> OvmsDev@lists.teslaclub.hk >> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev > -- > Michael Balzer * Paradestr. 8 * D-42107 Wuppertal > Fon 0202 / 272 2201 * Handy 0176 / 206 989 26 > > <dexter.vcf>_______________________________________________ > OvmsDev mailing list > OvmsDev@lists.teslaclub.hk > http://lists.teslaclub.hk/mailman/listinfo/ovmsdev _______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
-- Michael Balzer * Paradestr. 8 * D-42107 Wuppertal Fon 0202 / 272 2201 * Handy 0176 / 206 989 26 <dexter.vcf>_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk <mailto:OvmsDev@lists.teslaclub.hk> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
-- Michael Balzer * Paradestr. 8 * D-42107 Wuppertal Fon 0202 / 272 2201 * Handy 0176 / 206 989 26 <dexter.vcf>_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk <mailto:OvmsDev@lists.teslaclub.hk> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
-- Michael Balzer * Paradestr. 8 * D-42107 Wuppertal Fon 0202 / 272 2201 * Handy 0176 / 206 989 26
Michael, As the 'virtual car' originally came from the Tesla Roadster, those bits are not really 'unused' - more accurately 'unknown'. I guess we could mask them off, in the Tesla Roadster module, but for the sake of 1 byte, it seems better to keep the original Tesla Roadster data unchanged. Regards, Mark. On 30 Jan, 2013, at 11:44 PM, Michael Balzer wrote:
Mark,
what about the unused bits in doors1..4, it seems these are not currently in use:
doors1 bit 5 doors2 bits 0..2 + 5 doors3 all except bit 1 doors4 all except bit 2
That's 19 bits we could use for new flags, or am I missing something?
Regards, Michael
Am 30.01.2013 01:16, schrieb Mark Webb-Johnson:
Michael,
We have another signal: unsigned char car_doors3 [bit 1]
This bit is set to 1 to indicate the vehicle is awake, and operational, else 0. For some cars, this would indicate that cooling systems are working, but for most cars it should just be set to 1 if the car is ‘awake’ in any way.
On the roadster, that is set when the cooling pump is on, and all systems in the car are 'alive'.
Is that suitable for this?
If not, it is probably best to include a new car_door5 (which we need anyway for rear-left, rear-right door bits) and include a bit on that to signify 12V battery charging.
Regards, Mark.
On 29 Jan, 2013, at 11:45 PM, Michael Balzer wrote:
Mark,
I completely misunderstood bit 3 "pilot present" as a driver detection (seat pressure), good you explained that now :-)
I may have been unclear. I tried to use bit 4 before, but the 12V battery charge process is decoupled from the main battery charge process. That's for the Twizy, of course, but I suppose that's on other cars as well, as it seems to make sense to charge the 12V battery independantly.
I first thought about extending the doors flags to introduce a separate "12V charging" flag, but then thought the combination car_linevoltage + car_chargecurrent normally implies this.
But "pilot signal present" is also not quite the same as "charging 12V"...
So, would you still say we can generally use bit 3 for this, or shall I rather introduce a new vehicle hook, as this needs to be vehicle dependant?
Thanks, Michael
Am 29.01.2013 02:24, schrieb Mark Webb-Johnson:
Michael,
To determine if the car is charging or not, the best way is: unsigned char car_doors1 [bit 4] This bit is set to 1 if the vehicle is currently charging, else 0.
Alternatively, if you want to pickup "able to charge" rather than "charging": unsigned char car_doors1 [bit 3]
This bit is set to 1 if the pilot signal is present, else 0. This would normally indicated that the vehicle is connected to external power and either charging or ready to charge.
Seems a better solution than linevoltage/current.
Regards, Mark. On 29 Jan, 2013, at 5:05 AM, Michael Balzer wrote:
Done :-)
Also, as the Twizy (and I suppose other cars as well) charges the 12V battery further on as long as it's plugged in, I now use the plug in status (car_linevoltage + car_chargecurrent) to detect a 12V charge status.
After plug-out, the OVMS waits for 10 minutes (time for the 12V battery to calm down) until taking the new ref voltage. That will still be a bit above the nominal voltage, but the span should be short enough to allow for taking a new ref even if taking the car for the next drive soon after charging.
I hope this will work on other cars as well without change/config, but it will now need the car_linevoltage and car_chargecurrent reflecting the actual plugin status. If a car cannot provide this info, we can introduce a new vehicle hook for a function that checks for a valid calibration time.
Regards, Michael
Am 26.01.2013 22:05, schrieb Michael Balzer:
I've got a flaw in there: as the code begins taking ref max values right after charging ends, the ref gets too high. After charging my current ref is now 14.7 due to that bug, should be around 12.7.
I need to factor in the voltage decay after end of charge. I'll see if I can get that in without introducing a new timer variable...
@Mikeljo: "> 13" is correct (just ensures ref-13 > 0), your change to "> 130" is not correct, as the ref can be much lower. ...also consider using stp_l2f() for the STAT message, see the DIAG message for a copy source.
I really should document the stp functions...
Regards, Michael
Am 25.01.2013 17:16, schrieb Mark Webb-Johnson: > Michael, > > Seems like a sensible approach. > > Your car is now showing "11.9,0,12.2". > > I'll try it in my car over the weekend. > > Regards, Mark. > > On 25 Jan, 2013, at 9:16 PM, Michael Balzer <dexter@expeedo.de> wrote: > >> Mark, Tom, >> >> I just checked in the auto calibration implementation. >> >> It works by taking the maximum voltage reading while the car is off and not charging as the reference voltage, so it should adapt to all possible variations. >> >> Alert is triggered if current reading is at/below ref - 1.3V, which should fit for all cases. >> >> The alert now also includes the reference, and it can be queried by the "DIAG" SMS command. It's also now included as a new field in the environment message ("D"). >> >> Regards, >> Michael >> >> >> Am 22.01.2013 04:19, schrieb Mark Webb-Johnson: >>> Tom, >>> >>> My understanding is that the 2.x cars work the same way. The 12V battery is just for emergency systems. >>> >>> Presumably if the main pack fails (fuse blows, whatever), the 1.5 cars have no way of running hazard warning lights, brake lights, etc. >>> >>> It would still be useful to see the stability of that 12V line, on the v1.5 Tesla Roadsters. >>> >>> Regards, Mark. >>> >>> On 21 Jan, 2013, at 12:48 AM, Tom Saxton <tom@idleloop.com> wrote: >>> >>>> on 1/19/13 10:08 PM, Mark Webb-Johnson wrote: >>>> >>>>> If anyone has a 1.x roadster with a v2 hardware module, and has recently >>>>> parked it for some days, it would be helpful if you could send me the >>>>> date/time range and your vehicleid. >>>> I don't think the v1.5 Roadster has a 12V battery. It's my understanding >>>> that it uses a DC-to-DC converter on one of the ESS sheets to power the 12V >>>> systems when the car is off. >>>> >>>> Tom >>>> >>>> >>>> _______________________________________________ >>>> OvmsDev mailing list >>>> OvmsDev@lists.teslaclub.hk >>>> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev >>> _______________________________________________ >>> OvmsDev mailing list >>> OvmsDev@lists.teslaclub.hk >>> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev >> -- >> Michael Balzer * Paradestr. 8 * D-42107 Wuppertal >> Fon 0202 / 272 2201 * Handy 0176 / 206 989 26 >> >> <dexter.vcf>_______________________________________________ >> OvmsDev mailing list >> OvmsDev@lists.teslaclub.hk >> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev > _______________________________________________ > OvmsDev mailing list > OvmsDev@lists.teslaclub.hk > http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
-- Michael Balzer * Paradestr. 8 * D-42107 Wuppertal Fon 0202 / 272 2201 * Handy 0176 / 206 989 26 <dexter.vcf>_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
-- Michael Balzer * Paradestr. 8 * D-42107 Wuppertal Fon 0202 / 272 2201 * Handy 0176 / 206 989 26 <dexter.vcf>_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
-- Michael Balzer * Paradestr. 8 * D-42107 Wuppertal Fon 0202 / 272 2201 * Handy 0176 / 206 989 26 <dexter.vcf>_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
I've added car_doors5 with a first definition as follows: typedef struct { unsigned RearLeftDoor:1; unsigned RearRightDoor:1; unsigned Frunk:1; unsigned :1; unsigned Charging12V:1; unsigned :1; unsigned :1; unsigned :1; } car_doors5bits_t; (I also added bit field types for the doors vars) Please note the Charging12V flag now needs to be set by the vehicle modules for the 12V reference / alert logic to work properly. This commit also includes support for the parking timer on the Twizy. Regards, Michael Am 31.01.2013 02:57, schrieb Mark Webb-Johnson:
Michael,
As the 'virtual car' originally came from the Tesla Roadster, those bits are not really 'unused' - more accurately 'unknown'.
I guess we could mask them off, in the Tesla Roadster module, but for the sake of 1 byte, it seems better to keep the original Tesla Roadster data unchanged.
Regards, Mark.
On 30 Jan, 2013, at 11:44 PM, Michael Balzer wrote:
Mark,
what about the unused bits in doors1..4, it seems these are not currently in use:
doors1 bit 5 doors2 bits 0..2 + 5 doors3 all except bit 1 doors4 all except bit 2
That's 19 bits we could use for new flags, or am I missing something?
Regards, Michael
Am 30.01.2013 01:16, schrieb Mark Webb-Johnson:
Michael,
We have another signal:
*
unsigned char car_doors3 [bit 1]
This bit is set to 1 to indicate the vehicle is awake, and operational, else 0. For some cars, this would indicate that cooling systems are working, but for most cars it should just be set to 1 if the car is 'awake' in any way.
On the roadster, that is set when the cooling pump is on, and all systems in the car are 'alive'.
Is that suitable for this?
If not, it is probably best to include a new car_door5 (which we need anyway for rear-left, rear-right door bits) and include a bit on that to signify 12V battery charging.
Regards, Mark.
On 29 Jan, 2013, at 11:45 PM, Michael Balzer wrote:
Mark,
I completely misunderstood bit 3 "pilot present" as a driver detection (seat pressure), good you explained that now :-)
I may have been unclear. I tried to use bit 4 before, but the 12V battery charge process is decoupled from the main battery charge process. That's for the Twizy, of course, but I suppose that's on other cars as well, as it seems to make sense to charge the 12V battery independantly.
I first thought about extending the doors flags to introduce a separate "12V charging" flag, but then thought the combination car_linevoltage + car_chargecurrent normally implies this.
But "pilot signal present" is also not quite the same as "charging 12V"...
So, would you still say we can generally use bit 3 for this, or shall I rather introduce a new vehicle hook, as this needs to be vehicle dependant?
Thanks, Michael
Am 29.01.2013 02:24, schrieb Mark Webb-Johnson:
Michael,
To determine if the car is charging or not, the best way is:
*
unsigned char car_doors1 [bit 4] This bit is set to 1 if the vehicle is currently charging, else 0.
Alternatively, if you want to pickup "able to charge" rather than "charging":
*
unsigned char car_doors1 [bit 3]
This bit is set to 1 if the pilot signal is present, else 0. This would normally indicated that the vehicle is connected to external power and either charging or ready to charge.
Seems a better solution than linevoltage/current.
Regards, Mark. On 29 Jan, 2013, at 5:05 AM, Michael Balzer wrote:
Done :-)
Also, as the Twizy (and I suppose other cars as well) charges the 12V battery further on as long as it's plugged in, I now use the plug in status (car_linevoltage + car_chargecurrent) to detect a 12V charge status.
After plug-out, the OVMS waits for 10 minutes (time for the 12V battery to calm down) until taking the new ref voltage. That will still be a bit above the nominal voltage, but the span should be short enough to allow for taking a new ref even if taking the car for the next drive soon after charging.
I hope this will work on other cars as well without change/config, but it will now need the car_linevoltage and car_chargecurrent reflecting the actual plugin status. If a car cannot provide this info, we can introduce a new vehicle hook for a function that checks for a valid calibration time.
Regards, Michael
Am 26.01.2013 22:05, schrieb Michael Balzer: > I've got a flaw in there: as the code begins taking ref max > values right after charging ends, the ref gets too high. After > charging my current ref is now 14.7 due to that bug, should be > around 12.7. > > I need to factor in the voltage decay after end of charge. I'll > see if I can get that in without introducing a new timer > variable... > > @Mikeljo: "> 13" is correct (just ensures ref-13 > 0), your > change to "> 130" is not correct, as the ref can be much lower. > ...also consider using stp_l2f() for the STAT message, see the > DIAG message for a copy source. > > I really should document the stp functions... > > Regards, > Michael > > > Am 25.01.2013 17:16, schrieb Mark Webb-Johnson: >> Michael, >> >> Seems like a sensible approach. >> >> Your car is now showing "11.9,0,12.2". >> >> I'll try it in my car over the weekend. >> >> Regards, Mark. >> >> On 25 Jan, 2013, at 9:16 PM, Michael Balzer <dexter@expeedo.de> >> wrote: >> >>> Mark, Tom, >>> >>> I just checked in the auto calibration implementation. >>> >>> It works by taking the maximum voltage reading while the car >>> is off and not charging as the reference voltage, so it should >>> adapt to all possible variations. >>> >>> Alert is triggered if current reading is at/below ref - 1.3V, >>> which should fit for all cases. >>> >>> The alert now also includes the reference, and it can be >>> queried by the "DIAG" SMS command. It's also now included as a >>> new field in the environment message ("D"). >>> >>> Regards, >>> Michael >>> >>> >>> Am 22.01.2013 04:19, schrieb Mark Webb-Johnson: >>>> Tom, >>>> >>>> My understanding is that the 2.x cars work the same way. The >>>> 12V battery is just for emergency systems. >>>> >>>> Presumably if the main pack fails (fuse blows, whatever), the >>>> 1.5 cars have no way of running hazard warning lights, brake >>>> lights, etc. >>>> >>>> It would still be useful to see the stability of that 12V >>>> line, on the v1.5 Tesla Roadsters. >>>> >>>> Regards, Mark. >>>> >>>> On 21 Jan, 2013, at 12:48 AM, Tom Saxton <tom@idleloop.com> >>>> wrote: >>>> >>>>> on 1/19/13 10:08 PM, Mark Webb-Johnson wrote: >>>>> >>>>>> If anyone has a 1.x roadster with a v2 hardware module, and >>>>>> has recently >>>>>> parked it for some days, it would be helpful if you could >>>>>> send me the >>>>>> date/time range and your vehicleid. >>>>> I don't think the v1.5 Roadster has a 12V battery. It's my >>>>> understanding >>>>> that it uses a DC-to-DC converter on one of the ESS sheets >>>>> to power the 12V >>>>> systems when the car is off. >>>>> >>>>> Tom >>>>> >>>>> >>>>> _______________________________________________ >>>>> OvmsDev mailing list >>>>> OvmsDev@lists.teslaclub.hk >>>>> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev >>>> _______________________________________________ >>>> OvmsDev mailing list >>>> OvmsDev@lists.teslaclub.hk >>>> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev >>> -- >>> Michael Balzer * Paradestr. 8 * D-42107 Wuppertal >>> Fon 0202 / 272 2201 * Handy 0176 / 206 989 26 >>> >>> <dexter.vcf>_______________________________________________ >>> OvmsDev mailing list >>> OvmsDev@lists.teslaclub.hk >>> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev >> _______________________________________________ >> OvmsDev mailing list >> OvmsDev@lists.teslaclub.hk >> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev > > > > _______________________________________________ > OvmsDev mailing list > OvmsDev@lists.teslaclub.hk > http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
-- Michael Balzer * Paradestr. 8 * D-42107 Wuppertal Fon 0202 / 272 2201 * Handy 0176 / 206 989 26 <dexter.vcf>_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk <mailto:OvmsDev@lists.teslaclub.hk> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
-- Michael Balzer * Paradestr. 8 * D-42107 Wuppertal Fon 0202 / 272 2201 * Handy 0176 / 206 989 26 <dexter.vcf>_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk <mailto:OvmsDev@lists.teslaclub.hk> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
-- Michael Balzer * Paradestr. 8 * D-42107 Wuppertal Fon 0202 / 272 2201 * Handy 0176 / 206 989 26 <dexter.vcf>_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk <mailto:OvmsDev@lists.teslaclub.hk> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
-- Michael Balzer * Paradestr. 8 * D-42107 Wuppertal Fon 0202 / 272 2201 * Handy 0176 / 206 989 26
Michael B, For the stp_* functions, can you give me some text and I'll add it to the developer's guide. Thanks, Mark. On 27 Jan, 2013, at 5:05 AM, Michael Balzer wrote:
I've got a flaw in there: as the code begins taking ref max values right after charging ends, the ref gets too high. After charging my current ref is now 14.7 due to that bug, should be around 12.7.
I need to factor in the voltage decay after end of charge. I'll see if I can get that in without introducing a new timer variable...
@Mikeljo: "> 13" is correct (just ensures ref-13 > 0), your change to "> 130" is not correct, as the ref can be much lower. ...also consider using stp_l2f() for the STAT message, see the DIAG message for a copy source.
I really should document the stp functions...
Regards, Michael
Am 25.01.2013 17:16, schrieb Mark Webb-Johnson:
Michael,
Seems like a sensible approach.
Your car is now showing "11.9,0,12.2".
I'll try it in my car over the weekend.
Regards, Mark.
On 25 Jan, 2013, at 9:16 PM, Michael Balzer <dexter@expeedo.de> wrote:
Mark, Tom,
I just checked in the auto calibration implementation.
It works by taking the maximum voltage reading while the car is off and not charging as the reference voltage, so it should adapt to all possible variations.
Alert is triggered if current reading is at/below ref - 1.3V, which should fit for all cases.
The alert now also includes the reference, and it can be queried by the "DIAG" SMS command. It's also now included as a new field in the environment message ("D").
Regards, Michael
Am 22.01.2013 04:19, schrieb Mark Webb-Johnson:
Tom,
My understanding is that the 2.x cars work the same way. The 12V battery is just for emergency systems.
Presumably if the main pack fails (fuse blows, whatever), the 1.5 cars have no way of running hazard warning lights, brake lights, etc.
It would still be useful to see the stability of that 12V line, on the v1.5 Tesla Roadsters.
Regards, Mark.
On 21 Jan, 2013, at 12:48 AM, Tom Saxton <tom@idleloop.com> wrote:
on 1/19/13 10:08 PM, Mark Webb-Johnson wrote:
If anyone has a 1.x roadster with a v2 hardware module, and has recently parked it for some days, it would be helpful if you could send me the date/time range and your vehicleid. I don't think the v1.5 Roadster has a 12V battery. It's my understanding that it uses a DC-to-DC converter on one of the ESS sheets to power the 12V systems when the car is off.
Tom
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev -- Michael Balzer * Paradestr. 8 * D-42107 Wuppertal Fon 0202 / 272 2201 * Handy 0176 / 206 989 26
<dexter.vcf>_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
-- Michael Balzer * Paradestr. 8 * D-42107 Wuppertal Fon 0202 / 272 2201 * Handy 0176 / 206 989 26
<dexter.vcf>_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
Mark, see attachment -- sufficient? Regards, Michael Am 29.01.2013 02:38, schrieb Mark Webb-Johnson:
Michael B,
For the stp_* functions, can you give me some text and I'll add it to the developer's guide.
Thanks, Mark.
On 27 Jan, 2013, at 5:05 AM, Michael Balzer wrote:
I've got a flaw in there: as the code begins taking ref max values right after charging ends, the ref gets too high. After charging my current ref is now 14.7 due to that bug, should be around 12.7.
I need to factor in the voltage decay after end of charge. I'll see if I can get that in without introducing a new timer variable...
@Mikeljo: "> 13" is correct (just ensures ref-13 > 0), your change to "> 130" is not correct, as the ref can be much lower. ...also consider using stp_l2f() for the STAT message, see the DIAG message for a copy source.
I really should document the stp functions...
Regards, Michael
Am 25.01.2013 17:16, schrieb Mark Webb-Johnson:
Michael,
Seems like a sensible approach.
Your car is now showing "11.9,0,12.2".
I'll try it in my car over the weekend.
Regards, Mark.
On 25 Jan, 2013, at 9:16 PM, Michael Balzer <dexter@expeedo.de> wrote:
Mark, Tom,
I just checked in the auto calibration implementation.
It works by taking the maximum voltage reading while the car is off and not charging as the reference voltage, so it should adapt to all possible variations.
Alert is triggered if current reading is at/below ref - 1.3V, which should fit for all cases.
The alert now also includes the reference, and it can be queried by the "DIAG" SMS command. It's also now included as a new field in the environment message ("D").
Regards, Michael
Am 22.01.2013 04:19, schrieb Mark Webb-Johnson:
Tom,
My understanding is that the 2.x cars work the same way. The 12V battery is just for emergency systems.
Presumably if the main pack fails (fuse blows, whatever), the 1.5 cars have no way of running hazard warning lights, brake lights, etc.
It would still be useful to see the stability of that 12V line, on the v1.5 Tesla Roadsters.
Regards, Mark.
On 21 Jan, 2013, at 12:48 AM, Tom Saxton <tom@idleloop.com> wrote:
on 1/19/13 10:08 PM, Mark Webb-Johnson wrote:
> If anyone has a 1.x roadster with a v2 hardware module, and has recently > parked it for some days, it would be helpful if you could send me the > date/time range and your vehicleid. I don't think the v1.5 Roadster has a 12V battery. It's my understanding that it uses a DC-to-DC converter on one of the ESS sheets to power the 12V systems when the car is off.
Tom
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev -- Michael Balzer * Paradestr. 8 * D-42107 Wuppertal Fon 0202 / 272 2201 * Handy 0176 / 206 989 26
<dexter.vcf>_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev -- Michael Balzer * Paradestr. 8 * D-42107 Wuppertal Fon 0202 / 272 2201 * Handy 0176 / 206 989 26
<dexter.vcf>_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
-- Michael Balzer * Paradestr. 8 * D-42107 Wuppertal Fon 0202 / 272 2201 * Handy 0176 / 206 989 26
participants (3)
-
Mark Webb-Johnson -
Michael Balzer -
Tom Saxton