TIME CUBE - Arduino Kinetic Clock

by RidgedWorks in Circuits > Arduino

467 Views, 1 Favorites, 0 Comments

TIME CUBE - Arduino Kinetic Clock

Bild7.jpg
8.jpg
Bild 3.jpg
Bild 18.jpg
Bild.jpg

Hi there, the Time Cube is one of my semester projects and i would like to share it with you. The cube displays the current time in minutes and hours and essentially consists of 3 mechanical flaps and 3 LEDs. By opening one of its three flaps (which causes the cube to tilt), the minutes are displayed until it tips over when it reaches a full hour. The current hour is constantly displayed by a flashing LED on top.

Each of its flaps open in a different direction, which causes the cube to tip over "in a circle" every 4 hours.

If you've got any questions or improvements to my design let me know!

Have fun building!

@ridgedworks


SEE VIDEO BELOW

Downloads

Supplies

11.jpg

I used the Arduino Uno R4 Wifi because it already has an integrated RTC module and therefore I had more pins available for the stepper motors, LEDs and limit switches (for the flaps).

An FDM printer is sufficient for most of the parts.

The flap mechanism consists of a worm shaft + guide nut, which I printed with my SLA Printer (Elegoo Mars 4 Ultra). The tollerances came out well and it worked for me.


What else you need:

- 3x 12V stepper motors (28BYJ-48)

- 3x ULN2003 driver modules (5-12V)

- 3x LEDs (preferably low current)

- 3x LED mounting rings 

- 1x DC/DC voltage converter (IN 15-36V - OUT 12V)

- 2x 9V battery

- 3x 90 kohm resistors (pull-down)

- 3x 500 ohm resistors (depends on LED)

- 3x micro pushbuttons 6x6x5 mm (preferably low pressure force)

- 34 magnets (N52 6x2mm)

- 4 mm tube (frame to flap)

- 3 mm rod (flap to struts)

- 6x M4 bolt (stepper motors) with nut

- 6x M3 screw (flap shaft)

- 3x M3 screw (adjusting the limit switches) 

- 3x M3 bolt long (struts to guide nut) with nut

- Washers

- Arduino jumper wires

- Socket connector 

- Plastic glue

Frame

3mm Rod.png
Motor mount.png
Frame.png

The frame consists of five parts:

- Frame (could be split for printing)

- Motor mounts (3x the same part)

- Guide Rods (3 mm rod)

- 12 magnets


Attaching the guide rods

After the frame is printed, the 3mm rods are cut to size (about 1,5 cm) and press-fitted into the holes opposite the motor mounts. These are for guiding the worm shaft. They should only stick out on the inside.


Next, the motor mounts are glued to the frame. This can be a bit confusing, make sure they are properly aligned and appear straight in relation to the frame.


Preparing the limit switch

The limit switches are fitted above the holes for the guide rods. I would solder them (cables and resistors) as described in the circuit diagram before gluing them on the frame. Before final gluing, they can be attached on a trial basis using double-sided adhesive tape.


Finally, the magnets are glued into the holes. It is best to always glue in the same direction.

Mechanical Flaps

Mechanical Flap2.png
Mechanical Flap.png
Mechnismus complete.png
4.jpg
3.jpg
1.jpg

SLA parts preparation: 

It is important that the guide nut runs with as little friction as possible on the worm shaft. That's why I screwed the two parts together a few times before the SLA parts are cured, in order to remove any unevenness in the thread. I then cleaned them again with isopropanol and cured them. I lubricated the thread for the final assembly.


Connecting the mechanics

First, the flap is connected to the struts using the 3 mm rod. The struts are then connected to the guide nut using the long M3 bolt and nut. Maybe use some washers here. These joints should be easy to move in order to minimize friction. Next, i screwed the worm shaft into the guide nut. 

The flap can then be installed into the frame and fixed in place with the 4 mm tube. To do this, I screwed the M3 screws into the tube from both sides (it may also be possible to glue it).

Check whether the flap can be opened without any grinding.

Now the worm shaft is pushed onto the guide rods.


Setting the limit switch

The limit switch must be actuated as soon as the flap is completely closed. This is done using the M3 screw that is screwed into the guide nut. The end position of the flap is set by screwing it in or out. 

To start with, the flap can be set a little "looser". The setting can still be adjusted afterwards.

The hard stop of the flap can also prevent the flap from rattling later - if the flap is slightly under tension when closed.


Connecting the stepper motor

Now the motor must be connected to the worm shaft. To do this, the shaft can be turned (do not turn the guide nut towards the limit switch) until the motor shaft is aligned with the worm shaft groove. Then screw the motor onto the mount (M4 bolt and nut).

If the shaft has a greater axial play, washers can be added to the guide rods if necessary.

This flap arrangement has to be build three times.

Magnetic Flaps & LED's

Magnetic Flaps.png
65.jpg
8.jpg

Magnetic Flaps (Arduino, Battery and Motor Driver)

These flaps do not contain any mechanical components, they only serve to hold the electronics. I would recommend wiring each of the flaps as far as possible according to the circuit diagram. If all three flaps are pre-assembled, the final assembly is easier. The cable tie is your best friend.

The wires for the Battery Flap should be left a little longer, because this will be the Flap for turning the Cube on an off.

Four magnets must be glued into each flap, note the previous installation direction on the frame.


LEDs

One LED will be mounted in the middle of each magnetic flap. The LEDs can be fixated in the holes with led mounting rings.

Once the LEDs have been installed, the transparent LED inserts can be clipped in from the outside.

Downloads

Arduino Flap

UNO R4 WIFI.png
UNO R4 WIFI 1.png

On this Flap the Arduino is mounted (+ LED). I also used some Socket connectors on the Arduino pins to which i soldered the cables to improve strength.

In addition, a 3V button cell can be installed to store the RTC settings.

Downloads

Battery Flap

battery flap.png
10.jpg
98.jpg

On this flap the Batteries, the voltage converter and the on/off switch are mounted (+ LED). The two battery holders are screwed on in opposite directions and the other components are glued on. Try to get this as compact as possible so there will be no problems in the assebly.

Downloads

Motor Driver Flap

ULN2003.png

On this Flap the ULN 2003 driver modules are mounted (+ LED). Unfortunately, the spacing of the holes was always a bit different, so there may be small deviations here. Normally one screw should be enought.

Circuit Diagram

Schaltplan.jpg

The power supply for the Arduino and the stepper motors is provided by two 9V batteries and a voltage converter

The cables for the power supply are soldered on due to space constraints. But a self-made plug will work to!


The stepper motors are connected to the digital pins.

The LEDs and the limit switches are connected to the analog pins.


Pull-down resistors are attached to the limit switches to ensure an even pin input.

The series resistors of the LEDs depend on the selected LEDs.

Code

Before executing the code completely, I would recommend checking the function of the individual components

"Are all pins connected and declared correctly? Are the limit switches working? Are all flaps working correctly? Are the mechanics free-moving?"

Make sure that always the LED opposite to the currently moving flap is flashing. But this can easily be fixed in the code.



Setup

First, the RTC is initialized and all pins and variables are declared. After that, a flap test is carried out, which checks whether all flaps are closed (limit switch actuated or not). If not, all flaps close.

Loop

In the loop, the current minute is first queried and the flap (the motor) is raised to the corresponding number of steps. Now the current minutes are regularly checked and the number of hours is displayed by flashing the LED on top. If a minute is reached that can be divided by 5, the cube moves on a certain number of steps. This goes on until minute 59 is reached and a certain number of steps is exceeded. The cube tips over and the process repeats.


After downloading the code file, you have to create a folder of the same name and move the file into it.

Downloads