By continuing to use this site, you agree to our use of cookies. Find out more
Forum sponsored by:
Forum sponsored by Forum House Ad Zone

Arduino Pendulum Clock Design - Comments Welcome

All Topics | Latest Posts

Search for:  in Thread Title in  
duncan webster05/10/2020 11:34:14
5307 forum posts
83 photos

I strongly suspect that this is into angels dancing on pins territory, but according to my ruminations the frequency of a pendulum with springiness is

f = 1/(2*pi) * sqrt ( g/L + k/M)

where g = 9.81 m/sec^2, L is length in metres, k is stiffness in Newtons/metre, M is mass in kg.

In the unlikely event of anyone wanting a copy of the sum. send me a pm with your email address.

John Haine05/10/2020 11:46:41
5563 forum posts
322 photos

I'd be interested please Duncan - I think you have my email address?

But for this pendulum where the rod stiffness is that of a bending beam, k isn't the YM of the material but has to be computed from the YM and the dimensions?

duncan webster05/10/2020 14:04:34
5307 forum posts
83 photos

k is the stiffness of the actual rod, which SOD has measured, but as you say if the dimensions and Young's Modulus are known you could work it out.

I'll make a legible copy and send it to you

SillyOldDuffer05/10/2020 15:27:45
10668 forum posts
2415 photos

Centre of bob to suspension point about 223mm giving 877mS per complete swing if anyone has time to check Duncan's formula against reality.

Spent most of today clock-watching and tweaking software in hope of making the thing reliable. Plenty of problems!

  • Clock and computer are on my dining table. Bumping the table does the clock no good!
  • Clock base needs to be level and my table isn't.
  • Pendulum takes about a minute to settle down after starting. (I guess all clocks suffer this.)
  • I expected increasing pulse width would strengthen the impulse. Yeah but! I now see longer impulses braking the pendulum if the magnet is still on when the bob passes BDC. (My bob is attracted by the electromagnet, rather than carrying a permanent magnet to be repulsed.)
  • Sensor upset by sunlight more subtly than first thought. Sunlight at an angle to the bob causes early or late triggering, and I now believe reflections off the bob cause jitter. Maybe Snopake wiil help.
  • Timing's far too critical. Need to redesign the holder so the magnet is positioned accurately under BDC and stays put. To allow experimentation the electromagnet is wedged into the holder with matchstick wedges and the holder is Blue Tacked to the clock base. Not solid enough!

Two steps forward, three back...

Dave

SillyOldDuffer06/10/2020 15:36:19
10668 forum posts
2415 photos

Moved electromagnet last night from directly under the bob (bottom dead centre) to pull it sideways instead:

bobsideunder.jpg

Positioning the electromagnet at BDC minimises any disturbance of the bob when impulse is applied because the bob is travelling at maximum velocity at that point. Sadly my design makes the timing and strength of the impulse critical; why is still under investigation.

Got frustrated last night and moved the electromagnet back to the side position, and got it running in a few minutes. This morning wouldn't run at all. Causes: solar energy on the sensor, even though it's wrapped in silver foil, and the magnet base had moved about 2mm overnight. My suspicion BluTack is a rotten adhesive confirmed!

Anyway, got it going reliably and was able to log how well the pendulum performs over time.

ardclockdriftsidemagnet.jpg

The period of each full swing (in microseconds) is compared with a running average.

When the clock is first started, the pendulum bounces badly for about 3 minutes and then gradually settles down with each swing gradually getting closer to the average. Promising. Or is it?

ardclocksidew8000.jpg

With a longer sample deviation from average is rising again. Could it be temperature or air pressure? Not convinced: I'll add a sensor to see if either curve matches, but I think the effect is too big.

The comparison may be dodgy - statistics aren't my strong suit.

Time for a brisk walk and think in the fresh air.

Dave

Edited By SillyOldDuffer on 06/10/2020 15:37:53

Michael Gilligan07/10/2020 09:32:05
avatar
23121 forum posts
1360 photos
Posted by SillyOldDuffer on 04/10/2020 19:14:35:

[…]

It's deflection characteristic is:

cf0pt5deflection.jpg

This data enables the springiness of the rod to be calculated.

Dave

.

This **LINK** appears to be an excellent description of the calculation process

https://youtu.be/QNQ5qzXII58 : Cantilever Depression - Young's modulus determination

But, I am embarrassed to admit that his accent and speed of delivery make it difficult for me to follow.

... Can anyone suggest an alternative, please ?
... I feel the need to understand this better

MichaelG.

John Haine07/10/2020 10:41:20
5563 forum posts
322 photos

Surely the best way is to fix a known mass at the end of a known length, suspend it vertically, measure the period of oscillation, and back-calculate the YM using Duncan's formula?

Michael Gilligan07/10/2020 10:45:14
avatar
23121 forum posts
1360 photos
Posted by John Haine on 07/10/2020 10:41:20:

Surely the best way is to fix a known mass at the end of a known length, suspend it vertically, measure the period of oscillation, and back-calculate the YM using Duncan's formula?

.

Perhaps it is, John

But I am trying to understand Dave’s experimental results

MichaelG.

John Haine07/10/2020 11:14:20
5563 forum posts
322 photos

Update on my own experiments: with some software tweaks my prototype clock is now running reasonably well on my desk so next step is to transfer it somewhere it can run undisturbed for a few days and have its timekeeping monitored. It has been running for the last 17 hours and has gained 19 seconds quite steadily so obviously needs some tweaking to the pendulum and a readjustment of the compensation counter. To do that I need a better time standard so will acquire the data with timestamps from NTP.

Michael Gilligan07/10/2020 11:36:00
avatar
23121 forum posts
1360 photos

Note: Aside from the range of potential matrix materials ... there are many versions of the carbon fibre filament.

https://en.wikipedia.org/wiki/Carbon_fibers#Structure_and_properties

Predicting the properties of a particular pultruded rod could be ‘interesting’ to say the least !

MichaelG.

Edited By Michael Gilligan on 07/10/2020 11:36:42

duncan webster07/10/2020 11:41:57
5307 forum posts
83 photos

The effect of stiffness is very small even for Dave's lightweight pendulum bob, so John's suggestion is open to lots of uncertainty. Dave's experiment gives a value of 66GPa for Young's modulus in CF, which is lower than I'd expect. One supplier quotes 28-40MPa which is very low indeed (and I think must be wrong), another quotes 181GPa for a 70%fibre/30%resin mix. This is much more what I'd expect. Steel is 207GPa for comparison

Small variation in diameter will have large effect on rod stiffness, it goes as the fourth power

I can't work out how to attach a png to this, so I'll sent some sums to Michael via email, if he can work out how to make it public that's fine. I couldn't understand Michael's link either, is he speaking English?

 

Edited By duncan webster on 07/10/2020 11:42:59

duncan webster07/10/2020 13:23:18
5307 forum posts
83 photos

Easy Composites got back to me. Their figure of 28-40MPa should be GPA, much more sensible, but egg on face all round at EC I should think

Michael Gilligan07/10/2020 17:30:08
avatar
23121 forum posts
1360 photos

This appears to cover it nicely: **LINK**

https://www.doitpoms.ac.uk/tlplib/thermal-expansion/expt1.php

... despite the reference to thermal-expansion dont know

Derivation of the formula is linked from that page.

MichaelG.

.

and second moments of area for various shapes are listed here:

https://en.wikipedia.org/wiki/List_of_second_moments_of_area

Edited By Michael Gilligan on 07/10/2020 17:43:25

Michael Gilligan07/10/2020 17:51:43
avatar
23121 forum posts
1360 photos

... and, with thanks to Duncan:

9e97c0ed-7f97-47ef-ade5-1c35e504fec1.jpeg

.

MichaelG.

SillyOldDuffer07/10/2020 22:25:20
10668 forum posts
2415 photos

Out today, but was able to leave the clock running unattended while logging.

Yesterday, tested logging while typing on the same table. The graph of tick periods shows serious wobbling:

ondiningtable.jpg

My pendulum is exceptionally sensitive to vibration, probably because the rod is unconstrained. Easy to tell from the graph when I wasn't at the table. Don't know what caused the spike while I was out for a walk; I blame the cat.

Left it running undisturbed again whilst I was out today:

