Close
0%
0%

CogClock

A (humorous?), battery-powered, WiFi enabled, NTP, clock with arbitrary hour placement; using a servo to actuate the hour hand.

Similar projects worth following
This project was inspired by the idea of making a physical clock that resembled the sort of clocks sometimes drawn in COGnitive assessment tests. It should easily run 1 year on a set of batteries. It uses a servo to advance the hour hand as specified by an array of angles for each hour. Once a month or at the users command, it turns on wifi, connects, and updates to the NTP time. Then it turns off its wifi. Other than that it remains in deep sleep with power to the servo turned off except for a few seconds once an hour when it advances the hour.

Seen here is version 4.  The power consumption is 160 microamps except for a few seconds once an hour and the parts count is remarkably (to me anyway) low!  I'll list the more important improvements that got me here from version 1.

The prototype version worked but had a  hideously difficult method of setting the time using two buttons for input and only the hour hand for display.  When I remembered daylight savings time was a thing, I knew I had to start over.  It was also consuming 100s of milliamps.

The first change was to add a RTC module which gave me lower power than using a cpu timer, interrupt capability, battery backup,  and eeprom in case the eventual processor choice didn't include eeprom.

I hadn't considered using wifi because of the power requirement; but that wasn't necessarily high when using a RTC and only occasionally turning on wifi.  That, however, made the input problem of setting up even worse.  I didn't want to rely on changes to the source code for every adjustment.

At some point the blindingly obvious penetrated, that if one is building this, they have a usb connection to program it.  Therefore they also have a serial connection, so can configure the network and edit the angles that way when they program it.

I added a high-side mosfet switch to turn off all power to the servo when it wasn't actually moving.  The circuit was designed to keep overall current draw to a minimum.  I used surface mount mosfets but through hole 2n7000 and BS250 should work as well.  The circuit is now so simple a printed board is not really needed except for the surface mount mosfets.

Last of all I found the ESP32-C3 super mini which was able to replace the combination of cpu and ESP32 board I had been using. And it consumes less power.  (why use an esp32 AND a different controller? I could use a slow and low powered cpu and turn off all power to the ESP32 when it wasn't needed.  

The ESP32-C3 has a problem however.  It seldom connected to the router despite being only 15 ft away in the same room.  This was fixed by adding a 31.2 mm wire to the  end of the antenna component nearest the oscillator.  BTW said component is installed reversed on some board including the ones I received.  It doesn't matter just add the wire.

The led on the RTC has to be disabled as well as the charging circuit if a standard 2032 is used instead of a rechargeable or none at all.  

Likewise the leds, or at least the red one, has to be disabled on th ESP32-C3.

  • 1 × DS3231 Clock and Timer ICs / Real-Time Clocks
  • 1 × ESP32-C3 super micro
  • 1 × DM-S0020 Super Mini Digital Servo
  • 1 × clock mechanism 6mm thread length
  • 1 × 3 AA battery holder

View all 15 components

  • 1
    3D Printing

    STLs and STEP files are available from CogClock on printables.

    Use any filament you like, it's easy to print but you will need a 270mm print bed minimum.

  • 2
    Firmware

    Firmware is available on github.  Edit custom.h to your timezone.  Search for Posix timestring if unsure. When this is correct it will show the local time and automatically handle daylight savings time.  

    Program as you would any arduino. As soon as it is programmed go to the "serial monitor" window and it will prompt for the wifi ssid.  Enter it and it will prompt for the psk.  Enter that and it will show a comma separated list of angles for the hours.  A new list can be entered now or leave it as is by pressing return.  If wifi has already been configured correctly, just press return at each prompt.  To repeat this action just connect to the usb port and press the button.  If the usb port is not connected, pressing the button will refresh the time from a wifi NTP connection.  (the button must be held down for a couple seconds)

    To configure the exact angles when prompted for the ssid enter "#" instead and it will allow you to enter a new angle for the first hour.  As long as you enter some value it will move the had to that position and wait for a new value.  When no value is entered it will advance to the next hour.  This will continue until '#' is entered again.  Then the new values will be saved.

View all instructions

Enjoy this project?

Share

Discussions

alexschultze wrote 05/30/2026 at 20:08 point

After returning to this project mentally for a couple of times, I came to the conclusion that the WiFi approach is OK-ish for a person who uses it themselfs, but overly complex especially when gifted to people in psychology which are typically not so tech. 

My take therefore would be to rely on the RTC clock, and one or two buttons for setting the time like on any other clock. This in turn means that minute-timer also is controlled by the ESP.  But this is missing something simple like a 360° servo, so need to get funky with the minutes as well. 

  Are you sure? yes | no

John Silvia wrote 05/30/2026 at 21:05 point

I completely agree with your first paragraph.  My first version indeed used two buttons and no wifi.  And that was ugly too. Plus don't talk to me  about setting DST.  As you suggest, incorporating a controlled minute hand helps but now we're looking at more than doubled power requirement. Getting current consumption low enough was THE hard problem in this project.  Given time and budget this and other issues could be improved to make this more of a commercial item.

The thing is, the only time the user would have to adjust anything is if the network changed, so if it is being gifted the giver/maker (in my experience) would be on the hook for any change.

It has been seen by quite a few health professionals including neurologists and psychologists and all but one liked it.  However nobody asked for one or how much it would cost.

If it turns out there is more interest than I expect, I will spend the time and money to make it easier and more flexible.  If not, I hope it can serve as a source of ideas for others to expand and improve on.

  Are you sure? yes | no

John Silvia wrote 05/30/2026 at 21:13 point

Sorry, I meant to thank you for your comments.  I got my mind shifted to  tech mode and forgot.

  Are you sure? yes | no

Ken Yap wrote 05/25/2026 at 23:05 point

Cool idea. 👍 I assume that those numbers can be arbitrarily placed (magnetic?). The picture of them clustered on the right triggers a vague memory of a clock face drawn by a brain damaged patient I saw sometime in the past, Oliver Sacks's writing perhaps? 😳

  Are you sure? yes | no

John Silvia wrote 05/26/2026 at 17:00 point

They're attached with tiny screws.  I probably should have used magnets but it's a little tricky.  There's not much space in the numbers and the printed clock face thickness is an issue.  I can see a couple of ways of doing it though. Should there be significant interest in this, I'll add that.

There are conditions which cause people to draw a clock face like this.  The inspiration came when I was asked to draw a clock.  I knew about the test and I thought "How can they know I don't have a clock like this? The test doesn't say which clock to draw.".

  Are you sure? yes | no

Ken Yap wrote 05/27/2026 at 01:15 point

I would draw a digital clock. 🤣 I think one day people would have to ask AI what "clockwise" means.

  Are you sure? yes | no

John Silvia wrote 05/27/2026 at 17:19 point

I get it, but assuming that is so; We still say "Lift yourself up by your own bootstraps" and "riding shotgun" or even "hoist on your own petard".  I think they would know what it meant but be asking AI what does a clock have to do with it and what makes it so wise.

  Are you sure? yes | no

wootmaster wrote 05/25/2026 at 22:30 point

@ clockfacenotrandomenough!

  Are you sure? yes | no

John Silvia wrote 05/26/2026 at 17:03 point

I actually use it to tell time so I didn't want to make it too hard to read.  But the numbers can be in any order.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

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