Light Gate Timer

EquipoiseBob

New Member
Hi All

I would like to make a light gate timer for timing F1 in Schools CO2 rocket cars. In essence the cars are tethered rockets that are fired up a 24 meter track. A slow car takes about 2 seconds to cover the distance, but competitive cars (Formula 1 class) cover the distance in about 1.02 seconds. There is also a Bloodhound SSC class which is virtually unrestricted and these cars cover the distance in about 0.65 seconds. Clearly for car development it would be necessary to time the cars to an accuracy of 0.0001 second or better.

I would like to be able to position a number of light gates at intervals along the track so that we can measure the speed in different phases of the run (the thrust dies out after about 0.5 seconds so the cars are decelerating for most of the run)

My idea is an initial gate at the start line. When this is broken a signal is set high. Each subsequent gate would use this signal to initiate its timing period and stop timing the moment the car interrupts its light gate. In my simple-minded fashion I envisage each gate having an LCD display from which the time at that point could be read.

I suspect the pulsein command could be used, but as this only runs up to about 0.6 sec some provision for over runs needs to be made, does pulsein set a flag anywhere accessible from the PICAXE programming environment to record overflows?

Bob (RobotBuilder)
 

geoff07

Senior Member
you could simply use an ldr or equivalent to pull up/down an input when the beam is broken and use that input to trigger an interrupt. Meanwhile the chip could be counting away furiously and the readout is the value when the interrupt occurs. Initiate them all from an input toggled by the start device.

Issues could be:

resolution of the timing - how precise do you want to be bearing in mind the relatively slow Picaxe clock speeds. You might want a faster clock version.

calibration of the timing - how accurate do you want it to be - you would have to convert counts into time in some way.

display - best if you only display the output once the count is over, which would not be a problem if it only takes a second.
 

EquipoiseBob

New Member
you could simply use an ldr or equivalent to pull up/down an input when the beam is broken and use that input to trigger an interrupt. Meanwhile the chip could be counting away furiously and the readout is the value when the interrupt occurs. Initiate them all from an input toggled by the start device.

Issues could be:

resolution of the timing - how precise do you want to be bearing in mind the relatively slow Picaxe clock speeds. You might want a faster clock version.

calibration of the timing - how accurate do you want it to be - you would have to convert counts into time in some way.

display - best if you only display the output once the count is over, which would not be a problem if it only takes a second.

Hi Geoff

My plan was to use in IR LED as the light source and a phototransistor as the receiver. I would use an OP Amp comparator to process the signal to derive a nice clean output to the PICAXE.

I seem to recall that some PICAXE chips can use an external oscillator so I would guess that a crystal (4 MHz) would give more accurate results than using the internal clock. Am I correct about this or have I got this confused?

In some ways we need to be careful about how we define accuracy. Obviously the results need to be in the right ballpark! But more important than absolute accuracy is reproducibility so that we can assess the effect of changes to the car set up on its performance.

I agree there is no need to display anything until the timing is complete, although a LED to indicate the unit is ready to time would be helpful.

Bob
 
Last edited:
Top