Simply logs when the ignition power comes on and when it goes off, can be expanded at a later date but extra functionality not needed for now and have to start somewhere :-)
Extra functions can include:
-WiFi integration - when parked up at home (in wifi range), it will upload records to an internet repository, this can be checked once per ign on/off event.
-GPS integration - either log the GPS position when an event occurs, or once every x seconds when the car is running.
based on some preliminary research, the lot should take about 20mA max when idle... this is frankly, sod all, so there's no reason it cant be powered off the constantly live feed from the car, circuit redesign needed, but means I can get rid of the LiPo and charger, and add another buck converter (one for sense wire, one for constant power)
In other news, testing the battery power, just for personal interest really, this is modified main loop of the code showing the test code, every hour it adds a line to a text file to say its still alive, estimated lifetime should be a number of days, actually ill change it to every 20 mins, so I get better resolution...
Tested the logging this morning, hooked it up to a 12v bench supply and turned it on and off a number of times, of course, as the sleep time is 8 seconds, the resolution is no greater than 8 seconds, but frankly that's more than enough for my purposes.
The CSV file that was created was opened in excel, column width adjusted and the format of the cells containing the calculated time changed from 'general' to 'time', the result is thus:
there was a new session start last night as you can see, this was during a demonstration/explanation.
Of course, using excel you can detect weekday, and filter on start time (AM/PM) to get the data required. once I have got the thing hooked up in the car I will probably run it for a week and see what the data looks like. in the meantime I really need to find out what the plug is called that plugs into the REC(rear electrical console) in the back of the Astra...
RTC, liPo charge/boost board, Arduino Nano and the adjustable buck converter set to 5V
underneath is the bit of foam-board I'm going to be using, was going to mount it all on the battery but there is a change the buck converter might get a bit warm so thought I would play it safe and mount it all on a board.
next, the battery and SD card, nothing special here really
Arduino Nano at the core of it all, logging to an SD card (uSD would be too fiddly), logging the date/time as reported by the RTC, battery system required so that it can log the 'power off' events, originally this was to be a supercap of some kind, but i have loads of lipos kicking around and no supercaps.
Have realised since that only need one buck converter.