Dual Spiral Marble Clock

by Gammawave in Circuits > Clocks

7079 Views, 77 Favorites, 0 Comments

Dual Spiral Marble Clock

Dual spiral marble clock
DSCF9289.JPG
S0019308_2.jpg
DSCF9297.JPG
spiraltimelaps.gif
spiral_start(lg).gif

This is another one of my clock projects this time inspired by marble clocks.

However, not wanting to replicate an existing design I created my own.

Where most marble clocks contain a large number of marbles, this design is minimalist in comparison and contains only two. Although ball bearings rather than marbles, one for hours and one for minutes.

This is my design for a dual spiral rolling ball clock controlled by a Raspberry Pi Pico using a combination of 3D printed and hand made parts in metal, acrylic and wood.

A small digital clock display is included for information, time and time setting but given that this is a marble clock the digital clock can be switched off so as not to be a distraction to the main elements.

A highlighted project in Hackaday.IO Bits, Wed Jan 3rd 2024

Supplies

Opaque Filament PLA (Black, White, Yellow and/or Glow in the Dark) or to suit personal taste.

Neodynium cylindrical magnets 10mm (dia) x 1mm thick, 0.51kg pull - Qty 2

Neodynium cylindrical magnets 3mm (dia) x 3mm length, 180g pull - Qty 4

Neodynium ball magnets 3mm (dia) - Qty 2

Brass rod 3mm (dia), sufficient to make 4 x 135mm lengths

Brass rod 2mm (dia), sufficient to make 4 x 110mm lengths

Brass tube, sufficient to make 4 x 12mm lengths.

Stainless Steel tube 6mm (dia), sufficient to make 4 x 125mm lengths

Thrust needle roller bearing 12 (Bore) x 26 (OD) x 2 (H) mm - two sets

Flanged ball bearing 13.6(OD) x 12(ID) x 4(H), 6(Bore) mm

Steel Ball Bearing 10mm (dia) - Qty 2

Steel Ball Bearing 6mm (dia) - Qty 2

M3 plastic washers - Qty 2

M3 x 10mm machine screws - Qty 8

M2 self tapping screws - Qty 8

M2 machine screws

Threaded M4 rod, sufficient to make 4 x 127.5mm and 4 x 80mm lengths

M4 nuts - Qty 4

M4 washers - Qty 12

Plastic standoffs M3 thread, 5mm body, 5mm stub - Qty 8

Standoffs M4 X 15mm - Qty 4

Standoffs M4 X 5mm - Qty 8

Capped nuts M4 - Qty 4

Brass sheet

Wood panels

Acrylic Sheet 5mm thick - clear

Acylic Sheet 5mm thick - black

Pico LiPo 4MB

28BYJ-48 5V Stepper Motor + Uln2003 Motor Driver Board - Qty 2

HAT-Compatible GPIO Expander for Raspberry Pi Pico

RV3028 RTC

Pico Display Pack 1.14 IPS LCD 240 x 135

Passive Buzzer

Hall effect (omnipolar) switch - Qty 2

Toggle Switch (on/off) SPST

Push button (push to make, release to break)

Jumper strips Socket to Socket short

Jumper strip Socket to Socket long

Jumper strip Socket to Pin short

Pin headers - Straight through hole single row

Pin headers - Straight through hole double row

Pin headers - Right angle through hole double row

Micro USB plug to USB-C socket

Clear plastic drinking bottle 70(dia) x 150(H) mm, 450ml capacity

Black paint

Clear laquer

Heat shrink tubing

Wood dye/stain

Natural furniture wax

Stripboard

Hookup Wire 30AWG 1/0.2mm


Auto LED Board

BS270 NFET

ZTX751 PNP

LDR (Light Dependent Resistor)

12K resistor SMD 1206 - Qty 5

1K resistor SMD 1206 - Qty 5

47R resistor SMD 1206 - Qty 2

5k potentiometer through hole 3310C-001-502L

10n capacitor MLCC 1206

UV LED 3mm through hole - Qty 2

Pin headers - Straight through hole single row


Hall sensor board

74HC08 (Quad 2 I/p AND) - Qty 2

74HC04 (Hex inverter)

10k resistor SMD 1206 - Qty 5

220R resistor SMD 1206 - Qty 4

LED 3mm RED - Qty 4

10n capacitor MLCC 1206 - Qty 3

Pin headers - Straight through hole single row


Multiplexer board

74HC08 (Quad 2 I/p AND) - Qty 2

10n capacitor MLCC 1206 - Qty 2

Pin headers - Straight through hole single row


May prove more cost effective to buy a range of values rather than individual values unless you already have them available. Some components may also have a MOL greater than the quantity specified in the component list.

No affiliation to any of the suppliers, feel free to obtain the supplies from your preferred supplier if applicatble.

Links valid at the time of publication.


Tools

3D Printer

Saw

Needle files

Sanding paper

Craft knife

Soldering Iron

Solder

Wire cutters

Screwdriver

Pencil

Marker

Awl

Drill

36mm hole cutter

Drill bit 10mm

Drill bit 8mm

Drill bit 7mm

Drill bit 6mm

Drill bit 5mm

Drill bit 4.5mm

Drill bit 4mm

Drill bit 3mm

Drill bit 2mm

Masking Tape

Rigid plastic adhesive

Flexible clear adhesive


Know your tools and follow the recommended operational procedures and be sure to wear the appropriate PPE.

Description

Two separate and identical elements are used which consist of a stepper motor driven spiral, magnetic vertical slider and steel ball bearing. The ball is attracted to the magnet on the slider and the pair are lifted by the spiral as it rotates with the time indicated by its position and markings on a vertical scale.

