Home       Guestbook

Section   Top   Design     Features    ESP32      Digit Modules       Control Panel        RTC Setting    Summertime/Wintertime    Display Setting      Stepper Motor      RTC Modification     Schematic      Vero Boards       Dust Cover      Digit Modules      Digit Order    Drawers     Misc 3D Parts    Digit Printing    Wooden Parts    3D Part Download    Code

 

 

CYCLOTRON CLOCK

3D Printed ESP32 WROOM 32D Perpetual Timepiece

Using a wooden base, 3D printed parts and an ESP32 WROOM 32D module to display the time on four 28BYJ-48 Stepper Motor driven "perpetual rotating" digits.

Time is stored on a RTC and can be synchronized to a Master Clock if required.

The clock movement and electronics are housed in a 3D printed framed Perspex case.

 

 

 

 

Video

 

 

 

The clock can be wall mounted or just sit on a desk.

 

 

 

 

 

The dust cover can be removed as required.

 

 

The clock is supported on a pair of heavy duty wall brackets.

 

 

 

 

 

Design

The digits in this clock are based on a perpetual calendar dating back to the early 1900s.

 

The day was changed by rotating the digit holder.

 

I liked the simplicity of the design, the clunking and clicking for the falling digits and the movement of the digit holder.

 I decided to make a clock using four of these digits driven by individual stepper motors.

To me it's the sound and movement of a clock that makes them more than just a timepiece.

Having never seen inside one I played around with how I thought it would work until I came up with a working version.

Note my digits are the reverse of the original with the display rotating bottom end towards you and the digits displaying at the bottom.

If you look from the back of my clock the digits would look the same as the original.

 

 

 

Case Design

I have always liked the harsh industrial look of old Barometer cases and have based my case around this look.

 

 

 

 

I have used a combination of wood for the base and a 3D printed black frame with sheet Perspex panes for the case.

The 3D printed frame has 30 individual parts with only the 4 centers spars glued together in the middle.

 

 

I have also added a wood plinth to the base and top of the digit modules tie two together color wise.

 

 

 

 

Features

Four large  2"/50mm digits make up the display in hours and minutes

Can be Synchronized to a Master Clock if required

Summertime and Wintertime buttons

Designed to be wall or desk mounted

Battery backed up Real Time Clock

RTC and display adjusted and set from the control panel

