Sunday, January 15, 2012

Trip computer hardware is almost done

I finished mounting the LCDs on the dashboard (using Biltema body sealant). It just needs to cure for a while so I can grind down the edges. While waiting for that, I implemented a simple console driver with a backing-store for the LCD and printf-like interface that outputs characters to the LCD and serial port simultaneously.
Modified Aygo center dashboard
I also finished the OBD-ii interface. I restored the 200Ω resistor on the active pulldown and added a 10kΩ pullup to Vbat. It seems to work fine so I'll keep it that way.
Since I draw power from an unswitched battery pin I need to avoid draining the battery when the car isn't running. For this I implemented a power management feature that probes for the ECU every 16 seconds via a watchdog timer and puts the AVR into standby mode when it detects the ignition is turned off.  The nice thing about that is that I don't have to implement any flash memory persistence for medium-term statistics.

Power consumption is around 8mA in standby mode and 40mA while running with full LED backlight. With 8mA standby current the car should be able to sit for at least two months without discharging.

1 comment: