Shop OBEX P1 Docs P2 Docs Learn Events
Strange Problem with ir detect pairs — Parallax Forums

Strange Problem with ir detect pairs

MunklesunkeeMunklesunkee Posts: 2
edited 2010-03-08 21:32 in Learn with BlocklyProp
I'm quite baffled about this and can't find any info in the forums thus far.

I have a boebot using bs2 and a board of edu with bs2sx. The boe is wired for a left and right pair of ir detection sensors like whats made in chapter 7 of "robotics with the boe bot v 2.2". I have 3 random ir detectors pulled from vcr, dvd, and sat reciever. Because of the randomness of the parts the left was acting a little erratic, so I ripped apart a dvd player to harvest another. I wired the test circuit to my bs2sx w/homework board and proved that the new reciever/ir led·works perfectly.
The weirdness is that even though the wiring and programming is exactly·the same (except pin outs) on my boe bot as on the homework board, when I put the new reciever on either left or right positions of the boe bot it reads low and does not change unless I pinch it between my thumb and forefinger (it should be 1 until it encounters an object then changes to 0). When I put the good one back in either position it works perfectly. Likewise the new reciever works perfectly on the board of education. When I take the good one from my boe and put it to the board of edu.·it will read high and·never switch to low when·I put my hand in its way or pinch it like the other.·Once again the circuit wiring is exactly the same.

Could this be some difference between bs2 and bs2sx?

Any help would be delightful.

·

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2010-03-07 21:18
    The main difference between BS2 and BS2SX is timing. The BS2SX is faster and many of the statements that involve timing use different "magic" numbers. The Baud mode constants are quite different and the values returned by PULSIN and used by PULSOUT are different for example. If you're using FREQOUT to generate modulated IR, the values you'd need are different for the same frequency. Look in the BASIC Stamp Syntax and Reference Manual or the on-line help files for the Stamp Editor for the differences.

    Another difference between the BOE and Homework boards is that the Homework board has 220 Ohm resistors in series with all the I/O pins and this can affect the current available for LEDs and possibly the voltage read by the Stamp from the IR detectors. This all depends on exactly how you have things hooked up (which you haven't described in enough detail).
  • MunklesunkeeMunklesunkee Posts: 2
    edited 2010-03-08 21:32
    Mike,

    Thanks for the response. I figured it had to be a problem with the two different stamps. You shoved me in the right direction. Playing around with the frequency on my bs2 I got the little bugger working just peachy at 3000Hz. That number may not be exactly as it should be for all I know, but it works. I haven't yet read the resource you mentioned to figure it out properly, but thanks for showing me where to look.
Sign In or Register to comment.