The Corona Clock

by Sebastian Coddington in Circuits > Clocks

8868 Views, 38 Favorites, 0 Comments

The Corona Clock

The Corona clock demo video
Corona Clock main image.jpg
WhatsApp Image 2020-03-24 at 11.58.45 (3).jpeg
WhatsApp Image 2020-03-24 at 11.58.45.jpeg
2020 THE CORONA CLOCK v8.png

As the Coronavirus spreads across the planet and more and more countries are confining their citizens to their own homes to slow down the virus many of us are left going through days without anything to do. Luckily Instructables is here to lend a hand and with a few ideas in mind the Instructables Clock contest seemed like the perfect pass time :)

If you too are struggling with boredom in the household due to Coronavirus confinement have no fear the Corona Clock is here for you, with a guaranteed 2 days of build time plus endless hours of watching time fly by with your new Corona Clock!

So, the idea behind the clock was to have steel balls on the face plate of the clock instead of hands guided with magnets so that the balls moved as if by magic around the Clock. The outer ball represents the minutes and the inner ball represents the hours.

I designed all the CAD files using Autodesk Fusion 360.

The whole thing is programmed using an Arduino.

I hope you enjoy this instructable and maybe you too will find it to be the perfect Print/Build challenge in your free time.

Without any further ado lets get Building!!!

Supplies

ELECTRONICS:

  • 2x Steel balls between 10 and 15 mm diameter
  • 2x 15mm diameter x 3 mm width Neodymium magnets (Link Here) I would buy more than 2 just in case you break them as I did :(

PLASTICS:

The parts can be printed in PLA or PETG or ABS.

You'll need 2 colour filaments to get the best results.

Please note a 500g spool of each is more than enough to print 1 Clock

3D PRINTER:

Minimum build platform required: L130mm x W130mm x H75mm

Any 3d printer will do. I personally printed the parts on the Creality Ender 3 which is a low cost 3D printer under 200$ The prints turned out perfectly.

Tools:

1x Small cross head screwdriver is all you need :)

3D Printing the Parts

All the Parts are available to download on Pinshape (Link Here)

I Meticulously designed all of the clocks parts to be 3D printed without any support materials ,rafts or brims required while printing.

All the parts were test printed on the Creality Ender 3

  • Print time: Approx 20 Hours
  • Material: PETG
  • Layer Height: 0.3mm
  • Infill: 15%
  • Nozzle diameter: 0.4mm

The parts list for the clock is as follows:

White:

  • 1x Base
  • 1x Lid
  • 1x Servo Holder
  • 1x Cog
  • 1x Servo Rack
  • 1x Inner circle
  • 1x Outer circle
  • 1x Arm Extension
  • 4x Pins
  • 2x Button Holder
  • 2x Feet clips

Red:

  • 2x Feet
  • 1x Plate

Post processing:

Unless you are very lucky or have a very expensive printer some of the parts will need sanding where the parts rotate and slide between each other

Installing Arduino

arduino ide page.jpg

The Corona Clock uses Arduino C++ programming in order to function. In order to upload programs to the clock we will be using Arduino IDE

  • Install Arduino IDE on to your computer

Arduino IDE (Link Here)

In order to make sure the code works in Arduino IDE follow the following steps

  • Download the desired Arduino Code below (Corona Clock.ino)
  • Open it in Arduino IDE
  • Select Tools:
  • Select Board:
  • Select Arduino Nano
  • Select Tools:
  • Select Processor:
  • Select ATmega328p (old bootloader)
  • Click the Verify button (Tick button) in the left upper corner of Arduino IDE

If all goes well you should get a message at the bottom that says Done compiling. And thats it you have now completed Step 2 !!!

The Code

Heres a look at the code for those of you interested you will most probably have to tweak the servo arm mouvements to calibrate them perfectly as each servos precision varies.

#include

Servo myservoPUSHER; Servo myservoSLIDER;

const int buttonMinutes = 4; int buttonStateMinutes = 0;

int FiveMinuteCounter = 0; int OneHourCounter = 0;

unsigned long time_now = 0;

void setup() { Serial.begin(9600);

pinMode(buttonMinutes, INPUT); myservoPUSHER.attach(2); myservoSLIDER.attach(3); myservoPUSHER.write(90); myservoSLIDER.write(90); delay(5000); myservoPUSHER.detach(); myservoSLIDER.detach(); }

