Class 1 · Build the clock¶
Today you build the clock. It's the Hollow Clock V by shiura (CC BY-NC-SA): a stepper motor in the base turns a hidden gear train, and magnets carry the hands around an empty ring. You solder its small board, test the motor, assemble the clock and flash its firmware. This is the one class where you don't write code: the clock runs the designer's firmware as is.
By the end of class
The clock is assembled, running the clock firmware, set to the right time, and still right after 30 minutes.
New parts today¶
| Part | What it's for |
|---|---|
| Printed clock parts | Body, ring, hands, gears |
| 28BYJ-48 stepper + ULN2003 driver board | Turns the hands |
| Waveshare RP2040-Zero | Runs the clock firmware |
| Three 8 × 3 mm magnets | Carry the hands |
| M2 flat-head tapping screws | Hold the clock together |
| Light silicone oil | Lubricates the gears |
Build it¶
Keep the instructable open the whole class. Its pictures and its assembly video are the reference for every mechanical step; this page tells you the order and what to check.
- Clean up the prints. Remove stringing and deburr gear teeth and holes with a hobby knife. Rough edges are the main reason a clock like this skips or stalls.
- Pull the ULN2003 chip out of its socket on the driver board. This gives you room to solder underneath. Put it aside somewhere safe; it goes back in after soldering. Note which way it faces (the notch) before you pull it.
- Trim the header pins on the driver board as the instructable shows, so the boards fit in the base.
-
Solder the RP2040-Zero straight to the driver board. Four signal wires and two power wires:
From (RP2040-Zero) To (ULN2003 board) GP2 IN1 GP3 IN2 GP4 IN3 GP5 IN4 5V + (5 V) GND − (GND) Check the order of IN1–IN4 against the instructable's photo before you solder. If the photo shows a different order, follow the photo.
-
Check for bridges. Multimeter on continuity. Test each pair of neighbouring pads on the RP2040-Zero: no beep. Test 5V to GND: no beep.
- Put the ULN2003 chip back, notch facing the same way as before, and plug in the motor.
Warning
Never solder with the USB cable plugged in. Unplug it before you touch the iron to the board.
Tool: flashing a .uf2 file
The RP2040-Zero doesn't need PlatformIO. It has a built-in loader that looks like a USB drive.
- Hold down the BOOT button (labelled BOOTSEL on some boards).
- Keeping it held, plug the USB cable into the laptop. Let go.
- A drive called something like
RPI-RP2appears on the laptop. - Drag the
.uf2file onto that drive. The drive disappears by itself and the board restarts, running the new program.
That's all flashing is here: copy one file. If the drive doesn't appear, try another USB cable. Some cables carry power only, no data.
Mission 1 · The motor turns
The designer's test code comes only as source (test-code.ino), not as a .uf2, and the class laptops can't run the Arduino IDE. Ask Dr. Alvear to flash it for you, then watch the motor shaft.
Done when
The motor shaft turns smoothly in one direction, with no buzzing and no back-and-forth twitching. (Twitching usually means two of the IN wires are swapped.)
Mission 2 · Assemble the clock
Follow the instructable's assembly video step by step. Three things to watch:
- Magnets. Three 8 × 3 mm magnets. Check which way each one faces before you glue it: test it against its partner first.
- Screws. M2 flat-head tapping screws. Turn them in gently; they cut their own thread into the plastic and strip it if you force them.
- Oil. A little light silicone oil on the gears. Not too much: excess oil collects dust and drags.
Turn the gear train by hand before you close the base. It should turn with no tight spots.
Done when
The clock is closed, and turning the gears by hand moves the hands all the way around with no tight spots.
Mission 3 · Flash the clock and set it
Flash the precompiled clock .uf2 the same way. To set the time, pull the display ring off, turn it to the right time, and push it back on. Compare it with your phone's clock now and again 30 minutes later.
Done when
After 30 minutes the clock still matches your phone to within a minute, and the minute hand moves once a minute, not two minutes at a time.
If it jumps two minutes at once
The firmware has a setting called SAFETY_MOTION for clocks whose gears slip. Changing it means editing the designer's source and rebuilding it, not the .uf2. Only go there if the clock really skips, and only with Dr. Alvear. First check the usual causes: burrs on the gears, too much or too little oil, a screw that's too tight.
If you finish early¶
- Start the lamp: install the PlatformIO ESP32 platform (create a test project with
board = esp32dev; the first build downloads it, and that takes a while). - Measure the outside diameter of the printed ring and write it in your build log.
- Read through the Class 2 page.
Sign-off with Dr. Alvear
- Solder joints checked: no bridges, chip back in the right way
- Clock assembled and running the clock firmware
- Clock still right after 30 minutes
- Build log updated (photo + two sentences), with shiura credited