Shop OBEX P1 Docs P2 Docs Learn Events
Sensors for building a lap counter? — Parallax Forums

Sensors for building a lap counter?

egereger Posts: 9
edited 2007-05-05 04:02 in BASIC Stamp
Hello,

I am looking for ideas to build a lap counter out of my basic stamp board. Basically I want t build a small emitter of some sort that goes on a little remote controlled car (needs to be small...basic stamp or SX?). Then I need a way to sense when the car passes a line (line is about 3 feet wide).

What are some sensor combinations that might be able to do this? It seems like the BASIC coding part is something I can handle. But I am not sure what sensor combination would accomplish this. I also am not sure how I could build a emitter/transmitter than can be small enough to fit inside a little car.

Any suggestions would be great. Thanks!

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2007-05-04 19:44
    On page 191 of IR Remote for the BOE-BOT (www.parallax.com/dl/docs/prod/sic/WebIR-%20v1.1.pdf) shows a simple 38KHz IR emitter using a 555 timer and a very few parts. This could easily be put in a little car and run off the batteries in the R/C car. If you want, you could add a small voltage regulator like the LM2936Z-5.0 (in a TO-92 transistor package) if you don't have +6V available from the battery.

    You'd use the 38KHz IR detectors that Parallax sells and their documentation shows how to use it. It runs off 5V and has an open-collector output. A simple pull-up resistor to +5V (4.7K to 10K) and you would see an "on" state when INn = 0.

    The 555 timer actually runs off anything from about 5V to over 12V, so you could use a 6V or 9V battery source if that's available. The regulator (and its filter) would still be useful if the battery is also used for the motors since that would add a lot of noise to the power source. You should adjust the LED series resistor to limit the average LED current if the power supply is more than 6V.

    Post Edited (Mike Green) : 5/4/2007 7:51:52 PM GMT
  • egereger Posts: 9
    edited 2007-05-04 23:11
    This sounds like something that could work. So the 555 timer is a common timing chip? Looks liek the circuit for the emitter is simple enough.

    My second question, how could this setup be modified to allow for multiple emitters to be used. Is it possible to transmit one at slightly different frequency and have that detected by the IR detector to differentiate between the 2?
  • LSBLSB Posts: 175
    edited 2007-05-05 00:48
    I think the example used in the sensors book (?) for multiple cars is a beam across the finish (or lap) line with detectors arranged vertically; a 3 car system might look like a traffic light. In addition, each car has a ‘flag’ attached to its antenna at the height of one detector. As each car laps, the flag will break the beam for its unique detector (the 'yellow' car breaks the middle detector's beam, the red car the highest detector's beam...) and laps are counted/ totaled/ timed… whatever. A propeller seems perfect for this. An advantage here is that only one emitter will power the system and flags may be moved/ removed easily between cars.

    Laser pointers and photocell receptors would work too (you'd need only build the detectors and a stand to keep the lasers aligned). Probably possible just to use flags of varying length and time the flag passing to get by with only one detector. If your cars aren't too fast, you could use line detector hardware to build a crude barcode reader and attach labels with alternating patterns of black and white to the bottoms if the cars--read them as they drive over it. Order an RFID reader and a few tags... Ain't Stamps cool?
  • Mike GreenMike Green Posts: 23,101
    edited 2007-05-05 02:48
    There are similar IR detectors that are set for different frequencies (like 40KHz). Parallax doesn't sell them, but DigiKey or Mouser or Jameco should carry them. The detectors don't have a really sharp cutoff, so they could be triggered by a "nearby" frequency. You might be better off using a Stamp in the car instead of a 555 timer to generate a remote control signal as described in the tutorial that would be unique to the car, then have a Stamp as a decoder to identify the car going by. LSB's ideas are also good. It all depends on how fancy you need to get to do what you want.
  • Capt. QuirkCapt. Quirk Posts: 872
    edited 2007-05-05 04:02
    Most lap counters use a small short-range radio·transmitter inside the car and a track side reciever at the finish line
Sign In or Register to comment.