Shop OBEX P1 Docs P2 Docs Learn Events
Problem with IR - Page 2 — Parallax Forums

Problem with IR

2»

Comments

  • MovieMakerMovieMaker Posts: 502
    edited 2008-09-07 01:34
    OK, Mike, when I tried 38000,20,250 I got 19
    when I tried 38000,50,100 I got 49

    I don't know what that means, but it sounds like something is different.
  • MovieMakerMovieMaker Posts: 502
    edited 2008-09-07 01:39
    But, I found out if I take the detector completely OUT of the circuit, It still gives me the same readings.
    :-(


    I am going to put in my last NEW IRdetector. IF that doesn't work, I am going to hang it up.
  • Mike GreenMike Green Posts: 23,101
    edited 2008-09-07 01:57
    If the IR emitter stayed on until you turned it off, then there's something wrong about the way it's wired up or something wrong about the Propeller I/O pin. The IR emitter should only go on when you execute an IRZONE statement. You probably won't see the flickr with 10 zones. It's only about 40ms. If you specify 50 zones, the flickr should be around 200ms long. You can control the IR LED using OUTA[noparse][[/noparse] ] assignments as well, but you can't do both. If you turn on the IR LED using an OUTA[noparse][[/noparse] ] statement, it overrides the IRZONE control of the LED. Turning on the IR LED isn't the same. The IRZONE statement produces a pulsed IR signal for the IR detector. The IR detector won't respond to a steady IR signal. This is all described in detail in the "IR Remote for the BoeBot" tutorial.

    By the way, looking at the IRZONE code in BoeBotBasic reminded me that you can produce arbitrary frequencies from BoeBotBasic like for a piezo-speaker. You have to learn how to work the cog counters since you have access to them from BoeBotBasic. You can read and write to all of the counter registers (CTRA/B, PHSA/B, FRQA/B) by using them as variables.
  • Mike GreenMike Green Posts: 23,101
    edited 2008-09-07 02:01
    IRZONE 38000,20,250 is supposed to return 19 when the IR detector is "stuck at ground".
    IRZONE 38000,50,100 is supposed to return 49 when the IR detector is "stuck at ground".
    It returns the last zone # which it does if it has a strong correct IR signal or the output of
    the detector is "stuck at ground" or some other way for the Propeller input to always read as zero.

    If you get the same reading with the detector out of the circuit, it means that the connection
    is shorted to ground or appears to be shorted to ground. Try taking a 10K resistor and connecting
    it between the IR detector socket's Vout and +3.3V. IRZONE should return -1. If not, you
    absolutely have a short circuit to ground or a broken Propeller I/O pin circuit.

    Post Edited (Mike Green) : 9/7/2008 2:07:01 AM GMT
  • MovieMakerMovieMaker Posts: 502
    edited 2008-09-07 02:04
    That is good to know. I planted some outa[noparse][[/noparse]pin]=1 statements in the program to make sure that the IR stayed on long enough for me to look at it with my camera. This may have been what has defeated the whole thing. I forced it to stay on. So if I overode the other item, it never got a chance to work. And I have done and redone this for the last 10 hours. So, I have put it all aside and I am going to get on with my life. After a few deep breaths I will tackle it again. Hopefully sucessfully after what you have taught me.
  • rjo_rjo_ Posts: 1,825
    edited 2008-09-07 03:46
    I can tell you what I did... I didn't know there were two different IR products and I wired up the wrong one[noparse]:)[/noparse]

    AND I have personally rewired something 3 times and made a different mistake every time[noparse]:)[/noparse]
  • MovieMakerMovieMaker Posts: 502
    edited 2008-09-07 03:55
    Yeh, and the longer you work at it, you loose objectivity. You just keep saying "I've got to get this done." And the first thing you know you are tired and something gets messed up. But, I never give up. Although this has made me want to. Thanks for your comment.
  • MovieMakerMovieMaker Posts: 502
    edited 2008-09-08 01:59
    Finally, some closure. Mike and his Ultimate Wisdom let me know what I was doing wrong. I had placed a statement in the program to turn on the Emitters all of the time. Mike said in the literature it told me that it MUST take a Pulse. I had them on ALL of the time. So, now Everything is working fine in the Hardware. All of it is working. Now, I have to ask another question, but I will post it in a new thread.

    Thanks for all of you who were with me through my Insanity!\

    smile.gif
Sign In or Register to comment.