1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

I Determining the period of a pendulum with an accelerometer

  1. Nov 3, 2016 #1


    User Avatar
    Science Advisor
    Gold Member

    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?
  2. jcsd
  3. Nov 3, 2016 #2


    Staff: Mentor

    Have you tried just doing a Fourier transform?
  4. Nov 3, 2016 #3


    User Avatar
    Science Advisor
    Gold Member

    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:
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted