Shop OBEX P1 Docs P2 Docs Learn Events
IR beacon — Parallax Forums

IR beacon

ashiaashia Posts: 2
edited 2005-09-23 18:55 in BASIC Stamp
HI all:

I am trying to use a remote control as a signal for the boebot to find me.
I want left and right IR detectors for the bot to turn left or right based on which side picked
up the strongest(?) signal.

1) I don't know which command to use. I tried PULSIN Pin and COUNT Pin, 0,5ms.
Values from PULSIN and COUNT are contradictory. Neither is accurate either.

2) There always seemed to be one·domindate IR detector, no matter which angle I point at.

Please help!·· confused.gif

Comments

  • Bruce BatesBruce Bates Posts: 3,045
    edited 2005-09-23 06:30
    ashia -

    It sounds like you're attempting to use what is ordinarily a command input device (the intermittant and varied pattern output of an I/R remote control) as a homing device (usually a constant signal beacon). It would be good to think through this before you go much further.

    When I/R is used as a command device, first the carrier signal must be detected (presence / absence), and then PULSIN is the appropriate PBASIC command to use, as you are, in effect, then going to decode the underlying I/R signals as though it was DATA, separating each of the I/R signal's time-dependent ON and OFF segments within the signal, not unlike how one might decode Morse Code. More often than not, the hardware (the actual I/R receiver) detects and separates the carrier signal from the data. Each of the various remote control buttons will emit an I/R signal with characteristics specific to the exact button pressed. If the presence of a command signal is detected, you then decode the underlying data with the SINGLE I/R receiver onboard the robot, via PULSIN. The hardware will have already removed the carrier signal, so it is not an issue. There is no need to scan a directional array of sensors, as there is only one I/R input (receiver), or possibly there are two (fore and aft).

    When I/R is used as a local homing beacon, generally there is either nothing but a carrier signal present (one constant signal with no data value), or there is a carrrier signal present with a constant data format, but the value of the data is pretty much ignored. This constant I/R signal must be detected by any of the I/R input sensors; as many as the robot has. Generally there are two or more I/R receivers which are scanned for input as the robot travels forward, or when it stops to get its bearings. Sometimes there are 4 receivers, one for each cardinal direction (N, S, E, W). In a more sophisticated system, the I/R receiver may be centrally mounted, and adapted to rotate through 180 or 360 degreees, sweeping for signal input. In any and all cases, one is only looking for the presence or absence of an I/R signal as indication of the homing beacons presence. There is one guarantee however, and that is that IF the homing beacon IS present, it will be constant, and thus readily available. An intermittant signal (such as that from an I/R remote control) defeats the purpose of a homing beacon.

    In this latter case of just detecting the presense or absence of an I/R signal, we just need to inspect each potential source of the I/R signal (the receivers) for input (a 1 signal is present), so we might have all the I/R sensors checked in a FOR ... NEXT loop, with nothing but a single IF .... THEN statement, varying the value of the Input Pin number (Hint: IF PinStart + Pin_Var = 1 THEN ... is a valid format). Again, there is no qualitative analysis (nearer one sensor than the other), just presence or absence. You head in the direction of signal presence, simple as that.

    I hope that's not more confusing than helpful.

    Regards,

    Bruce Bates
  • allanlane5allanlane5 Posts: 3,815
    edited 2005-09-23 14:28
    Note that the IR from a remote tends to be quite bright -- for instance, you can easily 'bounce' it off a white wall, or the ceiling, and still have it be recieved by the detector. Thus you may have to do something to shield the detectors so they only 'see' in a narrow cone, and even then reflections may confuse the issue.

    Thus, signal strength is very important in 'tracking' applications, as mentioned above.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2005-09-23 14:55
    You might try making your own IR beacon to avoid the complexity related to using a remote.· They are asychronious serial and have something like 12-15 bit of data - everybutton and several manufacturers use different codes.

    You can use a 555 to drive a 38,500hz to 40,000hz signal into an IR LED as your beacon.· Also, you can control the 'duty cycle' to reduce the brightness and the bouncing to some extentent.· Finally you can mount the LED in a tube to reduce reflection [noparse][[/noparse]or even use a lens for long distances]

    You do need the oscillator as the world is full of IR at many different frequencies, so the receivers are designed for a narrow band to assure they aren't getting a lot of noise.



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    G. Herzog in Taiwan
  • ashiaashia Posts: 2
    edited 2005-09-23 18:55
    thanks for all of your suggestions.
    I will try them out.

    ashia
Sign In or Register to comment.