When the ball/slider combination reaches the top of its travel the ball is knocked off the slider by the spiral.

The slider falls to the bottom and the ball rolls down the spiral to be met at the bottom by the slider were the process repeats.

During the course of the build, elements were printed in a varieties of colours, in some cases this is due to the availability of materials and/or trials to assess the look. Feel free to colour co-ordinate as feels fit.

The reference start (home), position for the spiral and the slider are verified by hall sensors and magnets.

All this is controlled by a Raspberry Pi Pico with RTC and LCD used for both time setting and display.

The specific LCD display was chosen due to its small size and integrated push buttons negating the requirement for separate buttons.

The LCD displays the time in 24 hour mode whilst the Spirals display the time in 12 hour mode.

All this housed in an acrylic and wooden case.

Size: 215(H) x 218(L) x 118(D) mm

Weight: 2.12kg

Supply current at 5V (static typ. 42mA), (active typ. 260mA).

Some Calculations

In order to move the spirals to display the correct time a few calculations are required.

Each of the spirals has a circular height of 4.5 rotations at 360 degrees per rotation.

spiral_hgt = 4.5 # height of spiral in circular rotations

Motor steps per rotation = (4096/8) = 512 for an 8 step beat pattern.

This allows us to create a unified calculation irrespective of the beat pattern.

Steps per degree = 512/360 = 1.422222

Hours

Total degrees = (spiral_hgt*360) = 1620

deg_hr (12 mode) = (spiral_hgt*360)/12 = 135

step_hrs = int((hrs*deg_hr)*1.42222)

Therefore

1 Hr = 191 steps

6 Hr = 1151 steps

12Hr = 2303 steps

Minutes

Total degree = (spiral_hgt*360) = 1620

deg_min = (spiral_hgt*360)/60 = 27

step_min = int((mins*deg_min)*1.42222)

Therefore

1 Min = 38 steps

30 Min = 1151 steps

60 Min = 2303 steps


The specific motor used an 8 step beat pattern and the calculated steps are passed to a loop which repeats the beat pattern for each calculated step.

Software

Programmed on Thonny 3.3.13 utilising Pimoroni Pirate Brand MicroPython v1.20.6

Downloads

CAD Design

clk_spiral6c.jpg
clk_spiral_bat.jpg
clk_spiral_top3c.jpg
lcd_spacer.jpg
sense_pillar.jpg
spiral_feet.jpg
spiral_time_bars3.jpg
cable_clamp.jpg
slider_tool.jpg
clk_spiral_base_crescent.jpg
clk_slide6.jpg
clk_spiral_top_crescent2.jpg
clk_spiral_base_plate2.jpg
clk_spiral_top_plate3.jpg
clk_spiral_tube_base2.jpg
clk_spiral_tube_top2.jpg

The 3D printed elements were designed using BlocksCAD, sliced using Cura 4.5.0 and printed on a Labists ET4.

3D Printed elements required.

Vertical Helical Spiral - 100 (H) x 66 (dia) mm, 196g - 2 required.

The spirals are by far the largest items to be printed and therefore consume the greatest amount of printing time.

It's also recommended to print them individual to minimise time, strings, blobs or other abberrations which may develop travelling between multiple models.

The track in the spiral is designed to accommodate a 10mm steel ball bearing.

Top plate: 84(W) x 66(D) x 4(H) mm, 18g - 2 required.

Base plate: 84(W) x 66(D) x 4(H) mm, 17g - 2 required.

Top: 46(W) x 40(D) x 10(H) mm, 11g - 2 required.

Top crescent: 24.9(W) x 28(D) x 7(H) mm, 3g - 2 required.

Base crescent: 24.9(W) x 28(D) x 7(H) mm, 3g - 2 required.

Slider: 13(W) x 18(D) x 15(H) mm, 3g - 2 required.

The top and base are almost identical with the exception of the centre holes, the top fixes to a spindle bearing whilst the base allows the axle of the stepper motor to protude.

Between the top and the base run the rails on which the slider travels.

Tube Top: 68.3(W) x 74(D) x 6(H) mm, 9g - 2 required.

Tube base: 68.3(W) x 74(D) x 6(H) mm, 3g - 2 required.

Time bars: 8(W) x 115(D) x 5(H) mm, 5g - 2 required.

RTC cover: 32(W) x 22(D) x 7(H) mm, 3g - Three parts.

LCD spacer: 53(W) x 24.4(D) x 1.5(H) mm, 1g

Sensor retainer: 13(W) x 13(D) x 7(H) mm, <1g - 2 required.

Corner Feet (fits an M4 nut to allow leveling of the box): 16.8(W) x 17(D) x 5(H) mm, 1g - Qty 4

Worst case approximate weights if printed at 100% infill.

Recommend to print small parts and/or parts that will be drilled, subject to stress and contain screws be printed at 100% infill.

Circuit

spiral_clk_sch2a.jpg

The circuit shows the elements connected to the Raspberry Pi Pico.

RTC : GP0 - SDA, GP1 - SCL, POWER - 3V3

Set switch : GP11 (internal pull up), 0V

Reset switch : RU, 0V

Buzzer : GP21, 0V

Display : GP6 - LED_R, GP7 - LED_G, GP8 - LED_B, GP12 - SW_A, GP13 - SW_B, GP14 - SW_X, GP15 - SW_Y, RU - LCD_RESET, 0V, GP16 - BL_EN, GP17- LCD_MOSI, GP18 - LCD_SCLK, GP19 - LCD_CS, GP20 - LCD_DC, 3V3

Motor control : GP2 - (1), GP3 - (4), GP4 - (9), GP5 - (12), (connected to two 74HC08)

Motor select : GP9 - (2, 5, 10, 15) Hours, GP10 - (2, 5, 10, 15) Minutes (connected to two 74HC08)

ULN2003 motor drivers POWER - 5V, I1 - (3), I2 - (6), I3 - (8), I4 - (11) (connected to 74HC08)

28BYJ-48 stepper motors are connected to the motor drivers.

The Hall sensors powered by 3V3 are connected to the following: Hours - GP22 & GP26, Minutes - GP27 & GP28

The Box

DSCF9091_2.jpg
DSCF9092_2.jpg
DSCF9112_2.jpg
DSCF9109_2.jpg
DSCF9111_2.jpg

The box is a multipart sandwich of alternately stacked acrylic and wood.

The base is opaque black acrylic which is used to mount the control electronics.

On this is stacked alternate transparent acrylic and wood layers held together in the corners by threaded M4 rods.

The top of the box in black opaque acrylic supports the motors, ancillary electronics and the main clock elements.

In the front of the box is fitted the display and integrated buttons to enable time setting.

The back of the box allows access to a reset button, set enable switch, power socket and RTC.

From a suitable supply of wood cut 3 rectangles of size 218(L) x 118(W) x 20(H) mm and into the rectangles cut out the central area.

From a suitable sized 5mm thick acrylic sheet cut out 2 rectangles of size 218(L) x 118 (W) mm into the rectangles cut out the central area.

The central area to be removed is 200-180(L) x 100-80(W) mm along the edges except in the corners which are 20(L) x 20(W) mm, this creates a step in the corners.

Align and clamp the stack and equidistant from the corners drill 4 x 4mm holes through all the pieces.

From a length of M4 threaded rod cut 4 x 80mm pieces and round the ends with a file.


Be sure to verify the dimensions of the elements used and should they deviate from those specified adjust any openings accordingly.


Cut a recess for the display 54(L) x 24.4(W) x 2(H) mm in the centre of the first three layers of the stack (wood/acrylic/wood). Within the recess cut two 54(L) x 2(W) mm slots to accomodate the sockets.

Using a 10mm flat drill bit cut a a hole 5mm deep (a flat drill is used as it creates a small pilot hole), the pilot hole is used to guide a 7mm (dia), drill bit all the way through. This is to accomodate the reset button

Repeat the process using the 10mm flat drill bit at the other end of the box and into the resulting pilot hole drill a 5mm hole. This is to accomodate the set enable switch.

Drill an 8mm hole for the power socket and file the opening until it is shaped to fit the socket.

Using the 3D printed holder for the RTC as a template mark the position of the slot and holes.

The RTC is fitted externally at the back requiring a 12(L) x 2(W) mm slot and two M2 threaded inserts. The threaded inserts allow the cover for the RTC to be removed to replace the battery without having to dismantle the clock.

Sand the wood were appropriate to smooth the surface and prepare it for dying.

Apply a couple of coats of wood dye depending on the depth of colour required allowing it to dry between coats before applying a light sanding between coats.

Apply a natural furniture wax to finish.

Top Panel

top_template.png
DSCF9090.JPG

The top panel supports the motors, spiral elements and ancillary electronics.

To identify and mark the drill holes follow the accompanying details or tape the included template and/or the 3D printed base to the top panel.

Cut a piece of acrylic to the following dimensions 218(L) x 118(W) x 5(H) mm and with an awl mark and drill 4 x 4mm holes in the corners,10mm in from the edge.

Find and mark the centre (108 x 59 mm) of the panel with an awl.

Using the spiral base plate as a template, position it with the smaller of the two lobes to the right and 7mm from the centre on the horizontal.

Mark the centres of all the holes with a sharp awl.

One is made with a 2mm drill bit 16(L) x 0(H) from centre

Four of the holes are made with a 3mm drill bit (16(L) x +/-5(H) from centre slider rods, 52(L) x +/-18(H) from centre), base plate.

Two of the holes are made with a 8mm drill bit (69(L) x +/-18(H) from centre, motor fixing).

One of the holes is made with a 36mm hole cutter (70(L) from centre, motor).

Using the spiral base plate as a template, position it with the smaller of the two lobes to the right and 18mm from the right hand edge on the horizontal.

Mark the centres of all the holes with a sharp awl.

One is made with a 2mm drill bit 26(L) x 0(H) from centre

Four of the holes are made with a 3mm drill bit (26(L) x +/-5(H) from centre edge slider rods, 62(L) x +/-18(H) from centre), base plate.

Two of the holes are made with a 5mm drill bit (79(L) x +/-18(H) from centre edge, motor fixing).

One of the holes is made with a 36mm hole cutter (80(L) from centre edge, motor).

Main Cover

DSCF9294.JPG

The main cover is made of transparent acrylic and serves to protect the mechanism from tampering and the accumulation of dust.

It is held in place by 4 x M4 capped nuts on 4 pillars, one in each corner.

The pillars are removeable to enable access to the mechanism and the inside of the box as required.

Cut 5 x 5mm thick clear acrylic pieces to the following dimensions.

Top : 1 x 218(L) x 118(W) mm

Front/Back: 2 x 218(L) x 125(W) mm

Sides: 2 x 108(L) x 125(W) mm

Into the piece assigned to the top, drill 4 x 4.5mm holes in the corners that aligned with the 4 holes on the box.

Ensure the surfaces to be bonded are clean and square prior to assembly.

Mask the edges in close proximity to the areas to be bonded to prevent any overspill marring the surface.

Using an appropriate acrylic adhesive, stick the sides together and clamp with masking tape.

Once the require curing time has elapsed remove the masking tape.

Remove any tape residue with methylated spirit and a soft lint free cloth.

Cut off any adhesive beads with a scalpel.

Cover Pillars

DSCF9256.JPG
DSCF9257.JPG

The pillars support the main cover.

They are made from 127.5mm threaded M4 rod with two threaded hexagonal hollow spaces on one end (15mm & 5mm).

The threaded rod is inserted into the 15mm spacer half way and the 5mm spacer serves as a locking nut.

Cut a 125(L) x 6(dia) mm tube and press an M4 x 5mm spacer into one end. Either by tapping in with a mallet or press fit between a vice. Be sure to protect the open tube end with a wooden block or other soft material to prevent damage.

The rod is then inserted into the 6mm diameter stainless steel tube and screwed into the 5mm spacer such that 10mm of threaded rod protudes from the tube Repeat for a total of 4 tubes..

Spiral

DSCF3441.JPG

The spiral after printing will require some post processing, inparticular along the outer edge of the spiral channel to remove any uneven areas.

Use a fine file or emery board parallel to the contour of the spiral on the top and side to prevent creating an uneven profile.

For the inner edge, wrap and glue or tape in place fine sandpaper around a stout wire and bend it in order to access the inner edge of the spiral.

The slot in the centre of the base may require widening to fit the shaft of the motor this can be accomplished with needle files.

Check the fit at regular intervals during the process the result should be a close fit.

The off centre hole in the base is for the homing magnet.

Using a 3.2mm drill bit widen the hole to accept a 3mm ball magnet or alternatively a 3x3 mm cylinder magnet, the hole should be deep enough to just envelop the ball.

When the ball is glued in the hole it should sit flush to the surface.

The ball magnet in conjunction with a Hall sensor is used to identify the start reference position for the spiral.

Spiral Covers

DSCF9269.JPG
DSCF9270.JPG
DSCF9273.JPG
DSCF9443_2.jpg
DSCF3421_2.jpg
DSCF3433.JPG

The individual spiral covers serve to retain the ball bearing within the spiral.

Each cover is made from a clear plastic drinking bottle.

Wrap masking tape around the circumference towards the end of the bottle.

Wrap masking tape around the circumference towards the top of the bottle such that the distance between the extreme edges of the two wraps of tape measure 119 mm.

With a saw, knife or hot wire cut off the base and the top of the bottle.

Apply two parallel strips of tape along the long length of the resultant tube separate by a 13mm gap.

Cut the strip between the two lengths of tape and deburr the edges.

At the extremes (top and bottom), of the inner edges, cut a total of four 5 x 5 mm squares.

Remove the burr at the cut edges with sandpaper and/or a file.

That concludes the spiral covers subject to any minor adjustments when fitting.

Slider

DSCF9447.JPG
DSCF9281.JPG
DSCF9282.JPG
DSCF9283.JPG
DSCF9442_2.jpg
DSCF3363.JPG

The slider is used to indicate the time against a vertical scale and bright flourescent colours help to improve the visibility at a distance.

The slider moves vertically on three brass rods, two 3mm (dia), and one 2mm (dia) by the side of the spiral whilst holding the ball bearing in place on the spiral.

The main purpose of the 2mm (dia), rod working in conjunction wiith the spiral cover is to retain the ball in the spiral during its descent.

Cut two 12mm tubes and deburr the ends with a file and/or sandpaper, ensure the inner part of the tube is free of debris and smooth running by sliding over the rods.

Push the tubes into the slider by placing the tube end on a flat surface and pressing down on the slider to aid insertion.

Repeat for the other tube.

In the lower central opening in the slider for the 3mm magnet remove any obstructions with a 3mm drill bit.

Press the 3mm cylinder magnet into the lower centre hole in the slider.

Glue the 10mm cylinder magnet into the front of the slider. Stick a piece of ~0.5mm clear plastic sheet [typically PET (polyethylene terephthalate) or similar], from a blister pack to cover the front of the magnet.

The chosen glue used has some flexibility which creates a cushion between the clear plastic and the magnet.

Once the glue has set, trim around the edge and smooth with a file or sandpaper.

The clear plastic provides some protection to minimise the likelyhood of the magnet being damaged by the ball bearing as it is attracted to the slider head and if damage does occur it's contained within the slider head.

The magnet in the front of the slider attracts and holds the ball bearing, the magnet at the bottom of the siider is used to check the home position of the slider.

If the slider is at the bottom, its waiting for the ball to fall at the end of a cycle or waiting for it to be rotated into position at the start of a cycle.

Time Bars

DSCF9258.JPG
DSCF9259.JPG
DSCF3546.JPG
DSCF3547.JPG

The time bars are vertically mounted next to the slider rails, one for the hours and one for the minutes.

The hour time bar has major markings in one hour intervals from 0 to 12 hours with 15 minute sub intervals.

The minute time bar has major markings in five minute intervals from 0 to 60 minutes with 1 minute sub intervals.

Subject to the clarity of the numbers whose legibility may be affected by aberrations in the printing process post processing may be required. This may involve removal of excessive material with a scalpel or other sharp pointed implement. Or the addition of filler for any undesirable cavities.

Sanding of the surfaces may be required to remove aberrations.

The time bar is verticaly mounted on a 3mm(dia) x 5(H) + 3mm, threaded stub. through a hole in the base.

