Mechanical 7-Segment Digital Clock
by shiura in Circuits > Clocks
2912 Views, 25 Favorites, 0 Comments
Mechanical 7-Segment Digital Clock


3D-printed Mechanical 7-segment digital clock
- Each display unit is versatile and can be used separately
- Fast and smooth motion
Supplies
You need
- 3D printer
- Four SG-90 type mini hobby servo
- micro:bit (micro controller)
- Steel wire (radius = 1.6mm or around)
- Ks0360 Keyestudio Sensor Shield V2
- 2mm tapping screws
Assemble Display Units





Assemble single unit of the mechanical 7-segment display
- Print parts with supplied posture. Only cam.stl needs support (otherwise not necessary). Print two copies of seg-bl, seg-tc and seg-tl STL files per one unit.
- Paint visible surfaces of segments with different color. I used white paint for the parts with black PLA material.
- Clean holes for axes with 2mm drill.
- Attach three horizontal segments (seg-tc and seg-c) with 32mm steel wire. To avoid the steel wire shafts slipped out, slightly bend the shaft (at the center, or one end)
- Attach the cam shaft with 104mm steel wire. Please make sure which is top or bottom (bottom surface is usually smoother than top).
- Attach four vertical segments (seg-tl, seg-bl) with 104mm shafts
- Check smooth rotation and proper digit display
- Attach SG-90 type servo motor and servo-gear to the frame
Arrange Four Units




- Print base.stl and two copies of retainer.stl with supplied posture. No supports neeeded.
- Attach four display units to the base with 8 2mm tapping screws.
- Attach Ks0360 sensor shield for micro:bit with 4 2mm tapping screws.
- Connect wires of servos to the pins of sensor shield.
- Insert micro:bit to the sensor shield.
- (optional) Print two back-cover.stl and set them. They are snap fit.
Adjustment

Match the pin connection map
- Edit the array named servoPin[] to match to the physical connection.
Servo position adjustment
- Roughly adjust the position of servo gear so that the display can show 0-9 in a full range of servo rotation.
- visit the site at https://makecode.microbit.org/ and upload check-offset2.hex (code to adjust the servo position).
- Fill the "offmap" table with zeros
- Flash the code to micro:bit
- Find the best offset values for the all combinations of 4 units and 10 digits.
- A/B button increases / decreases the offset value.
- Press A and B buttons simultaneously to increase the number (0-9) to be shown.
- Set the found offset values to the source code and check again. Copy the offmap
Clock code
- upload clock.hex to micro:bit site.
- Copy the offmap table from check-offset2.hex to clock.hex.
- Flash the code to micro:bit
- Operation
- A button increases hour value
- B button increases minute value