quietrun.jpg

Far fewer big deviations, but the magnified scale shows wobble between swings of about ±250uS. (Eyeball guess, number crunched stats when I get home tomorrow.) Not good.

I added a BME280 pressure/temperature/humidity detector and arranged the Arduino to log to a RaspberryPi 3b rather than a PC. A compact low-power setup means I can leave the clock on test for months if necessary. Log files can easily be copied off the Pi at any time because it's wifi networked.

Next steps, measure Q, 3d print the redesigned magnet holder, and reduce the impulse to see if bob wobble can be reduced. Then back to the electromagnet under the bob.

Philosophical question. Although the period of each swing varies wildly, the inaccuracies appear to average out. If I accurately determine the pendulum's average period over several days, and then use average period to drive the mathematical gear train to get HH:MMS, can I claim the clock is accurate? Even in it's rough state, could be OK within 0.5mS. (Assuming I get Bressenham or Duncan's interpolation method to interpolate properly.)

Dave

Michael Gilligan07/10/2020 23:03:02
avatar
23121 forum posts
1360 photos
Posted by SillyOldDuffer on 07/10/2020 22:25:20:

[…]

Philosophical question. Although the period of each swing varies wildly, the inaccuracies appear to average out. If I accurately determine the pendulum's average period over several days, and then use average period to drive the mathematical gear train to get HH:MMS, can I claim the clock is accurate?
[…]

.

Philosophical answer:
I guess that would depend upon what you are intending to time with it

You might like to look at the Royal Observatory Chronometer Trials: **LINK**

http://www.royalobservatorygreenwich.org/articles.php?article=1040

But also consider the performance of Hipp’s Chronoscope: **LINK**

https://onlinelibrary.wiley.com/doi/epdf/10.1111/j.2044-8295.1906.tb00173.x

MichaelG.

John Haine08/10/2020 10:15:29
5563 forum posts
322 photos

It depends on the source of the variations and their statistics, but basically if the period changes randomly from swing to swing then their integral, which is indicated time, will probably not average out. The error typically grows as the square root of the number of periods summed. If you took your average over one time interval, say a day; then over the next day; comparing the two you would see a difference. I did some work on this a while back and for variations resulting from "escapement noise" - i.e. random changes in impulse from period to period - the variation decreases as the bob mass increases.

Woodward also covers this (but I can't remember if he mentions it in MORT, may be only in WOT) - the situation for errors induced by support noise is worse as they always generate on average a losing rate because of circular deviation.

SillyOldDuffer08/10/2020 18:21:02
10668 forum posts
2415 photos
Posted by John Haine on 08/10/2020 10:15:29:

It depends on the source of the variations and their statistics, but basically if the period changes randomly from swing to swing then their integral, which is indicated time, will probably not average out. The error typically grows as the square root of the number of periods summed. If you took your average over one time interval, say a day; then over the next day; comparing the two you would see a difference. I did some work on this a while back and for variations resulting from "escapement noise" - i.e. random changes in impulse from period to period - the variation decreases as the bob mass increases.

Woodward also covers this (but I can't remember if he mentions it in MORT, may be only in WOT) - the situation for errors induced by support noise is worse as they always generate on average a losing rate because of circular deviation.

The following graphs are experimental but I think they both support John's statement that the error won't average out. The rolling average changes.

First graph set is of an overnight run, on dining table, started mid-afternoon, and finished at breakfast. The Arduino logs period, temperature, relative humidity, barometric pressure and calculates the period's running average.

overnightdiningtable.jpg

During the night the pendulum grew wilder. Average period over the run was 878225µS.

The spikes in temperature and humidity and disturbed pendulum at about 16000 ticks coincide with cooking the evening meal. Lots of crashing in the adjacent kitchen.

Temperature drops overnight, and rises suddenly at about 48000 ticks when the central heating fired up. It's timed to stay on for two hours, after that the workers depart and I put on a jumper. Presumably humidity responds to the central heating. Condensation aficionados will note the burst of warmth caused humidity to rise, which will deposit water onto any handy cold surfaces.

There's a hint the rolling average period may be following barometric pressure. Unconvincing.

The gradually worsening turbulence starting at about 18000 ticks is the most obvious defect. My guess is it's due to the pendulum being over-impulsed.

Back home after today's outing, I moved the pendulum, Arduino, and Raspberry onto my garage workbench. Much sturdier than my dining table, no sunlight, cat-proof, and I kept my distance. Result after first 5 hours:

garage1210.jpg

Points of interest:

  • The average period changed! 878225µS up to 879965µS (about 1.4mS)
  • Rolling average in the first graph-set falls, while that in the second rises. (I think a much longer run is needed.)
  • Standard Deviation is much better in the garage: 144.6 vs 922.3 in the house.

The bounce at the end (22000 ticks) is due to me disturbing the clock whilst reinserting the Wifi Dongle; the signal isn't too good in the garage.

Dave

John Haine08/10/2020 18:28:29
5563 forum posts
322 photos

Interesting! Just to note that the sensitivity to barometric pressure is usually pretty low. The Arduinome at the moment is showing about 0.4 microseconds/mbar over several months logging covering a wide pressure range. The value is mainly a function of the bob density.

SillyOldDuffer09/10/2020 16:46:55
10668 forum posts
2415 photos
Posted by John Haine on 08/10/2020 18:28:29:

Interesting! Just to note that the sensitivity to barometric pressure is usually pretty low. The Arduinome at the moment is showing about 0.4 microseconds/mbar over several months logging covering a wide pressure range. The value is mainly a function of the bob density.

Agreed, and also not sensitive to temperature and humidity. I've added correlations to the data analysis and whatever my pendulum is reacting too, it's not the obvious. (I think the matrices below mean almost no correlation between period and the sensor data.

Latest graphs:

duff1932.jpg

The glitch at 57511 ticks in the rolling average was due to me entering the garage, turning the light on, and finding a screwdriver.

Statistics:

Period Statistics from ardlog1932.dta with 83957 samples
Median 879952.0
Average 879941.7
STDEV 459.97
Minimum 878484.0
Maximum 881400.0
Correlations (Pearson)
Period and Temperature
[[1. 0.00202627]
[0.00202627 1. ]]

Period and Air Pressure
[[1. 0.10235348]
[0.10235348 1. ]]

Period and Relative Humidity
[[ 1. -0.08289992]
[-0.08289992 1. ]]

Again the outstanding feature is the pendulum running wild, I assume because it's getting closer to the electromagnet. I'll experiment tomorrow with reducing the impulse, but an amplitude sensor is probably needed.

Misleading the public is always an option. In this version of the graphs, Rolling Average is on the same scale as Variation. Now the data looks much better!

duff1932scaled.jpg

Have I invented a wonderful new clock? The evidence suggests I'm on a sticky wicket unless I can stop the bob going mad. It's sensitive to light and vibration and I still haven't measured 'Q', which is expected to be low. Apart from that, it's marvellous!

One good thing; carbon fibre is standing up well as a rod material.

What I'd like to achieve is a much more stable pendulum where period does correlate to atmospheric pressure. Still lot's to do.

Dave

All Topics | Latest Posts

Please login to post a reply.

Magazine Locator

Want the latest issue of Model Engineer or Model Engineers' Workshop? Use our magazine locator links to find your nearest stockist!

Find Model Engineer & Model Engineers' Workshop

Sign up to our Newsletter

Sign up to our newsletter and get a free digital issue.

You can unsubscribe at anytime. View our privacy policy at www.mortons.co.uk/privacy

Latest Forum Posts
Support Our Partners
cowells
Sarik
MERIDIENNE EXHIBITIONS LTD
Subscription Offer

Latest "For Sale" Ads
Latest "Wanted" Ads
Get In Touch!

Do you want to contact the Model Engineer and Model Engineers' Workshop team?

You can contact us by phone, mail or email about the magazines including becoming a contributor, submitting reader's letters or making queries about articles. You can also get in touch about this website, advertising or other general issues.

Click THIS LINK for full contact details.

For subscription issues please see THIS LINK.

Digital Back Issues

Social Media online

'Like' us on Facebook
Follow us on Facebook

Follow us on Twitter
 Twitter Logo

Pin us on Pinterest

 

Donate

donate