|
Re: Ball speed trap using 2005 RC
Use banner sensors that throw a tight beam and set them up with retro-reflective tape so that when a ball is not blocking the beam the sensor activates. Adjust the sensor so that it just activates reliably when the beam is bouncing off the reflective tape, and so that a ball in the beam causes the sensor to change state reliably. When the ball goes through it breaks the beam, interrupting the RC to get the time value from the timer. You will not get as clean a signal off the ball itself...
Other than the possibility that you have not wired the sensors correctly, you need to wire the power input to 12 volts, and the signal output and ground to the digital input port on the RC. It also might be the case that you have not adjusted the sensor properly. You can see whether this is the case by the little indicator light on the sensor.
The best way to calibrate the sensor is to print out the time in raw clock ticks and time a long interval with a stop watch. With the time carefully calibrated, you can then measure the distance between the light beams and do the appropriate arithmetic. The code provided assumes that the clock rate of the timer is accurate, and it should be checked.
The sensor has two signal outputs, one that is high and one that is low when the beam is not blocked by the ball, and it is not all that important which one is used but the two sensors must be wired consistently...
In case you want to know, the sensor code is recording start-stop triggers and printing the speed only once for each event. If no beam interrupts are seen, in the proper order, nothing is printed.
Eugene
Last edited by eugenebrooks : 08-02-2006 at 12:29.
|