Close
0%
0%

Real Tower Clock version 2.0

3D printed tower clock using closed-loop stepper with high precision and is easy to make

Similar projects worth following
Tower Clock Version 2 is more than an evolution. It represents a fundamental redesign and re-engineering of world's first fully open-source tower clock I published three years ago on Thingiverse.
The mechanism is driven by two NEMA 17. At back a closed loop driver board with my tower clock firmware is used. I am using BIGTREETECH S42B V1.1 which are quite cheap. So for strong winds or a bird sitting on a clock hand it maintains always the correct angle according to current time.
This driver board communicates with an ESP 01 board to get always correct time via NTP. It runs with internet and without internet and deliveres web application so it can be controlled via internet for settings and status information.
NO additional board is used here - the clock runs directly on STM32 - one for hour and one for minute.
For the clock axis and motor mounting it uses only 3 3D printed parts. The hour axis is belt driven and seconds direct mounted so no backslash.

Features implemented

1. new Firmware for  S42B V1.1

  • set mode: seconds (yeah seconds also supported now!), minutes, hours+minutes
  • shows status in display at back of stepper motor with time, date angle, and more.
  • offline mode: set time+date directly at motor
  • online mode: gets NTP time once in a minute from internet so it will be always in exact time

2.  ESP-01:

  • Hotspot mode, select AP
  • responsible web interface, (using async webserver btw.)
  • show motor status
  • I also implemented several serial commands
  • get NTP time and broadcast it to stepper motor via serial
  • 5 buttons in web interface: 4 for clock hand directions and start clock
  • 4 more buttons for setting the mode here: hours+minutes, minutes or seconds and "crazy"

3. Mechanics

  • mechanical design in Fusion 360 also finished now 
  • it uses only a few printed parts and is very easy to print: one for minute axis, one for mounting and ball bearings top. for magnetic encoder two small parts.
  • prototypes tested, found two major issues. This are also solved now and final test was successful

The assembly of clockwork is very(!) easy and can be made within a few minutes from a beginner. The most difficult part is a 5 wire ESP-01 dupont cable but no soldering needed. Also the custom firmware has to be flushed on stepper motor board which is also a bit fiddly.

  • Real life test!

    imperator-maximus05/16/2021 at 22:48 0 comments

    The clock is running now for around two weeks in real life scenario meaning mounted in clock hole of house and clock hands are ouside.

    It runs smoothly - nearly perfect - but with one huge issue: at midnight it changes the time and goes back one hour. This happens only at first day midnight after power on and next days it still has got same time difference of -1 hour unchanged.

    I first thought it is a mechanical problem but it is not! So the NTP time goes wrong from midnight. I can see NTP time on display and in web interface. It is a software issue only.

    So I decided to put same software version on another ESP-01 just for testing. And now for around a week no issue there. Time is perfect no jumping back once. Crazy!

    I also gave code to two other software developers and they could not find the bug which might be in NTP library I am using: https://github.com/sstaub/NTP

    So what are the differences now:

    - asking once a minute for time triggered from serial and doing  ntp.update(); it loses one hour at first midnight

    - asking once a second for time it should work. If have not tested it but it is the example from NTP lib

    - just running and asking for time only a few times a day it is also working (separate ESP)

    So I cannot make a ticket for that library on Github because in test it just works and it would be impossible to reproduce for anybody else.

  • Finished!

    imperator-maximus05/02/2021 at 14:38 0 comments

    I am glad to announce that I have finished modification for external sensor and already made internal tests. So everything works fine now!

    On image there is new magnetic encoder at 1) and there is also magnet on hour axes at 2).

    Next step would be longer tests in reallife - put it in orginal location where it belongs in front fasade of house.

    I also want to start uploading files later - first source code on GitHub.

  • Status update

    imperator-maximus04/26/2021 at 00:09 0 comments

    After finished first version I ran into two problems:

    1. minute hand was not working at all
    2.  hours got wrong offset after each turnaround

    1. solution was just a parameter in firmware - took me some time and was just a bug in orginal firmware I got this from - now it works fine.

    2. each diameter of each pulley is slightly different so it adds an error for each turnaround but the solution is also not difficult: add magnetic encoder at hour hand

    For magnetic encoder I need little changes in CAD design. But using Fusion 360 is a huge mess. It is full of strange bugs. It is software with most bugs I know and my construction is not very difficult. A very frustrating experience! So I decided do give Shapr a try and this looks much better and is more intuitive. But I have to learn new concepts and I have to make whole CAD design in Shapr again. So this takes some time now but I hope to finish everything this week.

  • Firmware finished!

    imperator-maximus04/05/2021 at 14:01 0 comments

    First version of firmware is finished. Some options in menu would be nice but using web interface it is fully functional. IP address is also shown now.

  • Crazy mode!

    imperator-maximus04/05/2021 at 12:47 0 comments

    Big news:

    • some bugs are fixed and code is almost finished and ready to publish to GitHub. Just need to show IP address on OLED - this is still missing
    • Crazy mode now implemented! So clock hands are move to random location in random direction.
    • Testing of mechanics looks fine so far. no issues on latest version.

View all 5 project logs

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates