Contents

Design

The ampere meter starts at the value 0.0 at midnight and slowly goes up reaching halfway at noon and just touches the fullscale value at midnight again, where it falls back and the day cycle starts again.

You could work out that if the scale shows 0.4 => 24hours*0.4 => 9.6 => 09:26, but this is NOT the point. (There is a facility to see the "actual time".) The design is that you see "oh, most of the morning has gone". After a year in the living room I got used to thinking "need to get to work before 0.35"

Parts list

Coil ampere meter; an old large demonstration school model. the scale goes from 0.0 to 1.0.

Arduino compatible board (I used Flummer's kit)

RealTimeClock module (I used the DS1307 sparkfun with battery)

One push button

One resistor

One diode

Ampere meter modifications and Connections

Remove the shunt and all other stuff so there is direct access to the measuring coil.

Measure the internal resistance (if not written on meter). Choose a resistor such that 5V gives 110% of the scale.

Make it pretty so that terminals go to the power input of the Arduino (the regulator, not the direct 5V), but through the diode in case +&- are swapped.

Connect a PWM Arduino output pin to the meter (through the resistor) and Ground.

Connect the button between Arduino pin and ground.

Program

Basically it reads the RTC about twice a minute, and adjusts the PWM so the meter shows the fraction the time is between 00:00 and 23:59. (0.5 = 12:00)

A short button push gives a 12 hour clock "readout". It makes the meter hover briefly at 3 positions to show the digits 0 through "11". 1 shown by hovering at 0.1, 9 on 0.9, 10 at 1.0 and 11 shown "beyond 1.0". You know if ut is before or after noon by looking at it before you push the button.

Entering the time, done in 24-hour format, is started with a long push of the button. Use is to (re)set the RTC, f.ex. summertime. After a long push the meter will wiggle the needle around the middle to show the mode is activated. Each short push will now cycle the needle between 0, 0.1, and 0.2 positions which is the first digit (0, 1 or 2) of the 4 digit sequence (ie the only legal first digit possibilties). When you stop pushing the needle will wiggle again after a short pause, indicating it is ready for the 2nd digit. Short presses will now cycle through 0-9. Likewise a pause will move on the 3rd digit (cycling 0 to 5) after the wiggle signal. After the 4th digit the entered time is uploaded to the RTC and the clock goes back to the normal mode.

The Arduino analogWrite/PWM has 255 steps. Consequently the resolution of a step is approx 6 minutes or 0.004 on the scale, which are too small to see indvidually. It is not given that the pulsewidth wave of the PWM translates linearly to the needle movement. Therefore the code has a calibration scale to tweak the the analogWrite to get the desired result.

Other notes

The external supply has to >7V for the Arduinoboard regulator to suppy 5V. If it is less, then the meter can not reach full scale.

As the RTC has battery backup, the power can be removed and time is still shown correctly when power is applied again.

There is no smoothing circuit to "translate" the squarewave pulse to an analoge value. The mechanical inertia is big enough.

A possible future extension is to allow a battery supply - this would require some scaling to be done in software of the PWM signal, and some reference voltage to work out how low the battry is. As the meter needs quite a few mA to flow, battery life is limited (I estimate about two-three weeks for 3 big "D" sized 1.5V cells)

The project was completed in late 2011, ie the clock worked, but it was first made pretty (hide wires and board) for Kulturnatten in late 2012.