Determining the period of a pendulum with an accelerometer

tony873004
Science Advisor
Gold Member
Messages
1,753
Reaction score
143
I've got an accelerometer swinging back and forth on a string collecting data. But because of the tolerance of the accelerometer, the data is not quite clean enough to simply determine when positive turns to negative, or passes through equilibrium.

Here's the data. (arbitrary reading vs. time in milliseconds). It's easy to eyeball and see that the period is roughly 1.2 seconds. What kind of logic can I give my code so it doesn't get confused by the outliers?
pendulumdata.GIF
 
Physics news on Phys.org
Have you tried just doing a Fourier transform?
 
Thanks, I think that's a step in the right direction. I haven't done one since college so I'm rusty at it.

A little background...
I teach high school Physics.

Earlier this year our school got a few 3d printers. My students and I are together learning how to design things. I thought it would be fun to build a robotic person on a playground swing. Our "swingman" can lean his torso and kick his lower legs. We time his period unpowered with a stopwatch and then code that into an Arduino which tells him how often to pump.

It would be nicer if "swingman" could figure that out on his own. We're guessing that we could get more amplitude if the timing were better. The forward motion and backwards motion should have slightly different periods, as his center of mass changes. And as the amplitude gets larger, it becomes a factor in the period. So I'm trying to use the accelerometer to get better timing of his motions.

Here's a Youtube of the setup:
 
  • Like
Likes 256bits

Similar threads

  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 3 ·
Replies
3
Views
7K
Replies
3
Views
6K
  • · Replies 30 ·
2
Replies
30
Views
8K
Replies
29
Views
5K
  • · Replies 10 ·
Replies
10
Views
5K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 34 ·
2
Replies
34
Views
14K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 8 ·
Replies
8
Views
5K