With a 3mm drill bit carefully drill into the existing hole in the time bar to widen it to fit the threaded stub.

The marking on the time bars are highlighted with black paint.

However, prior to applying the black paint a clear coating is applied, the clear coat seals any small gaps in the plastic that would cause the black paint to run out from the recessed markings into the surrounding area.

Clear out any excessive clear coat from the marking that may prevent the black paint from collecting in the recesses with a toothpick or fine tip brush.

Apply two or more clear coats, allow each coat to dry, sanding between coats and ensuring the recesses are not overfilled.

Paint over the markings with the black paint ensuring the recesses are filled.

Once dry, sand the surface with fine sandpaper to reveal the markings.

Repeat the filling process if any gaps are found in the markings.

In addtion smaller recesses around the numbers may take up the black paint reducing clarity these can be picked out with a picking tool of scalpel then filled in with a compatible colour.

Once the paint in the markings has dried give the whole of the front of the time bar a clear coating.

The time bar slides over the threaded stub and stands vertically parallel to the hollow tube and is held in place by the spiral top.

Display Retainer

DSCF9438.JPG
DSCF9250_2jpg.jpg
DSCF9253.JPG
DSCF9254.JPG
DSCF9255.JPG
DSCF9301.JPG

Fit the display into the cavity in the box.

A 3D printed spacer surrounds the edge of the display glass and the buttons to fill the gaps, creating a uniform contrast and a firm support for the transparent film. Orientate it such that the small hole aligns with the LED. Press this over the front of the display.

The display is held in place by a brass surround and additional protection is provided by a plastic shield.

The plastic shield provides some protection to the LCD glass front whilst still enabling the buttons to be activated.

Cut a brass sheet to the following dimensions 65(L) x 38(W) mm and in the centre cut an opening 38(L) x 18(W) mm

Drill a 3mm (dia), hole coincident with the RGB LED on the display.

In the corners of the brass surround drill 4 x 2(dia)mm holes to accomodate self tapping screws.

Cut a piece of transparent film (PET or similar), from a blister pack the same size as the brass surround and attach with masking tape. Drill through the corner holes and attach the retainer to the box, using it as a template mark the positions of the buttons.

Drill 4 x 3(dia)mm holes coincident with the buttons in the transparent film and widen with a round needle file.

Fit the display retainer with the corner screws and carefully peel off the masking tape.

Top Panel Assembly

DSCF9446.JPG
DSCF3422_2.jpg
DSCF3364.JPG
DSCF3371.JPG
DSCF3370.JPG
DSCF3386.JPG
DSCF3369.JPG
DSCF3368.JPG
DSCF9085.JPG
DSCF9084.JPG
DSCF9048.JPG
DSCF3381_2.jpg
DSCF3388.JPG
DSCF3390.JPG
DSCF3392.JPG
DSCF9179_2.jpg
DSCF3406_2.jpg
DSCF3407_2.jpg
DSCF3411.JPG
DSCF3395.JPG
DSCF9444.JPG

The top panel is were the moving parts that form the spiral clock are attached.

Prior to assembly of the time display elements open up the holes assigned to the 3mm (dia), rods with a 3mm drill bit.

If possible use a pillar drill to ensure that once assembled the rods are parallel and the plates and crescents are level.

Align the spiral base plate (small lobe to the right and sensor channels uppermost), with it's large hole sitting over the spindle of the motor. Attach the motor to the base plate with two low profile head M3 x 10mm machine screws and nuts.

The stepper motors fit into the large circular cut outs with the fixing lugs sitting into the smaller cut outs to the left and right. Fix the base plate and motor combination to the top panel with two low profile head M3 x 10mm machine screws and nuts.

The base plate screw fixing holes are recessed however, low profile head machine screws are required to prevent contacting the base of the spiral which could effect smooth movement, seating of the bearing and reliable homing.

Slider sensor

Take the Hall effect sensor and bend the pins away from the sensing face at 90 degrees and close to the body.

Solder thin long wires to the leads and slide on insulating sleeves over the joins, alternatively cover with several layers of none conducting laquer keeping the pins separated whilst drying, double check with a DMM once dry to verify they are isolated.

Feed the wire attached to the sensor down through the slot in the base plate and pull the wire through until the sensor sits in the recess. Apply a flexible adhesive into the recess to hold the sensor in place whilst enabling relatively easy removal should it prove necessary.

Spiral sensor

Using the retainer as a template, in the top panel sensing hole mark and drill two 2mm holes 3mm deep.

Widen the two fixing holes in the retainer with a 2mm drill bit.

On the Hall sensor bend the pins away from the sensing face at 90 degrees and close to the body.

Measure from the pedestal to the bottom of the retainer and at this point bend the wire at 90 degrees away from the sensor.

Solder thin long wires to the leads and slide on insulating sleeves over the joins, alternatively cover with several layers of none conducting laquer keeping the pins separated whilst drying, double check with a DMM once dry to verify they are isolated.

Apply some flexible adhesive to the retainer pedestal, attach the sensor and leave to dry.

Push into the sensor hole in the top panel and attach with two M2 x 3mm self tapping screws.

Base Crescent

Prepare the base crescent by fitting two M3 x 5mm threaded stubs into the side holes and partially screw in place.

Thread the sensor wires through the large hole and screw the base crescent to the base of the top panel coincident with the base plate small lobe using 2 x M2 x 6mm self tapping screws.

Fit a M2 threaded stub into the hole infront of the small lobe on the base plate.

Push the 3mm brass rods into the 3mm holes in the base plate and through the top panel and base crescent.

