# Gas station without pumps

## 2012 January 20

### Pendulum lab went well

In today’s lab we derived the formula for the period of a simple pendulum (assuming the small-angle approximation), $T= 2\pi \sqrt{L/g}$, then measured both circular and simple pendulums.  For the circular pendulum we measured the radius of the cone on the first orbit and the last orbit, the length of the string (the slant height of the cone), and approximated the period by timing 10 or 20 periods and dividing.  For the simple pendulum, we used the photogate setup described in More on pendulums, to get very precise and repeatable measurements of the period.  The hardest part for us was measuring the length of the pendulums, since the center of mass for the bob was not obvious and the exact position of the pivot was not obvious—these uncertainties probably resulted in length measurements being ±5mm, making a large contribution to inaccuracy.

Here is a table of the measurements (and calculated g) we made for the circular pendulum:

Length cm radius cm num orbits period sec g cm/sec^2
212.4  48.6–46.6 10 2.90  970.8–972.6
212.4  38–52.4 20 2.601  959.8–974.7
161.5  58–60.5 20 2.501  938.7–984.2

The range of estimates for g is larger than I would like.  I think that the decay of the oscillation of the pendulum makes quite a difference.  The average of all the estimates of g is 967 gm/sec^2, which is rather low.

And for the simple pendulum:

Length cm num ticks mean period sec standard deviation g cm/sec^2
207.2 47 2.8958 0.0050 975.4
171.3 74 2.6272 0.0065 979.8
95.5 89 1.9565 0.0025 984.9
54.7 58 1.4809 0.0042 984.7
28.7 44 1.0730 0.0019 984.0

The pendulum ticked reliably for quite a while, and the periods were remarkably consistent.  The estimates of g from the simple pendulum are good to about 0.5%, which is the limitation of accuracy on our pendulum length measurements and close to the limit of the accuracy of the small-angle approximation.  The average of the 5 measurements looks good to about 0.2%, which seems pretty good to me, since we certainly weren’t measuring the lengths that accurately.

I looked up the gravitational field in Santa Cruz on Wolfram Alpha’s gravitational fields widget:

total field | 9.7995 m/s^2  (meters per second squared)
angular deviation from local vertical | 0.00322°  (degrees)
down component | 9.79945 m/s^2  (meters per second squared)
west component | 3.4×10^-4 m/s^2  (meters per second squared)
south component | 0.0316 m/s^2  (meters per second squared)
(based on EGM2008 12th order model; 11 meters above sea level)


While the lab was running, one of the students wrote a Python script (using numpy for mean and standard deviation) to read the data and compute the numbers in the table.  We could have talked directly to the Arduino, but it was simpler to cut the numbers from the Arduino serial monitor and paste them into a file for the script to read. That allowed us to keep the Arduino running throughout, and just cut and paste the good numbers, discarding the junk from starting or stopping the pendulum.

I’m quite pleased with the photogate setup, which was very simple to build and worked reliably during the experiment. Crudely wrapping tape around the string made a lumpy opaque object, whose rotation probably contributed to the standard deviation of the  period—having a smoother cylinder for the optical blocker would probably make the period measurement much more consistent.  But that would not improve the mean estimates much since errors in adjacent period measurements cancel.  I believe that our mean periods are much more accurate than the standard deviations suggests, with errors less than 1 per thousand.

I had to make one change in the Arduino code during the lab to accommodate all the different pendulum lengths—I had a dead time before recognizing the next pulse, to prevent getting 2 pulses per period as the string passed through the beam twice.  I started with a dead time of 1 second, which as a bit too long for the smallest pendulum.  Reducing the dead time to 500 msec for that pendulum made it count reliably.  Note that for the 2nd and 3rd pendulum, we measured for about 3 minutes without a bad time measurement, and could have gone longer if we had had the patience.

## 2012 January 19

### More on pendulums

In Newton’s measurement of g, I described a failed experiment to measure g with a motorized circular pendulum. Further experimentation on my own lead me to adopt for this week’s lab the standard approach using an unpowered circular pendulum.  The cone formed by the string can be described as having height $h$, base radius $R$, and hypotenuse $L$, the length of the string.  If the circular pendulum has period $T$, then $g= 4\pi^2 h/T^2$(derived in the Newton post).  If we make the string long and push the pendulum with the right speed to get a nearly circular (rather than elliptical) motion, then $h=\sqrt{L^2-R^2}$ is nearly constant for many orbits, and we can estimate the period with just a stopwatch by counting 20 or 30 periods.  Using a large enough mass means that neglecting air resistance is now reasonable (which it was not for the tiny mass I started with).

Thanks to John Burk for suggesting that I forget about the motor—that seems to be the best approach, even though I then can’t use the photogate to time the period.  I’m hopeful that we can measure the height and the period accurately enough to get within about 2% of the right value for $g$.

