Shop OBEX P1 Docs P2 Docs Learn Events
Faulty Boe-bot Infrared — Parallax Forums

Faulty Boe-bot Infrared

MousePadGirlMousePadGirl Posts: 3
edited 2010-04-21 22:33 in Accessories
Hello,

I am new to this forum so I'm not sure if this is where I put this post.· I have a Boe-bot with the Basic Stamp programming.· My problem is with the infrared sensors, they just won't work.· I wired them according to the manuel, and at first they worked, but one day they wouldn't sense anything.· I've discussed it with my robotics teacher, we tried rewiring it, and changing the batteries on the bot.· The sensors were tried on another Boe-bot, and worked perfectly.
I was wondering if it was my wall-following program, but I can't find anything wrong with it.

Any ideas?

Mousepad

Post Edited (MousePadGirl) : 4/21/2010 10:16:48 PM GMT

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2010-04-19 00:00
    It would be unusual for something like an IR sensor to suddenly stop working when it's been working fine for a while. Similarly, a Basic Stamp would not suddenly stop working or one of its I/O pins would not suddenly stop working without some obvious electrical fault like a static spark or a dead or weak battery. It's possible that you have a bad connection to one of the sockets around the breadboard area or in the breadboard itself and moving the wires around caused it to happen. Programs don't suddenly behave differently unless they've been changed.

    It would help for you to provide a copy of the source of your program as an attachment to a message (use the "Post Reply" button and the "Attachment Manager") and some kind of schematic drawing of how you have things connected.
  • SandhuamarinderSandhuamarinder Posts: 85
    edited 2010-04-19 01:13
    if you are using QRD1114 kind of infrared sensor yup they got a problem with it u just have to play around with it. I dont know why they dont work sometimes. Even though u have a right circuit i have this same problem many times. But they work fine if u play around with it.
  • MousePadGirlMousePadGirl Posts: 3
    edited 2010-04-19 22:58
    I don't know what kind of LED it is, I'll have to check and post it. All my wires were tightly connected and secure, and none of them were touching. You said that I should probably attach the source of my program; Do you mean the actual program itself?

    Sorry, I am seriously new to this whole thing. Thanks for the advice!

    Mousepad
  • Mike GreenMike Green Posts: 23,101
    edited 2010-04-20 05:04
    Yes the actual source program, the source file that you compile using the Stamp Editor.

    Also, provide a subject for your thread, something meaningful please. Since you started this thread, you can change it. Use the pencil icon in the upper righthand corner of your first message.
  • MousePadGirlMousePadGirl Posts: 3
    edited 2010-04-21 22:23
    Below is the program I used for the infrared.· Hopefully this is what you needed to see.· I wrote down the program to use only one sensor.

    One thing I forgot to mention about working with the wiring, was the infrared detectors were hot to the touch, after just a few minutes of the bot being on.· I'm not sure if this information was relevant, but it was kind of odd, and might have something to do with the issue.




    ' {$STAMP BS2}
    ' {$PBASIC 2.5}

    irdetectright· VAR Bit
    pulseleft····· VAR Word
    pulseright···· VAR Word

    LeftPR···· CON· 130
    Leftbright CON· 79

    FREQOUT 8, 1, 38500
    FREQOUT 4, 2000, 3000

    DO


    ·FREQOUT 2, 1, 38500
    ·irdetectright = IN0
    ·IF (irdetectright = 0) THEN
    ·pulseleft = 720
    ·pulseright = 650
    ·ELSEIF (IN6 = 1)

    ·ELSE
    · pulseleft = 850
    · pulseright = 720
    ·ENDIF

    ·PULSOUT 13, pulseright
    ·PULSOUT 12, pulseleft
    ·PAUSE 15

    LOOP


    Thanks again!

    Mousepad
  • Mike GreenMike Green Posts: 23,101
    edited 2010-04-21 22:33
    1) Did you include the series resistor for the LEDs? The instructions (p 238 in Robotics with the BoeBot) show a 1K resistor. Without the resistor, the LED will be damaged and/or the Stamp I/O pin.

    2) The IR detector should not get hot. Make sure it's connected properly. It may be connected backwards. If so, it might be damaged. If you have the 220 Ohm resistor in the circuit as shown, the resistor will prevent the Stamp from being damaged as well.

    3) What are pins 4 and 8 used for? You really need some comments in your program to explain what you're trying to do.

    4) Next time, please use the Attachment Manager rather than cut and paste. The forum software normally strips out leading spaces and some other formatting. Posting the code as an attachment avoids this. At least use the [noparse][[/noparse] code ] and [noparse][[/noparse] /code ] brackets (without the extra spaces). This will preserve some of the formatting.
Sign In or Register to comment.