Skip to main content

Overview

The free fall experiment allows you to measure Earth’s gravitational acceleration (g ≈ 9.8 m/s²) by tracking an object as it falls. PhysisLab provides three different measurement approaches, each with unique advantages.

Physics Theory

For an object in free fall (neglecting air resistance): Position: y(t)=y0+v0t12gt2y(t) = y_0 + v_0 t - \frac{1}{2}g t^2 Velocity: v(t)=v0gtv(t) = v_0 - g t Acceleration: a=g9.8 m/s2a = -g \approx -9.8 \text{ m/s}^2 For a drop from rest (v0=0v_0 = 0) over distance hh: g=2ht2g = \frac{2h}{t^2} Where:
  • hh is the fall distance (meters)
  • tt is the time of fall (seconds)
  • gg is gravitational acceleration (m/s²)

Measurement Methods

Camera-Based Measurement

Track a colored object through video frames to measure fall time.Source: ~/workspace/source/FreeFall/freeFallCam/FreeFallCam.py

Hardware Requirements

  • Camera (webcam, USB camera, or phone camera)
  • Colored ball or object (bright, solid color)
  • Ruler or measuring tape for calibration
  • Good lighting

How It Works

The script uses OpenCV to:
  1. Detect the object using HSV color filtering
  2. Track centroid position frame-by-frame
  3. Detect when object crosses start/end lines
  4. Calculate elapsed frames and convert to time using FPS

Setup Procedure

1

Configure Parameters

Edit the configuration section:
DESIRED_FPS = 10   # Adjust based on camera
RESOLUTION = (320, 240)
tolerance = np.array([25, 85, 85])  # HSV tolerance
2

Calibrate Color

Run the script and capture a reference frame:
python FreeFallCam.py
  • Press SPACE to capture image
  • Select ROI around your colored object
  • The script automatically calculates HSV range
3

Mark Start and End Lines

Click two positions on the image:
  • First click: start line (top)
  • Second click: end line (bottom)
  • These define your measurement region
4

Run Measurements

  • Drop the object through the marked region
  • System detects when object crosses lines
  • Press G to save measurement or D to discard
  • Repeat for multiple trials

Key Code Sections

FPS Measurement (FreeFallCam.py:41-57):
fps_from_cap = cap.get(cv2.CAP_PROP_FPS)
if fps_from_cap == 0:
    fps_from_cap = DESIRED_FPS

# Measure actual FPS
num_test_frames = 60
start = time.time()
for i in range(num_test_frames):
    ret, frame = cap.read()
end = time.time()
measured_fps = num_test_frames / (end - start)

real_fps = min(fps_from_cap, measured_fps)
Line Crossing Detection (FreeFallCam.py:160-175):
if state == "WAIT_START":
    if prev_cy < y_start_line and cy >= y_start_line:
        frame_start = frame_count
        state = "WAIT_END"

elif state == "WAIT_END":
    if prev_cy < y_end_line and cy >= y_end_line:
        frame_end = frame_count
        delta_frames = frame_end - frame_start
        delta_t = delta_frames / real_fps

Output

Data saved to datos_tiempo.txt:
Delta_frames, Delta_t(s)
15, 1.500000
14, 1.400000

Data Analysis

Once you have collected timing data, calculate g:

Calculation

For a known drop height hh: g=2ht2g = \frac{2h}{t^2}

Example Analysis

import numpy as np

# Your measurements
height = 0.96  # meters
times = np.array([0.441, 0.439, 0.443, 0.440])  # seconds

# Calculate g for each trial
g_values = 2 * height / (times**2)

# Statistics
g_mean = np.mean(g_values)
g_std = np.std(g_values)
g_uncertainty = g_std / np.sqrt(len(g_values))

print(f"g = {g_mean:.3f} ± {g_uncertainty:.3f} m/s²")
print(f"Percent error: {abs(g_mean - 9.8) / 9.8 * 100:.1f}%")

Expected Results

Typical results:
  • Measured g: 9.5 - 10.2 m/s²
  • Percent error: 1-5%
  • Main error sources: Air resistance, timing precision, human reaction time

Tips for Best Results

  • Use bright, solid-colored objects with good contrast
  • Ensure even lighting without shadows
  • Higher FPS cameras give better time resolution
  • Keep camera stable with a tripod
  • Measure start/end distance with ruler for calibration
  • Position sensors with clear line of sight
  • Shield sensors from ambient IR sources
  • Use stable power supply to avoid noise
  • Measure sensor separation distance accurately
  • Perform multiple trials and average results
  • Use earbuds/headphones microphone for lower latency
  • Quiet environment reduces false triggers
  • Hard surfaces create clearer impact sounds
  • Adjust threshold for your specific setup
  • Consider buffer size vs latency tradeoff

Troubleshooting

IssueSolution
Camera not detecting objectAdjust HSV tolerance, improve lighting, use brighter color
PIR sensors not triggeringCheck wiring, verify 5V power, test sensor range
Audio false triggersIncrease threshold, use quieter room, try earbuds mic
Inconsistent resultsEnsure consistent drop height, reduce air currents, average multiple trials

Next Steps

Pendulum Experiment

Explore periodic motion and energy conservation

Data Analysis Guide

Learn to analyze experimental data

Build docs developers (and LLMs) love