Shop OBEX P1 Docs P2 Docs Learn Events
Just built another boebot -Same IR curse. — Parallax Forums

Just built another boebot -Same IR curse.

MovieMakerMovieMaker Posts: 502
edited 2008-10-22 23:42 in BASIC Stamp
It is phenominal.· I just built my second boe-bot. This time, I am going to program it in PBASIC.· I was running some of the test programs and sure enough when I get to the IR program, I am having problems. Specifically, I get a 5 reading no matter what. Last time, with the propeller, I got a 9 no matter what. All I want to do is make sure that it doesn't fall off of the table or run into anything. This is so simple, but for me it has been a nightmare.

I KNOW that I must be doing something wrong. I have worked through the WAM book and all the way through robotics with the boebot.· I have followed well, except for when I got to IR.· I don't want to wire anything backwards and make the detector burn up like it did last time.

Everything else aside, though, I LIKE this little bot. I like the Board of Education and I like Parallax. I LOVE Pbasic. It is something that I understand better than ASM, SPIN and boebotBasic on the prop.· Not that the prop was bad, I am just not to that level yet.

I am using the documentation and software that came with the unit. I am not even altering anything.· I know how to follow schematics, I have been a Licensed and Certified Technician since 1971.

I am sure that I will figure it out. Just wanted to give some feedback that some people have mental blocks in certain areas. I guess IR is mine. I understand the principal and the concept. It just doesn't work when I apply them.



·

