Bike Chain Clock

by pgeschwi in Workshop > 3D Printing

2676 Views, 48 Favorites, 0 Comments

Bike Chain Clock

101 Full.jpg

I am attracted to clocks showing time in unusual ways and was inspired by some of the simple chain clocks I accidentally saw while looking for ideas. When my wife saw what I am putting together, just a stepper motor, some numbers attached to a bike-chain and one larger gear, she was not impressed. Maybe there is a little more explanation needed here. I can make lots of weird things work, but I honestly have a tough time making things pretty. My real challenge is to get her ideas for stuff that eventually makes it into the living room, blending in with other furniture and visitors will see them as a piece of odd art. This chain-clock is still a work in process and is at least missing some framing, which we have not yet decided on. The goal was also to have no additional wires beside the visible brass wires on the board. A little bit like these free-form circuits. The brass wires are the connections to LEDs, Motors and the pendulum showing the moon phase.

I'll explain more pending ideas/addons below along the descriptions how this thing came to live.

Bottom line, this is more of a prototype and I will probably tear down the whole thing because I think it is a great start but too much plastic when taking a closer look. I'm thinking of replacing all 3D printed parts with machined brass parts. I don't have the tools to machine these parts but that would make it really steampunky so to say.

Below I attached a video of the start sequence, beginning with a LED test, then moving the chain until "12" is at the top left gear as a defined start position. Then the Weekday roller will be synced. Once the positions are known, time and weekday can be set according to the RTC. I still need to start the pendulum manually and it will be kept in motion by nudging it via a coil and magnet at the bottom of the pendulum. I'm working on an automatic start sequence which should kick it into motion.

Downloads

Supplies

The following list is more what I had laying around and used for the clock. Use whatever you think will work for you and contributes to your liking.

