Jump to content

Banner.jpg.b89429c566825f6ab32bcafbada449c9.jpg

Gina

Beyond the Event Horizon
  • Posts

    45,326
  • Joined

  • Last visited

  • Days Won

    120

Blog Comments posted by Gina

  1. The piece of hardwood ply I bought for the job is 900mm x 900mm x 18mm.  To allow room for motors, brackets etc. I reckon to add 50mm at each end of the XY rails.  So that makes 400mm x 400mm inside and about 440mm x 440mm outside.

    This is the sort of box I'm thinking of with a height of just under 450mm.  This should give a print volume of 190mm x 190mm x 220mm approximately using 6 off 300mm MGN12 rails.  The bottom front rail will come from the bottom panel and the top a piece of ply left over from my Concorde printer box.

    971242790_Screenshotfrom2019-11-2216-07-59.png.3dd5d75d3cd7165ee2ccefb0daf118a5.png

  2. My first thoughts were to use the same type of rails and drives as my Concorde printer viz. V-Slot aluminium extrusion with Mini V wheels including C-Beam extrusion and gantry plate carriages for the Z axis.  I am now looking into higher precision rail systems on a smaller scale.  Home made linear bearings using tiny ball bearings arranged in threes around round rods is one option but this means using dozens of ball bearings with every third being adjustable.  Although giving high precision, this is very labour intensive and time consuming, even with 3D printed parts.  My thanks to @Chriske for this idea.  Another possibility, apart from the ubiquitous cylindrical linear bearings on round rods, is these MGN12 rails.  A combination approach is also a possibility.  I shall be giving this a lot more thought before going ahead and ordering anything.

  3. 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.

     

  4. 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..

  5. Going back to basics :-

    1. The chain wheel rotates at 4x the centre wheel which rotates once an hour.  So chain wheel takes 15m per revolution.
    2. The chain wheel (sprocket) has 18 teeth and the auto-winding sprocket has 8 teeth.  So AW sprocket rotates at 15x8/18 m/rev = 15x60x8/18 = 400 s/rev
    3. Drive motor rotates at 2 s/rev so overall ratio required is 200:1

    This could be achieved with a 40 tooth ratchet wheel and a 5:1 pair of spur gears.  This seems a lot simpler than the epicyclic gear system.  (OK so I've changed my mind again - my prerogative! 👩🤣 )

  6. Might change the timing to the stepper motor to give a rotation speed of 2s per revolution and save a gear or two.  I can do this with an Arduino sketch - here is a first attempt.

    // Filename :- Pendulum_Longcase_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 = 800; i >= 1; i--) { //  count 800 pulses in half second ie. 3200 micro-steps per two seconds
        digitalWrite(stepPin, 1);
        delayMicroseconds(10);        // Make STEP pulse 10μs long
        digitalWrite(stepPin, 0); 
        delayMicroseconds(600); }     //  1600×610 = 976ms
      ledON = !ledON; digitalWrite(ledPin, ledON); }  //  flash LED on & off (for testing)
    
    //
    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
  7. 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

     

  8. 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.

  9. 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.

  10. One idea is a 64 tooth ratchet wheel which is driven from the pendulum pushing system.  This would be connected to the strike shaft through 6:1 gearing and a "free wheel" (like on a bicycle).  A lever/pawl from the pendulum drive would be arranged to engage with the 64t ratchet wheel during the wind-up period - being started by a cam on the hour shaft and stopped by the weight being wound to the top of its travel.

    1611962101_Screenshotfrom2019-11-1122-19-50.png.21c0b8f79655b8c8fb8100edb794638c.png

  11. More calculations :-

    1. A ratchet wheel with 64 teeth and 160mm OD will fit nicely in the space
    2. This will need 13 revolutions so a total of 13x64 = 832 - comfortably below the 900.
    3. Total time to wind is therefore 832x2 = 1664s = 27.73m

    This gives minimal force needed to wind the strike mechanism yet taking a reasonable time.  The winding sequence can be started at 12:15 and will end just before 12:43.  Seems like a plan - just need to design the parts now.

  12. A calculation for winding every 12 hours :-

    1. Weight would descent by 1+2+3+4+5+6+7+8+9+10+11+12 = 78 times the amount for one strike (revolution of the big wheel).
    2. Distance from bottom of hood/clockface to floor = 1.3m, less height of weight and pulley of 200mm give 1m clear so 2m travel of the cord.
    3. Amount of cord for one strike = 2000/78 = 25.64mm
    4. If this were on the same shaft as the strike wheel the drum diameter would be 25.64/π = 8.16mm - which is far too small.
    5. With a 4:1 gearing from the strike shaft this would become 32.7mm.  5:1 gives 40.8mm - better.
    6. 78 factorises into 2x3x13 so at 6:1 the drum would turn 13 times to wind up the strike system giving a 50mm diameter drum. Seems OK.

    I will have a lever pushing the pendulum every 2 seconds and I think it could be used to wind up the strike mechanism.  This could take half an hour or more giving up to 30x30 = 900 strokes.

  13. Every half hour seems logical.  Three thoughts :-

    1. Maybe I could use a similar arrangement to the strike mechanism. 
    2. A wheel that turns less than a revolution when the clock strikes 12 could be would back up until it's back to "square one". 

    No.2 seems simpler.  It would want gearing of something over 12:1 as the striking shaft rotates 12 times for 12 o'clock.

    OTOH for every 12 hours :-

    • A knot in the cord that engages a lever when the weight is at the top to stop the winding.  The winding could be started by a cam on the hour shaft.
  14. One possibility I have in mind is to use cord rather than chain unwinding from a drum (a common system in longcase clocks) with some mechanism for re-winding the drum between striking periods.  Usually this would be manual but I want to design an automatic system.  (I don't want to wind up the strike anymore than I want to wind up the main timepiece.) 

    The way manual winding works is to have a ratchet system between the drum and the strike mechanism.  The motorised winding could drive the drum with another ratchet.  This ratchet would only engage when winding (otherwise it would stop the drum driving the strike mechanism).  I'm thinking the motor winding would take place either every half hour or when the weight had dropped a certain amount.

    I'll continuing posting my ideas as the come into my head 😀

  15. This model of the clock assembly shows the strike mechanism as far as I've got with the design plus the AW for the timepiece.  The large wheel on the left with blue cam turns once per ring of the gong/bell so a cam on the axle of this will operate a clapper lever.  I was planing to drive the large wheel with step down gearing from a sprocket carrying chain and weight similarly to the timepiece but I wondering whether some lateral thinking can come up with something simpler.

    1746056447_Screenshotfrom2019-11-0713-20-00.png.098658c5ad90c6bc5ac604a234b517fe.png

  16. That print turned out to be perfect for the job and will be the final print.  I've been printing more of the gears with good results.  I now feel like a break from printing and looking at the design of the strike mechanism.  The main parts are done but there remains an auto-winding system.  With the main clock auto-winding gears taking up more than half the free space, the AW system for the strike needs something smaller.  There is also the problem that the drive varies by 12 to 1 over the 12 hours unlike the timepiece which is constant.

×
×
  • 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.