Jump to content

Banner.jpg.b83b14cd4142fe10848741bb2a14c66b.jpg

DIY Moon Phase Dial


Gina

Recommended Posts

Still having problems with the minute shaft slipping clutch - it isn't supposed to slip all the time :happy6::eek:   I've been having such a big problem with this that I'm thinking of changing the design and driving the minute shaft from a second stepper motor somehow.  It may need an almost complete redesign :(  OTOH it would have benefits - I could change the time for BST automatically or at least with push buttons as well as banish slipping clutch problem for ever :D  Think I'll look into this...

Link to comment
Share on other sites

  • Replies 1.1k
  • Created
  • Last Reply

That's what I've been using.  Anyway, decision made - I can drive the intermediate wheel between seconds and minutes with a pinion on a second stepper motor and remove the teeth from the pinion on the seconds wheel.  Then rebuild the electronics to drive both stepper motors plus the RGB LED srrip to light the case.  I can use the RTC if I want auto BST changes.

Link to comment
Share on other sites

Now for some calculations...  Firstly, how long woutd BST advance/retard take  :- 

  1. There is room for a 10t motor pinion to replace the 5t seconds wheel pinion, so ratio to minutes shaft would be 30:1 rather than 60:1
  2. Stepper motor max speed =10s per revolution
  3. Max speed of minutes shaft = 10 x 30 secs per rev = 300 s/rev = 300 / 60 = 5m to advance/retard by one hour.  Hmm... rather slow :(
  4. REJECTED

Trying again :-

  1. Reduction ratio from S>M imtermediate wheel to minutes shaft is 6:1
  2. If we have 16:30 gear ratio stepper motor to intermediate wheel as for the seconds shaft, the intermediate gear would take just under 20s per rev.
  3. With 6:1 reduction, minute shaft max speed will be just under 120s per rev.
  4. So it will take a couple of minutes to advance or retard the clock for BST
  5. I think that's acceptable

Next question is whether this works out as a workable step rate for normal clock operation.

Link to comment
Share on other sites

OK looking at the steps to drive the minutes...  For the seconds shaft I had 64 steps per second.  The seconds to minutes intermediate wheel wants to turn at 6 revs per minute the seconds wheel at one rev per minute so the minutes motor wants to turn at 64 / 6 steps per second but you can't have 6.4 pulses - only whole numbers but you could have 64 pulses every 10s and I think moving the minute hand every ten seconds should be alright.  The small minute hand movement every 10s would be just noticible and confirm that the clock was working.

Looking at the gearing the S>M wheel currently has 50t and 8t so the 50t part will now have 30t to go with the stepper motor pinion of 16t

Link to comment
Share on other sites

Printed the new minutes drive intermediate gear and have been trying to print the new frame to take the pair of stepper motors but it's a bit big for the UP printer and suffered from too much curling at the corners :(  Off-grid spoon whittling is looking more interesting by the minute !!!!!  I may see if I can get my Pilot printer working again :D  I think if I used the spray on the print pad on the UP I'd never get the print off it :(

Link to comment
Share on other sites

Managed to print the mounting frame by turning it 90 degrees so the max dimension was upwards and also printed the motor pinion.  Now ready to assemble.  Need to dig out a second 12v stepper motor and build a new circuit but I think I'll get it going with one motor moved over to the minutes drive and run that off the present circuit board with a change to the sketch and test that it all works - I can add the seconds later.

Link to comment
Share on other sites

It seems that every time I make clock gears I have problems of jamming.  I think the problem is that the 3D printer always makes things 0.1mm bigger than the model then add the inevitable tiny knobs and blobs and you have a jam even after cleaning everything visible off the mating surfaces.  I've now redesigned the main framework with 0.75mm extra clearance between the gears.  If the gears still jam with that I'll add some more axle spacing.  Redesign in SketchUp is quick enough and 3D printing takes just 80m.

Link to comment
Share on other sites

I think the gears are alright now after use of a rat-tail file.  Had to alter the length of the fixed pivot paul as the moon phase ratchet was unreliable - I think that's fixed now too but time will tell.

Link to comment
Share on other sites

Moon phase drive seems to be fine now :happy3:  I'm running the minutes drive at full speed which advances the clock continuously at a rate of an hour every 70s.  The moon phase dial has now turned several revolutions successfully whilst running continuously for several days.  Once I have the under observatory water level instrumentation finished I shall probably look at finishing the clock.

Link to comment
Share on other sites

Really looking forward to seeing this one Gina.  What sort of "running in" period are you looking at before you are content that all is well and it is accurately predicting the phases.  I'm assuming you won't need to let it go a full lunar cycle to get a good confidence level, or would you?

 

Jim 

Link to comment
Share on other sites

I'm now satisfied that the moon phase drive is working properly and as long as the clock keeps time the moon phase should be correct.  At this stage the clock would be usable with an adjustment to the Arduino sketch to advance the minutes at the correct rate.  OTOH there are some refinements I want to add.  Drive the seconds hand and provide lighting for the inside of the case.  Both these will need a revamp of the electronics.  ATM it only drives one stepper motor so it will need a new stripboard to take an additional stepper driver.

Link to comment
Share on other sites

Ah, so you can tweak the arduino code if you need to advance or retard the pace of the time and the gearing in your drive sorts out the rest.  Cool that makes sense.  You'll laugh at this.  I picked up a cheap radio controlled clock from Lidl just before Christmas , thought it would work well in the obsy.  Christmas day I unwrapped it (it was a present to me from my youngest daughter) put the batteries in and watched intently as the hands moved round by themselves and stopped on,,,,,,,,,,,,,,, German time.:happy6:    Saw in the paper a few days later that Lidl had issued a product recall - the clocks were picking up a receiver in Germany!  We laughed so much we cried - it reminded us of something from Only Fools and Horses. :happy8:   I could have done with some of your arduino code to sort it out to UK time - in the end I manually advanced the hands and so far so good.  

 

Jim

Link to comment
Share on other sites

Yes Jim, I like it :icon_biggrin:  I guess a clock from a German company could well use the German time data transmitter.  The time code receiver I have is supposed to use a British transmitter up north somewhere - forget where now.  But I'm not using that ATM - just the crystal in the Arduino.  I'm about to set the sketch to produce 64 steps every 10s to drive the minutes which from my calculations above should give correct timekeeping (to the accuracy of the crystal).  We shall see if I've got this right :)  But don't hold yuour breath - I've been wrong rather a lot lately :icon_scratch:

Link to comment
Share on other sites

I'm sure you'll get it Gina, persistence pays off, but if it drifts we could always send a message up to Tim Peake to push the Moon back on its orbit to get it into sync with your clock.:icon_biggrin:  Now wouldn't it be cool if the forward and back button on Stellarium worked for real!

 

Jim

Link to comment
Share on other sites

Thank you Jim :)

Well... The Arduino Nano that was running the clock has started misbehaving - not being recognised by Windoze :(  Unfortunately this is a genuine Arduino with an FTDI USB to serial chip which are known as unreliable.  The CH340 USB-Serial chip is much more relaible and I have never had the problem with these.  Am I paranoid or do the simplest things really always go wrong?  Back to the spoon whittling I think :(

Link to comment
Share on other sites

1 hour ago, saac said:

Ah, so you can tweak the arduino code if you need to advance or retard the pace of the time and the gearing in your drive sorts out the rest.  Cool that makes sense.  You'll laugh at this.  I picked up a cheap radio controlled clock from Lidl just before Christmas , thought it would work well in the obsy.  Christmas day I unwrapped it (it was a present to me from my youngest daughter) put the batteries in and watched intently as the hands moved round by themselves and stopped on,,,,,,,,,,,,,,, German time.:happy6:    Saw in the paper a few days later that Lidl had issued a product recall - the clocks were picking up a receiver in Germany!  We laughed so much we cried - it reminded us of something from Only Fools and Horses. :happy8:   I could have done with some of your arduino code to sort it out to UK time - in the end I manually advanced the hands and so far so good.  

 

Jim

We had one like taht at work, but not from Lidl. Rather than send it back I took the 'glass' off and moved the hands on their spindle from CET to GMT :headbang:

I have two Aldi ones that I bought years ago, they are brilliant and a flat AA battery from something else lasts about 2 years!

And they show UK time (including switching to BST!)

Link to comment
Share on other sites

Neil, yep sounds similar to mine.  like you I was reluctant to take it back so removed the glass and turned the hands.  Thing is,  when I hung it on the wall of the obsy it fell off breaking the glass and denting its nice silver frame when I closed the obsy door.:happy6:  I went back to Lidl to see if I could pick up another, only £8 (temp and humidity indicator as well) but because of the recall they had stopped selling them.  Anyway, it appears to be working well at the moment, but it did make me laugh.

 

Jim

Link to comment
Share on other sites

I think I may be able to improve on the arrangement of sending 64 steps to the seconds motor every second and sending 64 steps to the minutes motor every 10 seconds.  The timer works in microseconds so timings can be shorter.  With the earlier version running everything off the seconds, it made sense to set the timer to 1,000,000 and step the seconds hand once per second.  There is no reason not to have a sweep seconds hand particularly and a faster step rate for the minutes would be much better than a multiple of the timer ticks of 1 a second.  As long as the timer works at a whole number of microseconds and not too fast there will not be a problem.

If we were to send single steps then the minute motor would want a step every 10,000,000 / 64 = 156250 microseconds.  Similarly for the seconds this would be a step every 15,625 microseconds or 10 steps every 156,250 microseconds.  The timer could be set to 156250 sending one step to the minute motor and 10 steps to the seconds motor per interrupt.

Link to comment
Share on other sites

I have designed the layout of the Arduino Nano and two ULN2003AN driver chips to drive the two stepper motors for seconds and minutes and RGB LED lighting strip.  This is alright as a start but some way of setting the time is also required.  I shall give this some thought...

56ad0092d915c_MoonClockControlUnitLayout

Link to comment
Share on other sites

Two ways of setting the time occur to me :-

  1. Buttons to advance or retard the time.
  2. Automatic setting using a Real Time Clock chip.

Option 1. of buttons is probably the easiest but would need several push button switches.  eg. :-

  1. Hour +1
  2. Hour -1
  3. Minute +10
  4. Minute -10
  5. Minute +1
  6. Minute -1

Alternatively, just two buttons could be used to set the time by arranging the sketch to take note of how long the button was pressed.  Short pushes could advance/retard by a minute at a time whilst holding it in could advance/retard quickly, going more quickly the longer the button was held.  That should make setting the time relatively simple.  For BST a switch could be used to tell the Arduino whether the time is GMT or BST and when changed could advance or retard the clock by exactly 60 minutes.  (Or alternatively, push buttons.)  I think I like the two buttons and one switch approach.

For option 2. above of automatic setting, it would need sensors to detect midnight (say) to compare with the RTC.  This was the first idea I had for a large DIY wall clock and why I bought an RTC chip and radio time data receiver.  The idea would be to check the time at 2am against the RTC and the RTC against the received time data.  At initial switch on the clock would be advanced to midnight and the real time read from the RTC, then the amount of advance or retard calculated and applied to the minutes stepper motor.  Change from GMT to BST and back would be handled automatically at the daily time check.

Getting the automatic radio controlled system working may take quite a lot of sorting out and I think I shall go for the manual time setting method to start with.

Link to comment
Share on other sites

In the layout diagram above all but one of the digital pins have been used but there are still 8 analogue inputs.  An RC combo could debounce the PB switches and the analogue inputs plus code provide a Schmitt trigger system.

Link to comment
Share on other sites

Thinking more about setting the time...  Fastest advance/retard rate available due to speed limit of stepper motor is 70s per hour so with worst case scenario of 6 hours change being required, it would take 420s = 7m to adjust the time.  I don't like that :(  I think another method of initially setting the time is indicated.  As this will only want doing once, it doesn't want too much time devoted to design and construction of a time setting system, so I'm thinking of connecting a computer to the USB port and setting it that way.

Adjustment of the time due to poor timekeeping of the Arduino crystal or a power cut can be achieved with push buttons as mentioned above.  I think single step minute advance/retard plus full speed will be sufficient as the full speed is not that fast.

Now to the implementation...  I have proposed a timer interrupt every 156250 microseconds which is 156.25 ms or 6.4 interrupts a second.  At each interrupt the PB and switch states can be read and any change registered.  When a PB is pressed the clock can be advanced or retarded by one minute by sending the appropriate number of steps to the minute stepper motor.  While this is happening a flag is set to stop interrupt driven steps so that the clock will change by exactly one minute (and also to prevent a "clash of code" in driving the stepper motor). 

After a count of 6 interrupts (about a second) the relevant PB can be read and if still set the fast forward/reverse mode initialised otherwise normal clock operation resumed.  Then after further intervals of 6 interrupts the PB is again read and the process continued until the PB is released when the fast mode is stopped and the clock set back to normal operation.  A similar process can be applied to the GMT/BST switch and the hour change applied (account being taken of the "ticks" lost during this process and correction made).

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.