Hello guys. I'm a Physics teacher and I wanted to give my students a simple experiment on uniform acceleration. The example would need arduino integration as a timer. A button would be pressed and a timer would be started, the end of the timer would occur when an ultrasonic sensor gets the passage of an object.
I'm a beginner in programming, I tried in several ways but I couldn't create this programming, could someone help me pls?
Don't scream.
Post your best attempt, and describe how it fell short of your expectations.
@andrewsgorlon HOW DOES THIS SOUND? I am describing a gravity lab in plain language, not worrying about writing the program. That comes LATER. Have a read...
-
Button is pushed. Arduino senses the button push.
-
Display pushbutton time. Arduino transmits time to display.
-
Ball is released to roll down a ramp. Arduino causes a relay to release a door holding the ball.
-
Display the release time. Arduino transmits time to display.
-
Ball rolls over a microswitch (button). Arduuno senses the microswitch and starts a timer.
-
Display the start time. Arduino transmits time to display.
-
Ball rolls over a second microswitch. Arduino senses the second microswitch and stops the timer.
-
Display the stop time. Arduino transmits time to display.
-
Display the difference. Arduino calculates and transmits difference to display.
-
Arduino calculates acceleration due to gravity and transmits it to display.
-
Arduino compares actual time with theoretical time and displays loss due to human error and friction.
@andrewsgorlon Make the changes you need to the above, then, LET'S GET OUR PROGRAMMING CAPS ON!
This is definitely what you need
Ultrasonic sensors are not very good for timing. They have to be repeatedly sampled at about 30-millisecond intervals. That limits time resolution and they have a fairly wide beam which limits spatial resolution. I'd recommend an optical break-beam for timing.
Here an example for what @johnwasser suggested.
Joining with the example that @bidrohini gave do you have everything to go on.
Here the code and circuit.
BTW, turn off your caps lock and edit the title of this topic.
Hello @andrewsgorlon - This experiment gave me flashbacks to my trig-based physics, where rolling a ball down a ramp let us measure gravity and conservation of energy, and I had a dust-up with the instructor. He (a nuclear physicist on a break) thought the lab equipment was flawed because his calculations had too much error, so he instructed the class to continue with the calculations, but subtract their result from "1" and that will be close enough for him (cue the nuclear joke). I spent time in the library reading (as you do) and found that the way we looked at the experiment was flawed... we were not rolling a ball tangentially down a single-point-of-contact ramp, rather we were rolling the ball down a set of rails, which made two points of contact, but worse, the points of contact were not centerline, rather, halfway to the "ends" of the ball, creating THREE forces: Gravity, angular momentum of NOT a ball, but a cylinder (due to the two points of contact) and retrograde (the part of the ball that descended below the two points of contact, and was trying to pull the ball back up the ramp. With that, I showed how the instructor's instructions were inaccurate at best. After he got done threatening me with physical violence and trying to kick me out of class, he came back the next week to announce to the class that they all had to either except a lower grade on their submitted laboratories or use their data in the drawings and formulae that Mr. Xfpd would be drawing for the class at this moment. And I did. And they all hated me. Not much has changed. And rest assured, he didn't teach much longer. He left the physics department and returned to the nuclear program. : )
Some day, over a in a bar (not here, since it is waaay off topic), I would love to hear how the rotational moment of inertia of a sphere can be anything other than just that.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.