This week in addition to doing the circular pendulum right, I wanted to do simple pendulums.  I’ve assigned problem 4.P.89 in Matter and Interactions, which seems to be the only place in the book that simple pendulums are done.  It is a computational problem, since there isn’t an analytic solution (though the small-angle approximation works pretty well up to about 45°).  I hope the students have done that by tomorrow!

I wanted to measure the period of the pendulum directly (not averaging over many periods), to demonstrate that the amplitude does not matter much.  Unfortunately, I’ve not yet built a sensor that works for this. I tried using the photogate, but I could not hit the 1 cm gap consistently, even with a shorter pendulum.

I also tried using a magnetic sensor (using the circuit I used for the speed-of-sound lab) with a magnet for the pendulum weight, but that triggered at random times as the magnet came close.  Even 20cm away the field was enough to trigger the detector, and I got almost random timings.  A magnetometer was no better than the coil and comparator, as the magnetic field varied chaotically (from movements of the magnet other than the simple pendulum swing, such as twirling on the string).  The magnetometer was usable as a compass, though, which is good, because I originally bought it for the robotics club to use as a compass.  There are some tricky points to using it as a compass, which I’ll talk about in a different post.

I then tried marking the top of the string with a bit of electrical tape and using the photogate there.  That was the most successful so far—if I hold the photogate steady enough, I can get readings repeatable to ±20msec, which is much better than I can do with any other approach I’ve tried.  For one pendulum hanging from the edge of my desk, I either got  two pulses at about 1.11 and 0.45 seconds or one pulse every 1.56 seconds, depending on whether the marker on the string passes all the way through the beam or blocks it continuously at the end of the swing. The random variation I get is probably because of holding the sensor by hand (to align with the string).

If I had a more rigid way to mount the sensor, I should be able get more consistent readings, so my main engineering task was to get a rigid pivot point on the ceiling beam (without making any holes) and mount the photogate in a rigid, but adjustable, way.  Of my two standard mechanical engineering techniques, duct tape and Lego, I chose Lego: Closeup of the photogate, showing the breakout board and sensor wedged between a plate and a beam, with a 2-plate spacer.

Having come up with a nice way to grip the photogate and still be able to swing a pendulum string into the gap, I connected the beam holding the photogate to the same right-angle platform that we had used last week for the motorized pendulum. This left a little gap that I could rest the Arduino board in, so that there was no tension on the wires to the photogate.

I was a bit worried that I might have to put my laptop on top of a ladder, since the USB cord is not very long, but I have a spare pair of USB-to-Cat5 converters (one set is for the robotics project), so I was able to make an extension cord out of a flexible Cat-5 Ethernet cable, giving me enough length to put my laptop safely on the desk. The same Lego that holds the photogate can also support the Arduino, so I don't need to hold anything in my hands.

I had two other ideas I haven’t tried: using one of the ultrasonic range finders to track the pendulum motion and using a video camera to time the motion.  These require interpolation of position data to estimate the period, so I’d rather avoid them for now. The top-of-string photogate will work (I think) for the simple pendulum, and the circular pendulum can be timed with a stopwatch averaged over many periods.  (I could even use the photogate timer as a stopwatch, though the resolution of the stop watch on my Casio wristwatch is 0.01 seconds, and human reflexes make anything less than 0.1 second pretty much noise.)

## 2012 January 13

### Newton’s measurement of g

Filed under: home school — gasstationwithoutpumps @ 22:02
Tags: , , , , , , , The motor for the circular pendulum mounted on a ceiling beam, with a short string attached.

In Chapter 5 of Matter and Interactions, the authors describe an experiment that Newton did to measure $g$, the gravitational field at the surface of the Earth.  The idea is a simple one: have a pendulum moving in a circle.  The size of the circle is a function of the length of the pendulum, the speed of rotation, and $g$. So I thought it would be fun to do an experiment along those lines in physics lab today.

The first step was to make a circular pendulum that could be driven to move at a constant speed.  My idea here was to build something out of Lego, so that we could adjust the speed as needed with pulleys and belts. My son and I built such a device early in the week and put it up on one of the ceiling beams in the room where we do our physics labs.  I put it up that high so that we could have a long string for the pendulum that would be easy to measure.  I had not done any calculations, just guessed that the bead on the string would fly out as we spun the shaft.

We had quite a surprise when we tried it out with a fast-spinning motor (about  9Hz or 540rpm) and a 2m long string.  The bead hung straight below the motor, but the string bowed out in several places, forming a nice pattern of nodes and antinodes. Changing the speed of the motor changed the number of nodes and antinodes. That is where I stopped the pre-lab preparation—the rest of the lab was done with the students.

