3D Printed Power Station Clock Using Three Analogue Voltmeter Type Displays Using an ESP32 and Arduino NANO
by oliverb in Circuits > Clocks
124 Views, 5 Favorites, 0 Comments
3D Printed Power Station Clock Using Three Analogue Voltmeter Type Displays Using an ESP32 and Arduino NANO


Housed on a reclaimed Oak block, three off 3D printed instrument gauges show time in hours minutes and seconds.
A secondary display on the seconds gauge also shows seconds on a 7 segment display.
Chimes sound out the hours and quarters and can be set to day, 24/7 or off as required.
The analogue gauges are each driven by a NEMA17 stepper motor while time is automatically fetched from an NTP time server.
A PIR is fitted to shut down the clock when no movement is detected. The clock wakes up and resets the time and display when movement is detected again.
A selector with spoken prompts allows setting of the chime times, summer winter setting, chime volume and clock reset.
This clock was based on my Aviator Clock but differs in that the hands reset by flying backwards and the seconds are fixed at 1 second updates. On the Aviator Clock the seconds are controlled by the primary ESP32 processor where as on the Power Station Clock the seconds are controlled off the secondary processor. The secondary processor is now an Arduino NANO.
I have made as many parts/software interchangeable so features from one can be used on the other.
Full build details on my main site here https://www.brettoliver.org.uk/Power_Station_Clock/Power_Station_Clock.htm
Supplies
Main microprocessor ESP32 38pin WROOM 32
This is the 38 pin version and I used the Arduino IDE to program it.
Details of the pin functions etc can be found here.
Secondary Microprocessor
Displays the seconds via a stepper motor and a TM1637 7 Segment Display
Nema 17 Stepper Motor 42x23mm 17HS4023 Pancake Motor 1.5A-3.8V
These are set to run in 32 microsteps Hours/Minutes and 16 microsteps Seconds.
TMC2209 Stepper Motor Driver 3 off
You must set the VREF before use. Set this to the minimum possible to turn the hands.
This will cut down power use and heat.
Connects via serial to the ESP32 & has 2M of built in memory to provide sounds for the chimes and spoken prompts.
DS3231 RTC 1 off
Connects to the Arduino NANO /ATMEGA328 to keep time.
MP1584EN ultra Small DC-DC 3A Step Down Converter 1 off
Provides 5v stepped down from 12v for the various modules.
If a 5v 1 Amp PSU is used this is not required.
TM1637 7 Segment Display 1 off
Used in the seconds gauge and connected to the ATMEGA328/NANO show the seconds in digital form.
Small Electronic Parts
Note choose LED colours and resistor values as required.
See pic 1
Harware
You will need a selection of M2 and M3 hex bolts, M2 self tappers and threaded inserts for 3D printing.
These are cheapest to buy in bulk assorted packs from Amazon.
3D printed parts are described on my site here.
and can be downloaded from my Cults3D page here (link to follow)
Bezel glass is 100mm x 2mm round Perspex sheet.
Videos






Video 1 This video shows the Power Station Clock starting up.
Video 2 This video shows the Power Station clock at 12:59 stepping to 1 o'clock .
Video 3 This video shows the full quarter chiming and chime controls of the Power Station Clock.
Video 4 Power Station Clock how to set Wintertime and Summertime.
Video 5 This video shows the Power Station clock going into sleep mode then waking up again.
Design



I based this clock around the gauges of an old power station.
Image 1. have picked out the control panel and mounts in duck egg green as many power stations used this colour on their control panels.
Image 2 The cast iron panel headers have been replicated as raised gauge labels for each display.
Image 3 I found this kilovolt gauge with built in 7 segment display similar to my seconds gauge.
Power
I have adjusted VRef on the TMC2209 to keep the stepper motor drive currents as low as possible.
The steppers have a very small loads to turn (the hand and position rotor) so they can be driven at far less than their normal current.
Driving the steppers at minimal current keeps the heat down especially on the seconds stepper that is running all day except when in sleep mode.
Normal running with just the seconds moving is around 200mA. I have not disabled the seconds motor between seconds as the reactivation caused an audible tick so this will increase the power consumption slightly.
I presume this "tick" will cause wear on the stepper motor gears?
This should not be a problem on the minutes motor as it moves 60 times less often. The hour motor will of course move 3600 times less often.
Max load on PIR re-activations is around 630mA for under a second.
At hour change with the chime on full volume the max load is around 670mA for under a second.
Controls/Indicators