Serial out enabled from control panel (press & hold "Set Disp" then pess "RST"

Program enable switch on back of clock

Dual Wood and 3D printed construction

 

The base and cover support are constructed from wood and have cutouts for the controls in the front and the Vero Boards in the rear

3D Printed Control panel

 

 

Control panel rear view showing 3D printed spacer for the micro switch Vero Board

Control Panel set into the base

 

 

 

The 3D printed frame is screwed to a wooden base frame to make a rigid structure for the Perspex sheets that complete the dust cover 

Clock with dust cover removed

 

 

 

Front View Wall Mounted Cover On

 

Front View Wall Mounted Cover Off

 

 

 

Underside of clock showing 3D printed Pullout trays, feet, Cable covers and Vero Board mount.

Feet are provided for desk mounting.

Note the space left for the wall mounting brackets if required.

 

 

 

 

 

 

Dust Cover Removal

The dust cover is a tight fit over the clock movement and has to be lifted slightly then twisted so the base of the dust cover clears the Minute Units and Hours Tens stepper motor bodies.

 

 

Top view with dust cover in place

      

 

 

 

Top view the dust cover has been lifted slightly to clear the four Dust Cover Location Brackets then rotated to position the protruding stepper motor bodies into the corners.

 

 

 

 

The Dust cover can now be lifted and removed.

           

 

 

 

 

 

 

Clock Weight and Dimensions

This is a large clock and weighing in at 10.5lbs (4.76kg) it is no lightweight.

Dimensions are Width 480mm, Depth 200mm and Height 235mm (includes feet) and 

 

 

 

 

 

 

 

ESP32 WROOM 32D module 

This clock uses an Espressif ESP32D module and uses all the available pins but not the WIFI.

 

 

 

 

 

 

3D Printed Digit Module

There are four 3D printed digit modules Hours Tens, Hours Ones, Minute Tens & Minute Ones. All are the same apart from the Tens and Units have the stepper motor on opposite sides and have different internal dividers.

 

Hours Tens comprises 5 double sided digits, two of which are blank.

Hours Units comprises 5 double sided digits and no blanks.

Minutes Tens comprises 5 double sided digits, two of which are blank. There are 2 sets of identical digits 0,1 & 2.

Minutes Units comprises 5 double sided digits and no blanks.

 

 

 

 

Digit Module Bearing & Stepper Motor connection minutes and hours units.

Note Minutes & hours tens will be the reverse of this.

The bearing is pushed into the hole on the digit module case with the bearing spigot pushed through the bearing center.

The bearing spigot also goes through the stepper bearing mount and then into the matching bearing of the tens digit.

 

Digit operation

 

 

The Min and Hrs tens digits have some blank digits inserted

 

 

Loading Digits

Digits are printed as 2 halves and 2 layers using the "Pause at Layer" script on CURA.

The rear digit it rotated so it is upside down and then glued to the back of the other digit.

Completed 7 and 2 digit used in the hours units and minutes units module

 

 

The 2 halves are "Super Glued" together with the rear digit printed upside down according to the table below.

  Hours & Units Ones  
Tray Front Digit Rear  Digit Order
Lower 1 6 3rd
Lower 9 4 2nd
Lower 7 2 1st
Upper 3 8 2nd
Upper 5 0 1st
       
       
   Units Tens  
Tray Front Digit Rear  Digit Order
Lower Blank Blank 3rd
Lower 1 4 2nd
Lower 5 2 1st
Upper 3 0 2nd
Upper Blank Blank 1st
       
       
  Hours  Tens  
Tray Front Digit Rear  Digit Order
Lower Blank Blank 3rd
Lower 1 1 2nd
Lower 2 2 1st
Upper 0 0 2nd
Upper Blank Blank 1st

 

The completed digits are loaded into the digit case by removing the front cover.

 

The case has a lower and upper tray with a divider slotted in the middle.

 

Using the Hour and Ones digit modules as an example an example.

The table for these digit modules shows the following.

Starting on the lower tray insert digit 7/2 with 7 facing out and should be upright (the digit 2 behind will be facing back and upside down.

Next load digit 9/4 and then 1/6 to the same tray.

Then load the upper tray digits starting with 5/0.

As per the lower tray 5 will face and is upright out and 0 will be upside down facing back.

Finish with digit 3/8 and then replace the cover ensuring the square digit cutout is downwards.

  Hours & Units Ones  
Tray Front Digit Rear  Digit Order
Lower 1 6 3rd
Lower 9 4 2nd
Lower 7 2 1st
Upper 3 8 2nd
Upper 5 0 1st

Completed hour/Mins units module ready for the cover to go back on.

 

Note the Hours Tens/Mins Tens digit module contain blanks.

These blanks are double sided and square so can be inserted anyway round.

 

 

 

 

 

 

Controls

Power

Turns all power to the clock off.

Note when using the serial port to power/program the clock the Power button should be off.

 

Select

This is an analogue control and selects the digit to apply the selected "SET VALUE" to.

During normal clock running this must be set pointing down to "SELECT".

This control can also select Summer and Winter time change.

 

Set Value

An analogue control to select a value 0-9 to send to the RTC digit or Rotary display digit according to the "Select" control.

 

Set RTC

Sets the time of the RTC.

Sends the value from the combination set by "SELECT" & "SET VALUE" controls to the RTC.

 

 

Set Disp

Rotates the digit selected by the "SELECT" control the number of times set by the "SET VALUE" control.

Used to set the correct time on the rotary digits.

 

RST

Resets the ESP32 module

 

Sync

Manually synchronizes the RTC clock seconds to 30.

 

Special Functions

There are a few special functions built into the control panel.

Enable the serial port

With the "SELECT" control turned to "SELECT" hold down the "SET DISP" and press the "RST" button.

Serial mode is indicated by the colon on the main display flashing green.

To turn off press "RST" the colon illumination will stop flashing Green.

With the serial port enabled the RTC time can be checked and the analogue values of the "SELECT" & "SET VALUE" controls can be seen.

 

Reset seconds to 0

With the "SELECT" control turned to "SELECT" press the "Set RTC" button to reset the RTC seconds to 0.

 

 

 

 

 

Program Switch

As all the pins are used on the clock a couple of the pins unless disconnected with prevent the ESP32 module from being programmed.

On the rear of the clock on the main Vero Board slide the switch to the program position while uploading code.

Note if you forget to slide the switch back to the normal position the clock will run but the "Set RTC" and "Set Disp" buttons will not function correctly.

The program enable switch is located on the rear of the clock on the edge of the main Vero Board.

Viewed from the rear slide the switch to the right for normal clock running and to the left for programming.

 

program enable switch location

 

Rear of Clock showing board locations and wiring with dust cover off.

 

Rear of Clock showing board locations and wiring with dust cover.

 

 

 

 

 

 

Setting the RTC

The RTC should be set before making any changes to the display.

The RTC is set digit by digit e.g. Hrs10, Hrs1, Min10 and Min1 and must be carried out in that order as changing Min1 updates the RTC for all the values.

The digit to be changed is set by the "SELECT" control and the digit value by the "SET VALUE" control.

The digit is saved when the "SetRTC" button is pressed until the colon flashing Off.

 

Example Setting the RTC to 23:48

When setting the RTC it is best to set the time in the minute preceding that time. If you are setting the RTC to 23:48 set it when it is 23:47 and a few seconds to allow you time to set all the values.

 Turn "SELECT" to the Hrs10 position.

As soon as the "SELECT" control moves off the SELECT position to any other setting the displays stop changing to the RTC (the RTC keeps running).

The colon will also illuminate green to indicate the "SELECT" control is off normal and the clock has stopped updating.

   Once on the Hrs10 position move the "SET VALUE" control to 2 and then press the "Set RTC" button until the colon flashes Off. 

 

  Move the "SELECT" control to Hrs1 position. 

  Move the "SET VALUE" control to 3 and then press the "Set RTC" button until the colon flashes Off. 

 

  Move the "SELECT" control to Min10 position. 

  Move the "SET VALUE" control to 4 and then press the "Set RTC" button until the colon flashes Off. 

 

  Move the "SELECT" control to Min1 position. 

  Move the "SET VALUE" control to 8 and then wait for the time to reach 23:48 exactly and then press the "Set RTC" button until the colon flashes Off

The RTC is programmed on pressing the "Set RTC" on the Min1 position only.

 

  Return the "SELECT" control to the SELECT position (the colon illumination will go off)  and the clock returns to normal mode. 

 

Now follow the instructions below "setting the display" to set the display to your RTC time.

 

 

 

 

Summer/Winter Correction

Summertime and Wintertime correction when selected sets the RTC and rotates the hours digits to correct the time.

 

Summertime

To set the clock to summertime

Turn "SELECT" to the "Sum" position then press the "Set RTC" button until the hours min digit starts to change.

Return the "SELECT" control to the SELECT position.

The hour digits and RTC are now an hour ahead.

 

Wintertime

To set the clock to wintertime

Turn "SELECT" to the "Win" position then press the "Set RTC" button until the hour min digit starts to change.

Return the "SELECT" control to the SELECT position.

The hour digits and RTC are now an hour back .

Note you may have to correct the minutes digits after the the hours digits have completed their correction.

 

 

 

 

Setting the RTC with Serial Monitoring on your PC

Set baud rate to 9600 -this clock uses a ESP32 Dev Module

The RTC can be set without the serial monitor connected however, it can be easier to see the actual changes being made.

The clock works by default with serial turned off as the colon illumination LED is connected to the TXD pin and would flash on and off during normal clock operation.

Note do not connect your PC to the ESP32 module serial port until the power has been turned off at the power button.

After turning off the power plug your PC USB into the ESP32 module USB socket.

Load your serial monitor program (I use the Arduino IDE).

Select your clocks serial port and enable serial on the clock.

To enable serial -On boot press & hold the "Set Disp" button.

Serial mode is indicated by the colon flashing to the serial port.

 

You can now see the RTC time, "SELECT" & "SET VALUE" settings and the time changes on your serial monitor as you set the RTC using the method above.

 

Once the RTC is set unplug the USB cables before pressing the power button on the clock.

The RTC has a backup battery and remembers the time even when the clock is powered off.

 

Now follow the instructions below "setting the display" to set the display to your RTC time.

 

 

 

 

 

 

Setting the Display

Note when setting the display it is best to start from left to right i.e. Hrs10, Hrs1, Min10 and Min1. Make sure the RTC is correct before making any changes to the display.

The displays are set by rotating a selected digit a number of times until it shows the current value.

The number of rotations is set by the "SET VALUE" control.

Due to the blanks in the 2nd digit of the hours and minutes modules the number of rotations is not straight forward.

To select the correct number of rotations for "SET VALUE" use the tables below.

 

Select the table for the digit you are changing.

The digit displayed is the START NUMBER in the table.

Go to the start number on the left column and read across to the number you want to set in the END NUMBER row.

e.g. if you want to change the minutes 2nd digit from 1 to 2

 Go to table 2 below and  select 1 in the START NUMBER column.

Follow along the row until you get to the number 2 under end number and read off the rotations in this case 3.

To set this digit turn "SELECT" to the MIN10 position.

As soon as the "SELECT" control moves off the SELECT position to any other setting the displays stop changing to the RTC (the RTC keeps running).

The colon will also illuminate green to indicate the "SELECT" control is off normal and the clock has stopped updating.

Once on the Min10 position move the "SET VALUE" control to position 3 and then press the "Set Disp" button until the MIn10 digit starts moving.

The Min10 digit will rotate 3 times then stop.

If the minutes units have not updated in this time then just return the "SELECT" control to SELECT the colon will stop illumination and the clock will now update as the RTC changes.

If the minutes have changed while updating the display you may need to change the minutes 1st digit as well using table 1.

 

 

Table 1  order 0123456789

    HOURS & MINUTES 1ST DIGIT    Hrs1/Min1  
    END NUMBER  
    0 1 2 3 4 5 6 7 8 9  
START NUMBER 0 0 1 2 3 4 5 6 7 8 9 ROTATIONS
1 9 0 1 2 3 4 5 6 7 8
2 8 9 0 1 2 3 4 5 6 7
3 7 8 9 0 1 2 3 4 5 6
4 6 7 8 9 0 1 2 3 4 5
5 5 6 7 8 9 0 1 2 3 4
6 4 5 6 7 8 9 0 1 2 3
7 3 4 5 6 7 8 9 0 1 2
8 2 3 4 5 6 7 8 9 0 1
9 1 2 3 4 5 6 7 8 9 0

 

 

 

Table 2  order 01BB234BB5

MINUTES 2ND DIGIT   Min10
    END NUMBER  
    0 1 2 3 4 5  
START NUMBER 0 0 1 4 5 6 9 ROTATIONS
1 9 0 3 4 5 8
2 6 7 0 1 2 5
3 5 6 9 0 1 4
4 4 5 8 9 0 3
5 1 2 5 6 7 0

 

 

Table 3 order 01BB201BB2

HOURS 2ND DIGIT  Hrs10
    END NUMBER  
    0 1 2  
START NUMBER 0 0 1 4 ROTA TIONS
1 4 0 3
2 1 2 0

 

 

Tables are stored under the clock on pull out drawers.

 

The right hand drawer holds the Hrs1 & Min1 tables.

 

 

 

The left hand drawer holds the Hrs10 & Min10 digit tables.

 

 

Table drawer locations under the clock.

 

 

 

 

 

Stepper Motor & Driver

The 28-BYJ48 Stepper Motors are one of the most commonly used stepper motors.

The motor has a 4 coil unipolar arrangement and each coil is rated for +5V.

 

28-BYJ48 Stepper Motor Pinout Configuration

No:

Pin Name

Wire Color

Description

1

Coil 1

Orange

This Motor has a total of four coils. One end of all the coils are connect to +5V (red) wire and the other end of each coil is pulled out as wire colors Orange, Pink, Yellow and Blue respectively

2

Coil 2

Pink

3

Coil 3

Yellow

4

Coil 4

Blue

5

+5V

Red

Supply +5V to this wire, this voltage will appear across the coil that is grounded.

 

28BYJ-48 Stepper Motor Technical Specifications

 

Dimensions

 

 

 

 

ULN2003 Stepper Motor Driver

The ULN2003 stepper motor driver PCB provides a direct drive interface between your microcontroller
and stepper motor. The PCB provides 4 inputs for connection to your microcontroller, power supply
connection for the stepper motor voltage, and ON/OFF jumper, a direct connect stepper motor header
and 4 LEDs to indicate stepping state.

 

 

ULN2003 Module Schematic

 

 

Connecting the 28BYJ48 to the ULN2003

 

 

 

 

 

 

Modification of DS3231 AT24C32 I2C Precision Real Time Clock Module to allow use of non rechargeable batteries

My clock uses a DS3231 AT24C32 I2C Precision Real Time Clock Module.

The module comes supplied with a Lithium-Ion rechargeable battery see diagram below.

 

 

 

I use a non rechargeable battery so have removed resistor R5

from the module as below.

 

Location of R5 on the DS3231 module.

 

 

Charging Resistor R5 removed.

 

 

 

 

 

 

 

 

Clock Schematic

Click on schematic for full screen version

 

 

 

 

 

 

Vero Board Layouts

There are 3 Vero Boards.

Left Main board, Center Power board  and Right Control Panel board

Click on images to see full size versions

 

 

 

Main board with ESP Module in place

 

 

 

Rear views

PCBBoards

 

 

 

 

 

Mounting Boards and Modules

All boards and modules except the RTC are mounted in the recess of the wooden base on a series of 3D printed mounts. The RTC is mounted on the wooden base itself on a 3D printed support

The image below shows the order of fitting Fitting Instructions





The VeroMount is screwed to the wooden base with the
VeroBoardSpacerMain and Power on top.




The main and power Vero Boards are fixed through both of these with M2 nuts and bolts.
M2 holes will need to be drilled through all 3 with the Vero Boards used as a guide.





The VeroBoardSpacerConnector screws to the baseboard above
the VeroBoards and between the DriverHolderMount.





DriverHolderMount sits on the VeroBoardSpacerConnector
and is fixed in place to the wooden base by 2x M2 screws.





The DriverHolder has the four ULN2003 boards screwed to it
and is then fixed to the DriverHolderMount with 4 M2 screws.














3D printed RTC Mounting bracket fixed via the 3 holes in the RTC PCB through the mount into the wooden base.

The RTC is fixed battery holder downwards.


 

Details of the mounts can be seen below.

The ESP module USB connector has been extender out using a right angle connector for easy access for programming.

 

 

 

 

Dust Cover Construction

The dust cover has a wooden base, 3D printed frame and Perspex sheet panes.

The wooden base is made from 4 off 15mm x 13mm strips cut from a block of hardwood I had in my workshop.

The wood strips are glued together on all four corners and also held by screws from the 3D printed frame.

The 3D printed frame has 30 individual parts with only the 4 centers spars glued together in the middle.

The 3D printed frame is fixed to the wooden base for support using M2 screws.

 

3D Printed Frame Parts

Top Perspex sub frame.

The sub frame made up of 8 GlassBeadGroove parts surrounds the top Perspex sheet and is fixed at the 2 sides to the Glass Frame Bars and  1 end Glass Bar.

The Perspex sheet is slid into the fixed GlassBeadGroove frame with unfixed end just clipped in place over the end of the Perspex sheet.

The top Perspex sub frame is shown below in black.

 

The sub frame is made up of 4 different parts 2 off each is required.

Each part has a mortise and tenon end so they can slot together.

 

GlassBeadGroveTopLefRightEnds

This part are fitted to both ends of the Perspex sheet.

 

 

 

 

GlassBeadGroveTop

Fitted in the center of the side of the Perspex sheet these parts connect to and in the middle of the GlassBeadGroveTopEnd and GlassBeadGroveTopEnd

 

GlassBeadGroveTopEnd

Fitted to the GlassBeadGroveTop tennon and GlassBeadGroveTopLefRightEnds mortice end

 

 

GlassBeadGroveTopEndB

Fitted to the GlassBeadGroveTop tennon and GlassBeadGroveTopLefRightEnds mortice end

 

 

 

 

End Frame Panels

There are 2 end frame panels each made up of 5 3D printed parts.

The Perspex end panels sit against the GlassFrameEnds165x155 and are held in place by 3D printed beading on all four sides.

The lower beeding is screwed trough the GlassFrameEnds165x155 and into the wooden dust cover base.

Note space must be left all round the Perspex sheet for the GlassFrame bars mortises to slot in.

 

 

GlassFrameEnds165x155 - 2 off

Looking at the inside of the Frame End showing the recessed corners for the glass frame bars

 

 

GlassBeadLower x 2 off

Fits to the lower part of the lower part of the frame end against the Perspex sheet and is screwed in place into the wooden dust cover base through the frame end

 

 

 

GlassBeadTop x2 off

Friction fit between the side glass beads. Note 1 bead left or right has the top Perspex sheet screwed to it.

 

 

GlassBeadSide x 4 off

Friction fit between the top and bottom glass beads

 

 

 

Side Frame Panels

Four pairs of Glass Frame bars make up the left and right side panel frames.

Each bar has 2 different parts GlassFrameBarTypeA and GlassFrameBarTypeB

 

 

GlassFrameBarTypeA

GlassFrameBarTypeB

 

 

 

 

The Glass bar Type A to B  joining method is shown below.

The A & B parts are glued at the joining ends and clipped together.

The 2 remaining ends are clipped into the GlassFrameEnds165x155. This is repeated for the 3 other bars.

The joint will be strengthened when the GlassBeadGroove parts are screwed along it's length.

 

 

 

Top view of A & B bars showing hidden holes in the Perspex Glass Slot. Either of these holes can be used depending on the position of the wooden dust cover base below.

 

 

 

 

 

 

Dust Cover Corner Bracket

Screwed to the wooden base these four bracket provide a location point for the dust cover.

DustcoverBracket 4 off

 

 

Dust cover brackets (3 shown) in place on the wooden base.

The brackets have oversized holes and are designed to be screwed down with a washer on top to give some adjustment.

 

Digit Modules

Digit modules are arranged in opposite pairs

 

 

Two of these pairs make up the display.

There are 3 types of module 0 to 9, 0 to 5 and 0 to 2

0 to 9 is used on the minutes and hours units.

0 to 5 is used on the minutes tens.

0 to 2 is used on the hours tens.

Complete display

        

 

 

Display with stepper motor locations shown

 

Each module pair contains the following

Note to make sure this clock runs reliably all faces that contact digits must be completely smooth with no sharp edges.

 

CaseFront 2 off

Fixed to the CaseRearHoursUnits & Tens by M2 screws

CaseRearMinsHoursUnits 1 off

The image below shows two views (left and right) of the CaseRearMinsHoursUnits.

This module has the stepper motor on the right and bearing on the left of the case.

CaseRearHoursMinsTens 1 off

The image below shows two views (left and right) of the CaseRearHoursMinsTens.

This module has the stepper motor on the left and bearing on the right of the case.

 

The front and rear case parts fit together with the square cutouts at opposite ends.

Digit Divider

DividerMinsHoursTens5mm026_5mmgap 4 off

The divider fits into the two slots in the middle of the rear case with the large cutout facing forwards.

The part can be filed as required to allow the digits to pass through easily.

Note when inserted in the rear case the two gaps front and back gap must be bigger than the depth of a digit but no bigger than 2 digits depths.

Bracket End supports

BracketEnds 12 off

Each pair of digit modules will need 6 of these supports.

These supports fix to the ends of the StepperMount and StepperBearing mounts and secure them to the wooden base at one end and either the TopBarLeft or TopBarRight depending on position.

 

 

 

Stepper Motor Mounts

StepperBearingMount 2 off

The stepper Bearing Mount has a hole in for the Stepper Bearing Spigot to fit.

 

 

Stepper Bearing Spigot

StepperBearingSpigot 2 off

The StepperBearingSpigot fits into the hole in the StepperBearingMount and the stepper bearing fitted on the side of the rear case.

The spigot fits into the rear case bearings on both side of the mount.

 

 

 

Stepper Mount Bracket

StepperMount 4 off

Recessed on one side for the stepper motor body and countersunk bolt holes on the other.

Both sides of the bracket shown and will need to be reversed depending on what digit module it is fitted to.

 

 

 

 

 

Digits

Loading Digits

Digits are printed as 2 halves and 2 layers using the "Pause at Layer" script on CURA.

The rear digit it rotated so it is upside down and then glued to the back of the other digit.

Completed 7 and 2 digit used in the hours units and minutes units module

 

 

The 2 halves are "Super Glued" together with the rear digit printed upside down according to the tables below.

 

 

  Hours & Units Ones  
Tray Front Digit Rear  Digit Order
Lower 1 6 3rd
Lower 9 4 2nd
Lower 7 2 1st
Upper 3 8 2nd
Upper 5 0 1st

 

 

 

 

   Units Tens  
Tray Front Digit Rear  Digit Order
Lower Blank Blank 3rd
Lower 1 4 2nd
Lower 5 2 1st
Upper 3 0 2nd
Upper Blank Blank 1st

 

 

 

 

 

 

  Hours  Tens  
Tray Front Digit Rear  Digit Order
Lower Blank Blank 3rd
Lower 1 1 2nd
Lower 2 2 1st
Upper 0 0 2nd
Upper Blank Blank 1st

 

 

 

 

 

 

Number of Rotations Table Drawers

DrawerTray

The drawer pulls out and if wall mounted also drops down.

 

This is the drawer tray for the hour and minutes Units digit table.

 

 

 

DrawerTray60mm

This is the drawer tray for the hour and minutes tens digit tables.

 

 

Drawer Frame

These frames clip into the Drawer Trays over the printed tables and hold them in place.

 

DrawerFrame

This is the drawer frame for the hour and minutes Units digit table.

 

 

 

 

 

Drawer Frame 60mm

This is the drawer tray for the hour and minutes Tens digit table.

 

 

 

Drawer Pull

DrawerPull 2 off

Fitted to both drawer fronts with a 2mm screw and glue

 

 

 

 

Drawer Runner

DrawerRunner 4 off

Screwed to the underside of the wooden base to allow the drawer trays to slide in and out.

Note right side shown but left side printed mirrored in CURA

Showing how a pair of drawer runner are printed on CURA with one drawer runner mirrored.

 

Tray locations on underside of the clock base.

 

 

 

 

 

 

 

Feet

Feet are fitted to the wooden base with M4 screws and allow clearance for the drawers.

Foot01 6 off

 

 

 

 

 

 

 

Wiring/Cable Cover

Simply screws of the exposed wiring in the channel in the wooden base of the clock to keep it tidy when wall mounted.

 

WiringCover 1 off

 

 

The wiring/cable cover fits over the wiring cutouts in the base.

 

 

Wiring/Cable cover in place

 

 

 

 

Colon

The colon digit separator fits between the hours and minutes digits.

Printed in dual layers using "Pause at Layer" script on CURA. as per the digits the white layer allows the colon to be illuminated by a single LED for various clock state indications.

The colon is mounted on the 2 central stepper motor mount via a pair of colon_support brackets.

The colon is screwed to the colon_support brackets  which are in turn glued to the stepper mounts.

 

colon01 1 off

 

 

 

 

The Colon, colon support and blanking panel in position on the clock.

 

 

 

Colon Support

Holds the colon to the bearing mounts at an angle to match the digits.

colon_support 2 off

 

 

Blanking Panel

Fits above the colon to the center stepper mounts with 4 M2 screws.

ControlPanel02a 1 off

 

 

 

 

 

LED Mount Panel

Screwed to the central  stepper mounts behind the colon this panel provides a mount for the 10mm LED which illuminates the colon.

ControlPanelRear01 1 off

 

 

The white LED Mount Panel with LED can be seen on the rear view below- screwed behind the colon.

 

 

Control Panel

ControlPanel03 1 off

Fixes directly to the wooden base with M2 screws.

Micro Switch Spacer

Spaces the control panel away from the micro switches to allow correct location of micro switch buttons through the control panel.

Fixed to the Control panel and Vero Board with a single M2 nut and bolt.

SwitchSpacer 1 off

 

The micro switch spacer in location between the Vero Board and control panel.

 

 

 

 

 

Cyclotron Name

These letters are individually glued to the top of the wooden bar on top of the clock digits and are printed as loose letters.

CYCLOTRON.3mf CURA project file

 

Location details of the Cyclotron name & name plate

 

 

 

Cyclotron Front Name Plate

Fixed with a single M2 screw through a hole drilled through the middle "O" of the nameplate and through the name plate spacer

NamePLateCyclotron03 1 off

 

Name Plate spacer

Mounted behind the nameplate to raise it out from the edge of the top bar.

CyclotronLableSpacer 1 off

 

 

 

 

Top Support Bar

These bars fit on top of the digit modules and are fixed via M2 nuts and bolts to the bracket end supports of the digit modules.

 

TopBarRight 1 off

 

TopBarLeft 1 off

Left & Right Top Bars fixed in position to the 6 bracket end supports 

 

 

 

Top Bar & Wooden Top Bar Spacer

Simple spacer to allow space for the bolt heads on the top bar so the wooden top bar can be bolted in place.

The Wooden Top Bar is fixed to the 3D printed Top Bar by 3 off M3 nuts and bolts (holes drilled by hand).

WoodSpacerTop 3 off

Wooden and 3D printed top bar fixing detail.

Digits

Digits are printed in dual layers using the  "Pause at Layer" script on CURA.

Note the digits 0 to 9 are printed single sided at 2.5mm and the blanks are printed 5mm.

Digits 0 to 9 are glued together back to back to make inverted pairs according to the setup tables.

To make sure this clock runs reliably all digits must be completely smooth with no sharp edges.

2 digits glued together making total depth 5mm to match blank digits.

 

 

 

 

 

The animation below shows both sides of the completed digit.

NumberPlateHoursUnits 0 to 9  & NumberPlateBlank5mm for quantities see tables.

Note digits 0 to 9 are 2.5,, high and blanks are 5mm high as digits are glued back to back in pairs according to the setup tables.

 

 

 

 

 

 

 

 

Timber Parts

I have used wood from an old mahogany outdoor step.

Rough dimensions below.

 

 

 

 

Wooden Top Bar Dimensions

 

 

Vero Board Cutout dimensions.

Holes in the back are for the wires to the control panel.

 

 

 

 

 

 

 

 

3D Printer Files

Files included for CURA and FreeCad so you can modify the parts as required.

 

 

 

 

 

Code

Note set board in Arduino IDE to "ESP32 Dev Module" you may need to install the ESP32 on the Arduino IDE first.

Download the code in a zip file

 

TombolaClockMain40

 

Code notes

This clock uses 28-BYJ48 Stepper Motors with ULN2003A drivers.

Quality and therefore torque does seem to vary depending on manufacturer so you will want to carry tests on each digit to make sure the stepper is not dropping steps.

The best way to do this is to set the digit in position and then selct the digit using the "SELECT" control and then set it to rotate 9 times using the "SET VALUE" control.

Press "SET DISPLAY" and let the digit rotate 9 times. Repeat this several times.

If the digit fails to return to the exact start location then it is missing steps.

You will need to calibrate each digit by changing the settings in the following functions.

RotateHrsTen()

RotateHrsOne()

RotateMinTen()

RotateMinOne()

 

Here is the code for RotateMinOne

//----------------------------------------------------------------------------------------------------------------
//Mins1

void RotateMinOne()
{
//turn min 1 motor
stepperMinsUnits.enableOutputs();
// Set the current position to 0:
stepperMinsUnits.setCurrentPosition(0);

// Run the motor backwards at "setspeed" steps/second until the motor reaches "currentPosition"
while (stepperMinsUnits.currentPosition() != -2786) { //3036
stepperMinsUnits.setSpeed(-400);
stepperMinsUnits.runSpeed();


}


// Reset the position to 0:
//Serial.println("position reset to 0");

stepperMinsUnits.setCurrentPosition(0);
delay(200);
// Run the motor forwards at "setspeed" steps/second until the motor reaches "currentPosition"

while (stepperMinsUnits.currentPosition() != 738) { //988
stepperMinsUnits.setSpeed(400);
stepperMinsUnits.runSpeed();
}

stepperMinsUnits.disableOutputs();

delay(200);
//end turn min1 motor
}


//----------------------------------------------------------------------------------------------------------------
All the steps together +ve & -ve must equal 2048.
In the code on the left the motor turns -2786 and then 738.
When you add the steps together the total is 2048.
A full digit rotation is 4096 but as we are in half step mode so we turn the digit in total half a turn.
The digits are always turned backwards and as alternate digits have left or right mounting backwards can be a -ve or +ve number depending on the digits.
Units digits start with a -ve step and tens digits start with a +ve.







The first step number in this example turns the digit from it's start position (slightly facing up) for over half a turn to almost the horizontal position.
while (stepperMinsUnits.currentPosition() != -2786){

at speed stepperMinsUnits.setSpeed(-400);

This is to ensure when the new digit drops into position and it also slides back against the rear digit.
All lower digits must be slide hard back against the case or when the digit module rotates the rear digit at the top of the module will slide down the back preventing the new digit sliding down the front.




The next step take the module back to the start position that is exactly 180° backwards from where it started.
while (stepperMinsUnits.currentPosition() != 738) {

at speed stepperMinsUnits.setSpeed(400);

The speed must be adjusted so no steps are missed. This will vary for each stepper motor and should be as fast as possible.



Note the change from 19:59 to 20:00 takes 55 seconds using speed 400. If your steppers take longer than 60 seconds then an extra minute rotation will need to be added as it is at midnight.
                               When changing settings above make sure the change at 19:59 to 20:00 takes less than 60seconds.