Prototyping board (like https://www.amazon.com/gp/product/B081R4YBY7)

Arduino Nano 2x (like https://www.amazon.com/HiLetgo-ATmega328P-Controller-Development-Unsoldered/dp/B01DLIJQA2)

Real-Time clock (like https://www.amazon.com/AT24C32-Replace-Arduino-Batteries-Included/dp/B07Q7NZTQS)

OLED display (like https://www.amazon.com/HiLetgo-Serial-128X64-Display-Color/dp/B06XRBTBTB)

Stepper Motor Driver (like https://www.amazon.com/Printer-Motherboard-TMC2130-Stepper-Ultra-Silent/dp/B084SV74QP

Neo Pixels 144/m (like https://www.amazon.com/KWMSTPLT-Individually-Addressable-Programmable-3-2FT144Pixels/dp/B09PBTMK9G)

Rotary encoder/switch (like https://www.amazon.com/Taiss-Detents-Points-Encoder-Diameter/dp/B07F24TRYG)

Usual soldering equipment

Low voltage wire or magnet wire 24 gauge for LED connections and pendulum wiring etc. Magnet wire looks nerdier, I think

Some parts like a PNP Transistor, trim-pot and capacitors depending how you implement the pendulum driver

Power supply, wall wart 12v 2A (like https://www.amazon.com/gp/product/B01GD4ZQRS)

Regulator, 12v to 5V for Arduino (like https://www.amazon.com/gp/product/B0758ZTS61)

Stepper Motor Nema 17 (like https://www.amazon.com/STEPPERONLINE-Stepper-Bipolar-42x42x38mm-Connector/dp/B0B38GX54H)

Stepper Motor 28BYJ-48 (like https://www.amazon.com/HiLetgo-ULN2003-28BYJ-48-Stepper-4-phase/dp/B00LPK0E5A)

GT2 pulley 5mm bore 2x (like https://www.amazon.com/WINSINN-Aluminum-Synchronous-Timing-Printer/dp/B077GNZK3J)

Timing Belt 2GT-696 (like https://www.amazon.com/Pnzxi-696-2GT-6-Timing-Length-Printer/dp/B09SXVCFYX)

Access to 3D printing

Brass wire 14 gauge (1.5mm, like https://www.amazon.com/gp/product/B01FY9CRJI)

Brass rod 1/8 in (3mm, from the local hardware store)

Acrylic sheets matte (thickness is not important, I had some old 5mm pieces at hand)

Bike Chain (I used two of https://www.amazon.com/gp/product/B09LY28PJJ?th=1)

Chain link breaker (like https://www.amazon.com/gp/product/B06XQDXW78)

Old radio tubes just for the looks, no mechanical or electrical task

Flanged bearings 5x (5x16x5 like https://www.amazon.com/gp/product/B07SJT68TT)

Steel axle 5mm (like https://www.amazon.com/uxcell-150mm-Stainless-Steel-Solid/dp/B082ZNSRBN)

Small magnets, I used 6mm x 1.5mm for the reed switches and 15mm x 1.5mm for the pendulum driver, two each (like https://www.amazon.com/gp/product/B07MV6M12H)

M4 Button Head Screws plus nuts (like https://www.amazon.com/gp/product/B08RZ3WDLK)

Board Size and Initial Project Setup

118 Number Attachment.jpg
110 Bottom Right Double Gear.jpg
111 Bottom Right Double Gear.jpg

When I started this, I had no idea how dimensions will turn out. The basic Idea was to allow a decent distance between the hour numbers so one could possibly read minutes fairly well. You already see that there was no real plan, I just started and constructed as the project progressed. I thought it would be nice if the clock has a pendulum and a weekday display. Asking for additional features, my wife was requesting a moon phase display.The next version may also get a disk with zodiac signs, or.....

I went for a distance of 18 chain links which spaced the numbers 9 inches apart. I had some rough-cut board in the garage which I cut into four pieces 21 inches each and glued these together resulting in a 29 inch high board. I had to get a second bike chain because 12 segments, 18 links each requires 216 links. One chain as listed above has 116 links. I used the link breaker to cut the chain into 18-link pieces, keeping the outer link pieces. I planned to simply use some M3 screws to attach the hour numbers, but these were causing too much tolerance and the chain roller distance got a little wider than with the original bolts. This caused issues with the toothed gears I printed. At times the chain had the tendency to get stuck. So I used M4 allen wrench button head screws, drilled the links matching the screw diameter and this fixed the tolerance issue. All chain rollers had the right distance again. I secured the nuts with Loc-tite so the screws/links can freely move but stay in place. I did not use self securing nuts, these became too large and got in the way of the hour numbers while the chain was moving.

For creating the gears I used https://woodgears.ca/gear/index.html

allowing to generate SVG templates for roller chains in a simple way. The above pictures also show the flanged bearings and mounts for the 5mm axle

All parts have been constructed using Tinkercad and have been published:

https://www.tinkercad.com/things/4hfpbzY0ySd

I wanted to keep the chain inside the board perimeter, just dangling down was no option. Adding another gear to the board taking up the remaining length of the chain was no problem but came with a twist. Making sure the number plates are not getting stuck with the chain when going around the gear, the number plates needed to stay at the outside of the gear. This meant opening the chain and reconnecting as a double loop. This way the number plates will never hit the axle of a gear and made the stacked gear at the bottom right of the board possible. To avoid collisions of the number plates with the chain, the middle gear needed to be tilted to the right, allowing the number plates to go below the chain moving down on the right hand side. This is why the gear holder is available in two versions, one straight and one at 7 degree tilt for the axle.

The Display Elements

102 Top Left.jpg
103 Hour Reed Relay.jpg
119 Number 12 Magnet.jpg
104 Chain Driver Belt.jpg
105 Weekday Reed Contact.jpg
107 Pendulum Bearing 2.jpg
109 Minute Display Connection.jpg
108 Chain Stepper.jpg
Wire Bending tool.jpg

The hour display is simply a backlit matte acrylic screen with a set of WS2812 (Neopixel) LEDs, not much to it. The case is a bit deeper at the bottom for the LEDs to get a better illumination across the height. I used LEDs from different strips, which turned out being a mistake because the color representation is a bit different between the backlit hour and minute display. I tried to compensate this difference via a hue-shift, but that did not work very well. The minute display is laser engraved and then filled with black epoxy making the numbers better readable. In the full view picture you may have noticed a bluish LED. This blue indicator walks the full distance between left and right over 10 minutes, representing the minutes least significant digit. Time on the overview picture is 4:08. I think for the next version of this clock I should engrave numbers 0 to 9 at the bottom of the minute display. Each LED in the minute display is about 15 seconds (I used 38 LEDs, the full length of the minute display, about 16 seconds per LED)

I wanted the chain to go in both directions allowing shorter startup times and when adjustments are made but that was causing issues with the hour display as the stepper motor driving the right hand gear was now pushing the chain in between the displays when going reverse. To fix this issue, I added a timing belt, synchronizing the two top gears. One of the pictures showing the belt also shows the flanged bearings, the toothed pulley and that the chain is actually running between the upper and lower display to keep it from sagging. The second picture is showing the reed contact for the clock to sync after power up. For this I simply added these small neodymium magnets at hour 12.

The Weekday display is a seven sided roller driven by a 28BYJ-48 stepper. The weekdays are 3D printed in two layers like the hour numbers. Starting with one color, halting the print, changing filament and then finishing the print. To make the weekday roller easier to assemble, all weekdays are printed in one go on a single sheet which has thin interconnection areas so one can fold the display and secure it with the end pieces.The tinkercad files show the roller and the internal LED holder partly assembled. Detecting the current position is done in the same way as the hour chain, using a tiny magnet and a reed contact.

Getting the brass wire straight is not difficult. I cut 4 to 5 ft segments, clamp one end into a vice, the other end using multi-grip pliers and a hammer for stretching it. For bending the brass wire to fit the curved wire guides, I printed a matching step pin. This is also part of the tinkercad files. I have to admit that this wiring work is a tedious process. I tried to make the wire guides tight enough so these hold the wires without glue but some didn't hold and I needed to glue them in. This turned out to be a suboptimal solution, because the board is shrinking when it's getting dry and the wires need to move a little. If they are glued in, it may happen that these are deforming and may touch each other, possibly causing havoc to your electronics.

Pendulum and Driver

106 Pendulum Bearing 1.jpg
112 Pendulum Coil 1.jpg
113 Pendulum Coil 2.jpg
114 Pendulum Driver Board 1.jpg
115 Pendulum Driver Board 2.jpg
123 Moon.jpg
Arduino Pendulum Driver basics.png
Arduino Pendulum Driver circuit.png

I have taken the moon display from another instructable. Kudos to G4lile0 for developing the moon phase display.

https://www.instructables.com/3Dprinted-Lunar-Phase-Clock/

The bottom part of the pendulum consists of three items as shown above. The bearing is the same type as for all other gears. The three brass lines are used for VCC, GND and Data to the 18 LEDs (6 compartments with three LEDs each) of the moon base. The LEDs in the pendulum are at the end of the LED strip, there is no further connection for the data line. If you like to add more illuminated gadgets, add these before the pendulum. For my taste, the frequency of the pendulum is too high. The pendulum is about a foot in length which results in a frequency of about one second for a full cycle. A grandfather clock typically swings in 2 second cycles. Since the hour chain is advancing once every three seconds, I'd like the pendulum to swing that slow. To accomplish this low frequency we have two possibilities: Either the pendulum needs to be over 7 feet long or one could use a counterweight, similar to a metronome. I guess this is something to consider for the next version. Unfortunately I don't have room for a counterweight above the pivotal point nor the chance to hang the clock over 7ft high. I have some idea about connecting a counterweight to the right of the pendulum with a connecting rod, driving it in opposite direction but that is far from being ready yet.

To keep the pendulum going, we need to keep nudging it a little. For this I used a separate Arduino Nano, not because this couldn't be integrated into the existing one but more for developing a separate application.

The idea was to use the coil for both, being a detector for the magnet passing by as well as pushing the magnet by energizing the coil. This has the advantage that we don't care about the amplitude and can adjust the duration of the push as well as the trigger point when the push is initiated. The basic idea for this method came from the following article:

https://www.eevblog.com/forum/projects/electronic-pendulum-(self-optimizing)/

I modified the schematic slightly to my needs (one of the attached screenshots) using two trim-pots for adjusting trigger level and push duration.The flashing LED shown in the video is lit by the collapsing magnetic field when the coil has been switched off after the push.

This is one part I am still working on. I'd like the pendulum to be started autonomously, but that needs a bit more software development for a state machine switching between initial startup and continuous run. I would also like to dynamically adjust the push duration depending on the swing amplitude. More to come...

The bobbin has a diameter of 3/4" (20mm), length of 1" (25mm) and the core is about 1/4" (6mm). Impedance is approximately 20 Ohm, resulting in 250mA during active time. The three wire connections to the pendulum are made from the same magnet wire (24 gauge) as for the coil, just wound them as a 1/2" (12mm) spring for a flexible connection.


Control Box and Programming

116 Control Box Left.jpg
117 Control Box Display.jpg
120 Wire Connector.jpg
121 Control Board top.jpg
122 Control Board Bottom.jpg
Schematic.jpg

This clock is a prototype, so I did not design a printed circuit board for the various components. I used magnet wire for the connections on the prototyping board. Magnet wire is easier to handle than cutting short pieces of insulated wire and trying to remove insulation from the ends. To handle connections between the thick brass wires and the control board, I made the board plugable. This makes it way easier for any changes during the build.

The NEMA 17 stepper motor requires 12V, the LEDs and Arduino as well as the pendulum driver are running on 5V. I mounted the voltage regulator below the brass wire connections. The only wire on the back of the board is the 12V connector for the power supply.

During normal operation the display is switched off. These OLED displays don't have a great lifespan. It is only used for adjusting date/time and will also come to live when turning the encoder switch for changing display color. It will switch itself off after 30 seconds. Adjusting date and time is done by pressing the encoder button which will then allow adjusting hour -> minute (seconds are set to '00' on next press) -> day -> month -> year -> idle.

There is not too much to say about the used components like OLED, RTC, Arduino and Encoder switch. All connections are documented in the INO-file and I added a Fritzing schematic for those who want to run the clock in a test environment without getting into soldering. The required libraries are the common type and can be downloaded using the Arduino IDE.

There are a few thoughts about the stepper driver and motor:

First, I used a too small NEMA-17 motor (24mm body height), which was not having the torque driving the chain without getting hot. The clock was working fine until I noticed that the motor bracket made from PLA was getting soft and started deforming. This happened after about 30 minutes run time. Printing a new bracket was not the issue, the problem was all parts on the board would need to be raised allowing the longer motor (plus 8mm -1/3 in) to fit. I went for another solution, using a forstner drill sinking the stepper into the board. I would prefer using a 38mm body size stepper to have a bit more torque at lower amperage.

The initial control board concept used an A4988 driver, the old fashioned, robotic workhorse. It was working fine, but the downside is that the stepper motor is mounted on a large piece of wood, amplifying each step to a sounding pock - pock - pock in three-second intervals. No way to get this changed other than mounting the motor on soft stands if I want to use the old stepper driver. The better solution was to swap the driver, using a TMC2130 (or similar TMC) series which is capable of "stealth mode stepping". This will soften the full steps to a soft accelerated/decelerated move. Now that I got rid of the heavy knocking, another issue showed. The chain was not kicked anymore in a rough way, rather moved softly, it kept pushing a little back after advancing once every three seconds. The stepper driver was holding the position perfectly but now a high pitch "whining" sound was audible, amplified by the board again. The solution for this was advancing the chain two steps, overshooting the desired position and returning one step again. Done, we have a clock ticking every 3 seconds, no added sound in between.

I mentioned above that I'd like the pendulum to swing as slow as the clock is ticking, but I guess this means a new layout of the board and is something for version two.

Downloads