Shop OBEX P1 Docs P2 Docs Learn Events
Infra Red Beacon — Parallax Forums

Infra Red Beacon

NitehawkNitehawk Posts: 3
edited 2009-07-03 00:30 in BASIC Stamp
Hi all,

would like to get some help on an issue I've encountered when I am trying to come up with an Infrared Beacon for my mobile robot. I've tried a search on the forums and the net, but could not find a suitable answer.

Background: I am making an IR beacon that my boe-bot will try to search for and home to.

I did a mock up using 2 BOE boards.

BOE A:
a) IR receiver connected to Port 0.
b) Program is written to poll Port 0 for status and display on screen.
Status = IN0
Debug ? Status

BOE B:
a) IR emitter connected to Port 1.
b) Program is written with freqout to emit a 38.5Khz signal.
freqout 1, 1, 38500

The receiver on BOE A will not detect signal not matter how close I've put them.

However, if I place the emitter and receiver on the same board, and combine the program as follows

freqout 1, 1, 38500
Status = IN0
Debug ? Status

Program behaves as expected. It will detect when the IR bounces off an object.

*Assumption: I've made all connections correctly and all necessary header fields and loops are in the program

Would like to check with the forumers here on what have I done wrong?

Thanks.

Nitehawk smile.gif

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-06-30 15:42
    You have to post your actual program. Your assumption is typically where the problem is located. Either you haven't wired the two boards up the way you think you have or your actual programs don't match the logic you stated in your message. The answer to these sorts of questions is rarely subtle.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-06-30 16:24
    It may also be a matter of timing. When transmit and receive are done in the same program, the receive catches the sensor at just the right moment after the FREQOUT has done its job. When using separate micros for these two jobs, and if the transmitter transmits in brief or infrequent bursts, it may be diffcult for the receiver to catch one if it's only listening intermittently. For a beacon to operate reliably, the receiver must listen for periods at least as long as the time between transmit bursts.

    -Phil
  • NitehawkNitehawk Posts: 3
    edited 2009-07-01 00:11
    Thanks Mike and Phil for your inputs.

    @Phil: This is what I had suspected also. It maybe a synchronization problem. When I increase the freqout command to freqout 1, 100, 38500 it starts to detect the emitting signal, however the signal just gets lost after ~30 sec. i.e. the receiver just stops responding, after which it detects for a while and the signal gets lost again. I have not yet determine whether there is a pattern as to when the receiver can reliably detect the IR signal from the transmitter.

    Going by the same logic, when I increase the freqout to 1 sec; assuming when i open the window for transmitting the signal longer, the receiver should receive the signal. However, there was no response from the receiver if I try to go anything beyond 750ms. Anything less, the signal will only be read intermittently.

    @Mike and Phil: Listed below is the program for board A and board B

    BOE A (receiver board):

    Status VAR Bit

    Do
    Status = IN0
    Debug home, "Status = ", bin1 Status
    Loop

    BOE B (emitter board)

    Do
    Freqout 1, 1, 38500
    Loop

    As for the connections, I've followed very closely those that were printed in the manuals (Robotics with Boe-bot: page 238). I'm sorry I could not provide a hard copy of the diagram as I do not have a scanner on hand.

    BOE A: Pin1 of emitter goes to Vdd, Pin 2 of emitter goes to Vss, Pin 3 of emitter goes to P0 with 220 Ohm resistor in series.
    BOE B: P1 goes to resistor with 1 KOhm, goes to IR diode, goes to VSS

    Nite
  • SandgroperSandgroper Posts: 62
    edited 2009-07-01 14:59
    Check the output from the pin to the emitter with a multimeter to see if it's actually putting out 38.5 kHz.· If it's not then you may have a programming problem.· Also, check the product data sheets for the·type of emitters / receivers you are using.· I was surprised to find out that some of the·receivers I was using were picking up signals at various frequencies way below 38.5 kHz.

    "IR Remote for the Boe-Bot"·has some good information in it as well.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-07-01 15:28
    Your FREQOUT is only outputting for 1ms at a time before being interrupted and restarting, perhaps out of phase, which may confuse the receiver. Why not output for a second at a time ... or more?

    -Phil
  • NitehawkNitehawk Posts: 3
    edited 2009-07-03 00:30
    Hi all,

    after some testing, I observed the following behavior:-

    After replacing the receiver and emitter supplied in the BOE-BOT kit set with a generic emitter and receiver cannibalized from an old forgotten project (without datasheet), and increasing the freqout command from 1 ms to 1 sec, I can get the beacon set to finally work.

    --> In this setup, lowering the freqout time will cause the receiver input to be highly unstable. 1 sec is the min. amount time that I will need to program in to get a reliable stable input from the receiver.

    Thanks for the input Phil, Mike and sandgroper. =)

    What I don't understand was, why isn't the IR set in the kit set work the way it is expected to in the above setup. I've tried the setup on robotics with boebot page 236 and it works perfectly - this shows the IR set works fine together though. eyes.gif

    nitehawk
Sign In or Register to comment.