Print
Category: Hardware hacking
Hits: 6115

Mommy's golfcart doesn't have a usable fuel gauge (battery level meter), or a clock. I have fixed that.

Dash, clock offdash, clock on

I slapped an Adafruit OLED (same as on my skateboard) onto a Particle Photon. I used a simple voltage divider to split the ~56v battery string down to something measurable, and a 48V relay to turn on/off a lower-voltage (~18V) line to power the voltage regulator.

The Photon awesomely has a very simple battery backup connection (so there's a lithium battery in there too), and the clock awesomely syncs up whenever it finds the cloud.

clock view

The display currently shows a fuel gauge bar, under that it has raw ADC value (debugging), a calculated voltage level, and a symbol showing the device's state of connectivity -- z (sleeping), + (connecting), * (connected). The device doesn't like being disconnected generally, so I detect that state and disconnect manually. It will reconnect on power-up, or if it senses the cart being charged (e.g. in my garage).

The clock display uses the built-in font, has a blinking cursor (currently "off"), and a smaller seconds display (also for debugging).

The code is a little silly, but please This email address is being protected from spambots. You need JavaScript enabled to view it. if you want to try and make one, I'll hook you up.