Jump to content

Banner.jpg.b89429c566825f6ab32bcafbada449c9.jpg

  • entries
    5
  • comments
    402
  • views
    3,926

Giant 3D Printed Skeleton Wall Clock


Gina

3,658 views

Based on some of my other clocks this will be a wall clock for my living room to go above the fireplace.  It will have a dial of around 3ft diameter with a sweep seconds hand as well as the usual minute and hour hands.  It will be driven by a stepper motor controlled by an Arduino Nano with Real Time Clock module to ensure excellent time keeping.  Unlike other clocks it will not have any extras such as moon dial or striking, nor a pendulum.  This will be of the simplest design using an epicyclic gearing principle with minimal number of parts.

  • Like 1

38 Comments


Recommended Comments



No joy with TMC2208 driver so ordered TMC2100 which are known to work silently in 3D printers.

Link to comment

Unfortunately, the 25:32 gears that provide the 1 second drive to the seconds wheel are far from quiet in spite of being accurately printed.  There are possible ways of improving the gears such as helical teeth but this mainly applies to machined gears.  Printed helical gears will be rough due to the layers.  Consequently, I'm looking into the possibility of just using code in the Arduino sketch.

The RTC module is capable of producing square waves of 32kHz, 8192Hz, 4096Hz, 1024Hz and 1Hz.  The stepper motor has 200 steps per revolution or 3200 steps/rev with 16x microstepping.  The TMC2100 only does "quiet" in 16x or 4x microstepping.

Link to comment

One thought was to apply a time correction every so often to keep the clock in time.  ie. using the 32KHz (actually 32768Hz) gives a ratio of 10.24 for 3200 microsteps per second so a correction of 24 counts per 1000 or 3 in 25. 

Another thought is to generate pulses controlled by the Arduino clock such that a number of them finish just short of the fixed time.  eg. produce 3200 pulses in just short of a second and use the 1Hz square wave to restart the sequence.  The 1Hz is a symmetrical square wave so timing can be taken from both edges resulting in two smaller gaps in the pulse train to the motor rather than one larger one each second.

Edited by Gina
Link to comment

Here is an Arduino sketch.

// Filename :- Giant_Wall_Clock_v2_2019-11-14
// Software timing from RTC using polling
//
#include <DS3232RTC.h>    //http://github.com/JChristensen/DS3232RTC
#include <Time.h>         //http://www.arduino.cc/playground/Code/Time  
#include <Wire.h>         //http://arduino.cc/en/Reference/Wire (included with Arduino IDE)
//
boolean lastSqWave = 0; 
boolean ledON = 0; 
int sqwPin = A6;
int stepPin = 6; // STEP pin
int enPin = 12;  // Enable pin
int ledPin = 13;  // Internal LED pin
//
void setup() {
  pinMode(stepPin, OUTPUT);
  pinMode(enPin, OUTPUT);
  pinMode(ledPin, OUTPUT);
  digitalWrite(enPin, 0);   //  enable
  pinMode(sqwPin,INPUT_PULLUP);   //  RTC timing pin
  RTC.squareWave(SQWAVE_1_HZ);    // 1Hz square wave            
}
//
void runClock(void){
  for (int i = 1600; i >= 1; i--) { //  count 1600 pulaes in half second
    digitalWrite(stepPin, 1);
    delayMicroseconds(10);     // Make STEP pulse 10μs long
    digitalWrite(stepPin, 0); 
    delayMicroseconds(300); }     //  1600×310 = 496ms
  ledON = !ledON; digitalWrite(ledPin, ledON); }  //  flash LED on & off

//
void loop(){
  boolean sqUp = ((analogRead(sqwPin) > 500));  // read logic level of 1Hz square wave
  if (sqUp != lastSqWave)  { lastSqWave = sqUp; runClock(); }  //  Call runClock on both edges of RTC square wave
}
// End

 

Edited by Gina
Link to comment

Taken the motor and gears unit off the living room wall and brought the electronics in from the cupboard for rewiring and installing replacement sketch into the Arduino Nano.  On inspecting the TMC2100 driver module connections I've found a mistake.  I have connected a pin to Gnd presumably to change from stealthChop to spreadCycle mode but I've connected Diag1 instead of Cfg1.  This would have no effect so I've been running it in stealthChop mode quite happily.  This is the silent mode with lower power but the clock has bee running quite happily on just 9v so I'll stay with this mode.

The wiring mod is simply connecting the Square Wave output from the RTC module to the Nano and an output from Nano to Step input of driver instead of a direct connection..

Link to comment

New sketch compiled and uploaded to the Arduino Nano.  Motor and control electronics board set up on table and all working fine.  Turned the motor current down until the PSU showed 100mA at 9v and the NEMA17 motor still produced plenty of power.  I could hear a faint hum if I put the motor to my ear.

Link to comment

Clock drive reinstalled and all working fire after a tiny tweak to the timing.  Clock is now virtually silent - just a faint pulsating hum only audible if sitting quietly with no TV, radio or records.  I can probably make that tiny hum quite inaudible with flexible mounting - the motor is currently fastened firmly to the partition wall (plasterboard).

Link to comment

Final sketch and IDE report.