Tighten the M3 threaded stubs to hold the rods in place.

Drill two 2mm holes 3mm deep in the top panel using the base crescent as a template and attach with 2 x M2 x 3mm screws.

Fit the slider over the brass rods with the magnetic face toward the spiral.

Spiral

Taking the spiral, fit the thrust bear washer into the recess, place the thrust bearing over the washer and fit a washer over the brearing. Place two thin slithers of tape across the bearing and base of the spiral extending beyond the edge by ~5mm. This will hold it in place while the spiral is pressed down onto the spindle and removed once the spiral is firmly seated on the spindle.

Fit a thrust washer into the recess in the centre of the base plate.

Press the spiral centre hole over the spindle of the motor.

Into the cente hole in the top of the spiral place a 6mm (dia), plastic washer followed by a 6mm steel ball bearing.

A brass threaded standoff is pressed into a 20mm length of 6mm (dia), stainless steel tube which has been pushed in to an axle bearing, this is then pushed into the top centre hole.

Align the top plate with the centre hole and the brass rods with the 3mm holes and push the top plate down,

Fit a M3 x 8mm machine screw with a washer in the centre hole and tighten.

Insert the 3mm hollow brass tube.

Push the top crescent over the brass rods and hollow brass tube and secure in place with 2 x M2 x 6mm self tapping screws

Align the time bar with the brass tube and place over the stub.

Push the top cap over the brass rods.

Slider

Drilling vertical parallel holes will significantly reduce the requirement to tweak the rods once assembled.

Move the slider up and down the rods to check for tight spots, pressing the rods in with your fingers if they bow outwards. However, if the rods bow inwards then the slider tool will be required.

Asymmetry may also be resolved by twisting the cap which is attached to the rods.

In addition sanding with fine sandpaper and polishing with wire wool then wiping with light oil may be required subject to the degree of misalignment to ensure the slider runs smoothly.

Ensure no particles of sanding grit remain in the tubes or on the rods that could affect smooth running of the slider by clearing with a cotton bud.

Some or all of these steps may need to be repeated to ensure free travel of the slider.

It's essential that the slider runs smoothly to prevent sticking which may affect the time and/or detachment of the ball.

Hall Sensors

DSCF3555.jpg

There are two main sensors per spiral element, one for the spiral and one for the slider.

When the magnet is inline with the sensor the output is low.

When the magnet is out of line with the sensor the output is high.

Spiral Sensor

A magnet is fitted to the bottom of the spiral and the sensor fits up through a hole in the top panel coincident with the magnet.

The magnet on the spiral is positioned inline with the bottom of the spiral, the home position.

The home position is where the ball bearing comes to rest and in this position is picked up by the magnet on the slider.

Slider Sensor

A magnet is fitted to the bottom of the slider and the sensor sits beneath it in a recess in the base plate coincident with the magnet.

The home position for the slider is with it at the bottom of its travel.

Homing

To satisfy the conditions for the home condition both the spiral and the slider must be in their respective start positions.

Therefore, before the spiral elements can be used to indicate the time they need to start in a predefined condition.

If either of these conditions is not satisfiied an error is flagged.

As there are a total of four Hall sensors (2 per spiral), and to save on GPIO's used the sensors are connected to a separate sensor logic board.

Hall Sensor Logic Board

sensors.png
pos_sense2.png
DSCF3425.JPG

This and all other custom PCB's designed on Eagle 9.6.2 and fabricated by OSHPark

The HC logic series operates from 2V to 6V and therefore can be directly interfaced to the microcontroller operating at 3.3V without recourse to level shifting.

The outputs of the two Hall sensors identified as base and align are each connected to an inverter (74HC04) and each one connected to one of the inputs of a two input AND (74HC08) gate.

Pull up resistors (10k), are connected to the inputs of the inverters forcing the inputs high with no connections to the inputs. They also serve as loads for open drain Hall effect sensors.

There are two such circuits per spiral with the outputs connected to GPIO 22 & 27.

When both sensors detect suitable magnetic fields the outputs of the sensors are low, these are inverted and fed to the AND gate whose output is high. The home position.

If any other input logic combination is detected the output of the AND gate is low.

If a low is detected during the homing sequence an error is generated.

The inputs of the AND gates are also connected to individual AND gates, each have their inputs connected to form a non inverting buffer which can be used to drive an LED. This enables the indication to be used for diagnostic purposes with the jumper in place.

Additionally, the base is also connected to a separate inverter to enable it to be monitored independently of the AND output.

There are two such circuits per spiral with the outputs connected to GPIO 26 & 28.

These can also be used to detect if the slider has dropped when it should be raised.

Downloads

Mutiplexer

mux.png
one2two_driverV2.png
DSCF3541_2.jpg
DSCF3544_2.jpg

The HC logic series operates from 2V to 6V and therefore can be directly interfaced to the microcontroller operating at 3.3V without recourse to level shifting.

Due to a large number of the GPIO pins being used mainly by the SPI display there were 2 pins too few to control both motors directly.

Therefore, I added a muliplexer circuit between the Pico and the Motor drivers.

The initial design being on stripboard prior to the creation of a PCB.

This was a PCB that utilises 14 pin SOIC packages to simplify the build and minimize the size.

This allows four GPIO's to carry the controlling bit patterns for the motor and two GPIO's used to control the external logic to select the required motor.

The multiplexer consists of two Quad 2 i/p AND gate chips (74HC08), one chip per motor.

Each one of the 4 GPIO pins from the Pico are connect to the same input of one pair of gates per chip.