Image 1. The panel holds the select switch which selects options from the selector potentiometer mounted in the middle of the panel.
It also starts the clock on startup and after a function change.
The potentiometer selects the following options.
SEL - Select position which is the normal position when the clock is running.
BELL- This is the chime control option with Chime off, Chime on Timer 6am to 11pm & chime on 24/7.
WIN- sets the clock to wintertime.
SUM- sets the clock to summertime.
VOL+ - increases the chime volume.
VOL- decreases the chime volume.
RST- resets the clock.
The PIR sensor/diffuser is also fixed to the control panel.
Image 2.The control panel is mounted on the wooden plinth made from old scraps of Oak.
Image 3. The wooden plinth is varnished with recesses cut into the wood to take the controls and indicators. The plinth can be made of any material or style you wish and I have shown dimensions for guidence only.
Image 4. Holes are drilled from the rear of the plinth in to the recesses to take to wires from the controls and indicators into the circuit board at the rear of the clock.
Note the old joint on he left rear of the wood. This is reclaimed timer and I cut the pieces out as I could.
Panel Indicator LEDs







Animation 1. The seconds processor detects if the hall effect switch errors and false triggers causing the seconds to rotate forever by counting the stepper pulses. If the steps go over a set threshold the seconds stepper motor shutsdown and the digit display flashes 99.
There are 2 LED indicators on the control panel which depending on the clock mode indicate different things.
Animation 2. In startup the Green LED indicates the time has not been fetched from the NTP server. While the Pink LED flashes to show the clock is attempting to get time from the server.
Animation 3. Once time has been fetched and the clock is running normally the Purple LED flashes every other second.
Animation 4. The Green LED will light steady if time cannot be fetched at any time from the NTP server.
Animation 5. If the PIR activates sleep mode the Pink and Green LEDs flash alternately every second to indicate sleep mode is active.
Animation 6. The Pink LED will be On steady while the clock resets after sleep mode.
Animation 7. If too many steps are detected on the minutes or hours steppers (hall effect sensor fail ) the clocks stops and the Green LED flashes. The ESP32 sends a signal to the seconds and they also stop and the digital display turns off.
Code Setup
Code Setup for local NTP server
The clock gets it's time from your local NTP server so the NTP and your router details will need to be changed in the code before use.
Search for "NTP settings"
You will need to set your timezone eg UK use 0.
Add in your NTP server address of your local time server. Just Google "local NTP time servers.
Enter your router SSID and password.
// NTP settings
int TIMEZONE = 0; // timezone (GMT = 0, Japan = 9 1 = gmt summertime)
#define NTP_SERVER "uk.pool.ntp.org" //using local internet time server
#define WIFI_SMARTCONFIG false
#if !WIFI_SMARTCONFIG
// if you do not use smartConfifg, please specify SSID and password here
#define WIFI_SSID "VirginMedia" // your WiFi's SSID
#define WIFI_PASS "Fg66L8gtdccc" // your WiFi's password
3D Parts Assembly







Assembly is quite straight forward but I have included some pics with parts labled in order or in position.
Image 01 Fixing detail of the BracketFix part.
Image 02 Detail of the removal of the 2 LEDs on the Hall effect switch.
Image 03/04 Shows how the resistor and Zero LED are fitted to the hall effect switch.
Image 05/06 These pics show mounting details of the stepper, hall effect switch, rotor and hand.
Image 07 show the assembly of the gauges.
Setting Hands to Zero



