Shop OBEX P1 Docs P2 Docs Learn Events
Help with IR detector sensitivity — Parallax Forums

Help with IR detector sensitivity

drhenderdrhender Posts: 1
edited 2012-01-13 09:10 in Accessories
I am in desperate need of help. I have over-promised to a group of cub scouts and now I am afraid I can't deliver. I am working on a digital timer for a pinewood derby race that is scheduled for Wednesday evening and I need to solve this problem by then.

I am using the schematics provided by http://www.miscjunk.org/mj/pg_pdt.html to build the hardware. It is a Arduino Uno-base timer that feeds data back over a USB port. I though everything was working great, but over the weekend in final prep, I discovered I am only getting about 3 inches of range between IR emitter and detector. I am using the emitter and detector set from Radio Shack. (276-0142 http://www.radioshack.com/product/index.jsp?productId=2049723)

After significant effort to debug the hardware, I think I have it narrowed down. The emitters are working as far as I can tell. The voltage and amperage on that circuit seems to be fine.

I believe the problem is the amperage on the detectors. Each detector is connected between a digital pin and ground on the Arduino. The power on that circuit is 4.4 V @ 0.2 mA according to my multimeter. The package for the detector says forward voltage should by 1.2V @ 1mA. (I am a bit surprised that the 4.4 volts haven't burned out the detectors, but they have consistenly worked as long as the emitter in within 3")

So my question is this: How do I drive the detectors at lower voltage but higher amps? Can I use a pin on the Arduino (I have 1 available pin/detector) to drive a transistor (MOSFET?) to switch the detector on a lower volt/higher amperage circuit? I believe this is possible, but I am in way over my head.

The Arduino has two always on power pins:
3.3V @ ~= 400mA
5.0V @ ~= 700mA

I am currently using the 5V pin to power my emitters as shown in the schematic referenced above. It runs through a 68ohm resistor, stepping the amperage down to about 70mA. That is also out-of-line with the spec on the package, which says it should be driven at 1.2V @ 100mA.

As I said, I am in way over my head and will need pretty explicit instructors on how to create a different circuit.

Thanks in advance!
David.

Comments

  • ZootZoot Posts: 2,227
    edited 2012-01-10 09:05
    Did you actually follow the schematic when wiring this up? If so, you may be overthinking this. It should work fine, presuming your code is OK. I might put a resistor of 220 ohms or so between the collector of the phototransistor and the micro pin (in case you set that pin to an output accidentally you will not get short and possibly fry your pin or your transistor).

    However, it seems that the Radio Shack emitter/detector pair you bought has issues -- misidentified pins and incorrect specs. The "detector" btw, is a phototransistor, not a modulated IR detector per se.

    See this link for some user feedback concerning the parts:

    http://www.radioshack.com/product/index.jsp?productId=2049723#tabsetBasic

    and scroll down to the "User Reviews" to see what I'm describing.
  • GordonMcCombGordonMcComb Posts: 3,366
    edited 2012-01-10 12:32
    drhender wrote: »
    After significant effort to debug the hardware, I think I have it narrowed down. The emitters are working as far as I can tell.

    You can see if the IR LEDs are working by viewing them through the camera of your cell phone, or a camcorder. If you wired up the LED without a dropping resistor there is no way it's working. It got burned out milliseconds after you first connected it.
    Each detector is connected between a digital pin and ground on the Arduino.

    It won't work this way, if this is indeed an accurate description of what you have. You need a resistor (2K to 50K, experiment to provide the best range) in line with the cathode or anode of the detector. The connection to the Arduino needs to be between the resistor and the detector. You need to use one of the Ardiuno's analog pins, as the output from the detector will be a varying voltage.

    I didn't look at the plans on the site you mentioned, but Google for phototransistor circuits for the Arduino and you'll find plenty of examples. It might also help if you drew up what you've done and posted it here.

    -- Gordon
Sign In or Register to comment.