Each one of the 2 GPIO pins are connected to a chip and each one of 4 pins, one per gate.

When the appropriate select pin is high the outputs of the gates on the enabled chip will follow the inputs.

When the appropriate select pin is low the outputs of the gates on the disabled chip will be low regardless on the inputs.

Therefore, any motor can be selected or deselected as required.

The GPIO limitation could also be resolved by using an I2C interfaced display, negating the multiplexer.

However, the method employed is based on the components available at the time of the build.

Real Time Clock

DSCF3360_2.jpg
DSCF9439.JPG
DSCF9163_2.jpg
DSCF9265_3.jpg

The RTC is mounted external at the back of the box and is housed in a 3D printed case.

A slot is cut in the back of the box to enable the pin header of the RTC to engage with a compatible socket.

Two M2 self tapping screws are used to secure the case to the box

Two 3mm holes are drilled inline with the holes in the case lid.

Into the 3mm holes are pressed two threaded inserts for M2 machine screws.

Two M2 machine screws are used to secure the lid enabling it to be removed to change the battery.

Auto LED

AutoLED.png
autoLED2.png
DSCF3424.JPG
DSCF3440_2.jpg
DSCF3463_2.jpg
DSCF3562_2.jpg
DSCF3561_2.jpg

Accent lighting is added using UV LED's in conjunction with glow in the dark elements (sliders).

Each LED is mounted above the slider at the top of its travel pointing downward through the hole in the top crescent and the coincident hole in the top plate, this illuminates the slider at any point along the rails and the LDR is mounted at the top of one of the spiral tops.

The LED and the LDR are soldered at the end of long wires that pass through the hollow tubes with the other ends being connected to the appropriate points of the Auto LED circuit.

The LED's are controlled by a separate circuit that automatically switches them on when the ambient lighting deminishes.

The light sensor is an LDR (light dependant resistor), which is connected as the lower end of a series circuit with a series resistor and potentiometer at the upper end to form a potential divider with the tap point at the top of the LDR.

A potential divider is a circuit whose output voltage is fraction of the input. This being composed of 3 series resistors supplied with 5V.

The variation in the light level changes the resistance of the LDR, more light the lower resistance and less light the higher the resistance. For this LDR used the resistance ranges from ~39R to ~350kR subject to lighting conditions.

The light detection threshold that determines at what level of brightness the LED's illuminate is adjusted by the potentiometer in the potential divider.

We can calculate the voltage at the tap point with the following equation:

Vtap = Vin * Rldr/(Rldr+Rs+Rpot)

We can apply typical values for the LDR and the potentiometer at min/max ranges not including component tolerance which will add some variation. The tighter the tolerance the smaller the component variation from its nominal value.

Vtap min = 5V * 39R/(39R+1k2+0R) = 157mV (LDR and potentiometer at min values)

Vtap max = 5V * 350k/(350k+1k2+5k) = 4.913V (LDR and potentiometer at max values)

The tap point of the potentiometer is connected to the NFET (BS270) which has a typical gate threshold (Vgsth), of 2.1V (1V min, 2.5V max).

Setting the potentiometer at its midpoint of 2.5K, (allowing manual adjustment either side of this value). If the LDR resistance varies from 1K to 4K then this variation will result in a voltage range of 1V to 2.6V, which will switch on the NFET. The exact switch on point will be subject to the Vgsth of the particular NFET.

The drain of the NFET is connected to a 12k resistor which acts as a pull up.

When the NFET is switched off (Vgsth < 1V), the base of the PNP transistor is pulled high by the 12k + 1.2k resistors thus reverse biased and switched off and the LED's are also off.

When the NFET is switched on (Vgsth between 1V to 2.5V), the midpoint of the 12k & 1.2k resistors are pulled low switching on the PNP transistor and the LED's.

The series resistor for the LED's (Rled), is calculated from the voltage drop of the other components.

Vled = 3.1V, Vcesat = ~1V therefore Vresistor = 5V - (Vled + Vcesat) = 5 - 4.1 = 900mV.

The transistor is not in full saturation due to the 1k base resistor limiting the base current to < 200uA.

The maximum recommended LED current (Ifmax), is 20mA, therefore Rled = Vresistor/Ifmax = 900mV/20mA = 45R

45R is not a standard value and the next value that maintains the current under 20mA is 47R (E6 or E12 series).

Additional, details can be found in Auto LED Switch : 6 Steps - Instructables

Downloads

Populate the Box

DSCF9197.JPG
DSCF3358.JPG
DSCF3380_2.jpg
DSCF9440.JPG
pico_40_to_40.png
DSCF9186_2.jpg
pico_2_2x20.png
DSCF3357.JPG
DSCF3359.JPG
DSCF3362.JPG
DSCF3385.JPG
DSCF9441.JPG
DSCF3379_2.jpg

The bottom of the box contains most of the main elements.

In the centre sits the GPIO expander board (GPIOeb), this connects the Pico to all of the elements to be monitored or controlled.

The board sits on 4 x M2 plastic spacers.

A short USB extension is connected from the onboard USB socket of the GPIOeb to the back of the box and held in place with a 3D printed cable clamp. This clamp is specific to the extension cable used. If a different extension cable is used it may not be compatible requiring a different design.

The clamp is held in place with 2 x M3 nuts and bolts.

The two switches are simply screwed into the holes drilled in the back of the box these are fitted with pin (soldered to the switch) to socket jumpers.

Two stepper motor driver modules are placed to the left of the GPIOeb, each held in place with 4 x M3 plastic standoffs and screws.

