Acceleration Due to Gravity: Measuring with Arduino Mega 2560

Hey everyone!

My name is Marcus and I'm writing a book about experiments with gravity - you know, that force responsible for making Earth round like an orange :wink:

For my book, I created an Arduino-based device to measure the acceleration due to gravity. The value of this acceleration varies at different points on Earth's surface, which happens to be one of many fun facts proving our planet isn't flat! Plus, knowing it helps us even weigh the whole Earth... cool right?

I'm not a professional programmer so my gadget is super simple. But maybe someone here will find inspiration in my project and build their own improved version - maybe with a fancy screen or something :smirking_face:

Would love to hear your thoughts!

https://marcusforsker.blogspot.com/2025/04/experiment-3.html

Welcome to the forum!

Back-of-the-envelope calculations suggest that there would be at least a 2-ms delay between the falling and rising edge of the photodetector signal as the ball passes. Might you get a more precise measurement of the time-of-flight by estimating the midpoint between these two events?

Also, have you estimated the magnitude of errors due to air drag? A quick estimate suggests that drag forces may be on the order of 1% of the gravitational forces for small lead spheres. This may limit the accuracy of the measurements, and may result in errors that exceed the expected variation in g at different locations on Earth.

The goal of the project is interesting for me also because I have a FB page/group dedicated to science, so I have only a few things that I would like to add to what has already been written.

The first one is "geometric".
Your text says that the diameter of the tube "should be two to three times larger than the diameter of the lead ball": even if in the "Challenges" section you pointed that out, I would rule out that a tube 3 times larger would work. Even a tube 2 times larger than the ball would not guarantee a trajectory sufficient to let the sensors detect the passage, so I would opt for a smaller diameter, I would say 1.5 not much more.

The other consideration concerns the "drag".
I know you said the tube should be quite larger than the ball, but the air displaced by the ball as it falls could negatively affect the measurements, so if you wanted to shorten the diameter to get around the "geometric" problem, to reduce this "drag" effect it would be appropriate to add a series of small holes on the side of the tube to allow the air to pass through and thus try to balance the pressure above and below the ball and that will reduce the drag.
I suggest you to add this to the experiment description.

The third is just a confirmation request, since it was not specified in the text: the tube must be plastic, to avoid any current induction, which results in the ball slowing down.

Finally, the code.
I would just like to give you some ideas on how to improve the code and make it "closer" to what a student might want to get from an experiment.
Your loop code is the following;

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;
}

I'm not sure that it is right, or, at least, I don't know what is the goal (e.g. the output).
That code means the while() statement exists on any of the variables to be non-zero, but this happens after the ball crosses the first sensor, resulting in an output with just one value, and so on for the second and third sensor (with timings relative to the previous sensor instead of the first one, which is instead the one used for the calculations).
For the experiment purpose, I think it'd be better to wait for the three values to be filled up, then the code could make all the required calculations, and then report the data and results: the t1 and t2 timings and the configuration values d1 and d2 while debugging, and the wanted result, "g". After debugging, the only output could be the "g", so if the code automatically resets to let it be ready for another run, one could collect a dozen of tests, and see if and how the "g" value changes (the code could even collect all the values and show the average!).

1 Like

I thought this was an interesting caveat to bring up, and I was wondering if you could explain further what you mean. I don't see how a metal tube would generate a magnetic field to induce any eddy currents in the falling ball (unless you are passing current through the tube).

You're right, it's just my precaution against side effects. Actually the problem with a metal tube only occurs if the ball is magnetized, but since lead is diamagnetic, in this case there is no E/M induction, and you can ignore this point.

What about the others?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.