Current Meter Shows Current Time

This isn’t the first of its type, but [Daniel]’s MSP430 based Analog Gauge Clock certainly ticks off the “hack” quotient. He admits an earlier Voltmeter Clock we featured a while back inspired him to build his version.

[Daniel] was taking an Embedded systems class, and needed to build an MSP430G2553 microcontroller based final project. Which is why he decided to implement the real time clock using the micro-controller itself, instead of using an external RTC module. This also simplified the hardware used – the microcontroller, a crystal, three analog ammeters, and a few passives were all that he needed. Other than the Ammeters, everything else came from his parts bin. Fresh face plates were put on the ammeters, and the circuit was assembled on a piece of strip board. A piece of bent steel plate served as the housing.

The interesting part is the software. He wrote all of it in bare C, without resorting to using the Energia IDE. He walks through all of the important parts of his code on his blog post. Setting load capacitance for the timing crystal was important, so he experimented with an oscilloscope to see which value worked best. And TI’s Application Note on MSP430 32-kHz Crystal Oscillators (PDF) proved to be a useful resource. Three PWM output’s run the three ammeters which indicate hours, minutes and seconds. Push-button switches let him set the clock. See a short demo of the clock in the video below.

16 thoughts on “Current Meter Shows Current Time

    1. Exactly what I was thinking. The MSP430 has CCS – a decent development environment that existed long before Energia. It allows you to do real stuff like debugging using breakpoints and manage low power properly (a key feature of the MSP430) and monitor power usage. Setting up peripherals and clocks can be a little tricky, but if you need a little help there are things like Grace to give you a hand.

      1. You’d be surprised how many young engineering students are afraid to get their hands dirty. I’m not saying hardware abstraction layers and using libraries is a bad thing, but its not always the best way to learn. A lot of students resorted to arduino or energia on their projects for this 3000 level course. I don’t think they got full credit, but still…

        Also, I hadn’t heard of grace, but it looks pretty cool. It would definitely be useful on the chips with more peripherals than the ‘G2553.

    2. +1

      I avoid energia like the plague. CCS is a fine IDE, but Energia just brings everything that is terrible about the Arduino IDE to the world of MSP430s. It kills me to see people promote Energia so much

  1. Would be cool as a future improvement to figure out the mechanical characteristics of the meters and then code a transition waveform so the needle doesn’t overshoot on each “tick”. Or, just make it a linear ramp for a sweep second hand.

Leave a Reply to timgray1Cancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.