Shop OBEX P1 Docs P2 Docs Learn Events
Infrared detectors — Parallax Forums

Infrared detectors

I am learning about the Parallax Propeller P8X32A by experimenting with an ActivityBot360 Kit and following (a) Propeller C Programming with the ActivityBot, (b) Propeller Education Kit Labs Fundamentals, together with the Propeller Manual, and (c) Programming and Customizing the Multicore Propeller Microcontroller (chapters 1, 2, 3, and 4).

In (a), Navigate by Infrared Flashlights, the wiring diagrams, schematics, and parts lists show 220 Ohms from the IR receiver to the Propeller microcontroller. Is 220 Ohms enough to protect the propeller from the 5 Volt signals emanating from the detector? I ask because in references (b) and (c) above the value of the protection resistor is 10 K Ohms. I have performed the relevant PEK Labs experiments (using 10K Ohms) and find that they work reasonably well.

Digression: I have performed the IR Distance Detection with NCO and Duty Sweep (page 156 of reference (b)) using the AB360 Kit, but without connecting the D/A facility provided by the WX board. The results are fair but in need of averaging to smooth things out .... Once I sort the resistor problem, I will use the D/A facility to see if the results are smoother.

Another digression: The PEK Labs is fantastic. Hope you produce something similar for the P2.

Many thanks for making such good quality products with excellent support.

Comments

  • kwinnkwinn Posts: 8,697
    If the voltage from the sensor is 5V you definitely want to use 10K.Using a 220 ohm resistor will almost certainly damage the I/O pin.
  • Thanks for your reply, kwinn. On Sunday, I will measure the detector's output voltage(s) and output resistance(s) -- If it is some sort of open collector/drain arrangement the output high and low resistances will probably be different. My hunch is that the output high resistance is several 100 K Ohms. thereby limiting the current that can be fed to the propeller. Since Parallax test their kits and lessons and there haven't been any reported problems (I presume), the clue might be the age of references (b) and (c) above: The detectors used then are different from the ones used now.
  • Couldn't wait. Performed some quick and dirty measurements.

    These were done with the LED off, so the detector output was high.
    The open circuit voltage of the detector output was 4.6 V.
    The voltage of the detector output when connected to the propeller via a 10 K resistor was 3.8 V.
    The voltage at the propeller pin was 3.7 V.

    So, the HIGH output resistance of the detector is about 80 K and the current fed into the propeller is roughly 10 microAmps.

    The pair of detectors that came with the AB360 kit were in a bag tagged #572-28132 Rev F [st 170803].

    In case you are wondering, the IR LED is connected to pins P6 and P7 with a 100 Ohm current limiting resistor. The detector is connected to the 5 V and Ground rails and its output is connected to pin P0 via a 10 K Ohm protection resistor. The details of the experiment can be found in page 156 of the Propeller Education Kit Labs Fundamentals, version 1.2, web release 2. The title is "IR Distance Detection with NCO and Duty Sweep". The main change is that the propeller pins are different because I'm working on a Propeller WX Activity Board on top of a robot....

    Finally, on Sunday I will repeat the measurements with the other detector of the pair and I will continue to join the detector to the Propeller via a 10 K resistor.
  • ercoerco Posts: 20,250
    Way to dig in, Addington! Kudos for following up with your results. Always best to err on the safe side when dealing with components to avoid releasing the magic smoke. No doubt the Parallax material was tested and safe but it's never a bad thing to ask why. We all have much to learn.

    There is a dizzying variety of those IR detectors available, each optimized for something, sunlight, noise, continuous signal, etc. The TSOP1838 seems to be popular with the DIY crowd. There may be some variation in output resistance between the various types.

    Again, well done!
Sign In or Register to comment.