Author Topic: Detecting the passage of a scalextric car  (Read 7283 times)

0 Members and 1 Guest are viewing this topic.

Offline Simon

  • Global Moderator
  • *****
  • Posts: 14455
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Detecting the passage of a scalextric car
« on: June 30, 2013, 07:24:33 am »
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 ?
 

Offline IanB

  • Super Contributor
  • ***
  • Posts: 9633
  • Country: us
Re: Detecting the passage of a scalextric car
« Reply #1 on: June 30, 2013, 07:35:53 am »
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.)
I'm not an EE--what am I doing here?
 

Offline Chet T16

  • Frequent Contributor
  • **
  • Posts: 522
  • Country: ie
    • Retro-Renault
Re: Detecting the passage of a scalextric car
« Reply #2 on: June 30, 2013, 08:30:13 am »
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
Chet
Paid Electron Wrestler
 

Offline rolycat

  • Super Contributor
  • ***
  • Posts: 1090
  • Country: gb
Re: Detecting the passage of a scalextric car
« Reply #3 on: June 30, 2013, 08:57:39 am »
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

Reed switches might be a cheaper and easier to handle alternative to Hall effect sensors.
 

Offline David Aurora

  • Regular Contributor
  • *
  • Posts: 162
  • Country: au
Re: Detecting the passage of a scalextric car
« Reply #4 on: June 30, 2013, 09:23:32 am »
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

Reed switches might be a cheaper and easier to handle alternative to Hall effect sensors.

Yep, 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
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 14455
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Detecting the passage of a scalextric car
« Reply #5 on: June 30, 2013, 12:58:22 pm »
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 interupts

I've never used reeds before, anything I should know ?
 

Offline david77

  • Frequent Contributor
  • **
  • Posts: 804
  • Country: de
Re: Detecting the passage of a scalextric car
« Reply #6 on: June 30, 2013, 01:01:55 pm »
Be careful with them they break easily. They also can have a fair bit of contact bounce.
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 14455
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Detecting the passage of a scalextric car
« Reply #7 on: June 30, 2013, 01:08:22 pm »
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 ?
 

Offline SeanB

  • Super Contributor
  • ***
  • Posts: 15351
  • Country: za
Re: Detecting the passage of a scalextric car
« Reply #8 on: June 30, 2013, 01:21:59 pm »
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.
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 14455
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Detecting the passage of a scalextric car
« Reply #9 on: June 30, 2013, 01:57:47 pm »
hm, this is a one off would rather have something with leads than surface, I could use soic
 

Offline SeanB

  • Super Contributor
  • ***
  • Posts: 15351
  • Country: za
Re: Detecting the passage of a scalextric car
« Reply #10 on: June 30, 2013, 02:13:45 pm »
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.
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 14455
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Detecting the passage of a scalextric car
« Reply #11 on: June 30, 2013, 02:59:27 pm »
Ah yes found them pity the datasheet has no real electrical information, I'll have a dig around
 

Offline fpliuzzi

  • Regular Contributor
  • *
  • Posts: 157
  • Country: us
Re: Detecting the passage of a scalextric car
« Reply #12 on: June 30, 2013, 03:23:44 pm »
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.html

This subject brings back fond memories of my distant youth.

Regards,
Frank
« Last Edit: June 30, 2013, 04:15:15 pm by fpliuzzi »
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 14455
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Detecting the passage of a scalextric car
« Reply #13 on: June 30, 2013, 03:37:00 pm »
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.
 

Offline Jon Chandler

  • Frequent Contributor
  • **
  • Posts: 545
    • Throw Away PIC
Re: Detecting the passage of a scalextric car
« Reply #14 on: June 30, 2013, 04:52:14 pm »
An IR Sensor Switch like 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.
 

Offline SeanB

  • Super Contributor
  • ***
  • Posts: 15351
  • Country: za
Re: Detecting the passage of a scalextric car
« Reply #15 on: June 30, 2013, 05:56:52 pm »
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.
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 14455
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Detecting the passage of a scalextric car
« Reply #16 on: June 30, 2013, 05:57:28 pm »
hm if only there was a UK supplier of something like that, I might end up using the sectioned off track method
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 14455
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Detecting the passage of a scalextric car
« Reply #17 on: June 30, 2013, 05:59:03 pm »
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.

well 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
 

Offline SeanB

  • Super Contributor
  • ***
  • Posts: 15351
  • Country: za
Re: Detecting the passage of a scalextric car
« Reply #18 on: June 30, 2013, 06:06:28 pm »
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.
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 14455
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Detecting the passage of a scalextric car
« Reply #19 on: July 07, 2013, 05:22:14 pm »
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.
 

Offline SeanB

  • Super Contributor
  • ***
  • Posts: 15351
  • Country: za
Re: Detecting the passage of a scalextric car
« Reply #20 on: July 08, 2013, 04:16:11 pm »
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.
 

Offline Galaxyrise

  • Frequent Contributor
  • **
  • Posts: 526
  • Country: us
Re: Detecting the passage of a scalextric car
« Reply #21 on: July 09, 2013, 12:44:06 am »
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".
I am but an egg
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 14455
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Detecting the passage of a scalextric car
« Reply #22 on: July 09, 2013, 05:37:29 am »
I'm going for infrared for the minute, got some bits on order and my fingers drossed
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf