Introduction: Analumi_Clock V3

Part of the process of making the Analumi-Clock was experimenting with different display mediums.

In this version the display medium was a 3D printed photo luminescent transluscent disc.

The intention was this would to be lit from the back using the same UV LED's

In order to retain compatibility with the previous version the display disc would be the same size as a CD and be a push fit on to the motor spindle. This meant that the disc and the axle could be printed as one complete unit.

Only one photo luminescent filament was evaluated and this was compared to the photo luminescent paper, regarding initial intensity, clarity and light decay.

This version used the same hardware and software from the previous Analumi-Clock with very minor changes.

The same motor support board with pre existing LED mounting holes is used, MOSFET pull downs are used to diferentiate between hours and minutes hands and the display disc complete with axle and is 3D printed as one complete unit with Luminous Filament. A shield is added to eliminate light eminating from behind the display disc and the same existing dial is used but turned around to put the LED support behind the display disc.

Supplies

Microbit V2 (preferred due to built in speaker, V1 will work but will require external sounder)

Servobit

5V stepper motor with ULN2003 driver board

Pinbetween

DS3231 RTC

Micro USB to 5V breakout

Jumper Jerky F/F - Qty 9

Jumper Jerky Junior F/F - Qty 20

Jumper Jerky Junior F/M - Qty 2

Pin Header right angle - 42 pins

Straight 2 row headers (7 x 2), 14 pins

Hall sensor

20pin DIL IC socket

Resistor 10k - Qty 2

Resistors 220R - Qty 8

Capacitor 100nF MLC - Qty 32

74HC541 Octal Buffer IC

BS270 NFET - Qty 3

Stripboard

LED UVA 3mm - Qty 8

Switch SPST

3 pin terminal block, 2.54mm pitch


22 SWG tinned copper wire

Screws M2

M2 screws 6mm - Qty 2

M2 Bolts 8mm - Qty 2

M2 Bolts 6mm - Qty 2

Bolts M3

M3 Bolts 8mm - Qty 6

M3 Bolts 6mm - Qty 18

M2 spacers 10mm - Qty 4

Hex standoffs M3

M3 Hex spacers 5mm - Qty 8

M3 Hex spacers 10mm - Qty 6

3d Printer

Photo Luminescent Filament

Ball magnet 3mm

PCB mounting block - Qty 4


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 used in this project, feel free to use your preferred suppliers and substitute the elements were appropriate to your own preference or subject to supply.

Links valid at the time of publication.


2mm drill bit

3mm drill bit

8mm drill bit

Drill

Saw

Clamps

Ruler

Combination Square

Allen Keys (2mm & 3mm)

Pliers

Soldering Iron

Solder

Sanding paper


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

Step 1: Principle

This project makes use of Photo Luminescence using film layered with Strontium Aluminate which has a green glow although different mixes can result in different colours and persistence.

Once charged, light from the film will continue to be emitted after the charging light has been remove. The charging light in this case comes from UVA LEDs.

The light emitted after charging is initially very bright but quickly decays to a lower intensity becoming further deminished over time, this persistance can last for several hours but may only be fully visible in total darkness. If the film is exposed multiple times in relatively quick succession then multiple ghost images will be present. Therefore, to minimise this effect a delay is applied between successive exposures.

Consequently, this project is best viewed in a low light environment.

Step 2: Mechanics

UV LED's are used to illuminate luminous film but require some means of moving the film under the LED's to create the hands.

This is achieved by using a single stepper motor which can rotate clockwise and anti-clockwise.

Fitted to the stepper motor is a CD and to this is fixed the luminous film.

A fixed arm at the 6 o'clock position and to this 8 LED's are attached to form one column.

As the motor rotates the luminous film moves under the arm pausing momentarily whilst the required number of LED's for the appropriate hand are switched on.

The LED arm, dial and motor support are 3D printed.

Step 3: Coding

The coding was carried out using Makecode for MicroBit.

The delay between time updates is controlled by the value of the passing parameter in the long_dly procedure.

This is set to update the display once every 60 seconds.

The main part of the process is in controlling the stepper motor to position the "hands" in the correct position to emulate a traditional clock. But there is only one positional element and not two separate hands.

Part of the process is defining a a known reference start point.

In this case the reference is the 6 o'clock position. At this fixed position is situated the Hall effect sensor.

The Hall effect sensor detects the presence of the magnet attached to the rotating Disc Flange which is attached to the stepper motor.

The time setting is defined in two parts for the elements hours and minutes.

The first part is to home the Display for a known start position.

By "homing", rotating the Display until the magnet is detected by the Hall effect switch at which point the motor is stopped.

The homing process is carried out in the homing procedure.

The output of the Hall effect switch is connected to P0 which is configured as a digital input.

A while loop checks if the digital pin=0 meaning the magnet is aligned with the sensor. Home = True

If the digital pin=1 the loop continues, however to prevent an endless loop a 60 second time out is assigned.

If the timeout is reached, Home = False.

Whilst in the while loop and checking the status of the sensor the motor is being turned.

In order to rotate the motor we apply a step pattern, the 8 step pattern is held in beat_list.


Calculate Steps for Hours and Minutes.

360/step angle * gear ratio = 360/5.625*64 = 4096step/rev = 0.088deg/step

Using an 8 beat pattern = 4096/8 = 512step/rev = 0.703deg/step

512/360 = 1.4222 steps/deg small enough step for our needs.

360/60 minutes = 6deg/min

360/12 hours = 30deg/hr

As the clock is in 12H format and the time from the RTC is in 24H format, subtract 12 if Hr >12

Steps/Hr = (((Hr+(Min/60))*30)*1.4222)-256 [Add minutes allowing hour hand to move smoothly between intervals]

Steps/Min = ((Min*6)*1.4222)-256

[256 is subtracted because the reference is at half a revolution. Hrs = 6 o'clock or Mins = 30 minutes]

The steps returned can be positive (anticlockwise rotation) or negative (clockwise rotation).

Anticlockwise = Steps*8 step pattern. See procedure anticlk.

Clockwise = Steps*8 step pattern in reverse order. See procedure clkwise.


The basic process is

Home the Display.

Rotate the Display to the required Hour position.

Flash the Display with 5 LED's for 2 second*.

Home the Display.

Rotate the Display to the required Minutes position.

Flash the Display with 8 LED's for 2 second*.

Home the Display.

Wait 60 seconds and repeat the process.


*The only code modification was the on duration in the Flash subroutine. This was increased from 1 to 2 seconds.

It being noted that the photo luminescent effect of the filament disc although initially bright decayed much quicker than the photo luminescent film. In addition the spots on the filament disc making up the hands were less well defined than those on the paper.

Overall the film had a slower light decay and better claity but could only be lit from the front.


Step 4: Schematic

The schematic shows how the different elements are connected.

The Microbit plugs into the Servobit board via a Pinbetween board this is due to the limited number of terminals to allow multiple connections to share the same terminal.

The RTC uses pins 19 & 20 and 3V and 0V. A backup battery is required to retain the time if power is removed.

The stepper motor used comes complete with a driver board (with visual driver bit indication), and is connected to pins 13, 14, 15, 16, 5V and 0V. This rotates the Display disc in front of the UVA LED's.

The Hall sensor using pins 0, 0V & 3V and is used to reference the home position for the Display disc

LED driver which is connected to 0V, 5V, Servo outputs 0 to 7 & Microbit pin 1 and the 8 UVA LED's to create the hands.

The MOSFETS disable 3 LED's which are used to differentiate the hour hand connected to pin 2, 0V and on the IC buffer to pins 6, 7 & 8.

The majority of connecttions are made using jumpers to interconnect the various boards.

However, some soldering is required to build the LED driver, Hand length control and mount the LED's and Hall sensor to the LED arm.

Step 5: Hall Sensor

The Hall effect sensor is omnipolar, meaning it will respond to either magnetic polarity.

The 100nF capacitor is for noise decoupling.

For ease of insertion or removal the sensor is screw fitted to a 3pin terminal block whilst the capacitor and flying leads are soldered to the pins.

When powered and in the abscence of a magnetic field the output is High when a magnetic field is detected the output goes Low.

Ensure there is sufficient cable length from the arm to the Servobit board.

Step 6: LED Driver

The UV LED's are not driven directly by the microcontroller.

We will make use of the Servobit board which has 16 servo outputs allowing us to control each LED with PWM.

But due to low drive capability a buffer IC rated up to 7.8mA per output is used to drive the LED's from a 5V supply.

The IC is a Non Inverting Octal Buffer with TriState outputs. In this case the IC is mounted on a piece of stripboard in a IC socket.

Right angle pin headers are used to make the connections for inputs, outputs and power.

With one supply decoupling capacitor and a pull up resistor to pin 19. When this pin is low the outputs follow the inputs and when high the outputs are high impedance and disabled. This pin is driven by the microcontroller on P8

This board is fitted under the Servobit board.

The centres for the fixing holes are marked by a single cross in the corners on the stripboard, cuts are included to isolate the corner when using metal standoffs.

The holes are made with a 3mm drill and attached to the base board on M3 x 5mm standoffs.


Step 7: Hand Length Circuit

The number of LED's illuminated on the arm indicate whether its the minute hand (8 LED's) or the hour hand (5 LED's).

However, the Servobit does not allow switching off of individual LED's in order to achieve this.

Therefore, a control circuit is fitted to three LED's to shorten the hand length for the hour hand.

The control circuit is an active pull down consisting of 3 N-channel MOSFET's, each connected to consecutive drivers to the LED buffer. All three MOSFET gates are switched by digital pin P2.

The MOSFET has a low VGS threshold typically 2.1V making it well suited to low voltage logic.

When P2 is low the 3 MOSFET's are disabled and the Servo outputs are passed to the LED Driver.

When P2 is high the 3 MOSFET's are enabled and pulls the 3 inputs to the LED Driver low regardless of the state of the Servo outputs. This switches the 3 LED's off.

Therefore, P2 is taken high when the hour hand is displayed and taken low when the minute hand is displayed.

The circuit is built in stripboard (6 strips x 11 holes), and the MOSFETS in a TO92 package are mounted in solder pins.

Three links from 22 SWG wire to connect them to the LED lines and 3 track cuts for circuit isolation.

Inputs and outputs are made via right angle headers.

One 10k resistor connected to all 3 MOSFET's gates acts as a pulldown, holding the gates low and the MOSFET's off unless >VGSTH min (1V), switching the MOSFET's on.

When the MOSFET's are off they present a high resistance from the LED lines to ground, effectively having no impact on the signals. However, when switched on they present a low resistance (RDSON), pulling the LED lines close to 0V.

With the three buffer inputs low the corresponding outputs are low and the LED's are switch off.

Hence we are able to change the length of the LED column which represents the hand to differentiate hours and minutes.

Step 8: 3D Design

The elements to be 3D printed were designed using BlocksCAD and also available in Tinkercad

The motor support holds the motor, Hall sensor and the LED's at the correct positions.

The LED Arm in this case act like a light guide with integral dial and hour markers.

The Display Disc flange houses the homing position ball magnet.

Elements are printed using PLA at 100% infill, layer height 0.15mm.

Tinkercad files:

Anashield2 | Tinkercad

Anadiscall | Tinkercad

Analumimtrn | Tinkercad

Analumiclkdl3 | Tinkercad

Step 9: Display Disc

The display disc is 3d printed using photo luminescent filament as a complete unit. All that is required is to fit the 3mm ball magnet in the pre printed hole and glue in place.

This is used in conjunction with the Hall sensor to determine the discs position and define its start reference.

Step 10: Motor Support

The 3D printed motor support has all the holes to mount the motor complete with LED holes and is fixed it to the LED arm using M2 screws.

This is attached to the LED arm on the Dial such that the LED holes are aligned.

In addition to mounting the stepper motor it's driver board is also fitted to this board below the motor, the driver board is secured with 4 x M3 bolts.

Step 11: Dial

The existing dial design was used but was turned back to front such that the LED holder was at the back. The dial was attached to the motor support by 2 x M2 10mm self tapping screws.

Step 12: Shield

Illuminated light sources in addition to the UV LEDS's behind the Display Disc can be seen which affects the contrast.

In order to reduce the interference of these unwanted light sources a shield is placed behind the Display Disc with a slot for the LED's.

The Sheild made from black opaque filament is attached to the motor support with 2 x M3 12mm bolts.

Step 13: Base Board

The base board is made from Acrylic with dimensions of 100mm(L) x 100mm(W) x 5mm.

The majority of elements being fixed to the boards with bolts, standoffs and stacked on other boards were applicable.

Details of dimensions and drill holes are attached.

Step 14: LED Wiring

The 8 UVA LED's are air wired to a 2 row header and fixed to the arm with M2 x 8mm screws, the series resistors are fitted to the LED Driver to simplify layout.

The LED's are configured as common cathode.

The straight 2 row header is attached to the arm by applying a soldering iron to the outermost two pins on each end.

Be sure to connect the LED's the correct way round.

Step 15: Assembly

All the elements are assembled together onto the base board creating a compact unit.

First screw the 5mm standoffs to the LED Driver board then fit it to the base board.

Route the long jumper cables from the front under the LED driver board and connect to the outputs.

Connect the short jumpers to the LED driver board inputs.

Fit the 10mm standoffs to the Servobit board and fix it to the base board above the LED Driver board.

Connect the LED driver board inputs to the Servobit outputs 0 to 4 and the supplies to V and G

Connect short jumpers to Servobit outputs 5, 6 & 7 and connect these to the input of the hand length control circuit and the outputs to the LED driver inputs. The 0V line of the hand control circuit is connect to G on the Servobit.

Insert the Pinbetween with the header pins facing the back of the clock into the Servobit.

Connect the enable pin of the hand control circuit to pin 2 on the Pinbetween.

Connect the enable pin of the LED driver to pin 8 on the Pinbetween.

Fit 2 x M3 x 5mm standoffs to the stepper motor bracket, centre the spindle through the large hole in the support and screw the motor assembly to the support.

Screw the servo driver board (LED indicators at the bottom), below the motor with 2 x M3 bolts in the lower holes; wrapping any excess wire around the motor.

At this time fit the Shield to the motor support with 2 x M3 bolts in the upper holes.

Connect 4 short jumbers to the stepper motor driver inputs

Attach 2 x M3 x 5mm standoffs to the bottom of the motor support and fit to the base board.

Connect the stepper motor driver inputs I1, i2, i3 & i4 to the PInbetween on pins 13, 14, 15 & 16.

Connect the stepper motor driver supply to the Servobit pin header supply pins next to the input screw ternimal block.

The long jumpers from the LED driver outputs are connected to the 2 row pin header connected to the LED arm. Fit a M3 x 5mm standoff to and attached the LED arm/ dial to the base board.

The hall effect switch is connected to the Pinbetween on pin 0, 3V & 0V.

The RTC is connected to the Pinbetween on pins 19 & 20 and 3V and 0V. and fitted to the board on M2 x 10mm standoffs. Be sure to fit a battery.

Power to the board is supplied via USB and there is a connector on the Servobit. However, a sacrificial USB connector to positioned at the back to prevent damage to the onboard USB as its cheaper to replace this connector rather than the Servobit. Its optional whether this is fitted.

Fit the 4 x PCB mounting blocks at the edge holes with M3 x 10mm bolts, orientated such that the greater surface area will make contact with the case.

Time setting enable is initiated with a toggle switch wired between 0V and pin 1 on the Pinbetween. This is fitted to a right angle bracket and attached to the base board by 2 x M2 x 10mm standoffs.

Finally, push the Display disc push onto the axle. Make sure there is sufficient clearance between the Disc flange and the sensor for the ball magnet to pass in front of the sensor without touching.

Fit the pre-programmed Microbit correctly in to the Pinbetween.

Before switch on, double check all the connection to make sure the wiring is correct and all connections are secure.

Insert the USB cable which is connected to a suitable 5V supply and switch on at the Servobit.

Once the Microbit is powered it will display CLK then the Hour homing symbol. if homing fails an X will be displayed.

If there is no issue it will attempt to set the time. This is assuming the time has been previously set.

See Operation for full details on time setting.

Step 16: Case

The case covers the main elements on the base board with entry for the USB lead, and a window to view the Microbit display to review status, however, the dial and display disc remain uncovered.

The case dimensions are 110mm(L) x 110mm(W) x 115mm(H) using 5mm thick Acrylic.

From an opaque Acrylic sheet cut 3 x 110mm(W) X 110mm(L) pieces and 1 x 100mm(W) x 110mm(L)

From a clear Acrylic sheet cut 1 x 49mm(W) X 42mm(L)

Into the 100mm(W) x 110mm(L) piece make a cutout to accomodate the 49mm(W) X 42mm(L) window, measure 50mm(L) x from the bottom and 31.5mm(W) from the right hand edge for a corner reference and draw around the window.

Using a 2mm drill bit make a hole in each of the four corners of the area to be cut close to the apex.

With a vibration cutter, small circular cutter or fret saw cut out the opening for the window, square off the edges and corners with a file.

Glue the clear window in the opening.

In the bottom right hand corner of the back panel 12mm(W) X 17mm(L) drill an 8mm hole for the USB lead.

Two of the 110mm x 110mm pieces will form the left and right sides and each has two holes along the bottom for fixing bolts. From the front measure in 12mm and up from the bottom 12mm and from the back measure in 37mm and up from the bottom 12mm at each of these two points drill 3mm holes.

Glue the 4 sides together to form a cube with open sides at the front and the bottom and the window side at the back.

Align the case to the PCB mounting blocks and use the holes in the case through which 3mm holes are made in the PCB mounting blocks.

Fix the base to the case at the PCB mounting blocks with M3 x 10mm bolts.

Step 17: Operation

Before setting the clock ensure that the RTC has a battery fitted to retain the time when/if power is removed.

Setting the clock.

The default time format is 24 hour mode.

Move the switch to the set time position a plus symbol will be shown on the display.

Press Button A for Hours. (0 to 24)

Press Button B for Minutes. (0 to 59)

Press Buttons A & B together to set the time, the entered time values will be displayed.

Move the switch from the set position.


At switch on or after setting.

If the clock has been previously set, it will auto home unless it is in the home position already.

Homing for hours will be indicated on the Microbit display with a circle containing a upright bar.

The hour will be displayed on the Microbit.

The dial homes then moves to the hour position and illuminates the LED's.

The minute will be displayed on the Microbit.

It then homes and then moves to the minute position and illuminates the LEDs.

Homing for minutes will be indicated on the Microbit display with a circle containing a right pointing bar.


If the Microbit displays a "X" this indicates a homing error which may be related to the dial not moving.

Step 18: Finally

Another different spin on an analogue clock with no physical hands.

Hope you found it interesting, that's all for now until the next time.