1
\$\begingroup\$

I was wondering if there is any difference between an infra-red phototransistor and a normal phototransistor.

I was also wondering if either of these would be directly compatible with an Arduino?

For example, I'm looking at this phototransistor. It's for a line follow robot.

\$\endgroup\$
1
  • \$\begingroup\$ ⚠ the link is dead \$\endgroup\$
    – JinSnow
    Feb 6, 2020 at 6:25

2 Answers 2

2
\$\begingroup\$

To emphasise WhatRoughBeast's point, that infra-red and 'daylight' phototransistors are usually the same active, semiconductor, component embedded into plastic with daylight transparent or daylight filtering, these two phototransistors a SFH 300 and a SFH 300 FA have an almost identical specification.

Both types are compatible with an Arduino. A search should find good values for 'voltage divider' resistor.

As Chris Stratton explained, you can take ADC measurements from the same sensor, one illuminated by an IR LED/emitter and the other measurement without IR illumination, then subtract to get the difference.

You can make the illuminated measurement more effective by 'pulsing' a very high current through the IR LED (for a short time). Usually if you look at the spec. sheet for the IR LED, it'll give a value for the maximum pulse current, whicn may be as much as 10x more than the continuous current. You'll need some extra circuitry, for example a bipolar or MOSFET transistor to do this as it'll likely be well beyond the current rating of the Arduino. This might provide enough power to work well using visible light (red) LEDs and sensors.

There are other things to consider with a line follower.

It is possible to get slightly better performance by making sure the LED/emitter and sensor are matched, usually you can get a good match just by getting parts with very similar peak wavelength.

Line follower tracks are often made with a black background and white line, or white with black tape. Black paper, some black paint and some black tape reflects IR light surprisingly well, and looks 'white' in IR light. So check that the track is using materials which have good contrast to your sensors. It is just possible that IR is worse than visible light.

Another thing to consider is using multiple IR sensors and LEDs/emitters. The positions of the IR sensors and IR LED/emitters can help. Search around and you'll find various ideas. If you use multiple sensors and emitters in a reasonable layout, you should get a pretty accurate measurement of the lines position (IIRC, Pete Harrison at http://www.micromouseonline.com/ might have described a technique). A way to think of it is interpolating from a few values, or fitting a curve to a few values. It's worth trying to make a couple of arrangement of sensors and emitters, if you have the time and money.

One small problem with using IR is knowing how well it works. Many mobile phone cameras and digital cameras will display in the viewfinder, and capture IR. You might make good progress by using visible light initially just because it should be easier to see how well things are working.

\$\endgroup\$
1
\$\begingroup\$

Infrared phototransistors are just "normal" phototransistors with a built-in filter which blocks visible light while passing IR. In the case of the units shown in your links, the filtering is done by a dye added to the plastic of the photodiode body. That's why they look black. If you were looking at them in the infrared, they would be (relatively speaking) transparent.

They are perfectly compatible with Arduinos, as long as you use a conditioning circuit, just like any other phototransistor.

\$\endgroup\$
5
  • \$\begingroup\$ so using an IR phototransistor for a line follow would be impossible? \$\endgroup\$ Aug 2, 2014 at 11:11
  • \$\begingroup\$ How do you figure? If you mean, can you use ONLY a phototransistor with no other components, the answer is yes, it's impossible. Otherwise, a single resistor and the Arduino power supply are possibly useful. A lot will depend on your optical design. \$\endgroup\$ Aug 2, 2014 at 11:15
  • \$\begingroup\$ @user3901882 possible and actually better, due to its insensitivity to visible light. Just combine it with an infrared LED. \$\endgroup\$
    – Armandas
    Aug 2, 2014 at 11:44
  • \$\begingroup\$ It's better, but still not a no-brainer. The presence of sunlight will cause all sorts of problems. You can get around this, particularly if you modulate the illumination source and use phase-sensitive detection from the detector, but I suspect that's beyond user3901882's comfort level. \$\endgroup\$ Aug 2, 2014 at 11:49
  • \$\begingroup\$ One thing you can do is turn the light source on and take a reading. Then turn it off and take another. Subtract the two. This makes a sort of a crude software version of something called a lock-in amplifier which is great at rejecting interference from other sources. You may need to put some care into being sure your get an ADC reading actually made after the change in the light; one simplistic idea might be take a reading and throw it away, then take another one to use. \$\endgroup\$ Aug 2, 2014 at 14:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.