// Filename :- Giant_Wall_Clock_v2_2019-11-15
// Software timing from RTC using polling
//
#include <DS3232RTC.h>    //http://github.com/JChristensen/DS3232RTC
#include <Wire.h>         //http://arduino.cc/en/Reference/Wire (included with Arduino IDE)
//
boolean lastSqWave = 0; 
boolean ledON = 0; 
int sqwPin = A6;
int dirPin = 5;   // DIRECTION pin
int stepPin = 6;  // STEP pin
int enPin = 12;   // Enable pin
int ledPin = 13;  // Internal LED pin
//
void setup() {
  pinMode(dirPin, OUTPUT);
  pinMode(stepPin, OUTPUT);
  pinMode(enPin, OUTPUT);
  pinMode(ledPin, OUTPUT);
  digitalWrite(enPin, 0);        //  enable
  digitalWrite(dirPin, 1);       //  set on test
  pinMode(sqwPin,INPUT_PULLUP);  //  RTC timing pin
  RTC.squareWave(SQWAVE_1_HZ);   // 4096Hz square wave
  }
//
//
void runClock(void){
  for (int i = 1600; i >= 1; i--) { //  count 1600 pulaes in half second
    digitalWrite(stepPin, 1);
    delayMicroseconds(10);          // Make STEP pulse 10μs long
    digitalWrite(stepPin, 0); 
    delayMicroseconds(290); }       //  1600×300 = 480ms  **** 2019-11-17
  ledON = !ledON; digitalWrite(ledPin, ledON); }  //  flash LED on & off
//
void loop(){
  boolean val = ((analogRead(sqwPin) > 500));     // read logic level of 1Hz square wave
  if (val != lastSqWave)  { lastSqWave = val; runClock(); }  //  Call runClock on rising edge of RTC square wave
}
// End
Sketch uses 3896 bytes (12%) of program storage space. Maximum is 30720 bytes.
Global variables use 283 bytes (13%) of dynamic memory, leaving 1765 bytes for local variables. Maximum is 2048 bytes.
/home/gina/arduino-1.8.10/hardware/tools/avr/bin/avrdude -C/home/gina/arduino-1.8.10/hardware/tools/avr/etc/avrdude.conf -v -patmega328p -carduino -P/dev/ttyUSB0 -b115200 -D -Uflash:w:/tmp/arduino_build_979028/Giant_Wall_Clock_I2C-control_2019-11-15.ino.hex:i 

avrdude: Version 6.3-20190619
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "/home/gina/arduino-1.8.10/hardware/tools/avr/etc/avrdude.conf"
         User configuration file is "/home/gina/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/ttyUSB0
         Using Programmer              : arduino
         Overriding Baud Rate          : 115200
         AVR Part                      : ATmega328P
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : Arduino
         Description     : Arduino
         Hardware Version: 3
         Firmware Version: 4.4
         Vtarget         : 0.3 V
         Varef           : 0.3 V
         Oscillator      : 28.800 kHz
         SCK period      : 3.3 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: reading input file "/tmp/arduino_build_979028/Giant_Wall_Clock_I2C-control_2019-11-15.ino.hex"
avrdude: writing flash (3896 bytes):

Writing | ################################################## | 100% 0.59s

avrdude: 3896 bytes of flash written
avrdude: verifying flash memory against /tmp/arduino_build_979028/Giant_Wall_Clock_I2C-control_2019-11-15.ino.hex:
avrdude: load data flash data from input file /tmp/arduino_build_979028/Giant_Wall_Clock_I2C-control_2019-11-15.ino.hex:
avrdude: input file /tmp/arduino_build_979028/Giant_Wall_Clock_I2C-control_2019-11-15.ino.hex contains 3896 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 0.44s

avrdude: verifying ...
avrdude: 3896 bytes of flash verified

avrdude done.  Thank you.

 

Link to comment

Now looking at another clock to go in the kitchen.  Just slightly smaller dial and hands.  May go for spur gear drive to seconds wheel rather than ratchet.  Maybe a slightly smaller gear unit would look better in the smaller space.

Link to comment

Now for some calculation for a pair of spur gears for the seconds drive.

  1. Seconds wheel wants to turn once a minute = 60s.
  2. Stepper motor driven by TMC2100 in it's quietest mode takes 3200 microsteps per revolution.
  3. With a 6:1 reduction ratio (16t motor pinion and 96t seconds wheel) motor takes 10s per revolution.
  4. This means 320 microsteps per second.
  5. In the Arduino sketch above the 1600 pulses in a half-second becomes 160 (which agrees with the 1/10th speed of the motor).
Edited by Gina
Link to comment

Finished clock.  Apart from changing to gear drive from the motor I've cut out the ball bearing on the moving hours gear - it's sufficient to run PLA on a stainless steel bolt with washers either side of gear.  With such a low speed, wear will be insignificant.  (Bolts and washers are not shown in this model.)
563510821_Screenshotfrom2019-12-2713-43-02.png.05d75a10cabcc52b1151c82ca87f7a1e.png

Fixed hour and minute gears are attached to base plate with three countersunk bolts.  Then washer, moving hour gear, another washer and all retained by a 6mm SS bolt into the base plate.

171683594_Screenshotfrom2019-12-2713-17-53.png.34fe18ce8850a279860e9f0dde9775d3.png

1542160599_Screenshotfrom2019-12-2713-17-05.png.e6bc53ce8062abb8431ca1d54a7c3d55.png

Edited by Gina
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. By using this site, you agree to our Terms of Use.