Shop OBEX P1 Docs P2 Docs Learn Events
555 and 4 IR LEDs — Parallax Forums

555 and 4 IR LEDs

Special_KSpecial_K Posts: 162
edited 2006-09-29 17:07 in BASIC Stamp
Does anyone have a schematic that will help me make an IR Beacon out of a 555, four IR LEDs, a 5V regulator and a 10 ohm resistor ? I have my BOE-BOT homing in a a pulse made by another BOE but is it a waist of a good Basic stamp for it to just sit there and produce 37500 pulses.
it s mentioned here but I never got the schematic
http://forums.parallax.com/showthread.php?p=605150

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2006-09-18 19:33
    In appendix C of IR Remote for the BOE-BOT <http://www.parallax.com/detail.asp?product_id=28139&gt; which you can download, there's a schematic and instructions for such an IR beacon. It's designed for a single LED, but you can modify it for more than one LED by changing the current limiting resistor for the LED.
  • Special_KSpecial_K Posts: 162
    edited 2006-09-18 21:48
    Ok I found it. But it looks like it takes the Basic Stamp to send info to the 555. that will still tie up a basic stamp and make the project a $50+ IR Beacon.
  • ZootZoot Posts: 2,227
    edited 2006-09-18 22:24
    If you go about halfway down this page there is a circuit that uses a 555 to generate the frequency for IR leds. In the example, a logic gate is used to send the frequency to one of two LEDs. You could do this with 4 LEDs and 4 gates (so that you only use your Stamp to turn on one or another LEDs). Switch them all on, or whatever. A directional beacon could be assembled by having 4 IR LED/detector pairs. Alternate between sampling each detector in order then turning IR LEDs on. You will only detect IR from the OTHER bot, and the other bot will only detect YOUR IR LEDs. If the North detector sees IR but not the others, that's your rough direction.

    users.frii.com/dlc/robotics/projects/botproj.htm

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When the going gets weird, the weird turn pro. -- HST
  • RDL2004RDL2004 Posts: 2,554
    edited 2006-09-18 22:51
    If you're using the ir detectors that came with the BoE-Bot, then all you need is a circuit that will pulse your LEDs at 38KHz or whatever those sensors need. This is pretty easy to do using a 555 timer. That way all the Stamp has to do is watch for the detection, and not have to be pulsing the LEDs all the time.

    Do a Google search on 555 astable mode and you should find what you need. Here is a good starting point:

    www.uoguelph.ca/~antoon/gadgets/555/555.html

    Also try doing a search on "infrared proximity detector", since this is what you are trying to build. Several companies sell kits for robots that do exactly what you need, but they are a bit over-priced I think. All you need is a 555 chip, a couple of resistors and a capacitor.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Rick
  • allanlane5allanlane5 Posts: 3,815
    edited 2006-09-18 23:21
    Note: Another name for what you're creating is "IR-Remote-Jammer", since NO IR-Remote will be able to compete with the flood of 38 Khz IR light you'll be putting out. Just a thought.
  • ZootZoot Posts: 2,227
    edited 2006-09-19 06:14
    Allan -- indeed. I think that's why, even if using a 555 to generate the modulation frequency, it would be a good idea to flash the LEDs briefly when you need to detect -- you might enable them with 3 pins and a shift register -- that would save pins and let you turn on/off up to 8 LEDs. Save some battery time too.

    Special_K -- wasn't there another thread along these lines? If I remember, we also discussed possibility of using detectors that work on a different modulated frequency -- 56khz or so -- they're out there. This would prevent interference from and interference to your beacon. You'd also be taking nice advantage of your 555 since you can't generate 56khz from the stamp.

    Oh, another thing I remembered -- here's some code I found that lets you use your Stamp to monitor (and therefore calibrate) the 555 timer output.... you'll need to adjust the constants if you have something other than a BS2. Hook the output of your 555 circuit up to a Stamp pin and run the code.

    ' {$PBASIC 2.5}
    ' {$STAMP BS2}
    
    timer  PIN 14
    freq   VAR Word
    scale  CON $0100
    
    DO
    
      COUNT timer, 100, freq
      freq = freq */ scale
      DEBUG HOME, "555timer freq: ", DEC5 freq * 10
    
    LOOP
    
    

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When the going gets weird, the weird turn pro. -- HST
  • Tom WalkerTom Walker Posts: 509
    edited 2006-09-19 13:04
    Gentlemen,
    I think that Special_K is just looking to create an IR beacon...WITHOUT needing any Stamp control.

    If that is the case, then either RDL2004's 555 astable multivibrator or Zoot's siggestion without the addition of any control (i.e. always gated ON) should do the trick.

    Or have I missed something, Special_K?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Truly Understand the Fundamentals and the Path will be so much easier...

    Post Edited (Tom Walker) : 9/19/2006 1:10:42 PM GMT
  • allanlane5allanlane5 Posts: 3,815
    edited 2006-09-19 13:20
    Oh, sure, I have no problem with that. I'm just pointing out one of the "unintended consequences" that could bite him in the foot if unaware of it.
  • Special_KSpecial_K Posts: 162
    edited 2006-09-19 17:53
    yeah I want to have a beacon without using the Basic Stamp 2.
    allanlane5 what problems will I have?

    Let me tell you what I eventually want to happen.
    I want the BOE-BOT to be able to navigate to a spot marked by a IR Beacon. I do not know what I will try to have it do when it gets there... Maybe recharge. I want to have multiple IR Beacons maybe 10 -15 feet apart, And for the BOE-BOT to navigate to one beacon then the other. I figured that each beacon can send a small data bit that can help the BOE-BOT tell which beacon is which.
    The first part of this project is a self contained Beacon.. Then a beacon that sends a bit of data like the number 1.
  • allanlane5allanlane5 Posts: 3,815
    edited 2006-09-19 18:06
    That's all fine. What will bite you is if you use a 555-based solution, where a beacon is on "all the time". First of all, how you'll encode a 'bit' into it with only a 555 I don't know.

    But my point was, your design looks like a Beacon, as well as a Jammer. If you have two of them, how are you going to keep them from jamming each other? And they'll probably jam an IR-Remote, as well as any IR-enabled devices in the same room (TV, DVD player, Cable Box, VCR). As long as your 'beacon's are operating, anyway.

    It doesn't have to be a show-stopper, I'm just saying that's one of the possible unintended consequences of your beacon.
  • ZootZoot Posts: 2,227
    edited 2006-09-19 18:42
    Not sure about transmitting data -- you have timing issues, when to listen issues, not confusing your own data with that of other remotes, etc. My partner and I were actually trying something like this out, but it gets pretty hairy working out timing, how to decide the "start" of message that isn't just your Sony remote, etc.

    But start with single beacon, no data. How about setting up a second timer with a NAND chip. You'd have a 555 generating your IR freq. hooked up to one input of a NAND gate. The other input of the gate would be hooked up to the output of another timer, set on a slow frequency, say, 1ms on/499ms off. The output of the NAND goes to one lead on the IR LED, with resistor & power to the other LED lead. When the second timer switches on, it will pass the IR frequency through to the LED for 1ms. Basically you'll get two 1ms IR pulses every second. 3 cheap chips (or 2 chips if you use a 556) and a few parts and a 9v battery.

    You might also think about light shields or light baffles if you are trying to home in on the beacon. That could also prevent remote control interference. If you ever want to see really good *optical* control of IR, check out a Roomba demo at a dept. store.

    If you want data, or beacon IDs to be transmitted, I dunno, sounds like a job for an S/X....

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When the going gets weird, the weird turn pro. -- HST

    Post Edited (Zoot) : 9/19/2006 6:48:19 PM GMT
  • Tom WalkerTom Walker Posts: 509
    edited 2006-09-19 18:53
    ...or to expand on what Zoot proposed, use a 556 with one timer generating the 38.5 and the other gating that at some frequency. That way you could use essentially the same circuit at several locations...one sending out 2 "pulses" per second, another sending out 4, etc... So, once your 'bot figures out "where" a beacon is (direction), the beacon's pattern will also tell the 'bot "which" beacon it is.

    FWIW, creating the beacons is probably not going to be the most difficult part of this process...

    Keep us updated....

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Truly Understand the Fundamentals and the Path will be so much easier...
  • ZootZoot Posts: 2,227
    edited 2006-09-19 20:04
    ....the timing and optics will be smile.gif

    If you are using Boe-bot IR LEDs/detectors for obstacle avoidance, those detectors will get triggered by your beacon, methinks.

    Use a pot in place of one resistor when you build the timers -- that way you can adjust both the IR freq. to match your detetors and you can use another pot to adjust the timing the bursts themselves.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When the going gets weird, the weird turn pro. -- HST
  • Special_KSpecial_K Posts: 162
    edited 2006-09-19 20:47
    even if I am using the Sharp GP2D02 Detector Package..
    well yes I guess you are right IR is IR. maybe I can use the sonar.
    I have the 3 Sharp GP2D02 Detectors being checked by sonor on the same sensor mount. maybe when IR homig is on the Sharp GP2D02 can not fire. I will have to test this.
  • ZootZoot Posts: 2,227
    edited 2006-09-19 20:58
    Oh, right. That's the serial version of the GP2D12 analog detector? I don't think those are so sensitive to remote IR interference because that detector calculates the angle of the returned IR as well as presence. Easiest way to find out is to test it -- aim a remote at the detector and hit lots of buttons.

    If you are sampling and averaging two or three successive readings on the sharp I think you might get one single reading once in a while, but the effect would get average out very quickly.

    Here's a timing grid a PIC guy worked out for IR beacon/data with 3 bits of data --
    Somebody said...

    So we need to ensure at least three consecutive words get from the transmitting beacon to the receiving beacon. If we weren't operating in such short distances with the possibilty of all four robots being within sight of each other, our task would be simple. The problem is as follows: if all four robots transmit their "word" (essentially their ID) in the same space in the same time, they won't be able to detect each other at all! The detectors wouldn't see the correct timing sequence, because there would definitely not be a 14.9ms blank 'header' period.

    Each robot needs to take turns transmitting its signal and 'listening' for signals from other robots. Because these robots aren't synchronized, this problem is more complicated - who knows when to start transmitting and stop listening?

    Due to reflections, it's also pretty clear that when the beacon is transmitting, it won't reliably detect other beacons that are also transmitting! (ie: the beacon can't 'talk' and 'listen' at the same time) We have a real timing problem now.

    The timing solution (shown below) works if you consider the following worst-case scenario: assume all four robots are within line-of-sight of each other. Assume that, by luck, the first collection of 'words' are transmitted at the same time and none of the robots detect each other. By changing the time between this first burst and a second burst (ie: each robot waits a different amount of time before sending out another collection of 'words'), we can ensure that each robot will detect ALL the others, with a worst-case detection time of 1.7s.

    This can be shown in a chart form as follows: roboflag.carleton.ca/images/beacon_timing.gif

    The page is here: roboflag.carleton.ca/resources/technical/ir_beacon.shtml. The sequencing requires nice timing, and you want the beacons cheap, which is what made me think of the S/X for running the beacon itself.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When the going gets weird, the weird turn pro. -- HST

    Post Edited (Zoot) : 9/19/2006 9:19:29 PM GMT
  • Special_KSpecial_K Posts: 162
    edited 2006-09-20 03:54
    i just set up the IR beacon.. the old one with the basic stamp 2 running it. and all the IR remotes in the room work fine.. the DVD player the TV the stereo and even the remote for my AC.
    is this really a jammer too because it did not jam a thing
  • allanlane5allanlane5 Posts: 3,815
    edited 2006-09-20 14:12
    I'm not going to say this again, because I've said it three times already, and three is my limit.

    Okay -- the 555 based 'beacon' MAY be a jammer. The BS2 version could be a jammer if programmed that way -- clearly it isn't right now. BUT, you keep saying you want to build a beacon WITHOUT a BS2 -- which raises the possibility of a jammer.

    Thats all I'm saying. Be Careful, This Could Happen. COULD. POSSIBLE. RISK. MIGHT see this IF it happens. If after three attempts I've been unsuccessful at communicating that to you, perhaps after you do it you'll see what I was concerned about.
  • crgwbrcrgwbr Posts: 614
    edited 2006-09-29 17:07
    You could always use an SX28. Use the FREQOUT command in SX/B. Easy as pie.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    NerdMaster
    For
    Life
Sign In or Register to comment.