Shop OBEX P1 Docs P2 Docs Learn Events
Help with Adjusting infared vision — Parallax Forums

Help with Adjusting infared vision

A.C. fishingA.C. fishing Posts: 262
edited 2006-03-10 22:05 in Robotics
Hello. I'm very new to Robotics and programming. I have a Boe- Bot. I'm using the following code so the boe-bot chases targets of its own choice. My boe-bot "sees" targets using Infared vision.
How can I change it so the Infared isn't as sensitive, and only "sees" life and power sources, so it only chases them. Any ideas. thanks.
P.S. The scematic I'm using is the same as on the Boe-Bot's manual cover.
' {$STAMP BS2}
' {$PBASIC 2.5}

irDetectLeft  VAR Bit
irDetectRight VAR Bit
pulseLeft VAR Word
pulseRight VAR Word

'---------[noparse][[/noparse]Initialization]------------------------------------------------

DEBUG "Attack Program Running!!"
FREQOUT 4, 2000, 3000

'-------[noparse][[/noparse]Main Routine}----------------------------------------------------

Main:

DO

  PULSOUT 13,790
  PULSOUT 12, 790
  GOSUB Check_IRs
LOOP UNTIL (irDetectLeft = 0) OR (irDetectRight = 0)

DO
IF  (irDetectLeft = 0) AND (irDetectRight = 0)  THEN
  pulseLeft = 850
  pulseRight = 650
ELSEIF (irDetectLeft = 0) THEN
 pulseLeft = 650
 pulseRight = 650
ELSEIF (irDetectRight = 0) THEN
 pulseLeft = 850
 pulseRight = 850
 ELSE
 pulseLeft = 850
 pulseRight = 650
 ENDIF

 PULSOUT 13, pulseLeft
 PULSOUT 12, pulseRight
 PAUSE 15

 GOSUB Check_IRs
 LOOP

 '--------[noparse][[/noparse] Subroutines ] ---------------------------------------------------------------

 Check_IRs:
 FREQOUT 8, 1, 38500
 irDetectLeft = IN9
 FREQOUT 2, 1, 38500
 IrDetectRight = IN0
 RETURN

Comments

  • Ken GraceyKen Gracey Posts: 7,392
    edited 2005-12-26 23:33
    Dear AC Fishing,

    To adjust the sensitivity of the infrared receivers/emitters you can do a couple of things:

    - use a larger resistor between the IR LED and the I/O pin to decrease IR power OR
    - change the frequency in the FREQOUT lines of code to some other "out of tune" value from 38500 (try 37500 for example) OR
    - make the object black so that some of the IR is absorbed

    Of course, you could use a combination of these ideas and at some point the IR won't work at all.

    I'm not sure what you mean by "power sources". Are you referring to 120 VAC wall voltage? Maybe you could hook up a cheap gaussmeter to measure EMF - explain what you mean by power sources.

    Ken Gracey
    Parallax, Inc.
  • Steve JoblinSteve Joblin Posts: 784
    edited 2005-12-27 00:49
    I think you are talking about having the BOEbot only sense living moving things... IR won't do it... you need to use a PIR sensor like a motion detector in an alarm system... these types of devices monitor both heat and movement... check out http://www.hvwtech.com/products_list.asp?CatID=114&SubCatID=186&SubSubCatID=0 for an example.
  • Ken GraceyKen Gracey Posts: 7,392
    edited 2005-12-27 02:18
    Better yet, get Parallax quality at only $7.95!

    http://www.parallax.com/detail.asp?product_id=555-28027

    Ken Gracey
    Parallax, Inc.
  • Steve JoblinSteve Joblin Posts: 784
    edited 2005-12-27 18:11
    Sorry about that... I always recommend (and purchase) Parallax products... I wasn't aware of the product... It looks great! Again, sorry!
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2005-12-28 15:53
    You may need two of those to get directional control.

    The PIRs are very interesting and come in a wide range of styles and designs. This little guy has all the circuitry on board, so you don't have to build. It is quite handy.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "When all think alike, no one is thinking very much.' - Walter Lippmann (1889-1974)

    ······································································ Warm regards,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan
  • A.C. fishingA.C. fishing Posts: 262
    edited 2005-12-28 21:19
    OK. Now I have an almost opposite problem. I'm working on a program so the Boe-Bot follows the person but also avoids objects, and now the boe-bot is sensing objects in an empty room, at least 10 feet away from the wall??!!! This is the code I'm using. I'm running this part separetely from the other part of the program. (and I didn't change any resistors). I just want the Boe-Bot to move away when it is just about to crash.
  • Jake11611Jake11611 Posts: 47
    edited 2006-03-10 22:05
    Maybe you could get away with one sensor if when the robot senses an object it turns to find the "brightest" portion?
Sign In or Register to comment.