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.
Why is it so amazing that the code was written without the Energia IDE?
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.
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.
+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
The worst thing is that the previously really useful 43oh.com is now drowning in useless Energia stuff. It seems to mostly be people unable to install it or use it.
He brought a bomb to school?
How well does it keep track of time?
No, really, any clues on accuracy?
How mush does it drift after say 24 hours?
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.
Or add a capacitor.
55 second minutes are a thing now?
Metric time.
Metric time has 100 seconds per centihour.
Well there was this in the movie “Metropolis”
http://www.boiledbeans.net/wp-content/uploads/2010/04/e722068fe909be6ab673fcca2fee5487.jpg
This is actually a mistake! It’s supposed to tick all the way to 59 of course, but the trimmer pots were outta wack. I added a routine that puts it into calibration mode to make tuning the trimmer pots easier. I updated the source code on my blog and posted a new video. Just when you think a project is finished… https://www.youtube.com/watch?v=Us5rB6u8hQ8
Cool project! It is quite similar to the open source Wicked Device Angular Clock project kit (disclaimer, it’s my company) http://shop.wickeddevice.com/product/angular-clock-kit/. We recently had a customer do a really beautiful build based on it, we should totally submit it to the tip line in light of this article. Granted it’s fundamentally Arduino based and uses an external RTC chip, but still noteworthy I think.
I did the same using an Arduino Pro Mini, external RTC and a 3d printed case. I made mine with just two meters due to the size limitations of my printer. http://www.thingiverse.com/thing:1177458