Shop OBEX P1 Docs P2 Docs Learn Events
IR Emitter - 40khz - Need help with design. — Parallax Forums

IR Emitter - 40khz - Need help with design.

Justin9Justin9 Posts: 9
edited 2008-02-24 19:11 in BASIC Stamp
I've seen the designs using the 555 timer as the base and making a 2 led IR emitter.· These examples use 5v and only two leds to send the 40k signal.· I would like to modify this design to run off 12v and use 8 infrared leds.· I building a lap counter, I search the forums and found one old topic in May of 07 about this idea.· My idea was to build a bridge across the track and have leds space 1.5 inches across pointing down at the track surface.· My idea was to put the counters on the cars themselves and use one common transmitter (aka the bridge) to send one siginal.· Each car will carry their own receiver to capture and record the beacon when it goes under the "bridge."· I built a very rough counter and have sucessfully tested using a remote control.· I need to filter out the daylight some more but the counter part works, if I could just get my transmitter together the way I want.· My plan is to be able to hook the transmitter bridge up to a car battery (12volt) and the way I have it design, I will be able to add or remove sections of 1 foot intervals to my bridge for changing track shapes, locations (we race in parking lots).· I figured I would have up to possibly 160 leds over 20 feet.· Using 32 leds in every 4 feet, 8 leds in every foot, I'll have a 40khz emitter board/circuit every foot.· These will be connected parallel to the main 12volt supply.

·

Comments

  • UghaUgha Posts: 543
    edited 2008-02-23 06:35
    A couple questions:
    Where are you planning on using the Stamp in this setup?

    Wouldn't it be better to put the LEDs on the cars and the receiver on the bridge? The receiver
    will be the most expensive/complex part, the LEDs can just require a couple coin batteries, a resistor,
    the LED and a magnet... and boom, instant IR emitting car. (This concept is based on the stupid trend
    of using "throwies" or LED graffiti.)

    This would solve your daylight problem, as the receiver will be pointed down and you can surround
    it with a shroud on four sides.

    In fact, if you use IR distance sensors on the bridge, it can just register the cars driving under and
    you won't even need any additional parts/transmitters.

    I suppose you could also use Ping as well.

    That is, unless you intend to display the count IN each car as it races. In that case, yes you'd need a
    receiver in each car.
  • Justin9Justin9 Posts: 9
    edited 2008-02-23 12:39
    Well, I'm new to the stamp stuff and I'm trying to figure out if there is something I can use, and secondly, I stumped across an old previous posts in this forum and it was basicly on the same topic and hoped it would be ok to ask here. So I might not be using stamp in my project, I'm just not sure.

    I can build the receivers for less than 2.00. The one I built that is basicly a pedometer (purchased for 1.00) and a photoresistor. I have some 40khz ir receivers coming so I can tune my signal down and cut out unwanted rays. I really don't care if the counter is on the cars or the bridge, as well will be running timed races, so its basically who can run the most laps in X amount of time.

    And since I will be using more than one car, possibly 6 or more at one time, I though instead of making 6 transmitters for each car and then needing my bridge to detech 6 different signals and for it to be able to score those, why don't I just build a single fixed location transmitter, have it broadcast a single signal, and then be able to have each car detech that signal and count that lap on each cars counter. Infrared seemed to be the most cost effective solution to use as well. I'm willing to try something, and I've read on the internet several different and good ideas, but this is the one that I think I could accomplish (maybe one day I be able to write programs and can make one where the cars are counted on a computer, but for now I'll stick to the basics).
  • UghaUgha Posts: 543
    edited 2008-02-23 13:02
    The thing about IR frequency is you usually need some source generating them. You mentioned a 555. This might work
    but you'd need an O-scope or something to check the frequency. With a Basic Stamp or related device, you could simply
    emit the proper frequency using a simple program on the stamp.

    Is it important that you know which car is which? I'm assuming it does. In that case you could use a narrow range of
    frequencies for the transmitters and a single receiver on the bridge. The only problem would be when two cars are
    passing eachother while under the bridge... the receiver may become confused. You could use two receivers, one
    for each "lane".

    To tell the truth I'm kind of a newbie to electronics myself. I've got a good bit of the basics down, but I actually have
    little idea how you'd do what you want to do within the price range (1-2 dollars apiece) you've said.

    Perhaps you can use crystal resonators to set the proper frequency? I have no idea HOW you'd do that but maybe
    you can find the info on the net or perhaps someone here will be nice enough to help you out.

    Another option I thought of would be radio frequency... you could most likely rig up a transmitter for each car for
    around $20 apiece. The range would be short, maybe 10 feet or so, but how high would you need the bridge anyways?
    A single stamp could use a receiver.

    Basicly these are the transmitters/receivers for keychain car locks and the like. I got a matched pair for $15 from a
    surplus site about a year ago. You could have each car broadcast a different data stream fairly simply and receive
    them with the stamp. It's just a thought though.

    Remember that I'm just a newbie. Take my advice at your own risk.

    Good luck with your project [noparse]:)[/noparse]
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2008-02-23 15:43
    Justin -

    You really only need one piece of track (probably a straight piece) for each lane, with the I/R transmitters built·below it. There will be a small opening in the top-side of the track to allow the beam to shine through. The I/R receiver will be underneath the bridge you are planning to build. The underneath of the bridge will be "boxed" with one open side which will be the bottom. This way the potential problem of sunlight hitting the I/R receivers goes away.

    The "counter" (so to speak) can be mounted in or on the bridge, and NOTHING will be mounted in or on the cars. I'll bet that will make you happy!

    You need to use a "break-beam" arrangement, so that as each car passes through this piece of track and overhead bridge, it breaks a beam of light which shines UP from the track onto the I/R receiver located underneath the bridge. There will be one of these break-beam units for·each lane of track.

    Sketch that out on a piece of paper and see what you think of it. If you like it, we can go on from there.

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "Genius is one percent inspiration and ninety-nine percent perspiration."

    Thomas Alva Edison

    Post Edited (Bruce Bates) : 2/23/2008 3:49:33 PM GMT
  • Justin9Justin9 Posts: 9
    edited 2008-02-23 16:37
    These are not slot cars, so lanes do not exists, these are full blown remote control cars racing in a parking lot, 1/10th scale cars. There is no track except the pavement we are racing on. Just so you'll have an idea of the car, here's a link for reference, http://hpiracing.com/kitinfo/704/ .· I· have a set of plans on making a 40khz ir emitter/transmitter, but it doesn't suit my needs in the long run, the design I have only supports two leds in parallel, which is fine, but I need 8 leds and use 12 volts supply.· I will have one of these controllers every foot, and I am planning on building the bridge in 4 foot sections, so I can add or remove sections depending on how wide or track is.

    So a break-beam system will not work because how does it know which car is which, because at any given moment a car could be passing the bridge, so if 6 cars start the race and all run 5 laps, but then only 4 cars run 7 laps, there would be no way for me to tell who ran how many. The bridge could be somewhere between 2 and 3 feet tall. The reason I want the bridge to be a FIXED tramsitter, is so I do have 6 different freq on transmitters mounted on cars. I figured it would be easier to just have a transmitter mounted above the track beaming a single down. When the cars pass the signal, each one with their own receiver, they could score a lap. It doesn't have to be IR, I just figured that would be the cheapest. I don't mind make the bridge boardcast a RQ, said it was 50mhz. I can make one standard receiver and use it on every car and when they go under the bridge they score a lap, that's fine, I just though IR would be easier for me to work with. One day, it would be nice to make every car have its on signal and be deteched by the bridge, but I'm not concerned with that right now, I just want something to track how many laps me and my buddies have run in a 6 minute race without us having to call out our number everytime we pass the start/finish line. (Because some have the amazing ability to lose count often). I could to have a fixed transmitter and use a receiver on the car with a counter for cost. I think I will have at the most 4 dollars for the car receivers and 10 dollars in every foot in my bridge. I don't need lap times or keep records of each run on a computer, yet... I just want something simple working first.

    Here is the circuit I am trying to build off of.· http://www.reconnsworld.com/ir_ultrasonic_555timer40khzir.html

    Post Edited (Justin9) : 2/23/2008 5:02:37 PM GMT
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2008-02-23 17:56
    Justin-

    From that same web site, you could use this as a 40 KHz I/R receiver, if you find it appropriate: http://www.reconnsworld.com/ir_ultrasonic_40khzirtest.html

    I suspect you'll need to save a bit more money, as the I/R transmitters may turn out to be more than $4.00 each. You need to figure in a battery, unless you're going to run it off the car battery. You will also need a small enclosure or some way to mount the I/R transmitters appropriately.

    If you were driving the I/R transmitters with a Stamp or other micro-controller, sending an ID out would be fairly easy. As it is now, if you use different transmitting frequencies on each car, the receiver or receivers will need to be able to switch between frequencies, to attempt to see which car may be passing underneath.

    Also, are you going to have a "bottleneck" so that the cars pass through in single file? If not, you may have a problem "seeing" each cars transmitter and identifying it anywhere in a wide path.

    I think you need to do some more design work, before you go too much further with circuitry and the like.

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "Genius is one percent inspiration and ninety-nine percent perspiration."

    Thomas Alva Edison

    Post Edited (Bruce Bates) : 2/23/2008 6:01:29 PM GMT
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2008-02-23 18:17
    Another option would be RFID tags. Each car would have its own tag, which would register when it passed over or under the sensor coil.

    One problem with using IR outdoors is sunlight, which is rich in IR and which could easily saturate a sensor.

    -Phil
  • Larry~Larry~ Posts: 242
    edited 2008-02-23 18:25
    Well If I was going to do this I would have someone here program me a number of SX or PIC chips which output a constant number using IR led's (like one through ten) Transmitters, this way you could have ten racers in one race. Then have a stamp or propeller chip as a receiver which would look for IR numbers (cars) as they pass under then read a RTC chip and log the Info into eeprom. then you could hook this up to a laptop or desktop computer download the info and graph the passes and times for each race. You can use PVC tubing to install the Receivers and depending on how long you make these tubes you will only get pulses which are right under the gate. you may be able to hook all receivers in parallel and just read on one line? this will take some testing. and I would think that four receivers could cover 20' depending how you set up the shielding around them. If you just want to display the results on an LCD screen that could work fine also. So make a 40khz transmitter and get a few 40khz receivers hook them up and see what kind of results you get with different types of shielding so only one goes off at a time or if it even matters two are sending the same data at the same time.
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2008-02-23 19:18
    Justin -

    Here are some 40KHz I/R transmitters and receivers in kit form. They may be helpful in the prototyping stage. You can always build your own design later, to fit your exact needs.

    40 KHz I/R transmitter kit: http://www.mpja.com/prodinfo.asp?number=5287+RB

    40 KHz I/R receiver kit: http://www.mpja.com/prodinfo.asp?number=5288+RB

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "Genius is one percent inspiration and ninety-nine percent perspiration."

    Thomas Alva Edison
  • Justin9Justin9 Posts: 9
    edited 2008-02-23 19:46
    "I suspect you'll need to save a bit more money, as the I/R transmitters may turn out to be more than $4.00 each. You need to figure in a battery, unless you're going to run it off the car battery. You will also need a small enclosure or some way to mount the I/R transmitters appropriately."

    My IR Transmitters will have 2 resistors, a pot, 555 timer, cap, and 8 leds.· I feel like I can put these together for 10 or less a peice.· I will need several for my bridge, but once I have them built, I don't have to worry about them anymore.· The receivers on the car will run off the battery with the pedometer.· They come with a coin battery already.· I can get the pedometer for 1.00 a peice, and then add my IR receivers, which I can get for about 25 cents a peice.· I can use the pedometer enclosure with a simple hole cut in it to house my car receiver.

    "Also, are you going to have a "bottleneck" so that the cars pass through in single file? If not, you may have a problem "seeing" each cars transmitter and identifying it anywhere in a wide path. "

    No bottlenecks, I have attached a poorly drawn Paint jpg to show you.· I will have the LEDS spaced out even across the bridge so no matter where within a 20 foot section of the track a car crosses under the bridge, it will have a IR beam coming down on it..·· basically a checkpoint.

    "Another option would be RFID tags."

    I actually thought about this, but have been unable to find alot of information on it as where I can get them and costs and such.· I didn't spent a lot of time looking, but will look some more.

    "One problem with using IR outdoors is sunlight, which is rich in IR and which could easily saturate a sensor."

    Yeah, I am aware of that, I was hoping that if I used some 40khz IR Receiver modules I could overcome the problem with the sunlight, I was also not throwing out the option of building a tube to insert the receiver in so it was directly straight up and I hoped that this would allow me to reduce sunlight noise...· My test receiver I built the other night worked but was with a plan phototransistor, and it would work with a remote good after I wrapped some black tape around the end and may·a tube to channel the light, but it would still get some noise from sunlight, so I'm hoping the 40khz will cut down on that.

    "Well If I was going to do this I would have someone here program me a number of SX or PIC chips which output a constant number using IR led's (like one through ten) Transmitters, this way you could have ten racers in one race. Then have a stamp or propeller chip as a receiver which would look for IR numbers (cars) as they pass under then read a RTC chip and log the Info into eeprom. then you could hook this up to a laptop or desktop computer download the info and graph the passes and times for each race. You can use PVC tubing to install the Receivers and depending on how long you make these tubes you will only get pulses which are right under the gate. you may be able to hook all receivers in parallel and just read on one line? this will take some testing. and I would think that four receivers could cover 20' depending how you set up the shielding around them. If you just want to display the results on an LCD screen that could work fine also. So make a 40khz transmitter and get a few 40khz receivers hook them up and see what kind of results you get with different types of shielding so only one goes off at a time or if it even matters two are sending the same data at the same time."

    I still thinking and processing this....
    907 x 528 - 95K
  • UghaUgha Posts: 543
    edited 2008-02-23 23:25
    The reason why I didn't mention RFID before is because I thought you meant you were racing REAL cars.
    Or at least go-karts.

    I guess I had a real dumb moment there.

    Anyways... RFID will be your absolute best bet. The reason why? Very cheaply expandable!

    A stick-on RFID tag costs around $2... plus, no additional electronics to build. Just peel
    the sticker off and stick it on the top or bottom of the car.

    You'll need a microcontroller like the Basic Stamp and an RFID reader... and you'll need to
    either build a bridge like you had thought, or a "speed bump" like design where the cars
    run over it.

    Parallax sells a very useful RFID reader for $39.95.
    They also sell RFID stickers for $2.75 apiece.
    You'll also need a microcontroller. Parallax has the Basic Stamp 1 on a nice protoboard
    for $29.95
    They already have up the source code to interface the RFID reader with the BS1... so you'd
    just need to customize the source (hint... the people on this forum are VERY helpful and
    will likely walk you through it every step of the way).

    In addition, if you decide not to use a microcontroller, you can build a fairly simple
    interface to use the RFID reader with a laptop or whatever. This is a bit more complex
    though and I recommend the BS1 option.

    So, using RFID. The total cost for the project's electronics would be:
    $69.90 + $2.75 per car.

    Using IR you have a lot of issues such as ambient IR, false positives and complex
    circuits to build. In addition, you'll have to build and attach a receiver to each and
    every car, building a new one as new cars are introduced to the race. This is sure
    to cost a pretty penny.

    Let us know what you decide.
  • Justin9Justin9 Posts: 9
    edited 2008-02-24 02:23
    I'm looking at this stuff now..· I don't mind changing lanes on my plan...· I like the idea of the RF tags...· I just gotta do some reading and figure out what's involved.· I won't have a computer at the track so being able to read the lap counter after every race is a must.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2008-02-24 02:46
    Yet another option is barcodes. You could adhere them to the bottoms of the cars with a row of optical sensors embedded in the track to read them. The sensors would toggle on an off as the dark and light bars scanned by. The barcodes themselves wouldn't have to be tiny, dense little UPC codes, but something with a few large bars that would be easy to read and decode on the fly in software. The catch with barcodes, of course, is that the cars can't stop or experience any abrupt changes in speed while the bars are being read.

    -Phil
  • Justin9Justin9 Posts: 9
    edited 2008-02-24 02:46
    Question,

    What range can I expect to use with the RF reader?

    Will the reader be fast enough to register two cars or more at once?

    ·
  • Justin9Justin9 Posts: 9
    edited 2008-02-24 02:56
    I don't really think anything attached the racing surface will work, we usually race in a school parking lot... which is another reason why a computer is not available, and the fact we don't have a laptop. Nothing can really just be left, I have to be able to move my scoring system at the end of the day. Plus, some days we race on asphalt, some days on concrete. And if we ever get dirt rc cars again... well.. I'd like to transport my system.
  • UghaUgha Posts: 543
    edited 2008-02-24 03:18
    RFID tags are very short-range. This is why I suggested putting them on the bottom of the cars and have
    the cars drive over a speedbump-like barrier to count the laps, if they are on the bottom, it should be well
    within range... but a bridge overhead might be too far.

    About the registering two cars at once, its out of my field of expertise but I have an idea or two.

    What if you built a bottleneck for them to run through?

    See the image below.

    Also I've included my suggested form of getting info on the status of the race in the field... the
    Parallax LCD Terminal Appmod ($14.95). It has four buttons and an LCD screen... perfect for your
    uses and it'll hook up to the same microprocessor.

    If you want to add a "cool" element to it, you can do without the exit ramp and make them "jump" out
    of the ramp.

    If I can help in any other way, let me know.

    Edit: This design will be just as portable as any ramp design... most likely.

    Post Edited (Ugha) : 2/24/2008 3:25:46 AM GMT
    448 x 301 - 34K
  • Justin9Justin9 Posts: 9
    edited 2008-02-24 04:36
    I'm going to·have to take you guys to a track so you can see these little cars...· the ground clearance on one of these cars is probably not 1/2 inch for·the on-road cars.· The tires are only 26mm tall....· so having a ramp or something, it would have to be really long and a very gradual slope to keep from upsetting the cars, which by the way run 30-50 mph depending on how modified they are.· When you are talking about a remotely controlled objected the size of legal paper crusing around with an aluminum chassis jumping things, it gets ugly in a hurry...· The idea of taping the line down works I guess with duck tape, and I guess if we used it offroad we would have to try burying it some in the dirt....

    the bottleneck is out of the question, it's hard enough driving one of these things in a straight line sometimes let along asking two or three guys to slow down and go single file through a lap counter in a timed race...· ain't going to happen...·· there will be some serious wall scrubbing going on there...· basically, what I getting at is this cars aren't like the kid bashers you buy at walmart for 50 bucks, but are more, true racing vehicles...· I'm not a big fan of the idea of jumping my car off a ramp and killing the suspension and chassis (yes, these cars have real oil filled shocks with coil over springs).

    The lot we use the most has about 100 foot straightaways and about 30-40 feet sweeping turns, so we are moving pretty fast to have to channel through a bottleneck timing line....

    Post Edited (Justin9) : 2/24/2008 4:41:30 AM GMT
  • UghaUgha Posts: 543
    edited 2008-02-24 07:18
    Wow... ok so now I got a better picture of the situation.

    I believe the RF card reader is fairly thin... maybe a half inch thick or so. Are you sure a ramp is out of the question?

    That still wouldn't solve the multiple cars at once problem...

    To be honest, I strongly doubt IR would as well.

    I could be absolutely completely wrong about this, but you can't just emit an IR frequency and then ONLY pickup that
    frequency...

    The reason being that IR receivers are made for a set frequency. You can emit a different frequency within its accepted
    band, but the range is greatly reduced.

    So basicly, emitting IR from each car and having it picked up by a central point while knowing which car emitted it,
    is out.

    So that leaves your original concept... emit IR from a "bridge" and pick it up with the cars.

    The problems are: Ambient IR. This can be reduced by making sure no light can get directly on the IR LEDs... covering them
    on four sides and pointing them straight down. But you have a problem with reflected IR. The sun can generate IR and then
    it can be bounced off the tops of the cars, nearby shiney objects, and possibly by the track its self.

    There is another problem with receiving with each car, how will you know how many laps each car has run without stopping
    the race and looking at whatever display you have on the cars? Is this an issue?

    Ok... lets look a bit more "low tech".

    What about a "photo-finish" system that takes a picture of every car as it passes through the gate? There are keychain
    cameras for around $15 that have SD card slots. They are low quality, but it'd be good enough to make out which car
    is which. Making it automated is very simple.

    But again, you have to have someone manually look at each photo and count the number of times each car shows up.

    That option looks like its out as well.

    So what about Ultrasonic rangers? That won't tell you which car is which... and they cost to much and are too bulky
    to put on each car.

    Then there's hall-effect sensors... basicly magnetic sensors. You'd stick some magnets on the sides of your cars, different
    number and spacing for each car, then they'd be "scanned" by the sensor as they go past. But the problems here are
    that you'd need each car to go fairly close to a central post and again, you can't do multiple cars at once (unless you
    had multiple sensing posts). I'm also not sure that a magnetic sensor can handle that high speed.

    The only thing I can really think of that'll work for your setup is radio frequency transmitters/receivers.

    I've found a remote control receiver from Electronic Goldmine that's a bit like the one I have. It's
    $10.95 and should be easily interfaced with a BS1 like the one I mentioned before for $29.95.
    (go to www.goldmine-elec.com and search for G16418).

    They sell a matching keychain transmitter for $1.99 (search for G1449 on the site).

    You can easily "gut" the transmitter and set it to "always on". Give it a very short antenna so it has limited
    range, then whenever it gets near the receiver, the receiver will pick it up.

    Using something like your 555 timer or something of the like, you can give each car a different "frequency"
    or a different series of bytes that the keychain transmits. This is beyond my current knowledge although
    someone else will liekly be able to help you rather easily.

    I think this simple RF setup will be your best bet, as you can control the range, you only need a central "box"
    on the side of your starting line (no bridge needed), more than one car can go through at a time, and you can
    use very cheap parts.

    I hope this helps a little.
  • Justin9Justin9 Posts: 9
    edited 2008-02-24 19:11
    "There is another problem with receiving with each car, how will you know how many laps each car has run without stopping
    the race and looking at whatever display you have on the cars? Is this an issue?"

    I don't care about the laps until the end, we run timed races, not lap based races...

    "I've found a remote control receiver from Electronic Goldmine that's a bit like the one I have. It's
    $10.95 and should be easily interfaced with a BS1 like the one I mentioned before for $29.95.
    (go to www.goldmine-elec.com and search for G16418).

    They sell a matching keychain transmitter for $1.99 (search for G1449 on the site).

    You can easily "gut" the transmitter and set it to "always on". Give it a very short antenna so it has limited
    range, then whenever it gets near the receiver, the receiver will pick it up.

    Using something like your 555 timer or something of the like, you can give each car a different "frequency"
    or a different series of bytes that the keychain transmits. This is beyond my current knowledge although
    someone else will liekly be able to help you rather easily.

    I think this simple RF setup will be your best bet, as you can control the range, you only need a central "box"
    on the side of your starting line (no bridge needed), more than one car can go through at a time, and you can
    use very cheap parts."

    Ok, I'm looking at this now...
Sign In or Register to comment.