Measuring Time Period of a Pendulum Using IR Sensor

About This Project
This project teaches you how to calculate the time period of a simple pendulum using an IR sensor and evive.
Project Info
Estimated Time Required: 3 Hrs
Programming Platform:
Difficulty:

Introduction

Calculating on paper is never an easy job. And when it comes to formulas with sub-formulas of their own, it is nothing short of a nightmare! Take the case of a simple pendulum, which has a variable with a formula of its own.
What if there was a way to replace these scary calculations with a simple computer program?

You guessed it right! With the help of evive, an IR sensor, a computer program, and little DIYing, you can easily find out the time period of the pendulum in a matter of seconds!

So, what are you waiting for? Let’s get into it right away!

Components Required

Building Guide

Step 1: Assembly

  1. Cut out the cardboard according to the dimensions given below:
    A = 160 mm x 85 mm
    B = 30 mm x 95 mm
    C = 150 mm x 162 mm
    D = 150 mm x 162 mm
    E = 75 mm x 34 mm 

    Cutout3
    DIY Pendulum Components Required
  2. Take the base piece i.e, piece A.
  3. Now, take the smaller piece B which holds your sensor and attach it to the base plate using M3 bolts of 20 mm and M3 nuts.
    Attaching the Sensor Holder Plate
  4. Take piece C and attach it to the base using M3 bolts of 20 mm and M3 nuts.

    DIY Pendulum Completing the Frame

  5. Similarly, take the other piece i.e D and fix it using M3 nuts and bolts to the base.
    DIY Pendulum Completing the Frame
  6. Now, take the last Acrylic piece i.e E and attach it between the gaps of the piece C and D using M3 nuts and bolts. On this plate, we will be attaching the bob of the pendulum.
    DIY Pendulum Completing the Frame
    The base assembly is ready. All we need to attach is the Sensor and the bob which is a small weight attached to the string at its end.
  7. We will start fixing the sensor on plate B in the vertical gap using M3 bolts of 8mm length and M3 nuts.
  8. Once it is attached, it’s time for the last part of the assembly, the bob.
  9. Bob is nothing but a small weight attached to the string at its end. The bob we used here is a 3D printed one. You can make it using any heavy material or even clay.
  10. Now, the free end of the string is passed through the hole on the piece E and its length is thus adjusted according to the height required.

    Make sure that the pendulum always remains in the same line as that of the sensor’s LEDs.

Now, the assembly of the simple pendulum is thus complete.

Step 2: Logic

Here, the IR Sensor calculates the how frequently the bob passes in front of it and thus giving us the Time-Period. Time-period changes on changing the length. Thus, here the IR Sensor successfully calculates the time-period no matter what the length is. Thus, reducing the use of pen-paper based calculation.

The formula we used to calculate on paper is:

T = 2 Π √(l / g)

where,
T = Time Period (milliseconds)
l = Length of the pendulum (measured from the centre of the bob to the end of the string) (millimeters)
g = acceleration due to gravity (m/s2)

Let’s take two cases:

  1. When l = 118mm,

    According to the formula: Time-period = 689 milliseconds

    From the activity: Time-period = 689 milliseconds

  2. When l = 91 mm,

    According to the formula: Time-period = 605 milliseconds
    From the activity: Time-period = 605 milliseconds

Step 3: Circuitry

  1. GND to GND of evive
  2. VCC to +5V
  3. OUT to Digital Pin 2

Pendulum circuit

Step 4: Code

The following code shows how to do the calculations for Time-period:

Step 5: Conclusion

With this, your setup to calculate the time period is complete! Watch as evive and the sensor perform their magic with the help of the code you wrote!

Circuit Diagram

DescriptionCircuit Diagram
  • GND to GND of evive
  • VCC to +5V
  • OUT to Digital Pin 2

 

Code

DescriptionDownload Code
Code for PendulumDownload
evive's libraryDownload
Share this Project
Facebook
Twitter
Google+
Pinterest
Reddit
Print
Related Projects
Featured Projects
Unique-Christmas-Tree

DIY Unique Christmas Tree

This project will show you how to make a unique DIY Christmas Tree for this year’s Christmas.

All articles loaded
No more articles to load

Leave a Reply

Close Menu
×

Cart

ATV Tank Small

Subscribe toour newsletter!

We publish new projects every Tuesday & Friday.
Be the first one to get notified.