Introduction: The Anything Clock

About: Passionate about Fusion and 3D Printing

Hi, my name is Ridhwan Aggarwal and I am currently a student studying in India. I made a clock, with a revolving magnet on the inside, letting any other magnet object be attached on the outside. It uses gear to modify the rpm of the motor inside, eventually rotating a ring gear and spinning the magnet. The magnet shows the seconds of the time, while the lights on the outside show the minute and hour.

Supplies

Hardware and Electronics


Neopixel (144 Led's per meter)(120 Led's to be used)

Bearing 12x16mm (Roller)(4)

Bearing 8x5mm (Ball)(1)

BO Motor (single-shaft)(1)

Seeed Studio SAMD21 (Micro-Controller)(1)

Wires (5)

3x6mm screws (2)

2x12mm screws (2)

6x8mm magnet (1)



3D Printed Parts


Clock base (2 Parts)

Clock top (2 Parts)

Spur ring gear (1)

Internal spur gear type 1 (1)

Internal spur gear type 2 (1)

Connector for Magnet and Spur Ring Gear (1)

Translucent minute inserts (48)

Translucent hour inserts (12)


Tools


Screwdriver (1)

Gel based super-glue (1 Bottle)

Soldering Iron (1)

Solder (1 Spool)

Step 1: 3D Designing

I designed the entire clock on fusion and have attached the download files below. The overall idea of the clock was to show time using LED's, as well as a central magnet which spins, allowing any other magnetic object to be attached to it, acting as the second hand of the clock. The LED's show the minute and hour, through a neopixel.

Step 2: Printing the Parts

After designing the parts, I started with printing them using my Bambu labs A1. I carefully sliced all the parts in the Bambu slicer, giving them all optimal strength and supports. Above are images of the printed parts.

Step 3: Assembly of Clock

Gear & Base Assembly

  1. Screw the spur gear and magnet connector together.
  2. Apply glue inside the connector cavity and insert the 6×8 mm magnet.
  3. Glue both base plates together to form the main clock body.
  4. Insert the roller bearings onto the four corner cylinders.
  5. Place the ball bearing on the smaller cylinder.
  6. Add the middle gear on top of the ball bearing.
  7. Install the small motor gear onto the motor shaft
  8. Attach the BO motor to its mount using 2×12 mm screws
  9. Place the ring gear inside the roller bearings and ensure it meshes with the middle gear.

Electronics & Wiring

  1. Stick the NeoPixel strip along the inner edge of the clock frame.
  2. Connect three wires to the NeoPixel: positive (bottom pad), ground (top pad), and data (middle pad).
  3. Solder the NeoPixel wires to the microcontroller: VCC, GND, and pin 6 for data.
  4. Connect two wires to the BO motor terminals and solder them.
  5. Connect one motor wire to VCC and the other to GND.

Programming

  1. Plug the microcontroller into your computer using a USB cable.
  2. Open Arduino IDE, select the SAMD21 board, paste the code, and click Upload. (Attached Below)
  3. Find the "set time here!!'' comment and change the time to your current time.

Finishing Touches

  1. Apply small dabs of glue and insert the translucent hour and minute markers into the holes.
  2. Attach the top cover using tape or non-permanent fasteners for easy maintenance.


Step 4: Code

#include <Adafruit_NeoPixel.h>

// ---------------- CONFIG ----------------
#define PIN_NEOPIXEL 6 // XIAO D10 pin
#define NUM_PIXELS 120 // Physical LEDs
#define LOGICAL_LEDS 60 // 60 logical positions (every 2nd LED)

Adafruit_NeoPixel strip(NUM_PIXELS, PIN_NEOPIXEL, NEO_GRB + NEO_KHZ800);

// Colors
uint32_t BACKGROUND_COLOR; // dim white
uint32_t HOUR_COLOR; // bright RED
uint32_t MINUTE_COLOR; // bright GREEN
uint32_t BOTH_COLOR; // overlap: hour + minute (YELLOW)

// Logical position 0 (12 o'clock) = physical LED index 60
const int LOGICAL_OFFSET = 60;

// set time here!!
int currentHour = 9;
int currentMinute = 59;

unsigned long lastMinuteUpdate = 0;
const unsigned long MILLIS_PER_MINUTE = 60000UL;

// Map logical position (0–59) to physical LED index (every 2nd LED)
int logicalToPhysical(int pos) {
pos = pos % LOGICAL_LEDS;
int idx = (LOGICAL_OFFSET + pos * 2) % NUM_PIXELS;
return idx;
}

void showTime(int hour, int minute) {
// 1) Fill ALL LEDs with dim white background
for (int i = 0; i < NUM_PIXELS; i++) {
strip.setPixelColor(i, BACKGROUND_COLOR);
}

// 2) Determine positions
int minutePos = minute % 60;

// DISCRETE hour hand: jumps once per hour
int hourPos = (hour % 12) * 5; // 12→0, 1→5, 2→10, ..., 11→55
hourPos %= 60;

int minutePix = logicalToPhysical(minutePos);
int hourPix = logicalToPhysical(hourPos);

// 3) Draw hands, handling overlap
if (minutePix == hourPix) {
strip.setPixelColor(minutePix, BOTH_COLOR); // yellow when same
} else {
strip.setPixelColor(hourPix, HOUR_COLOR); // red hour
strip.setPixelColor(minutePix, MINUTE_COLOR); // green minute
}

strip.show();
}

void setup() {
strip.begin();
strip.setBrightness(255); // full brightness; we make background dim via color

// Colors (R,G,B)
BACKGROUND_COLOR = strip.Color(70, 70, 70); // dim white
HOUR_COLOR = strip.Color(255, 0, 0); // bright red
MINUTE_COLOR = strip.Color(0, 255, 0); // bright green
BOTH_COLOR = strip.Color(255, 255, 0); // yellow when overlapping

strip.clear();
strip.show();

lastMinuteUpdate = millis();
}

void loop() {
unsigned long now = millis();

// Advance time every 60 seconds
if (now - lastMinuteUpdate >= MILLIS_PER_MINUTE) {
lastMinuteUpdate += MILLIS_PER_MINUTE;

currentMinute++;
if (currentMinute >= 60) {
currentMinute = 0;
currentHour++;
if (currentHour >= 24) {
currentHour = 0;
}
}
}

showTime(currentHour, currentMinute);

delay(10);

}


Step 5: Functionality

The two videos above show the functionality of the LED lights, one displaying the Hour and the other displaying the minutes, in this case, it would be the red one showing hours and green showing minutes.

(The LED's are a bit less visible in the video but I can assure you they are clear in real life)

The video attached above also shows moving objects such as a resin printed design, a benchy and even a pawn chess piece. These all are containing of magnetic components therefore acting as the second hand of the clock. Similarly anything with a decently strong magnet or with one attached to it can repeat the same motion.

Step 6: Conclusion

I hope that the following steps and instructions help you to make your very own clock. I really wish that your enjoyed reading and making my Instructable and I wish you a great day.