The clock synchronizes to zero on every rotation eg hours at 01:00hrs and 13:00 hrs, minutes on every hour and seconds on every minute.
The stepper motor drives the hands to zero and stops when the magnet attached to the rotor is sensed by the hall effect switch.
To set the hands to zero power up the clock and let all the gauges zero then power off the clock.
The hands are fixed to the "nemaspindleconnecter" by a single M2 self tapping screw.
If the screw is loosened the hands are free to rotate without turning the spindle/stepper motor.
Image 1 The gauge has stopped near zero. To zero the hand loosen the screw and move the hand to zero.
Image 2 Tighten the screw while holding the spindle in place. I have designed the spindle slightly larger in diameter than the hand so it can be gripped with thin pliers to stop it moving.
Image 3 Gauge now zeroed correctly.
Power up the clock again, let the gauges zero and double check all gauges point to zero.
If you find the any of the hands get out of alignment as they rotate try adjusting the steps for that motor.
Although my stepper are identical I found I had to decrease the step rate by 1 on just one of the steppers.
Clock Operation


Image 1 There are only 2 controls for this clock both located on the control panel.
Video 1 Shows an example of using the controls to set Winter/Summertime.
The "Select" switch is a momentary push switch and the rotary selector is a 10K Ω potentiometer.
In normal operation the rotary selector is set to the "SEL" or Select position.
As soon as the selector moves off the "SEL" position the clocks hour and minute analogue displays stop.
The rotary selector has 6 different position used to set and control the clock.
Each position has at least one function. To set the function the move the rotary control to that item you want and then press the "Select" button.
The clock will speak the current function that has been set. Pressing the "Select" button again will select the next function if available and speak it.
Rotary Control Functions when "SELECT" is pressed
SEL - If a function has been changed returning the rotary control to the SEL position the clock is restarted and time updated and the new selected function activated. Pressing the SELECT button has no effect in this position.
BELL - Changes the when the clock chimes
Options are Chimes on timer (set in code off ater 23:00hrs on after 06:00hrs) , Chimes 24/7 and Chimes off
WIN - sets the clock to wintertime
No other options on this function
SUM - Sets the clock to summertime
No other options on this function
Vol+ - Turns up the chime and voice sounds volume
Volume goes up each time the SELECT button is pressed
Vol- - Turns down the chime and voice sounds volume
Volume goes down each time the SELECT button is pressed
RST- Resets the clock loading default values
No other options on this function
As an example of using the rotary controller and "Select" here is how to change the chimes to off.
Rotate the rotary control to the "BELL" position.
Press the "Select" button once.
The clock will speak the function selected in this case "chimes 24/7".
Press the "Select" button again and the clock will speak "chimes off"
Turn the rotary control back to "SEL" and the display updates any changes made.
The chimes are now off.
PIR Operation


Video 1 This video shows the PIR operation. Note the ticking clock in the background of this video is another clock. As all my clocks are synchronised the ticking appears to be coming from the power station clock. In operation in a completly quiet room the clock is audable but not obtrusive.
Image 1 The PIR module is fitted to the control panel and will detect movement over a few meters.
The PIR looks for motion every second. If motion is not detected the clock starts a 5 minute timer.
If motion is detected again while the timer is counting down, the 5 minutes starts again.
If motion is not detected for 5 continuous minutes then the clock goes into sleep mode.
In sleep mode the digital seconds display turns off and all the hands stop moving with the stepper motors disabled.
As soon as motion is detected the digital seconds display is activated and all the hands move to the correct time.
Depending on where the hands are when the clock comes out of sleep mode the hands will move forwards or backwards to display the correct time.
3D Printed Parts

TM1637 7 Segment Display



Image 1 TM1637 module.
Used in the seconds gauge and connected to the ATMEGA328/NANO shows the seconds in digital form.
Only the middle 2 digits are use.
Image 2. I covered the 7 segment display on the TM1637 with two sheets of Neutral Density Gel Sheet. This help hide the unlit segments and gives the lit LED segments more contrast.
The animation shows the display with and without the ND sheet. In bright light the display is hard to read without the ND sheet. In dim light it would be too bright without adjusting the segment currents.
Image 3 The TM1637 module is mounted with hot melt glue to the rear of the seconds gauge.
It is a very tight fit so the lower corners around the mounting holes will need to be snipped back a litle bit.
Dial & Control Labels




The labels have been drawn up in TurboCAD and can be printed in actual size. I have also included PNG files so the labels can be printed out using a paint package. The lables include dimentions marks to check correct size when printing from PNG.
The dial labels can be printed onto photo paper or waterslide decal paper. The control panel label is printed onto waterslide decal paper.
If you require other CAD formats message me and I will export your format from TurboCAD if possible.
Dial Waterslide Decals