Comments

  • MovieMakerMovieMaker Posts: 502
    edited 2008-10-19 21:08
    I just thought of something. It is far fetched, but here goes. I have these engery saving flourescent bulbs all over my house. Do you think that this is interfering with the IR detection?
  • Mike GreenMike Green Posts: 23,101
    edited 2008-10-19 21:26
    Compact fluorescent lamps could interfere with IR detection. They operate at above 40KHz typically while the IR detectors work at 38KHz and generally below 40KHz.

    You need to figure out what you're doing wrong. The examples in the Robotics with the BoeBot and the IR Remote with the BoeBot do work. You can easily test the interference hypothesis by turning off the CFLs in your work room while you're testing your BoeBot and using a flashlight or portable incandescent lamp for illumination.
  • MikerocontrollerMikerocontroller Posts: 310
    edited 2008-10-19 21:27
    · How about constructing an IR sniffer using your IR detector.·
  • MovieMakerMovieMaker Posts: 502
    edited 2008-10-19 21:31
    I ran the IR sniffer program and it said everything was fine.

    I will try what you suggested , mike.

    One more thing. I swapped the resistors from 1 k to 2k to make it nearsited like the manual said. and it went from 5 to 1 readout all the time.
  • MovieMakerMovieMaker Posts: 502
    edited 2008-10-19 21:56
    I ran the IR sniffer program and it said "no problem yet."

    I turned on the lights and BANG! IR interference Detected.

    So, I guess my other test was wrong. I am going to try everything with the lights out. All of my house is wired this way. :-(

    I am going to have to figure out a way for the thing NOT to fall off of the table and NOT to run into things. I hate to go to a stupid contact switch. Maybe there is another kind of sensor that would work.
  • SRLMSRLM Posts: 5,045
    edited 2008-10-19 23:20
    Ping))).
  • kevinb2050kevinb2050 Posts: 56
    edited 2008-10-19 23:59
    I had similar problems and found it was the IR detector - had no problems with the ones from parallax but the ones I got locally kept giving false readings.
    I now only use Parallax or Sharp IR detectors.
  • MovieMakerMovieMaker Posts: 502
    edited 2008-10-20 00:39
    I was thinking about the sharp ones. But, is the frequency going to be the same? I mean, will my florescent lights in the house throw all of the sensors off?

    Also, I have the PING. But, even with Ping, the unit runs into things close to it. I was going PING for the distant and IR for the imediate sensor.


    Do you think it could operate off of PING alone?

    Oh, and I need to be able not to fall off of the table top.· That was my main reason for IR.

    I can't understand this. EVERYONE has gotten past this stupid stage. What is diferent in this case?

    Thanks for the replies.

    :-)
  • MovieMakerMovieMaker Posts: 502
    edited 2008-10-20 02:30
    I found a set of programs that let you check to emitter, Receiver. I ran them. I used an external IR remote control and got the detector to detect everything fine. I changed out the IR emitter a few times. The first two did not work at all. The third try and the program indicated that the emitter was working fine. But, after a restart, back to the same old story.

    But the Detector worked flawlessly every time.

    ????
  • kevinb2050kevinb2050 Posts: 56
    edited 2008-10-20 05:16
    I had two IR detectors (local supplier) on the Bot - using them for IR object detecting and IR Remote Control detecting - had nothing but false signals.
    Changed them over to some (parallax) ones I had on the arm of the bot - worked perfectly
    Have since got some Sharp ISu160 which work the same as parallax ones.
    Being in Australia it is hard to get parallax items especially $1 items as freight is worth more than the items.
  • JonathanJonathan Posts: 1,023
    edited 2008-10-20 15:07
    MM,

    I would be very reluctant to trust a single sensor type for something as important as edge detection. After all, if your sensor screws up, your poor 'bot falls off the table! I'd have at least two sensors, and one of them would be a "dumb switch". Switches aren't dumb, they are cheap, reliable and easy to implement. It's just risking too much to use IR alone, which is probably the least reliable. A combination of IR, a PING and a switch would be much, much safer.

    Jonathan

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.madlabs.info - Home of the Hydrogen Fuel Cell Robot
  • MovieMakerMovieMaker Posts: 502
    edited 2008-10-20 23:36
    I have a PING already. Do you think that PING alone would be enough?
  • $WMc%$WMc% Posts: 1,884
    edited 2008-10-21 00:51
    MovieMaker

    The "PING" has a Min. dist. that it can read.Since the "PING" would have to be·pointed down @ a hard angle this is not the best way to go.Have you tried useing a IR led and A IR Trany w/ some light baffles to keep outside light out....?????

    I have used IR to detect a brake in the BEAM like A person or car passed through and area I wanted to monitor.Sun light was always a problem. I took a IR led "emitter" and pulsed it w/ a 1kHz tone.I then looked for a 1kHz signal on the IR "detector" and filtered every thing else out. I thought I came up w/ something Brillant,Only to find this is used by just about every Alarm Co. out there...You'll want to baffel the two so it see's the signal reflecked from the table

    Drop a post reply if this fixed the problem

    __________________________$WMc%______________________out_____________________

    Post Edited ($WMc%) : 10/22/2008 12:57:42 AM GMT
  • MovieMakerMovieMaker Posts: 502
    edited 2008-10-21 01:11
    that sounds like a good Idea. I don't exactly know how. But, maybe I can figure it out.

    Thanks,

    smile.gif
  • $WMc%$WMc% Posts: 1,884
    edited 2008-10-21 01:43
    MovieMaker

    Send a PWM signal out or "PULSOUT" to the IRled some were around 1kHz/Then use something like "PULSIN" or "INPUT" to see the Signal You sent out.Then some "IF" statments to look for this 1kHz signal.
    If Your still drawin a blank,I'll be back tomrrow and I can send You some Sample Code. I'll have to dig it up!!...Just drop A PostReply


    ____________________________$WMc%_________________out______________
  • MovieMakerMovieMaker Posts: 502
    edited 2008-10-21 01:51
    Thanks wmc!
  • MikerocontrollerMikerocontroller Posts: 310
    edited 2008-10-21 02:40
    I'm confused. Are you using a 40khz detector? There are only two states HIGH (no 40khz IR detected) and LOW (40khz detected) . An unfiltered FREQOUT command is issued to the IR led through a 220 ohm resistor. If the frequency is adjusted above or below the detector's center frequency the IR range is reduced enough so that any drop-off will no longer reflect back IR to the detector lens. Immediately after the FREQOUT command the pin state of the detector's output is stored in a bit variable. Any delay in doing this will result in a missed echo. If you already know this I apologize. Good Luck.

    This worked for me:
    ····
    ····· 'Ir detector output connected to pin 10

    ····· IrLed············· PIN·········15
    ····· dropOff·········· VAR········Bit
    ·····
    ····· FREQOUT IrLed,1,39000
    ····· dropOff=IN10
    ····· IF dropOff=1·THEN
    ····· ' take evasive action
    ····· ENDIF

    ··· Woops....I fixed the FREQOUT statement blush.gif

    Post Edited (Mikerocontroller) : 10/21/2008 3:44:18 AM GMT
  • RDL2004RDL2004 Posts: 2,554
    edited 2008-10-21 04:56
    This may not be what you want to do, but in my experience, I have had best results using a dedicated IR emitter circuit instead of the BS2.

    This also frees up the Stamp to do other things.

    You can use several approaches, but a simple 555 timer circuit can easily drive a few IR LEDs at the required frequency.

    These can be on all the time, or pulsed. The detector only has to watch for reflections.

    You can also get detectors for frequencies other than 38 kHz (such as 56 kHz), which will help with interference from fluorescent lamps.

    You may want to Google for "IR proximity detector".

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Rick
  • MovieMakerMovieMaker Posts: 502
    edited 2008-10-21 13:38
    Mike, I am using the pairs that come with the boebot kit. The detectors pickup the signal from the remote control, so I know they are both working. Just the emitter part is very flakey and my florescent lights are interfering with everything.

    RD, I will try the 555 circuit maybe, I have one lying around.

    Thanks again!
  • $WMc%$WMc% Posts: 1,884
    edited 2008-10-22 00:53
    Mikerocontroller, MovieMaker

    I gess I wasn't clear enough on useing a ( IR LED ) and a ( IR TRANSISTER ) and not the 40kHz detector. Since the Flor.Lamps generate so much noise @ 40kHz (the type MovieMaker has),My intention was to get away from 40kHz w/ another Freq. and a hole new detector setup.Radio Shack keeps the IR led and IR tranny on the shelf and thier dirt cheap!!!!! I have had great success w/ this setup!!!


    ___________________________$WMc%_______________out______
  • MovieMakerMovieMaker Posts: 502
    edited 2008-10-22 23:42
    Thank You, I will look into this!
Sign In or Register to comment.