Tuesday, April 15, 2025

Experiment 3

A significant amount of attention has already been given to measuring acceleration due to gravity (g). Two methods have been proposed to evaluate this value. The simplest approach - measuring the time it takes for a falling object to drop - is often overlooked because dropping a stone from about 30 meters (100 feet) and timing its fall with a stopwatch doesn’t yield highly accurate results. While approximate values obtained through direct measurement are good and illustrative, we want greater precision. This would allow us to compare data collected directly in different cities with previously described estimation techniques.

Therefore, I propose a simple device based on Arduino Mega 2560 that can measure the acceleration due to gravity using a small lead ball.

Device Design

The device consists of a tube, preferably dark or even black, with a length of 1.4 meters (55.12 inches). Its diameter should be two to three times larger than the diameter of the lead ball. Six holes, each 3 millimeters (0.12 inches) in diameter, are drilled into the tube - three on one side and three on the other. Upper and lower holes are located 20 centimeters (7.87 inches) from the ends of the tube, while middle holes are located in the middle of the tube.

On one side of the tube, infrared LEDs (blue in the image) such as L-34F3C are inserted into the holes. Power is supplied directly from the Arduino board. The LED anodes (long contacts) connect to the Arduino’s +5V pin, while the cathodes (short contacts) are connected via 240 Ohm, 0.25 Watt resistors to the Arduino’s GND pin. These resistors limit current flow to prevent immediate burnout of the LEDs.

On the opposite side, phototransistors (green in the image), like L-3DP3C, are installed. Their collectors (short contacts) attach to the Arduino’s +5V pin, and their emitters (long contacts) link to digital pins 2, 3, and 18. These same pins are also connected to GND via 1 kOhm, 0.25 Watt resistors to ensure proper operation of interrupts.

Note that the shorter leads of the phototransistors distinguish them from the longer-lead LEDs, helping avoid confusion during assembly.

The lead ball (red) measures between 2 - 2.5 centimeters (0.8 - 1.0 inch) in diameter, making it convenient to toss into the device.

Arduino Sketch

/*
    Sketch: Gravimeter
    Board: Arduino Mega 2560
*/

volatile unsigned long int timeA = 0;
volatile unsigned long int timeB = 0;
volatile unsigned long int timeC = 0;

void setup()
{
  attachInterrupt(digitalPinToInterrupt(2), sensorA, FALLING);
  attachInterrupt(digitalPinToInterrupt(3), sensorB, FALLING);
  attachInterrupt(digitalPinToInterrupt(18), sensorC, FALLING);

  Serial.begin(9600);
}

void loop()
{
  while (timeA == 0 && timeB == 0 && timeC == 0);

  delay(800);

  Serial.println(timeA);
  Serial.println(timeB);
  Serial.println(timeC);

  timeA = 0;
  timeB = 0;
  timeC = 0;
}

void sensorA()
{
  if (timeA == 0)
  {
    timeA = micros();
  }
}

void sensorB()
{
  if (timeB == 0)
  {
    timeB = micros();
  }
}

void sensorC()
{
  if (timeC == 0)
  {
    timeC = micros();
  }
}

Operation

Using the device is straightforward. Connect the Arduino to your laptop, open the Arduino IDE, and launch the Serial Monitor. Bring the ball close to the top edge of the tube and release it. On your computer screen, you'll see three numbers representing the microseconds when the ball passed by each phototransistor. This information is crucial for calculating acceleration.

Next, calculate the time taken for the ball to travel from point A to B and from A to C in seconds:

t1 = (timeB - timeA) / 1000000

t2 = (timeC - timeA) / 1000000

Finally, plug these values into the formula below:

g = (2 * ((d1 / t1) - (d2 / t2))) / (t1 - t2)

Where:
g is the acceleration of gravity (m/s2),
d1 is the distance from A to B (meters),
t1 is the time taken to pass d1 (seconds),
d2 is the distance from A to C (meters),
t2 is the time taken to pass d2 (seconds).

In our setup, d1 = 0.5 meter (19.68 inches) and d2 = 1 meter (39.37 inches).

Perform multiple measurements and discard any significantly deviating values. For similar readings, calculate the arithmetic mean to determine the local gravitational acceleration.

Challenges

Different trajectories may result in varying data since hand-tossing the ball does not always achieve perfect vertical alignment. If the ball’s diameter is too small relative to the tube, it might miss some phototransistors entirely, producing erroneous results. Keep these factors in mind during testing.

Bonus Calculation

Knowing the gravitational acceleration allows you to estimate Earth’s mass using the following equation:

M = (g / G) * (r * r)

Where:
M is the planet’s mass (kilograms),
g is the gravitational acceleration (m/s2),
G is the gravitational constant (6.67e-11 N*m2*kg-2),
r is the radius of the planet (meters).

For example:

(9.8 / 6.67e-11) * (6371000 * 6371000) = 5.963695e+24 kilograms


External links
arduino
software
mega 2560
volatile
attachInterrupt
serial
begin
println


Wikipedia
Equations for a falling body


Donations:

0x6dC7F3b1114684ac0D7967a7ae7c2a06f1c1cBdD

ETH, USDT (ERC-20), USDC (ERC-20), DAI (ERC-20)

No comments:

Post a Comment

Experiment 4