If you only want to buy one type get clear decal paper.
If you have clear and white decal paper then this will save you painting the 3D printed dial white.
Dials
I print direct from TurboCAD but test print the enclosed images until the 85mm marks line up if your printing from image files.
Follow the manufacturers instruction as they do vary by brand.
Image 1 Slide the decal over the dial and position the cross marks over the center of the holes.
Image 2 When the decal is dry cut the decal away from the openings.
Spray with acrylic varnish to seal in place.
Image 3 The edges are covered with the "countersinkcover" 2 off, "countersinkbottcover" 1 off and NemaDialLEDWide 1 off each dial.
Control Panel Waterslide Decals




Image 01 Completed dial.
Image 4 If printing from an image file print to match the dimensions between the holes.
If printing from TurboCAD print as is.
Paint and prime the control panel matt eggshell green before applying the decal.
Trim printed decal to the black inner line.
Image 2 Decals are slid into place.
Image 3 Line up the center marks on each hole.
When the decal is dry cut the decal away from the openings.
Spray with acrylic varnish to seal in place.
Dial Printed on Paper




As an alternative to waterslide decal dials the dials can be printed onto matt photo paper.
I used this method on my clock.
Image 1 Print out each dial onto matt photo paper & cut out the holes with a leather punch or a craft knife.
Image 2 Cut around the label and hold it in place on the dial.
Image 3 The gaugewide part is M3 bolted over the top.
The punched or cut out holes in the paper are covered with the "countersinkcover" and "countersinkbottcover".
The LED cover "NemaDialLEDWide" will cover the paper edges around the LED cutout.
Image 4 completed minutes dial with covers in place.
Vero Board Layouts



Veroboard correction 06 May 2025 Seconds Dir & Step reversed with each other.
Note there seems to be 2 versions of stepper motor wiring depending on the manufacturer.
If your stepper motor turns the wrong way reverse the plug on the Veroboard socket.
If you want larger vertions of these layouts download them here.
Wiring the Vero Board




This will take around 4 hours.
Image 1 Plug and socket connectors are soldered in place followed by the fuse and Voltage module.
Adjust the voltage module to 5v at this stage.
Image 2 Small components are now fitted except C3,4& 5.
Image 3 Do the 5v, 3.3v and Eth runs.
C3,4& 5 are soldered in place after the Battery and Eth runs are completed.
Image 4 Finally wire in all the other interconnect wires.
Now test and double check all your wiring before plugging in modules and connecting power.
Schematic

To download or view the full size shematic go here
JQ6500 Audio





Image 1&2.This clock uses a JQ6500 module for the voice promps and for the quarter and hour chimes.
Chime & Spoken Files
This clock chimes are based on an old carriage clock.
Chimes are struck on a single bell with a chime for each quarter hour and also for every hour.
24/7 - The chime will sound the four quarters and the hours 24/7
Timed - The four quarter and hour chimes will only sound from 06:00 until 23:00 hrs. (set in code)
The sound files are held in the JQ6500 module max 2M of files.
Using the JQ6500 program the audio file are copied over from a PC.
Your sounds will need to be loaded onto the JQ6500 module.
See these sites for info and Arduino libraries for these modules.
English Language MusicDownload.exe Uploader for JQ6500-16P
By way of Nikolai Radke an English Language version of the MusicDownload.exe tool.
English Language MusicDownload.exe v1.2a
I just run this file from windows (no need to install it) and it runs in English see details below.
Image 3. When the file is run this window will open. Click FILES
Image 4. Click CHOSE FILES and shift select all the files you want to be copied to the module.
Image 5 Click OPEN above then click on the FLASH tab.
Click on FLASH and you should get a message saying FILE PROCESSING
It the files will fit on the module the message will change to FLASHING RUN and a green bar will show progress.
When flashing is completed the message will change to READY......
You can remove your module and plug it into the clock.
Download Links
Aviator Clock or Power Station Clock


This clock and my Aviator clock can use each others 3D print files. If you prefer the look of the Aviator clock you can print out the 3D files for the Aviator clock and fit the electronics and software from the Power Station Clock into it.