Jump to content

Banner.jpg.b89429c566825f6ab32bcafbada449c9.jpg

DIY Moon Phase Dial


Gina

Recommended Posts

My only clock project never got far it was electromechanical design with Nixie tubes for the display I planned to have a vibrating spring as the heartbeat but could never figure a way to keep it going during power outages.

Alan

Nixie tubes eh ?  That takes me back :D  I shall want a backup battery for this clock.

Link to comment
Share on other sites

  • Replies 1.1k
  • Created
  • Last Reply

Thanks Alan :) It might be if I had a way to set the time to start with :D Ha Ha ... New design of minute wheel needed to include a slipping clutch. I'm working on that now :D

Can't you just set it to twelve exactly then make it clever enough to start on time?

Link to comment
Share on other sites

Can't you just set it to twelve exactly then make it clever enough to start on time?

Yes, but what happens when BST comes along? :eek:  TBH BST is a right PITA :(  I stick with GMT/UTC for my weather station - BST is just too much hassle.

Link to comment
Share on other sites

I now have the Arduino and driver board connected up, loaded with the sketch and working but... the clock is running backwards and moving two seconds every two seconds :D  A little adjustment required to the sketch :grin:

post-13131-0-78699300-1450205152_thumb.j

Link to comment
Share on other sites

Sorting out the Arduino sketch.  The clock is now running forwards but advancing 2s each second and I know why.  The 4096 steps per revolution was based on bi-phase half stepping as I used for astro focussing systems but here I'm using the simpler one phase at a time and only one phase powered at any time whereas the focussing units have 2 coils on at times.

This is the phase sequence I'm using here :-

1000

0100

0010

0001

1000

0100

0010

0001

And this is the focussing half-stepping system :-

1000

1100

0100

0110

0010

0011

0001

1001

1000

1100

etc.

To put things right is simply a matter of stepping 64 instead of 128 each second.

Link to comment
Share on other sites

I now have the clock advancing correctly at one second every second :D  However, as I suspected, the slipping clutch needs improving as the minute hand is tending to turn with the second hand due to the minutes tube running on the seconds shaft.

Here is the modified Arduino sketch :-

// Arduino test sketch v01 for moon clock - 2015-12-14// Code included to turn stepper off between ticks// Timing uses timer interrupt (Timer1)//#include <TimerOne.h>int motorPins[] = {2, 3, 4, 5};  // motor pins for the stepperint stepSize = 64;  // how many motor steps correspond to one secondint count = 0;int mask = 0; //  binary mask for motor pins to select phase//void setup() {  for (count = 0; count < 4; count++) {    pinMode(motorPins[count], OUTPUT);  // set the motor pins for output  }  Timer1.initialize(1000000); // set a timer of length 1,000,000 microseconds (1 sec)   Timer1.attachInterrupt( timerIsr ); // attach the interrupt service routine here}//void moveForward() {  //  move one stepper motor phase forwards  if ((mask == 0) || (mask == 1)) {    mask = 16;  // set/reset phase mask  10000  }  mask>>=1;  // binary shift phase mask one position right  1000, 0100, 0010, 0001                                        for (count = 3; count >= 0; count--) {    digitalWrite(motorPins[3 - count], mask>>count&0x01);  //   }  delay(150);}//void moveBackward() {  //  move one stepper motor phase backwards - for use later for time correction  if ((mask == 0) || (mask == 1)) {    mask = 16;  }  mask>>=1;  for (count = 3; count >= 0; count--) {    digitalWrite(motorPins[count], mask>>count&0x01);  }}//void timerIsr() {  //  Ths was previously the loop - now called by the interrupt  int c = 0;  for (c = 0; c < stepSize; c++) {    moveForward();  }//  Disable all motor pins to turn current off //  mask is not touched and phase shift continues where it left off on next tick  for (count = 3; count >= 0; count--) {    digitalWrite(motorPins[count], 0);    } }//void loop(){  // Main code loop  // TODO: Put regular (non-ISR) logic here}// End
Link to comment
Share on other sites

Fixed it :)  Added a disc of paper between the two halves of the slipping clutch and a plastic washer to provide pressure from the acrylic sheet and frame.  Clock working properly now :)

To finish it off it needs the case and container for the electronics plus power supply.

Link to comment
Share on other sites

The electronics has developed a fault and stopped driving the clock :(  Been running off my bench PSU so I can watch the current.  It was 20mA standby and 90mA when powering the stepper motor now it's more like 10mA.  So some faultfinding to do.  Meanwhile, it's finally stopped raining for a while so I'll go out to the shed and sort out some plywood for the box.

Link to comment
Share on other sites

Sides, top and bottom of box cut from 6mm plywood.  Still have the back to cut.  Two choices - 6mm plywood with framework or 11mm OSB to which I can attach the sdies directly.

Done initial testing on the electronics with my DMM and all signs are that the Arduino Nano is at fault.  I have uploaded the firmware again but no difference.

Link to comment
Share on other sites

I've added control of D13 which controls built-in LED to show the 1s pulse.

The Arduino on the control board shows flashing LED when run from USB but not from the 12v Vin.  I have now umsoldered it from the control board.  I have also found another Arduino Nano on which I've installed the firmware and the LED on that is flashing so I think it's probably alright.  I'm going to see if I can find a DIL socket for the Nano and solder that to a new piece of stripboard for testing.  ATM I only want one Arduino Nano and stepper driver and see how good the Arduino crystal is for timekeeping.  I would like to keep the RTC for the calendar display.

Link to comment
Share on other sites

Sorted out the stepper drive electronics and running the clock :)  However, now the minute hand is not moving :(

Here is a screenshot of the main shaft cross-section modelled in SketchUp.  I think the problem is that the friction between minute shaft (orange) and hour wheel (light green) is more than that of the slipping clutch between the minute wheel (yellow) and minute shaft (orange).  I'll try putting a PTFE washer between minute shaft and hour wheel.

post-13131-0-92401300-1450299301_thumb.j

Link to comment
Share on other sites

Taken the clock apart again, made a PTFE washer and put it all back together with PTFE washer between hour wheel and minute pinion.  Connected stepper and power and the clock now seems to be running correctly :)  I shall let it run overnight and see if the time is still correct in the morning.

Here's a new cross-section of the main shaft and gears etc.

post-13131-0-87393600-1450303774_thumb.j

Link to comment
Share on other sites

Something isn't right.  The minute drive seems to be catching or something - the minute hand is stopping just past the 30m mark.  I'll take the clock apart again and examine the gears - maybe there's a bit of stray plastic.  Otherwise it seems alright.

I'm just wondering if a different system would be better - like used on commercial radio controlled clocks viz. use two motors, one to drive the sweep second hand and the other to drive the minutes (and thence hours).

Link to comment
Share on other sites

Took it all apart and cleaned up the minute pinion which did have a few small nibs of plastic on it, put it all back together and set it running again.  I'm running it fast to test without it taking all day.  Still sticking :(  Can't be much because I can't feel anything by turning the minute hand.

Link to comment
Share on other sites

Yes, that's what I was thinking :)  I think I'll leave it running at maximum speed for a day or two to give it time to settle down and throw up any problems though the full cycle needs to run for a lunar month :grin:

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • 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.