Ensure that the leads connected between the lower part of the box and the underside of the top panel are long enough to enable work to be carried out with the top panel removed.

Due to limited GPIO lines a multiplexer PCB module sitting between the Pico and the motor drivers is used to switch the same 4 driver lines to the required motor by selection of one of the two appropriate select lines.

The multiplexer is fitted to the inside back of the box in line with the stepper motor drivers.

The LCD display sits at the front of the box.

All connections to the GPIOeb, from the various components are made by jumper wires.

The GEBeb if fitted with vertical pins which when populated with the jumpers reduces the usable interior height of the box.

To this end two header PCB's are used to change the orientation from vertical to horizontal pins, this increases the usable height in the box and prevents undue pressure being applied to vertical pins from the motor and other circuit elements mounted under the box lid.

To carry out work inside the box

Lift the top panel and position it with the front sitting on the two rear threaded rods and hold in place with nuts. Two threaded rods can then be inserted into the holes at the back of the top panel, adjusted for height with a nut on either side of the top panel for stability.

To carry out work on the underside of the top panel.

A box or container (LEGO works well), that will allow the spiral elements to be inverted and supported at the edges of the top panel.

Levelling

DSCF9261.JPG
DSCF9267.JPG

To make sure the bearings run smoothly adjust the feet and check that the box is level with a spirit level.

To prevent the surface upon which the clock will stand from being scratched, pads can be stuck onto the bottom of the feet.

Operation

DSCF9302.JPG
DSCF9299.JPG
DSCF9301.JPG

Power (5V), from a suitable supply is provided by a USB-C lead connect to a socket on the lower right hand side at the back.

At power on or after a reset.

The homing process will begin, displaying "Please Wait ... Homing"; this ensures that the spirals and the sliders are in the starting (home), positions with the ball bearing at the bottom.

First the hour spiral then the minute spiral.

If the slider is already at the bottom and the spiral is aligned, the spiral is homed.

If the slider is part way up the rails, the spiral will rotate until the slider is at the top at which point it will drop to the bottom while the ball bearing roles down the spiral to the bottom. When the spiral is aligned, the spiral is homed.

There is a 60 second timeout on the homing process for each spiral. If the timeout expires the display will show "Homing Failed"; in red text which will be reflected in the time display also in red.

With both spirals and the sliders aligned the display will show "Homing Passed", in green text which will be reflected in the time display also in green.

The current time from the RTC will be displayed.

The hour spiral will rotate with the ball attached to the slider and move to indicate the hour on the vertical hour scale.

The minute spiral will rotate with the ball attached to the slider and move to indicate the minute on the vertical minute scale.

The minute spiral will increment each minute until the hour passes and reset to home position.

The hours spiral will reset to the home position and increment to the current hour each hour.

The spirals operate on a 12 hour cycle and will reset to the home position at 1200 and 0000 hours.

A reset can be initiated by momentarily pressing the button on the lower left on the back and this will start the homing process.

To set the time.

Flip the switch located on the lower right at the back.

The display will turn blue.

Press the top left button next to the display showing a "H", for each hour to be set 0 to 23.

Press the top right button next to the display showing a "M", for each minute to be set 0 to 59.

Press the bottom right button next to the display showing a "U", to update the new time.

If you wish to blank the digital display.

Press the bottom left button next to the display showing a "B".

Once complete, flip the switch on the lower right back the display will turn green and show the updated time assuming the display has not been blanked, in which case nothing will be displayed.

The time will be updated on the spirals.

RTC battery replacement.

The RTC battery is accessible externally by removing 2 x Allen screws from the 3D printed case at the back of the box.

Troubleshooting

Problems are likely to occur with the mechanical elements during the course of the build but with patience and care these can be avoided or resolved.

The spiral fails to rotate or judders.

1: Do not apply excessive force when pressing the spiral onto the spindle such that it locks the thrust bearing, a little movement is desirable.

2: if the ball magnet protrudes too far from the bottom of the spiral it could rub on the base plate and create too much friction hindering movement.

3: The top plate is not level and is rubbing on the top of the spiral.

4: The top plate is too low on the spindle, either because the spindle is too short or the hole in the top plate is too deep.

5: The spindle is too low in the recess at the top of the spindle.

6: The clear cylinder is rubbing on the outer circumference of the spiral due to surface aberrations on the spiral.

7: The clear cylinder has non uniform thickness and is rubbing on the spiral.

The slider does not rise or fall freely on the rods.

1: The holes in the top panel, top/base plates or top/base crescents are not vertical or in line.

2: The rods are not vertical due to a bow, bend or warp in one or more of the rods.

3: The rods are not vertical due to torsion created by overtightening of the screws on the top plate and or top crescent.

4: Burr is left on the inner rim of the tubes in the slider.

5: Sanding grit is trapped between the rod and the tubes on the slider.

6: Polish the rails and ensure there are no aberrations on the surface and clean with light lubricant on a cotton bud to prevent distorting the rods with undue force.

The ball does not remain attached to the magnet.

1: The slider is sticking on the rods due to a bow, bend or warp in one or more of the rods.

2: Aberrations on the outer circumference of the spiral creating irregular movement.

3: The gap between the edge of the spiral and the magnet is not optimum.

4: The magnet is weaker than that required to maintain the ball bearing in contact with the magnet.

5: The silder is rubbing on the vertical edge of the clear cyclinder.

Homing fails

1: The slider is sticking in the raised position on the rods due to a bow, bend or warp in one or more of the rods.

2: The silder is sticking on the vertical edge of the clear cylinder.

Finally

Thanks for reading, that's all for now and hope you found this of interest.