0
\$\begingroup\$

I am working on a project that involves communicating with LEDs. I need to be able to detect the state of a light source that is flashing at about 100 Hz. I am using the phototransistor that comes with the Arduino Starter Kit, but I am noticing that, while the phototransistor detects a difference between the high state and low state, this is very minimal. Is this simply because of the phototransistor's response time? If so, are there any other components (preferably inexpensive) that I can use to detect light from a source that is flashing at this frequency.

The data sheet for the phototransistor can be found here: https://www.arduino.cc/documents/datasheets/HW5P-1.pdf

Edit: Thank you to everyone for the responses! I am just a little confused about how I could go about implementing some of the solutions. It appears to me as if the operational amplifier ones just increase the difference between the low and high states. Perhaps I was not detailed enough with my question. I have asked this question on the Arduino forum, which has a little more detail (my apologies for posting on two forums, but this is becoming urgent because of time constraints). The link to this forum is here: https://forum.arduino.cc/index.php?topic=452365.0.

Note: this question was initially written with the assumption that the device is a photoresistor. It was later updates to avoid confusion when searching for questions on photoresistors.

\$\endgroup\$
  • \$\begingroup\$ Are you aware that your data sheet describes a silicon phototransistor, not a photo resistor? Polarity of applied voltage is important for transistors, not for resistors. \$\endgroup\$ – glen_geek Jan 31 '17 at 23:55
  • \$\begingroup\$ How far away do you need to detect this LED? What output level when ON? \$\endgroup\$ – Sunnyskyguy EE75 Jan 31 '17 at 23:59
  • \$\begingroup\$ Response time is dv/dt= I/C for a given light current, I and junction capacitance, C. This can be reduced by a load R such that the voltage also reduces I*R but T=RC then may be amplified with a transimpedance Op Amp simple circuit. \$\endgroup\$ – Sunnyskyguy EE75 Feb 1 '17 at 0:09
  • \$\begingroup\$ I just realized that on the data sheet it mentions that the reaction time is 2 microseconds. Does this not mean that it would be able to detect the difference between light flashes that occur milliseconds after each other? \$\endgroup\$ – dts Feb 1 '17 at 2:46
  • \$\begingroup\$ This OE converter must consider O as the desired Optical power signal and all other light as noise and then design how raise the S/N ratio by optical methods of directional gain of lens amplification, aperture filtering to block stray light, wavelength matching , wavelength filtering along with inverse squared power loss for the radiated light. If you can define these parameters then the signal gain and noise attenuation can be defined to make accurate detection. SNR peak ratio ought to be 10:1 or more for accurate detection with 10:1 hysteresis as a minimum. Threshold must be controlled. \$\endgroup\$ – Sunnyskyguy EE75 Feb 2 '17 at 0:30
1
\$\begingroup\$

The data sheet is for a phototransistor, and the 2 us time is for 10% to 90% rise with a 100 ohm load.

Phototransistors are capacitive, and with a lower load resistance (such as a transimpedance amplifier creates) you can get faster operation. It should be possible to use this sensor with a good amplifier to meet the modest goal of keeping up with an LED modulated source.

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
0
\$\begingroup\$

A phototransistor. You will get as an extra a lens that catches the light only from a narrow sector. The minus for the phototransistor is that it is a transistor, only the base current is replaced by the light. Photoresistor can handle AC, phototansitor is DC only.

The slow response is easy to check for a photoresistor. If it works ok for continuous light and darkness then it's the slowness. Otherwise it's too long distance or too weak transmitter or not enough amplification in the receiver circuit.

\$\endgroup\$
  • \$\begingroup\$ The question is about a photo_transistor_ (see the referenced datasheet). Consider deleting or rewriting your answer. Thanks. \$\endgroup\$ – try-catch-finally Feb 19 '17 at 14:24
  • \$\begingroup\$ @try-catch-finally Thanks for the clever comment. Me too noticed that a phototransistor is a possible target of the interest. Do not loose your agility. \$\endgroup\$ – user287001 Feb 19 '17 at 15:28
0
\$\begingroup\$

That data sheet references a photo-transistor.

It gives you two applications circuits that show you how to use it as a switch.

The specifications show a response time of 2uS, to both on-going and off-going edges. This means that when properly biassed, it should be able to distinguish pulses of a few uS long, a few uS apart, so a 100Hz rate, 10mS period, should be well within its performance.

'When properly biassed' means choose a load resistor such that you get a large enough voltage swing between light and dark conditions. A phototransistor has a fairly low output current, so may need a load resistor in the 10s of k or even 100s of k to be usable with a digital input.

\$\endgroup\$
0
\$\begingroup\$

Is this simply because of the photoresistor's response time?

i actually tested this a while back. the response isn't symmetrical: the resistance goes up not as fast as the resistance falling off, as I recally, on the order of 100ms.

So what you are observing is really the phoneresistor doing its averaging of pulsing light.

\$\endgroup\$
  • \$\begingroup\$ The question is about a photo_transistor_ (see the referenced datasheet). Consider deleting or rewriting your answer. Thanks. \$\endgroup\$ – try-catch-finally Feb 19 '17 at 14:24
0
\$\begingroup\$

What is your mains frequency? If it is 50Hz, then your system will also pick lots of 100Hz light flicker from everywhere. You should choose a different frequency.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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