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?

Privacy Preference Center