Precision pendulum techniques

Advert

Precision pendulum techniques

Home Forums Clocks and Scientific Instruments Precision pendulum techniques

Viewing 25 posts - 351 through 375 (of 502 total)
  • Author
    Posts
  • #652707
    Martin Kyte
    Participant
      @martinkyte99762
      Posted by SillyOldDuffer on 17/07/2023 21:41:04:

      Posted by Martin Kyte on 17/07/2023 17:11:32:

      I am playing devils advocate on this but I think it’s possibly a question that you need to be able to defend. As I said before what you have produced thus far is astonishing and so interesting so please don’t think I’m in any way criticising.

      best regards Martin

      I agree. And I'm very grateful for awkward questions because peer review is essential to what I'm doing. Left to my own devices I'm perfectly capable of believing in all manner of deluded nonsense! Much safer to let the team comment and tackle any issues raised honestly.

      Thought experiment: would it be acceptable if I replaced GPS in Stage 1 by comparing my clock to a century old Shortt Synchronome?

      The Shortt clock's rate would be determined from star transits, and accuracy improved by resynchronising it to star time every night. (We shall have to move to Hawaii to ensure clear skies. A terrible imposition I know, but science demands sacrifices! I'm sure Morton's will pay the bills.)

      Not as accurate or convenient as GPS, but I think a Shortt-Synchronome and a 24×7 team recording temperatures and pressures for a few months would get enough data to do the statistics. The necessary sums could be done with pencil and paper, though another team would be needed to do the mass of horrible arithmetic.

      Dave

      To my mind that would be acceptable. I also don’t object to automatic data gathering or using modern computers to do calculations. The heart of my objection is the use of timing technology in advance of the pendulum when used as a reference to generate the data set used for compensation. This essentially builds the results of the atomic clock into a component used in the later running of your clock. It’s difficult to argue that it’s a pure pendulum clock after that. You only know the time marks of your clock because you compare to GPS. You then rely on your clock behaving the same when you know the environment and have successfully produced your code to predict its beats. You are therefor relying on GPS albeit embedded in your code to tell the time.
      Regards Martin

      Advert
      #652747
      S K
      Participant
        @sk20060

        Michael: I have not looked at the details of that project beyond wondering which photodiode was used (I couldn't find it specified, actually) and which amp or comparator was used.

        However, the speed of a comparator is related, in part, to the "overdrive" – the magnitude of the difference between the signal voltage and the threshold voltage. A typical comparator experiencing 100mV of overdrive will respond much faster than one with only 1mV. This dependency is sometimes called "time walk", and it can be a nuisance in some applications.

        But more importantly, the project uses two sets of sensors, right? If so, it's actually the difference in time between the entry and exit sensors that is of interest, not necessarily the individual sensor's own speeds. This should be related to the bullet's speed and the distance between sensors, while folding in some of the individual sensor's performance too as noise in the measurement. It seems likely this is where the "100 ns" number comes from.

         

        Edited By S K on 18/07/2023 14:23:01

        #652749
        Michael Gilligan
        Participant
          @michaelgilligan61133

          Thanks for trying to explain … I have to admit that I am still lost

          It’s not important though: I was originally admiring his high-speed LED flash unit, and just tripped-over the ‘light gate’ whilst I was there.

          MichaelG.

          #652853
          John Haine
          Participant
            @johnhaine32865

            I haven't taken the time to work out how all the light gate works, but maybe the 100ns comes from a differential measurement. Each comparator may have a propagation delay of 1us but as he uses a device with 4 on the same die they may be quite well matched.

            More interesting to me is the way he arranges the comparator threshold to track ambient light level, though he could equally well have just ac coupled the photodiodes to the comparator inputs. I'm planning such a scheme for the next iteration of my current clock if efforts to exclude ambient IR aren't good enough.

            #652866
            SillyOldDuffer
            Moderator
              @sillyoldduffer
              Posted by John Haine on 19/07/2023 10:44:59:
               
              …if efforts to exclude ambient IR aren't good enough.

              You've probably done similar already, but I found it helped to position the receiver with its back to the sun, protected with a blob of plasticine.

              The big improvement, I won't claim bomb proof, was putting sender and receiver in sealed Brass tubes with slotted ends acting as a sort of collimator:

              dsc06802.jpg

              The dark side Brass tube above contains the sender, not shielded at the back.

              However, the receiver Brass tube, with its back to the sun, is shrouded with a length of Aluminium tube blocked with black plasticine. The only way IR can get in, I hope, is through the collimator slot, which is aligned with the sender.

              dsc06803.jpg

              In my build the collimator is important because IR bounces off all the internal metal work, including the moving bob. I had multiple problems with unshielded IR sender and receiver. Sun shining on the receiver alters its apparent sensitivity, whilst IR from the sender or sun reflecting off the bob and structure causes false triggering. Even though my pendulum should be immune when it's working in a light-proof container, I will retain the shield and collimator, and will probably blacken the shiny metal internals.

              At this stage of the game, IR management is more important to me than fitting the fastest possible receiver. The very basic circuit and devices I'm using are good enough to detect that my pendulum period varies distinctly beat by beat (microseconds). Plenty of other problems to fix before I need to improve the IR system.

              Dave

               

               

              Edited By SillyOldDuffer on 19/07/2023 11:57:32

              #654980
              John Haine
              Participant
                @johnhaine32865

                Planning to complete the build of my new clock, I'm thinking about instrumentation. The clock will be located in a fairly prominent position in our living room, and I have a friend who will make a nice looking case for it. I would like to monitor its running but I don't really want to have a Raspberry Pi with its accoutrements hanging round it or taking more space in the case. It did occur to me that it would be easy to make the pendulum pulses drive one of the low-cost 433MHz telemetry transmitters so I could have the monitoring kit elsewhere in the house. These use on-off keying so should be pretty deterministic.

                Does anyone have any experience of using these for this sort of application please, or have ideas for an alternative? Bluetooth has been suggested but its protocol will have variable delays.

                #654983
                Tony Jeffree
                Participant
                  @tonyjeffree56510

                  They're cheap as chips & look easy enough to set up –

                  https://hobbycomponents.com/wired-wireless/1054-433mhz-transmitter-receiver-modules-with-antenna

                  Of course, even with something like this that is on the face of it pretty simple and transparent, there will inevitably be the potential for variable delays, given that the transmitter & receiver operation isn't instantaneous, and the receiver will have some threshold for detecting the carrier. Worth a try though.

                   

                  Edited By Tony Jeffree on 03/08/2023 12:01:39

                  Edited By Tony Jeffree on 03/08/2023 12:16:51

                  #655036
                  S K
                  Participant
                    @sk20060

                    The cool kids all use Bluetooth or WiFi to transfer data to apps they create that run on their phones. Small WiFi-enabled microcontrollers such as ESP32 are barely bigger than those 433MHz devices. Do a minimal amount of math and there should be no latency-related issues.

                    But I can see the draw of a simple "binary" transceiver.

                    #655091
                    SillyOldDuffer
                    Moderator
                      @sillyoldduffer
                      Posted by S K on 03/08/2023 18:04:09:

                      The cool kids all use Bluetooth or WiFi to transfer data to apps they create that run on their phones. Small WiFi-enabled microcontrollers such as ESP32 are barely bigger than those 433MHz devices. Do a minimal amount of math and there should be no latency-related issues.

                      Um, the cool kids are probably wrong. John mentioned the issue in his question – protocol overheads. Bluetooth, which is a form of Wifi, has number of protocols available (synchronous or asynchronous, with connection set-up, link management, acknowledge, error correction, retransmit, multiplexing, buffering, segmentation and polling etc. ) All good stuff, and quick, but not time deterministic. Wouldn't matter for nearest second clock purposes, but bad for sub-second timings.

                      I bought an ESP and some 433MHz modules ages ago for time trials but am miles away from doing them properly – dreadful slow progress elsewhere on my to-do list! From memory, I fired up a pair of 433MHz modules to check they worked and found they were very slow, probably limited by bandwidth and modulation method. If I can find them I'll measure what they can manage.

                      Dave

                      #655095
                      Bazyle
                      Participant
                        @bazyle

                        While 433MHz stuff works for remote controls if you are pressing the button every second the battery consumption might soon be a problem. So you rig up a mains psu. But by the time you have run the wires from that along the mantlepiece you might as well have run the wires from a reed switch all the way to another room. What's more if only carrying signal current you can use fine shellac insulated wire virtually invisible along the skirting.

                        Elsewhere sunshine has been mentioned. Is this going to cause temperature related variations in the electronics? We have major problems every summer with telco cabinets in the streets which are balanced over a wide temp range but then suddenly go over their limit at midday and crash out until the cool of the night. (in case you are wondering hot countries are more careful about positions out of the sun or underground)

                        #655105
                        John Haine
                        Participant
                          @johnhaine32865
                          Posted by S K on 03/08/2023 18:04:09: Do a minimal amount of math and there should be no latency-related issues.

                          Um… Please explain?

                          #655111
                          S K
                          Participant
                            @sk20060
                            Posted by John Haine on 03/08/2023 22:24:13:

                            Posted by S K on 03/08/2023 18:04:09: Do a minimal amount of math and there should be no latency-related issues.

                            Um… Please explain?

                            I mean that if you deliver period measurements, for example, instead of trying to send optointerrupter on/off signals, then latency should not be a bother. Of course, that means that you must be satisfied with the way those period measurements are made, and that may require another module if you want to do it in a particularly-accurate way, but many such modules are also postage-stamp sized. (BTW, I am not promoting ESP32's and have never used one; it's just an example.)

                            Just curious, though: What sort of case are you imagining that has so little room? I'm making some progress towards mine, but thus far I'm using only an aluminum profile as a "case," i.e., just a mounting scheme. So I'm also considering some sort of remote instrumentation.

                            I second the above about measuring the latency or temporal noise in the 433 schemes before use.

                            #655112
                            S K
                            Participant
                              @sk20060

                              So I have a timing system running now, albeit a sketchy one. At the moment I am using a mini 16MHz Arduino. I'm getting the usual ~62.5ns resolution from that, but I intend to replace it with something faster down the road (I have a 120 MHz stand-in on-hand).

                              I doubt that the Arduino keeps particularly good time, so I've attached an auxiliary RTC (the popular DS3231, temp. compensated to a decent 2 ppm from 0 to 40C) and a separate temperature sensor (MCP9808, typical 0.25C accuracy).

                              Anyway, my question: I can think of several very different ways to do timing, but people here have already tried many things and learned a lot in the process. What is the current wisdom on the best approach? Thank you.

                               

                              Edited By S K on 04/08/2023 01:56:59

                              #655113
                              S K
                              Participant
                                @sk20060

                                Oh, yes: The cool kids are right!

                                How cool is it to look at your cell-phone and know what the time is straight from your free pendulum clock, instead of submitting like a blinkered slave to whatever Apple says it is!

                                Plus, you can obsessively monitor its performance from almost anywhere in the world.

                                A win-win all around! Cool!

                                #655139
                                John Haine
                                Participant
                                  @johnhaine32865

                                  I mean that if you deliver period measurements, for example, instead of trying to send optointerrupter on/off signals, then latency should not be a bother. Of course, that means that you must be satisfied with the way those period measurements are made, and that may require another module if you want to do it in a particularly-accurate way, but many such modules are also postage-stamp sized. (BTW, I am not promoting ESP32's and have never used one; it's just an example.)

                                  My approach is to use a picPET07 driven by a 10MHz OCXO to time both edges of the pendulum pulse. Far more accurate than an Arduino can achieve. (In answer to your question about timing approach.) The OCXO takes 5V 300mA continuous to keep its heater on, more like 500mA on startup. That would make it the largest consumer of power in the clock. Also ideally needs a linear regulator which assuming a primary supply of 12V (to give headroon for the escapement drive) gets rather hot! And if the Pi is in the case too it doubles the supply requirement again.

                                  The clock will need mains power and battery backup. I've already done this in another clock so quite familiar with the approach – but putting the OCXO and the Pi in the case means a much bigger battery.

                                  My experience with a headless Pi with WiFi connectivity for logging is not good – they have a habit of dropping off the WiFi and need resetting to recover which stops the log. I prefer to have an MMI on the Pi and map a folder to my Windows file system for data transfer.

                                  I would obviously do some measurements on the 433MHz Tx/Rx to see how they perform – one should arrive soon. Cheap as chips.

                                  #655218
                                  SillyOldDuffer
                                  Moderator
                                    @sillyoldduffer
                                    Posted by John Haine on 04/08/2023 10:39:31:

                                    I mean that if you deliver period measurements, for example, instead of trying to send optointerrupter on/off signals, then latency should not be a bother. Of course, that means that you must be satisfied with the way those period measurements are made, and that may require another module if you want to do it in a particularly-accurate way, but many such modules are also postage-stamp sized. (BTW, I am not promoting ESP32's and have never used one; it's just an example.)

                                    My approach is to use a picPET07 driven by a 10MHz OCXO to time both edges of the pendulum pulse. Far more accurate than an Arduino can achieve. (In answer to your question about timing approach.) The OCXO takes 5V 300mA continuous to keep its heater on, more like 500mA on startup. That would make it the largest consumer of power in the clock. Also ideally needs a linear regulator which assuming a primary supply of 12V (to give headroon for the escapement drive) gets rather hot! And if the Pi is in the case too it doubles the supply requirement again.

                                    The clock will need mains power and battery backup. I've already done this in another clock so quite familiar with the approach – but putting the OCXO and the Pi in the case means a much bigger battery.

                                    My experience with a headless Pi with WiFi connectivity for logging is not good – they have a habit of dropping off the WiFi and need resetting to recover which stops the log. I prefer to have an MMI on the Pi and map a folder to my Windows file system for data transfer.

                                    I would obviously do some measurements on the 433MHz Tx/Rx to see how they perform – one should arrive soon. Cheap as chips.

                                    Bazyle's question first: does temperature alter the electronics? Potentially yes. Definitely is the electronic clock is based on the computer's oscillator, less so if the electronic clock is a Real Time module, or an OCXO, and not at all if the electronic clock is GPS based. So needs thought.

                                    John's remarks above – my approach is very similar except I use an Arduino rather than a PIC.

                                    Ages ago John drew my attention to the PICPET chips. These use a hardware counter/timer to get high accuracy, and the same technique can be implemented on Arduino (Atmel) and other microcontrollers. The only disadvantage of PICPET is the chip can't be programmed to do anything else: it can only be a Precision Event Timer.  Otherwise, they are the bees knees.

                                    Arduino et al. can be programmed to do PET and other functions, but there are ifs and buts. PICPET can be plugged into an accurate 10MHz OCXO, but the Arduino has a 16Mhz uncompensated oscillator. An external clock can be connected to an Arduino pin to do PET, but it's limited to 6.4MHz tops. In practice I run it off a 5MHz OCXO, but this loses a lot of resolution compared with 10 and 16MHz.

                                    My sub-miniature soldering skills aren't up to replacing an Arduino's onboard crystal with an accurate 16MHz source. What I have done is have the Arduino run two PETs off the onboard cytstal. The first measures the crystal frequency once per GPS second, which tells me the oscillators real frequency over the last delta. The second PET measures the pendulum relative to the crystal, whose actual frequency count during the last GPS second ago is known, and can be error corrected. I doubt the trick is better than an OCXO because the crystal may have drifted whilst being counted, but results are in the same ball-park.

                                    The ATMega 16U4 and PIC chips are both 8 bit time predictable with support for counter/timer Input Capture. Other microcontrollers are more or less suitable. Not all support Input Capture. As far as I can tell the ESP8266 has no programmable hardware timer functions at all. The ST32 family (Nucleo) are promising, but the system clock doesn't run at a steady rate – the chip pulls fancy tricks to increase average speed, by running some instructions faster than others. I've not confirmed it's possible to drive an ST32 counter timer with an external clock and get reliable high accuracy timing.

                                    The Raspberry Pi has a multi-user multi-tasking SOC. It pulls even more fancy tricks to increase average speed, and an operating system schedules work, not the programmer. Though possible to get close to real time performance, all processes are regularly or irregularly interrupted by the operating system, which makes accurate sub-second timing of external events difficult. On the other hand, PI supports Network Time Protocol, always within 100 mS of atomic time, usually within 20mS, and it's not difficult to GPS discipline a Pi to get better than 10mS accuracy. Though poor at measuring short external events, a GPS'd Pi is about as good as it gets for long term accuracy. Provided that is the network stays up! I intended to fixed my Pi's network problems by hardwiring it with Ethernet, but moving it closer to the router made WiFi reliable.

                                    I found my 433MHz modules and remembered why they're so slow. I bought a cheap controller pair of the type used to open garage doors. They recognise 5 or 6 'commands', which can be encoded to send data, but the transmission rate is too slow for clock logging. I need to cough up for a proper telemetry pair, about £30. The first one I found only does 9600 baud without error checking. More research needed.

                                    Dave

                                     

                                     

                                    Edited By SillyOldDuffer on 04/08/2023 21:50:49

                                    #655225
                                    John Haine
                                    Participant
                                      @johnhaine32865

                                      The only disadvantage of PICPET is the chip can't be programmed to do anything else: it can only be a Precision Event Timer. Otherwise, they are the bees knees.

                                      True – but then they are only a PIC microcontroller, cheap as chips, and the code is in the public domain. Just a serial interface into a host needed.

                                      #655237
                                      SillyOldDuffer
                                      Moderator
                                        @sillyoldduffer
                                        Posted by John Haine on 05/08/2023 07:28:50:

                                        The only disadvantage of PICPET is the chip can't be programmed to do anything else: it can only be a Precision Event Timer. Otherwise, they are the bees knees.

                                        True – but then they are only a PIC microcontroller, cheap as chips, and the code is in the public domain. Just a serial interface into a host needed.

                                        Agree, I think the PicPET chips are brilliant. For anyone interested, here's a PiCPET and Arduino Nano side by side.

                                        picpet.jpg

                                        The PICPET is ringed in red. There are only 8 pins, 3 of which aren't used. The main complication on a modern computer is the output is RS232 serial at 9600baud. In the good old days all computers had RS232, but this has been replaced by USB. To connect it to a new PC or Apple, it's necessary to spend a few pounds on an RS232 to USB converter. Also needed, a stable accurate 10MHz signal, ideally an OCXO. If you want to change what the chip does, PICPET is coded in PIC Assembler. Delightfully cheap and simple plus top performance.

                                        In contrast, the Nano has 30 pins, and the chip has more memory and capabilities than the little PIC. USB is built in, and so is a 16MHz oscillator, unfortunately not very stable! Programmed in C from the Arduino IDE, and there are a multitude of plug-in modules, with software, available to simplify the electronics. You don't have to design and build your own Motor controller, Real Time Clock, Accelerometer and Sensor boards etc as well as write code. Precision Event Timing can be incorporated into a larger system. In my experimental pendulum, the same Arduino:

                                        • runs two PETs, one measuring pendulum period, the other crystal frequency
                                        • drives the pendulum, controlling when the impulse occurs
                                        • reads temperature, pressure and humidity,
                                        • counts pendulum time in seconds and microseconds, compensating for environmental changes s required
                                        • displays Day/Month/Year/HH:MMS locally
                                        • logs the all data to a remote PC and
                                        • responds to commands sent from the PC, such as set current time

                                        All this is more complicated and not so cheap. Also, I haven't got an Arduino PET to measure events as accurately as a PICPET.

                                        Like everything else, the worst shortcoming of the PICPET is what it doesn't do. Monitoring a pendulum clock it's useful to log temperature, pressure and humidity as well as period because they can all influence the pendulum, and PICPET doesn't do that.

                                        Back to obsessing about pendulum precision, after applying temperature compensation, a close look shows air-pressure needs attention too. Maybe humidity as well, certainly if the rod is made of wood. Anyone know what happens to a pendulum's period when water condenses on to a metal bob and rod? I guess it would shift the centre of mass slightly, causing a serious disturbance if condensed water collected on the bob base and then dripped off!

                                        Dave

                                        #655245
                                        John Haine
                                        Participant
                                          @johnhaine32865

                                          Dave, you could surely use software serial with the pP and get the Nano to gather data from a BME280 via I2C? It would then have much less time-critical software to run.

                                          #655250
                                          duncan webster 1
                                          Participant
                                            @duncanwebster1

                                            You can buy the atmel chip out of a Arduino uno with the bootloader (whatever that means) already installed but no crystal. Presumably you could then use an OCXO direct instead of trying to use the OCXO to calibrate the resonator, which is what I think SOD does. You might then be able to programme the chip with the whizbang for Arduino Pro mini.

                                            This is all well beyond my pay grade, so might be rubbish

                                            #655284
                                            SillyOldDuffer
                                            Moderator
                                              @sillyoldduffer
                                              Posted by John Haine on 05/08/2023 11:05:00:

                                              Dave, you could surely use software serial with the pP and get the Nano to gather data from a BME280 via I2C? It would then have much less time-critical software to run.

                                              Great minds think alike! That's where the photo of a Nano and PP6 on the same breadboard came from. The pP6 sent software serial to the Nano, which read a BME280 and added environmental data to the pP6 string, before sending the whole via USB to a PC (actually a Pi)

                                              At that point I discovered I could do PET and collect environmental data with the Arduino alone, advantage being it eliminates a serial hop, and moved on, missing a trick. At the time I didn't have an OCXO, and it's only just occurred to me after reading your post that an OCXO/pP6/Nano combination is a winning combination!

                                              Clearly my claim to have a 'Great Mind' is flawed.

                                              sad

                                              Life dominated by a family crisis at the moment but I should be able to build one later. Not difficult to program and I could use it to measure how good my GPS + ordinary oscillator technique really is.

                                              Ta,

                                              Dave

                                              #655286
                                              SillyOldDuffer
                                              Moderator
                                                @sillyoldduffer
                                                Posted by duncan webster on 05/08/2023 11:55:34:

                                                You can buy the atmel chip out of a Arduino uno with the bootloader (whatever that means) already installed but no crystal. Presumably you could then use an OCXO direct instead of trying to use the OCXO to calibrate the resonator, which is what I think SOD does. You might then be able to programme the chip with the whizbang for Arduino Pro mini.

                                                This is all well beyond my pay grade, so might be rubbish

                                                Not rubbish at all because it gives direct access to all the pins. Downside is having to build the support components already on the Arduino board – more work. I don't calibrate the resonator with an OCXO, it's currently done with GPS, but see my reply to John's comment above. Good idea: might try it.

                                                Dave

                                                #655289
                                                Bazyle
                                                Participant
                                                  @bazyle

                                                  Not heard of PICPET before. Is there a similar concept of a thing that just counts until tripped then starts again but holds the count so you could trip it once a day (accurately) and at your leisure read it to see how many seconds off the clock is.
                                                  Yes I know it could be easily programmed but is it there already like the picpet?

                                                  #655318
                                                  S K
                                                  Participant
                                                    @sk20060

                                                    What you want is a small FPGA with a compensated or controlled reference clock. You should be able to reach say 150-500MHz depending on the FPGA's specs. But FPGAs can be a pain to program.

                                                    I was thinking about the resolution of timing. If the typical noise on period measurements taken via an opto-interrupter is 5us RMS, then you have to average something like 2500 readings before you approximate the resolution of a 10 MHz system clock (5E-6/sqrt(2500)=100E-9).

                                                    Actually, I vaguely recall that the resolution from randomly sampling an interval t is t/sqrt(12). If that's the case, then you have to average 30,000 samples, i.e. over 8 hours.

                                                    Or something like that – I've forgotten more math than I've ever remembered. But if true, it seems that there's a lot of payoff to building a better opto system, especially if you are interested in short-term effects.

                                                    Edited By S K on 05/08/2023 23:21:17

                                                    #655324
                                                    Michael Gilligan
                                                    Participant
                                                      @michaelgilligan61133
                                                      Posted by S K on 05/08/2023 23:19:52:

                                                      […]

                                                      if true, it seems that there's a lot of payoff to building a better opto system, especially if you are interested in short-term effects.

                                                      .

                                                      yesspot-on [ if you will forgive the pun ]

                                                      MichaelG.

                                                    Viewing 25 posts - 351 through 375 (of 502 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