Arduino Break Beam Gravity

GOAL: Measure acceleration due to Earth's gravity using Arduino microsecond timer circuit

 O -> ball at L height
 |
 |
 (L-4) inches
 |
 |
 + -> sensor 1
 | -> 4 in
 + -> sensor 2

================================

Data

The data right of the serial port:
--- Miniterm on /dev/ttyS4  9600,8,N,1 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
setup
elapsed_time 54112
elapsed_time 52152
elapsed_time 51488
elapsed_time 51888
elapsed_time 50536
elapsed_time 36364
elapsed_time 35464
elapsed_time 35548
elapsed_time 33984
elapsed_time 36768
elapsed_time 27836
elapsed_time 28036
elapsed_time 27056
elapsed_time 28044
elapsed_time 28972
elapsed_time 39532
elapsed_time 40480
elapsed_time 38668
elapsed_time 41200
elapsed_time 44512
elapsed_time 29268
elapsed_time 30200
elapsed_time 28488
elapsed_time 30252
elapsed_time 29868

================================

What Do the Laws of Physics Say Should Happen?


RESULT: t_2 is the calculated time as measured by sensors S apart falling from a height of L

================================

Statistical Data Analysis

Pull the data into R

# observed sensor times in microseconds
t = c(54112, 52152, 51488, 51888, 50536, 36364, 35464, 35548, 33984, 36768, 27836, 28036, 27056, 28044, 28972, 39532, 40480, 38668, 41200, 44512, 29268, 30200, 28488, 30252, 29868)/1.0E+06

# the heights the experiment was performed at
l = c(rep(10,5),rep(20,5),rep(30,5),rep(15,5),rep(25,5))

S=4

myx = (sqrt(l)-sqrt(l-S)) # what the linear model inputs. t2 equation

# make a linear estimate of the relationship (least squares: t = A*myx+B)
mylm = lm(t ~ myx)
summary(mylm)
Residuals:
       Min         1Q     Median         3Q        Max 
-0.0021731 -0.0007420 -0.0003242  0.0008086  0.0037078 
Coefficients:
             Estimate Std. Error t value Pr(>|t|)    
(Intercept) 0.0001866  0.0012439    0.15    0.882    
myx         0.0730061  0.0023870   30.58   <2e-16 ***


# make a linear estimate of the relationship forcing 0 intercept
mylm = lm(t ~ myx+0)
summary(mylm)
Residuals:
       Min         1Q     Median         3Q        Max 
-0.0021436 -0.0007521 -0.0003316  0.0008306  0.0037004 
Coefficients:
     Estimate Std. Error t value Pr(>|t|)    
myx 0.0733548  0.0005332   137.6   <2e-16 ***

RESULT: My estimate of the acceleration due to gravity 9.5 m/s^2 is within 3% of the true value 9.8 m/s^2. Air resistance?


Plot data

# what the model predicts given correct constants
S=4
modelTgivenL = function(L){
gtrue = 9.8*39.37 # inches/s^2
return(sqrt(2/gtrue)*(sqrt(L) - sqrt(L-S) ))
}
modelEstTgivenL = function(L){
constestimate = 0.0733 # from linear fit
return(constestimate*(sqrt(L) - sqrt(L-S) ))
}

png("drop.png",width=1024,height=1024)
plot(t ~ l,pch="x",xlab="L height",ylab="sensor time",cex=2)
points(seq(10,30), modelTgivenL(seq(10,30)),type="b", col="red",cex=2)
points(seq(10,30), modelEstTgivenL(seq(10,30)),type="b", col="green",cex=2)
title("drop times. black=measured red=model green=estimated model")
dev.off()

================================

Timer Construction

README_RESULT_arduino-break-beam.html