Detecting the passage of a scalextric car - Page 1
Forum section: electronics / beginners

author: Simon
author_rank: Unknown
timestamp: June 30, 2013, 07:24:33 am
content: I need to setup a system to measure the lap time of micro scalextric cars. Now I'm thinking IR (this is separate from my other infrared question with glass) but I have two cars so going across the track cannot be done but all the cars are mini's with white roofs, can i use this to my advantage ? because the track is black so if I had an overhead sensor it would get a blazing reflection from the car but not pick up enough from the track, am I on the right lines ?

author: IanB
author_rank: Super Contributor
timestamp: June 30, 2013, 07:35:53 am
content: I expect so. An IR sensor will be a pair of sender and receiver. You could angle these in a V shape pointing downwards so that the bottom of the V is about the level of the roof of the car. You could also use short tubes as beam collimators to avoid side scattering and interference from the other transmitter. (You could make your tubes out of short lengths of drinking straw sprayed matt black on the inside.)

author: Chet T16
author_rank: Frequent Contributor
timestamp: June 30, 2013, 08:30:13 am
content: Have the cars got the magnets that hold them on the track? Ours do and i was going to see if a hall sender could pick them up as they pass

author: rolycat
author_rank: Super Contributor
timestamp: June 30, 2013, 08:57:39 am
content: Quote from: Chet T16 on June 30, 2013, 08:30:13 amReed switches might be a cheaper and easier to handle alternative to Hall effect sensors.

author: David Aurora
author_rank: Frequent Contributor
timestamp: June 30, 2013, 09:23:32 am
content: Quote from: rolycat on June 30, 2013, 08:57:39 amYep, works like a charm. I found my old AFX set a while back and slapped a couple reed switches under the track wired up to an Arduino for doing lap counts/times etc. and it did the job just fine

author: Simon
author_rank: Unknown
timestamp: June 30, 2013, 12:58:22 pm
content: thank you all, I must have had IR on the brain, yes reed switches and tactiles on a lever sound like a very good idea, i was trying to work out a way of using the usual lap counter to make a signal but figured that the adaption was going to be more complicated than a from scratch thing.Luckily I have some hitachi driven 16x2 displays and the arduino has a library for them so in theory I might even be able to cobble something together in a couple of weeks, having learnt to use interuptsI've never used reeds before, anything I should know ?

author: david77
author_rank: Frequent Contributor
timestamp: June 30, 2013, 01:01:55 pm
content: Be careful with them they break easily. They also can have a fair bit of contact bounce.

author: Simon
author_rank: Unknown
timestamp: June 30, 2013, 01:08:22 pm
content: OK, I'll put a delay in so that after the first detection some tenth of seconds must pass before another is valid.How are the magnetic properties determined ? how do i match the magnet to the switch ?

author: SeanB
author_rank: Super Contributor
timestamp: June 30, 2013, 01:21:59 pm
content: You would probably be better off using a cheap hall effect digital switch there, as it is available with higher sensitivities. RS 747-4988 is cheap, SM and small enough to mount right under the track under the guide slot and it will most likely be quite capable of detecting the car magnet there.

author: Simon
author_rank: Unknown
timestamp: June 30, 2013, 01:57:47 pm
content: hm, this is a one off would rather have something with leads than surface, I could use soic

author: SeanB
author_rank: Super Contributor
timestamp: June 30, 2013, 02:13:45 pm
content: They have them in SOIC, teeny tiny and even leaded versions. Nice thing is they are 3V3 and 5V capable, and all they need is a pull up resistor on open collector ones, and they give a bounce free signal.

author: Simon
author_rank: Unknown
timestamp: June 30, 2013, 02:59:27 pm
content: Ah yes found them pity the datasheet has no real electrical information, I'll have a dig around

author: fpliuzzi
author_rank: Regular Contributor
timestamp: June 30, 2013, 03:23:44 pm
content: This site has some interesting info about the various methods mentioned by the other posters for detecting the slot cars. They also have free PC software to time and count laps for up to four lanes of action.http://hoslotcarracing.com/LapCounter.htmlThis subject brings back fond memories of my distant youth.Regards,Frank

author: Simon
author_rank: Unknown
timestamp: June 30, 2013, 03:37:00 pm
content: hm, the idea of isolating a section of track so that the car can act as a pull don/up switch is not a bad one, saves me even buying parts and i have more track than I care to admit to now.

author: Jon Chandler
author_rank: Frequent Contributor
timestamp: June 30, 2013, 04:52:14 pm
content: AnIR Sensor Switchlike this might work well, mounted above the track. It's got an IR emitter and receiver mounted in the same package and aligned to reflect IR back from some near distance.These sensors can be used as a tachometer pickup with a piece of reflective tape on a shaft.

author: SeanB
author_rank: Super Contributor
timestamp: June 30, 2013, 05:56:52 pm
content: Those IR distance detectors you are having troubles with will work well in this application as a sensor acting through a small gap in the track.

author: Simon
author_rank: Unknown
timestamp: June 30, 2013, 05:57:28 pm
content: hm if only there was a UK supplier of something like that, I might end up using the sectioned off track method

author: Simon
author_rank: Unknown
timestamp: June 30, 2013, 05:59:03 pm
content: Quote from: SeanB on June 30, 2013, 05:56:52 pmwell bottom of the cars is black (well some of the motor shows) so might need the reflective tape. Problem is the ones we have used so far are bga or something like that and assembled by a subcontractor, not the sort of thing i can handle at home

author: SeanB
author_rank: Super Contributor
timestamp: June 30, 2013, 06:06:28 pm
content: IR phototransistors are free from any old printer, just rip them out of the Sharp housings, the pink is the transistor and the clear the IR LED. LED in the track and the phototransistor above on a gantry. Run the IR diodes at 50mA ( not going to have a long life but will do a few seasons in this application) and use 22k on the transistors as a start and see how it goes. If having a problem with ambient light simply drive the transmitters with 100kHz 1% duty cycle square wave and up the current to 1A per diode. then all you need on the other end is a capacitor coupling it to an opamp ( remove DC from light) and then a peak detector with a short time constant of around 1mS and a comparator.

author: Simon
author_rank: Unknown
timestamp: July 07, 2013, 05:22:14 pm
content: I'm reconsidering hall effect sensors and looking at a datasheet it needs the magnet to pass both N and S side over the sensor where as in slot cars I'm guessing that the polarity is just N or S.i might actually go for IR sensing, put a transmitter in the track and receivers overhead and do a break beam type thing.write, time to write code.

author: SeanB
author_rank: Super Contributor
timestamp: July 08, 2013, 04:16:11 pm
content: Just stick a small piece of steel strip under the sensor that extends along the track away from the car direction for about 2 sensor lengths. That concentrates the field and ensures a better triggering. The magnet is not a monopole, there will be an approaching and leaving field.

author: Galaxyrise
author_rank: Frequent Contributor
timestamp: July 09, 2013, 12:44:06 am
content: Not all Hall Effect sensors require a field inversion to turn off (they're not even all switches.) Sounds like you want a "unipolar switch".

author: Simon
author_rank: Unknown
timestamp: July 09, 2013, 05:37:29 am
content: I'm going for infrared for the minute, got some bits on order and my fingers drossed