The first thing we did was rederive the formulas the motion of the mass at the end of the pendulum, using the new whiteboards I had made for the class.  The whiteboards cost under $8 each for 2 2’×3′ boards—the lumberyard sells dry-erase hardboard for$1 a square foot (less if you buy a full sheet, but that was too hard to get home on my bike), plus \$1 for the cutting.  The rest was the cost of the duct tape for the edge and taxes.

The cone formed by the string can be described as having height $h$, base radius $R$, and hypotenuse $L$, the length of the string.  The idea was to measure $L$, $R$, and the period of the pendulum $T$, and from these try to calculate $g$.

We neglected air resistance (probably not a good idea) and so had just two forces acting on the mass: the gravitational attraction to the Earth $(0, -mg, 0)$ and the diagonal pull from the string with magnitude $F_s$. We can get the horizontal and vertical components of the force exerted by the string: $F_s(R/L, h/L)$. The vertical component must match the force due to the Earth as the mass is not moving vertically, so $F_s h/L=mg$, or $F_s = mgL/h$. The magnitude of horizontal component is $F_s R/L= mg R/h$.

The horizontal component is what is accelerating the mass around the circle.  We rederived the formula for that by describing the position of the mass in the complex plane $\Xi(t) = R e^{i\omega t}$ and taking the derivative twice: $d^2 \Xi(t) / dt^2 = -R \omega^2 e^{i\omega t}$.  One of the students was very comfortable with this, the other (who had ostensibly had more calculus), had never seen $e^{i \omega}$.  I gave a very brief mention of doing it with sines and cosines, but did not take the time to do the derivation in those terms.  Note that the magnitude of the force is $m R\omega^2$ and it is directed towards the center of the circle, as we would expect.  The angular frequency $\omega$ is just the speed in radians per second, so $\omega=2\pi/T$.

Combining the two formulas for the horizontal force, we get $mgR/h = mR\omega^2 = m R 4 \pi^2 /T^2$.  We can simplify this to $g=4 \pi^2 h/T^2$.  If we don’t want to measure $h$,we can use Pythagoras’s Theorem to get $g= 4\pi^2 \sqrt{L^2-R^2}/T^2$. After demonstrating the unexpected behavior of the long string, I challenged the students to compute $h$ from the known value of $g$.

To do the calculation we needed the period $T$. In preparation for this, I had bought a “photo interrupter” from Sparkfun and a breakout board to mount it. (Actually, I ordered 2, which was a good thing, since one of them did not work—Sparkfun is sending me a replacement).

I hooked up the photo interrupter to my Arduino microprocessor, which I programmed to measure the time between falling edges of pulses (with a 20msec minimum pulse width). By letting the Lego beam on the motor pass through the gap, I could get pretty consistent measurements of the period. Because the beam is not quite centered, I believe I was getting just one end to pass through the gap. I could have made the measurement easier by having a piece of opaque tape sticking out the end of the beam to pass through the gap. I believe that the period as the motor was initially set up was 119 msec. The students computed that this should result in lifting the mass by 3.5 mm, which is a bit small to measure at the end of a 2m string!

The next step was to have the students compute a period that would involve a decent value for $h$, say 20 cm. They computed it to be about 0.9 seconds, which was easily arranged by changing the pulleys on the motor and shaft. We then shortened the string to about 30 cm, and put the motor on the desk. I forget exactly what the period turned out to be: something close to 910 msec, I believe. We did not take careful notes, because we were still playing around with the setup when it was time to end the class (one student’s mother came to fetch him, another had to go off to improv class, and I had a meeting with 4 grad students and an AP bio teacher about a bioinformatics lesson the students are going to do for his classes in 2 weeks).

Why were we still fussing around? Well, when we turned on the motor the pendulum mass did indeed move out into a big circle, but it didn’t stay there! Instead the circle slowly shrank until the bead was hanging almost straight down, then grew again to a big circle, then shrank again, and so on. This was the second, even less anticipated result from the lab. I still don’t have a good explanation for it. Am I getting some sort of beating between the natural period of the pendulum and the forced rotation? I think I’ll have to play around with the setup this weekend to see the effect of different variations. Some things I plan to play with include

• using a heavy weight for the mass, instead of a tiny one.  Originally, I had thought the I would need to allow the mass to pass through the gap in the photo interrupter, and I didn’t want to risk damaging it. But now I see that I can measure the period using the beam, so the mass can be larger.
• adjusting the length of the string, to change the natural period of the pendulum.
• adjusting the speed of rotation.  It would be nice to have a real slow rotation, so that I could do a decent measurement with a long string.

Question for the physics people who read my blog: have any of you done the circular pendulum experiment in class?  Are there some things I should have known about to make this work better? Do you have an explanation for why I got such a varying amplitude in the size of the circle with the short pendulum? Will the long string with a fairly fast motor always produce nice nodes and antinodes, or did I get lucky on the two speeds I tried?