void loop() { FiveMinuteCounter = ((millis()/1000) % (300)); // FiveMinuteCounter = 0 every 5 minutes

buttonStateMinutes = digitalRead(buttonMinutes);

Serial.print(" FiveMinuteCounter: "); Serial.print(FiveMinuteCounter); Serial.print(" OneHourCounter: "); Serial.print(OneHourCounter); Serial.print(" buttonStateMinutes: "); Serial.println(buttonStateMinutes);

// if button pressed move minute ball 5 minutes forward

if (buttonStateMinutes == 1) { myservoPUSHER.attach(2); myservoSLIDER.attach(3); myservoPUSHER.write(30); wait5seconds(); myservoSLIDER.write(130); wait5seconds(); myservoPUSHER.write(140); wait5seconds(); myservoPUSHER.write(90); wait5seconds(); myservoSLIDER.write(90); wait5seconds(); myservoPUSHER.detach(); myservoSLIDER.detach(); OneHourCounter++; }

// if 5 minutes has passed move minute ball 5 minutes forward

if (FiveMinuteCounter == 0) { myservoPUSHER.attach(2); myservoSLIDER.attach(3); myservoPUSHER.write(30); wait5seconds(); myservoSLIDER.write(130); wait5seconds(); myservoPUSHER.write(140); wait5seconds(); myservoPUSHER.write(90); wait5seconds(); myservoSLIDER.write(90); wait5seconds(); myservoPUSHER.detach(); myservoSLIDER.detach(); OneHourCounter++; }

// if minute ball has moved 12 times move hour ball 1 hour forward if (OneHourCounter >= 12) { myservoPUSHER.attach(2); myservoSLIDER.attach(3);

myservoPUSHER.write(65); wait5seconds(); myservoSLIDER.write(50); wait5seconds(); myservoPUSHER.write(130); wait5seconds(); myservoSLIDER.write(90); wait5seconds(); myservoPUSHER.write(90); wait5seconds(); myservoPUSHER.detach(); myservoSLIDER.detach(); OneHourCounter = 0; } }

void wait5seconds() { time_now = millis(); while(millis() < time_now + 500) { //wait approx. 500 ms } }

Assembling the Corona Clock

Corona clock assembley video

All the following Steps are depicted in the Assembley Video above

  1. Upload the code to the Arduino Nano
  2. Secure the Arduino Nano to the Nano Shield
  3. Screw one of the Servos on to the Servo rack as shown in video
  4. Place the Servo and Servo rack in the Servo holder and pass the cable through the slot as shown on the video
  5. Plug that Servo in to pin D2 of the Nano shield
  6. Plug the other Servo in to pin D3 of the Nano shield
  7. Screw the other Servo to the Base as shown in the video
  8. Plug the USB cable in to the mains power or laptop
  9. Plug the other end of the USB cable in to the Arduino Nano for 2 seconds until the Servos reach their 90 degree home position
  10. Unplug the USB Cable from the mains power or laptop and Nano shield
  11. Place a Servo arm in to the Servo extension
  12. Screw that Servo arm on to the Servo plugged in to pin D2 at a 90 degree angle to the servo body exactly as shown on the video
  13. Connect the Button to the GND, V+ and S pin to the D4 pin of the Nano Shield with 3 dupont cables
  14. Slot the 4 Pins into the Base of the Clock
  15. Place the Arduino Nano shield in to the Base
  16. Slot the button in to the base
  17. Secure the button in place with the button holder
  18. Slot the Feet in to their respective slots in the base
  19. Secure the feet in place with the feet clips
  20. Plug the USB cable in to the Arduino through the remaining hole in the base
  21. Slot the Servo Holder in to the Base over the 4 pins Make sure to install it the right way around (Video)
  22. Slot the Circle guide pin on to the Servo holder
  23. Place the remaining Servo arm in to the cog
  24. Screw that Servo arm on to the other Servo at a 90 degree angle to the servo body and with the servo rack positioned at the center of travel (video)
  25. Position the inner Circle in place magnet hole facing downwards (6) (cable exit hole)
  26. Position the outer Circle in place magnet hole facing upwards (12)
  27. Insert the magnets with caution (Neodymium magnets are strong and can cause dammage to themselves and others if put in contact with one another)
  28. Place the plate in to the lid the plate lining up with the lid holes
  29. Place the lid over the top with number 6 facing the cable exit hole
  30. Place the steel balls on the top where they magnetically stick in place

And thats it the clock should be fully assembled and ready to function!

Setting the Corona Clock

WhatsApp Image 2020-03-24 at 11.58.42 (2).jpeg

In order to set the clock the outer minute circle must start in the upper 12 position.

fortunatly the inner hour circle can start in what ever position you want

You can then proceed to switching the Clock on by plugging it in and using the button to adjust the minutes

and manually rotating the Steel ball for adjusting the hours.

Thoughts and Design Iterations

WhatsApp Image 2020-03-24 at 11.58.42.jpeg

This was an awesome project and challenged my mechancal engineering abilities to the full !

I had had this idea in mind for a while now and to of actually brought this project to life is amazing. It was a struggle, especially figuring out the timing mechanism and a way of using cheap 180 degree SG90 servos to power it.

It has taken me just under a week full on to accomplish this project I went through at least 10 design iterations to accomplish this project some of which are in the photo above. It was all worth it, time well spent!