Arduino Pendulum Clock Design – Comments Welcome

Advert

Arduino Pendulum Clock Design – Comments Welcome

Home Forums Clocks and Scientific Instruments Arduino Pendulum Clock Design – Comments Welcome

Viewing 25 posts - 26 through 50 (of 307 total)
  • Author
    Posts
  • #494656
    SillyOldDuffer
    Moderator
      @sillyoldduffer

      Realised last night I hadn't mentioned the main reason for a light bob. It reduces the force applied to the frame, meaning it too can be relatively lightly built. I haven't attempted sums, instead I'll bounce a laser pointer off a mirror on the top cap while the clock is running to see if the projected dot moves on a distant wall. With luck it will be rock steady. Don't bet the farm on it.

      John asked if the rod is carbon fibre / resin composite. I assume so, but don't know. I'll have to trace the order back but I don't recall it having a specification. To find the rod's properties it will probably be necessary to measure them.

      Picking up on Martin's knife edge suggestion, I got into this after noticing a very crude and simple pendulum knocked on this principle to test another project kept amazingly good time, similar to a digital watch. Compared with the high-end engineering needed to make a good conventional pendulum clock, the approach seems ridiculously straightforward. The good performance could have been down to pure luck, and I'm chasing a red-herring, or was due to:

      • Carbon fibre having low temperature expansion characteristics – comparable to Invar
      • Nothing intrusive at the suspension. The thin carbon rod is it's own spring at the join, and there is no escapement adding and subtracting energy.
      • The lightweight bob and 'rod' don't shake the frame much.
      • It's a 'free pendulum' clock. Ticks are detected optically at the bob, and impulses are provided by an electromagnet.
      • The electromagnet tends to keep the pendulum running straight.
      • Straightforward to fine tune what happens between detect and impulse when the impulse is generated by a microcontroller. The impulse can be accurately timed relative to detect and it's power accurately adjusted by altering the length of the output pulse. Slightly analogous to the Shortt Clock's pair of pendulums except the Arduino's clock, (good at microsecond and milliseconds, not so accurate over days) provides precision control over the impulse, and applies it non-intrusively.
      • As ticks are processed by the microcontroller, the actual period of the pendulum doesn't matter much.  I guess it doesn't matter if the rod is a suspension or spring or both provided it's consistent.  It's not necessary to provide mechanical adjustments to set the pendulum to time. Instead, the period can be measured and rate adjusted in software. The 'gear-train' is implemented in software with whatever 'ratio' is needed to convert ticks into human time.

      Doing stuff in software opens up other opportunities. Whilst counting and maintaining ticks, the microcontroller can also monitor temperature, air pressure and humidity. It should be possible to correct errors in pendulum time caused by these factors.

      Apart from mechanical simplicity, the clock is advantageously small because it doesn't depend on a long pendulum (or does it?), and the shield could be evacuated without much bother.

      I'm finding the comments very helpful: please keep 'em coming. Off to see if I can find any of the books recommended by John. Research & Development is expensive.

      How well any of this will work in practice is an open question. So far ignorance is bliss. I'm sure my design can be improved, not least because there's so much I don't know. This fool is going where angels fear to tread!

      Dave

       

      Edited By SillyOldDuffer on 08/09/2020 10:33:37

      Advert
      #494666
      John Haine
      Participant
        @johnhaine32865

        Philip Woodward:

        My Own Right Time

        Woodward on Time

        #494676
        SillyOldDuffer
        Moderator
          @sillyoldduffer
          Posted by John Haine on 08/09/2020 11:04:43:

          Philip Woodward:

          My Own Right Time

          Woodward on Time

          Thanks John, found a copy of My Own Right Time for sale and ordered it. Listed next to the 'Skin Two Fetish Yearbook', which is worrying! Also a cheap Grimethorpe on offer so got that too.

          Cheers,

          Dave

          #494683
          John Haine
          Participant
            @johnhaine32865

            MORT is a great read, the book that got me started on horology. WOT is a compilation of all Woodward's articles in Horological Journal and Horological Science News – some of the ground is covered in MORT.

            #494686
            Michael Gilligan
            Participant
              @michaelgilligan61133
              Posted by SillyOldDuffer on 08/09/2020 10:31:09:

              […]

              John asked if the rod is carbon fibre / resin composite. I assume so, but don't know. I'll have to trace the order back but I don't recall it having a specification. To find the rod's properties it will probably be necessary to measure them.

              .

              Try the twang test, Dave

              … Remember the school ruler, cantilevered over the edge of a desk ?
              … You have the technology to measure its frequency : the rest is basic math.

              MichaelG.

              #494687
              John Haine
              Participant
                @johnhaine32865

                I guess if it isn't composite it would just CF strands and would be floppy like a string?

                #494691
                SillyOldDuffer
                Moderator
                  @sillyoldduffer
                  Posted by John Haine on 08/09/2020 12:20:20:

                  I guess if it isn't composite it would just CF strands and would be floppy like a string?

                  Not string-like at all, which I why I'm fairly sure it's a composite. If I get the chance I'll take a microphotograph and try Michael's twang test.

                  Dave

                  #494695
                  John Haine
                  Participant
                    @johnhaine32865

                    Just hold it horizontal? It should sag slightly but be relatively stiff. If you can hold it at one end and have enough to measure the "sag" at the other, if you know its weight you could calculate its YM I think.

                    #494699
                    Martin Kyte
                    Participant
                      @martinkyte99762

                      Can you come up with a way of demonstrating that the pendulum period is not being 'regulated' by the Arduino timing in the sense of a phase locked loop. As I understand your system there is a fixed delay between the beam break and the impulse which is generated by the arduinino. During the delay the pendulum has moved a distance S. The magnetude of the impulse will depend on S (pendulum further or closer to the electromagnet). Say S is smaller the pendulum will get a bigger impulse which increases the amplitude and slows the pendulum. This makes S larger as the bob is moving faster so the impulse is less which allows the pendulum to slow down. Could you perhapse write some code to modulate the delay and compare the period. I'm concerned that the Arduino is driving the timing rather than the pendulum. It would be easier to see with a high mass bob perhaps so you could allow the pendulum to swing free for many oscillation between impulses.

                      regards Martin

                      #494700
                      Michael Gilligan
                      Participant
                        @michaelgilligan61133
                        Posted by John Haine on 08/09/2020 13:19:40:

                        Just hold it horizontal? It should sag slightly but be relatively stiff. If you can hold it at one end and have enough to measure the "sag" at the other, if you know its weight you could calculate its YM I think.

                        .

                        Very true, John … ‘though would suspect it difficult to do accurately on CRP, as the specific modulus [stiffness to weight] is high.

                        You are effectively measuring a ‘freeze-frame’ of the peak deflection in vibration at 1g

                        MichaelG.

                        #494702
                        Michael Gilligan
                        Participant
                          @michaelgilligan61133
                          Posted by SillyOldDuffer on 08/09/2020 12:49:25:

                           

                          Not string-like at all, which I why I'm fairly sure it's a composite. If I get the chance I'll take a microphotograph and try Michael's twang test.

                          Dave

                          .

                          My guess is that it’s a pultrusion [but other composite constructions are available]
                          .

                          If you want to go beyond doing a ‘twang test’ for the first mode : this is a handy one-page reference.

                          https://autofem.com/examples/determining_natural_frequencie.html

                          … unlikely to be relevant, but curiosity leads us …

                          MichaelG.

                          Edited By Michael Gilligan on 08/09/2020 14:14:03

                          #494703
                          SillyOldDuffer
                          Moderator
                            @sillyoldduffer
                            Posted by Martin Kyte on 08/09/2020 13:56:50:

                            Can you come up with a way of demonstrating that the pendulum period is not being 'regulated' by the Arduino timing in the sense of a phase locked loop…

                            regards Martin

                            Now that's a darned good question! Vital to prove that's not happening. Hmmm.

                            Working on the electromagnet now. Once it's in place and the clock is ticking, I have to show I'm measuring a pendulum rather than the Arduino's crystal oscillator. Could be a show-stopper. Eek.

                            Ta,

                            Dave

                            #494705
                            John Haine
                            Participant
                              @johnhaine32865

                              A quick test on my 2mm rod 1m long shows that its sag is ~20mm over the length under its own weight. Weight goes down as the square of radius and YM as the cube or something? So as long as Dave has enough length it should be possible.

                              On the question of locking to the digital controller, there's been quite a lot of discussion about this. One way to ensure it isn't happening is to make the pendulum period asynchronous to the Arduino – you may find that its period "beats" but the effect should cancel out on average. You could put some variable delay in the arduino code to show that the pendulum period is not locked?

                              #494707
                              Martin Kyte
                              Participant
                                @martinkyte99762

                                As an aside, the Shortt-Synchronome system operate like this (I think I have it right). The Synchronome is used to time the impulse of the Shortt free pendulum with the period of the Synchronome set slightly longer than that of the Shortt. Timing pulses from the Shortt pendulum are used to operate a hit and miss synchroniser where once the Synchronome is sufficiently 'retarded' it receives an additional push from the synchroniser spring which advances it a little. Thus the period of the Shortt pendulum regulates the period of the Synchronome which generates the timings signals.

                                To remain true to this system assuming you have produced a high quality free pendulum, that pendulum should be arranged to adust the oscillator frequency of the Arduino which is then divided down to generate the required period to match the period of the free pendulum. The arduino needs to predict where in time the beam break occurs and compare predicted with actual. If the predicted is earlier than the actual the oscillator needs to slow down and vice versa. The Arduino timebase can then be used to time the impulse point and by normal counting generate the TIME. This also ensures that the timing of the impulse comes from the Free Pendulum and not the arduino and is independent of the point in the oscillation where the impulse occurs.

                                Note: The Trinity clock group used a pulse decay system and level sensing to achieve sub sampling period accuracy on their sensor. See Instrumentation on their website.

                                regards Martin

                                #494709
                                Joseph Noci 1
                                Participant
                                  @josephnoci1
                                  Posted by SillyOldDuffer on 08/09/2020 14:22:31:

                                   

                                  Working on the electromagnet now. …

                                   

                                  WRT magnetic excitation of a pendulum – and not being familiar with the field at all – I can accept that the 'sharp' impulse can perturb the pendulum in modes additional to the desired one – what about this –

                                  Place the electromagnet at the one end of the pendulum swing and use an optical sensor to detect the pendulum position as it approaches the magnet. Have the magnet ALWAYS energised, the level of to be determined while tuning the setup. Then as the opto is triggered, linearly reduce the magnetic field ( current through the coil) to zero, with the zero achieved at some adjustable distance before the pendulum turns around in its swing.

                                  To try have a 'sufficient' magnetic field lying in wait for the pendulum's approach, and as it enters the (now very gentle) tug of the field reduce the field to zero as the pendulum approaches end of swing.

                                  I believe this would impart very little undesired perturbation to the pendulum, and any second order effect should terminate before the pendulum turns around.

                                  Joe

                                  edit: – remove an errant 'n'…

                                  Edited By Joseph Noci 1 on 08/09/2020 15:38:53

                                  #494712
                                  Joseph Noci 1
                                  Participant
                                    @josephnoci1

                                    Dave, would the frequency locking concept used in many GPSDO's not work here ?- where they lock to the GPS 1Hz time clock –

                                    The GPSDO I built uses the 1Hz time stamp from the GPS, which has a lot of jitter and short term inaccuracies, and the rising edge of that is clocked by the reference oscillator we are trying to stabilize, and then into a phase detector whose output is filtered in software – often a 32 to 64 tap IIR filter, easy on an Arduinio at 1Hz…This then locks the reference oscillator.

                                    So, if you get two of those medium class GPSDO's , available relatively cheaply, and use one as your reference – then use the second one as the clock lock – instead of the 1PPS GPS time stamp feeding the phase detector, feed it from the pendulum opto detector. Then lock THAT GPSDO's reference oscillator to the pendulum period, and compare the reference GPSDO oscillator clock to the pendulum locked clock by means of another phase detector. That way there is no chance of locking to any obscure reference.

                                    Maybe I'm just blowing smoke..

                                    Joe

                                    #494715
                                    duncan webster 1
                                    Participant
                                      @duncanwebster1

                                      This is all getting a bit esoteric. using a super accurate GPS clock to control the rate of a pendulum (which I have seen written up) seems like cheating to me, you might as well use the GPS clock to tell the time.

                                      As long as SOD's pendulum is telling the Arduino when to trigger the magnet I don't see how the Arduino clock frequency comes in to it? You could achieve the same result with a board full of discrete logic chips, discharging a capacitor through the electromagnet ,no clock at all, unless you count a capacitor/magnet combination.

                                      If still worried, you can get 3.3v Arduinos which work at half clock speed, if bot give same result then clock speed doesn't matter, or just add weights on top of the pendulum bob and see whether it changes the pendulum rate as predicted, if it does the pendulum is in control.

                                      I still think that it doesn't matter how you impulse a pendulum as long as you do exactly the same every time, Temperature and buoyancy/drag effects need to be kept under control, I was going to put a heater in my clock, but failed miserably to make a decent fitting door!

                                      I our house, no matter how accurate the clock, SWMBO will always be late, it's a matter of principle with her.

                                      #494720
                                      Martin Kyte
                                      Participant
                                        @martinkyte99762

                                        This is all getting a bit esoteric. using a super accurate GPS clock to control the rate of a pendulum (which I have seen written up) seems like cheating to me, you might as well use the GPS clock to tell the time.

                                        Totally agree with that

                                        As long as SOD's pendulum is telling the Arduino when to trigger the magnet I don't see how the Arduino clock frequency comes in to it?

                                        The pendulum triggers the arduino timer which fires the impulse some fixed TIME later (Arduini timing). The impulse only occurs at the same POINT if the pendulum is travelling at the same speed.

                                        regards Martin

                                        #494725
                                        SillyOldDuffer
                                        Moderator
                                          @sillyoldduffer

                                          Inching towards impulsing the bob. This is the relay driver circuit:

                                          relaydriver.jpg

                                          D13 is the pin connected to the built-in LED on the Arduino Board. Might see it flash!

                                          Not had time to take in the other comments yet. Joe's soft magnet idea is interesting except I'm aiming to swing the pendulum by only 3° or so and the bob will never be far away. Still going to try it; the code is easy enough, but I think being on risks the magnet acting as a brake.

                                          To self-start the clock I'm going to send powerful pulses at to match the pendulums period. When the bob is moving enough to break the beam, the code will switch to maintain mode in which much shorter and carefully timed pulses will be triggered optically.

                                          Duncan's comments are reassuring. I'm worried I've accidentally built a phase-locked loop!

                                          Breadboard the driver and write some code next.

                                          Dave

                                          #494726
                                          John Haine
                                          Participant
                                            @johnhaine32865

                                            I don't think we are trying to lock, but to avoid locking!

                                            The end of the swing is the worst possible point to impulse. Ideally the impulse should be applied at the centre, or equally either side of it. Woodward shows that actually the impulse shape is largely irrelevant, if you get its "phase centre" in the middle of the swing – this is in effect the "centre of gravity" of the impulse. The shape doesn't matter because the pendulum's resonance filters out all the higher harmonics, you just want the fundamental to be applied as a force in phase with the pendulum to accelerate it at the centre of swing, where it has ideally no effect on timing. If there is a phase error, it causes a fractional change in time which is reduced by a factor of 2Q for small errors – so Q should be as high as possible. Q is determined by bob mass, period, and air losses.

                                            I think there should be no worry about exciting spurious modes by a short spiky impulse applied directly to the bob provided it is in the plane of the swing. You don't want to be exciting a "back to front" mode as well. One thing I have noticed about the small diameter rod I have is that it's not circular. A non circular rod may induce spurious modes as it will have different bending moduli in different planes, and the modes will have different frequencies.

                                            Clocks can be made with a small magnet on the bottom of the bob which passes over a coil at the centre of the swing – this triggers a transistor that applies an impulse (via the same coil) largely downwards at the centre, starting just before and ending just after the centre position. You could do this also using an opto to sense the centre. The opto could drive the coil directly rather than through a processor, which would avoid the processor delay affecting the timing. I believe (but haven't yet proved) that if you simply use a coil to attract the bob downwards for a short period starting just before BDC and ending just after, it will apply an impulse that increases amplitude.

                                            The role of the processor will be to monitor and control amplitude, and correct the displayed time. On my Arduinome this is done essentially by moving the displayed time back by a second every "N" swings – the same approach is used in many quartz clock ICs.

                                            I mentioned earlier that someone posting in the Synchronome1 group uses a coil off to the side, as described by Joseph, but rather a large flat coil, which is impulsed in the swing centre. Of course the magnetic efficiency is not very good (as it's probably 75 – 200 mm away from the bob). This configuration is dual purpose as it could also start the bob swinging.

                                            Avoid an iron core in the impulse magnet, remanent flux can disturb the bob's motion.

                                            One of the reasons I didn't use magnetic impulsing in my clock was to avoid interaction between the processor clock and the pendulum. The latter is impulsed by a gravity arm with a little roller which is placed on a "dead roll" on the pallet just before the centre of swing, where it has no effect. As the pendulum swings through the centre the roller "runs down" a little ramp which generates the impulse, then is caught on another dead roll until the processor lifts the arm up again. So the impulse timing is done by the pendulum itself. This is the same principle as in the original Synchronome, and the Shortt. All the 'Nome had to do was to lower the impulse roller onto the free pendulum's pallet just before BDC, so the impulse was taken by the pendulum exactly when it was wanted.

                                            #494728
                                            Joseph Noci 1
                                            Participant
                                              @josephnoci1
                                              Posted by duncan webster on 08/09/2020 16:10:24:

                                              This is all getting a bit esoteric. using a super accurate GPS clock to control the rate of a pendulum

                                              Not trying to do that at ALL! I Nowhere mentioned trying to lock the pendulum to GPS…I locked a reference oscillator to the pendulum…

                                              And By Martin Kyte

                                              The pendulum triggers the arduino timer which fires the impulse some fixed TIME later (Arduini timing). The impulse only occurs at the same POINT if the pendulum is travelling at the same speed.

                                              Yes, of course, I get the picture, but against WHAT do you measure it???

                                              My suggestion was not to lock to the GPS(DO), but to use the GPSDO as a reference to see how accurate and consistent the pendulum swing is. The second 'GPSDO', which IS locked to the pendulum, ie, converted to a PENDULUM LOCKED OSCILLATOR ( NOT the pendulum to it, if you read carefully..) is just so that you can easily compare two hi-frequency PHASE LOCKED clocks to measure accurately the delta and therefore the pendulum timing and jitter. The first clock is phase locked to GPS 1PPS, the second to PENDULUM 1PPx

                                              If you are chasing the sort of accuracy implied in Dave's intent, just observing the pendulum opto- sense pulses on a 'scope is not going to cut it..

                                              If your measurement tools are of lower accuracy or resolution than what is being measured, you ARE blowing smoke..

                                              Joe

                                              #494758
                                              duncan webster 1
                                              Participant
                                                @duncanwebster1

                                                Ah, I hadn't twigged that SOD was proposing to impulse some time after the sensor detected the pendulum. I'll have to have another think.

                                                Impulsing at the extreme of swing just makes life more difficult, and I haven't seen any advantage yet apart from stopping the Foucault effect.

                                                I didn't suggest that Joe was referring to using GPS to correct the pendulum, but I have seen that written up somewhere. I think that changed the amplitude to fine tune the rate.

                                                #494768
                                                SillyOldDuffer
                                                Moderator
                                                  @sillyoldduffer
                                                  Posted by duncan webster on 08/09/2020 20:14:40:

                                                  Ah, I hadn't twigged that SOD was proposing to impulse some time after the sensor detected the pendulum. I'll have to have another think.

                                                  Impulsing at the extreme of swing just makes life more difficult, and I haven't seen any advantage yet apart from stopping the Foucault effect.

                                                  The advantage of impulsing at the end is that a single electromagnet can both start and maintain the clock. I've also a notion it will keep the pendulum on track, there being little to stop the bob swinging in an ellipse, perhaps a design fault. I'm thinking now of fitting a second electromagnet at the bottom of the swing to do the impulsing with the other dedicated to starting.

                                                  State of play when I downed tools for tea: the Arduino successfully starts the bob from rest after twelve 50% pulses.

                                                  Now I know how big the relay coil is I reckon a 3D printed holder for it (or them) and the IR transmitter/receiver is in order. Then the whole lot can be glued neatly as a module under the bob.

                                                  Dave

                                                  #494823
                                                  John Haine
                                                  Participant
                                                    @johnhaine32865

                                                    Dave, going back to your relay drive circuit, I don't know what pulse length you are aiming at but the configuration you have with the flywheel diode will lengthen the pulses because the current that was flowing through the transistor will flow through the diode when the it switches off, and decay exponentially depending on the inductance. This could be solved by adding a resistor in series with the diode, chosen so that the inductive kick plus the supply voltage remains within the max Vce rating of the 2n2222 (30V I think), and/or removing the iron core (advisable anyway to prevent remanent magnetism from perturbing the pendulum). Could also replace the 2n2222 with a MOSFET with a significantly higher max voltage.

                                                    #494838
                                                    SillyOldDuffer
                                                    Moderator
                                                      @sillyoldduffer
                                                      Posted by John Haine on 09/09/2020 10:14:07:

                                                      Dave, going back to your relay drive circuit, I don't know what pulse length you are aiming at but the configuration you have with the flywheel diode will lengthen the pulses because the current that was flowing through the transistor will flow through the diode when the it switches off, and decay exponentially depending on the inductance. This could be solved by adding a resistor in series with the diode, chosen so that the inductive kick plus the supply voltage remains within the max Vce rating of the 2n2222 (30V I think), and/or removing the iron core (advisable anyway to prevent remanent magnetism from perturbing the pendulum). Could also replace the 2n2222 with a MOSFET with a significantly higher max voltage.

                                                      Noted thanks. I've not noticed any residual magnetism in the relay core, but a Hall Effect device might show otherwise. I'm not too worried about the pulse length yet because the plan is to experiment: the pulse length will be slightly bigger than the minimum needed to keep the clock going, and it may not be applied to every swing. This morning's test showed more experiment to be necessary because last night the pendulum started reliably after twelve pulses, now it doesn't. I suspect it's because the magnet is temporarily mounted on a blob of blue tack and moved while I snored!

                                                      Main reasons for the 2N2222 is I got some and they're cheap. Max ratings up to about 40V and 800mA, well within the coil which is 5V at 70mA. My oscilloscope shows the diode managing the inductive spike; overshoot under a volt, negative rather less.

                                                      Does seem there are endless opportunities for minor improvements. At this stage I'm after the big things; can I make it work, then what causes the worst errors one at a time. For example, I took on board your suggestion that a tube is stronger than a tripod by adding a reinforcing ring to the design. Not proven yet that's good enough, though adding it noticeably stiffened the tripod – a good thing. Like as not there will be a Mark 2 design to address a shower of shortcomings.

                                                      I'm keen to get the clock starting and running reliably. Several suggestions and comments to check against the prototype once it goes. Out today unfortunately.

                                                      Ta,

                                                      Dave

                                                    Viewing 25 posts - 26 through 50 (of 307 total)
                                                    • Please log in to reply to this topic. Registering is free and easy using the links on the menu at the top of this page.

                                                    Advert

                                                    Latest Replies

                                                    Viewing 25 topics - 1 through 25 (of 25 total)
                                                    Viewing 25 topics - 1 through 25 (of 25 total)

                                                    View full reply list.

                                                    Advert

                                                    Newsletter Sign-up