A conversation we’re having at the moment on the Teacher Mailing List is around the creation of a Timer.
Ian Chow-Miller has been running an activity with NXT dragsters with a focus on gear ratios and mechanical design rather than programming. He initial solution of using the stopwatch on his phone has human error associated with it (as would any human activated stopwatch) and so the search was on for a robotic solution!
His initial setup involved an NXT with a Sound Sensor and an Ultrasonic Sensor. Dragsters are started with the whole group shouting “GO!” which the timer sound sensor picks up, starts an internal timer which stops once a robot crosses the ultrasonic sensor.
Gary Cordell suggested using the Light Sensor for more accuracy over the Ultrasonic Sensor
I rigged the light sensor, put it in Ambient Light mode and pointed a flashlight at it. I was able to get a reading of 50 open and less than 10 with the beam broken (with the Ambient Light Shield (grin) in place) at a distance of about two feet.
photo by Gary Cordell
Elwood Fischer suggested offloading the timing to the robot itself-
I’m wondering if you can dodge some of the sensor difficulty by loading your timer program on the Drag Racer itself, with ultrasonic sensor mounted on front? Point it towards a wall (or other flat surface) so it records time between start and when the ‘bot is, say, 1 meter from the wall (then full brakes!)? It’s easy for the ultrasonic sensor to see a wall! This also reduces chance that start and end ‘bots get triggered at different times (by an over-eager student near one of the ‘bots).
My contribution 😀
I think the Ultrasonic Sensor might be a little in consistent, but what about the light sensor. You could have it mounted face down and have a finish line (either white on black surface or black line on white surface). I threw together this little program that will display the time on the screen.
– Wait for loud sound to start the robot
– Once you hear the loud sound, reset the timer
– Get the robot driving unlimited
– Wait for a increase in light readings (or decrease depending on your situation)
– Take the timer value
– Convert to ‘text’ (the display block can’t handle ‘numbers’
– Show the result on the NXT Display
– Stop the robot (don’t forget this!)
– Wait 5 seconds to give you a chance to read the result.If the programming is too much for the kids and the focus is on the gearing, there is nothing stopping you loading this onto everyone’s robot yourself.
Thoughts? How would you do it?
2 Comments
Comments are closed.
Fantastic Ian 🙂
Could you post it back into the mailing list as well for other teachers to see
Hi Damien,
Just a few updates. I had students attach light sensors to their robots and added a piece of pink duct tape to the finish line. Since each student has slightly different light sensor values I had to change the light sensor trigger point for each robot (and sometimes the motor direction). I also continued to use my timer with the ultrasonic sensor. I stand at a point equidistant from my timer and their robots and yell "GO!" So far the difference between the two timers after several trials was no more than one tenth and as little as two hundreths of a second. The kids like having a way to test their own robot and this is a good lead into reading sensor values with the "View" function as this is what we're doing next.