We’ve seen a few H-bridge circuits around these parts before, and here’s another application. This time we have an Old Train Station Clock which has been refurbished after being picked up for cheap at the flea market. These are big analog clocks which used to be common at railway stations around the world.
This build uses an ESP32 C3-mini microcontroller (PDF) in combination with an A4988 Microstepping Motor Driver (PDF). The logic is handled with MicroPython code. The A4988 provides two H-bridge circuits, one for each of two stepper motors, only one of which is used in this build.
The controller for this clock needs to send an alternating positive then negative DC pulse every minute to register that a minute has passed so the clock can update its hour hand and minute hand as appropriate. The ESP32 and the A4988 H-bridge cooperate to make that happen. The wifi on the ESP32 C3-mini is put to good use by facilitating the fetching of the current time from the internet. On an hourly basis the clock gets the current time with a HTTP call to a time server API, for whatever is suitable for your time zone.
Thanks to [PiotrTopa] for writing in to let us know about his project. If you’re interested in learning more about H-bridge applications be sure to check out Introduction To The H-bridge Motor Controller and A H-Bridge Motor Controller Tutorial Makes It Simple To Understand.

The A4988 is /not/ a H-bridge and cannot be used as one, as it has integral logic to create the waveforms for a stepper motor. You can however just connect up the clock solenoid to one of its outputs and just “step” the motor around. This still doesn’t make it a H-bridge though.
I agree. Much simpler solution would be to build a rotary AC-AC converter. A low power AC motor, something like Besel SEH 56-4A, connected to a rewired car alternator would produces a true 3-phase AC electricity as expected by the cock.
Never mind reading the original piece. You obviously didn’t even make it to the third paragraph of the summary here before blurting out irrelevant nonsense.
Eh what? You need pulses, not AC waveform :D
Meh, this is a semantic argument. They never claim that the A4988 is an H-Bridge, only that it “provides two H-Bridges” which it does, two DMOS Full Bridge outputs. When you say that one can, “connect up the clock solenoid to one of its outputs and just “step” the motor around,” I see what you mean, but it’s equivalent to saying that you can just, “connect up the clock solenoid to one of the H-Bridges and tell the A4988’s Control Logic to create the desired pulses,”
If your concern is that someone is going to read this and then go buy a 28-pin device marketed as “DMOS Microstepping Driver with Translator and Overcurrent Protection” expecting it to be a 4 transistor circuit, I think you can rest easy. The A4988 is obviously more than two H-Bridges, but it is also that. I think this is a perfectly sane way to describe the project electronically and it’s also the way that the project’s author frames it in their GitHub write-up.
You’ve done writeups on the Swiss railway clock, right?
I don’t think we have? But we have done France https://hackaday.com/2025/07/31/railway-time-why-frances-railways-ran-five-minutes-behind/ and Belgium https://hackaday.com/2021/12/26/belgian-railway-time-for-your-home/ is that close enough? :)
Great. Now I want a train station clock.
I did the same years ago using a double H Bridge SN754410, an ATmega328P and a RTC. It even enforced Dayilight Saving Time by fast-forwarding or pausing the clock for 1hour. I made an open hardware PCB too. It’s in french so it may not be of great interest to most people here. It can be found by searching ArduiBodet.