I have made a sensor which uses six IR phototransistors, three per sensor block, opposite it is a matched IR diode(940nm). This is in turn connected to a MCU.

The function of the circuit is an airrifle chronograph, the circuit generates a signal when a pellet passes over one of the sets of three transistors, thus breaking the circuit giving a pulse. Look at the first image on the linked page here.


Firstly the device is detecting an object with a 4.7mm cross section passing between sensors, the original application used an audio port and the internal amplifier and some pull ups to create a pulse for each crossing of the sensor. When I added a external pull-up and measured the voltage, only a small change was visible. This yielded results such as \$ 0.4v < VOut < 0.9v\$, which obviously will not be picked up by an interrupt. I concluded that I would need to use a compartor to give a clean signal for the input to the MCU, this would be a standard circuit with hysteresis non-inverting.

Question: How do I calculate the needed pull-up resistor to give me a voltage range of 1.5 - 3V from a 5V supply with 6 phototransistors(linked above). This will be feed into the comparator circuit.

I know that transistors can be simplified to equivalent resistors but I do not know how to determine them for a phototransistor, I am assuming one can do this so as to find a pull-up.


The datasheet for the IR led.

Here is a snapshot of the wave form from the audio port and software used to read the signal:

enter image description here

Each spike is a break of a three set sensor of the six.

  • 1
    \$\begingroup\$ Why are they all in series? Your total current will be the current of the least illuminated phototransistor. (5V may not be enough bias... but I don't use photo-transistors.) \$\endgroup\$ – George Herold Mar 17 '15 at 13:22

I think your system relies on all the photo-transistors being illuminated when no object is passing in front. With 6 photo-transistors in series and all of them being strongly illuminated, the "on" voltage of the group is 6 x 0.4V = 2.4 volts.

The 0.4V figure comes from the data sheet, \$V_{CE(SAT)}\$ = 0.4V at 20mW/sq cm illumination.

Any device switching off (due to a blockage) will cause the signal to rise to about 5V. So, the basic system you have cannot be guaranteed to generate any change in signal voltage greater than 2.6 volts p-p and this is with fully illuminated devices. Should the IR diode that does the illumination not be producing a power output of at least 20mW/sq cm at the photo-transistors, the individual "on" voltages will be somewhat greater than 0.4 volts and this might be (say) 0.8 volts.

The impact of this is that the change in signal voltage seen at the output will be 5 volts - (6 x 0.8 volts) = 0.2 volts.

I believe you need to sort out this problem first before deciding on the value of resistor. Look at the volt drop across one of the photo-transistors (not in the group but separately powered via a load resistor) and see what it is when illuminated.

I'll also add that the data sheet is not very helpful when it comes to stating what the "illuminated" collector current is - there seems to be several figures and no explanation of what conditions these different figures apply to.

|improve this answer|||||
  • \$\begingroup\$ +1 for being useful, I have 940nm IR diodes facing the phototransistors. I have seen the output voltage you describe too. \$\endgroup\$ – RSM Mar 17 '15 at 13:40
  • \$\begingroup\$ I was going to deal with the low voltages given by the circuit to control a comparator so as to get clean high or low for a micro. \$\endgroup\$ – RSM Mar 17 '15 at 13:43
  • \$\begingroup\$ I think before I can give further advice you should show a picture of the signal and give a link to the IR emitter. \$\endgroup\$ – Andy aka Mar 17 '15 at 14:23
  • \$\begingroup\$ ok I'll do that, would you like a link or a link edited into the ques \$\endgroup\$ – RSM Mar 17 '15 at 14:27
  • \$\begingroup\$ I have added the link and a waveform \$\endgroup\$ – RSM Mar 17 '15 at 15:13

It's hard to know what you are really trying to do since your circuit makes no sense. Some issues:

  1. The photodiodes are oriented so that they operate in photocell mode, but yet you are deliberately applying bias.

  2. Do you really want all the diodes in series? This effectively causes a AND function. They all have to be activated to produce a output signal. This is a bit less certain in photocell mode, depending on the impedance the string is loaded with.

  3. If you do run the photodiodes in leakage mode (flip them around relative to how you have them now), you will only get a small signal.

As with using any electronic part, you have to actually read the datasheet of the part, then use it accordingly in a circuit. The datasheet should tell you, among other things, what the reverse leakage will be for various light levels.

|improve this answer|||||
  • \$\begingroup\$ if you read the red writing next to the diodes and the question you will notice that I am using PHOTOTRANSITORS \$\endgroup\$ – RSM Mar 17 '15 at 13:25
  • 3
    \$\begingroup\$ @RSM: If you read the schematic, you will notice that photodiodes are specified. If you want to show phototransistors, show phototransistors. No, showing one part and then saying it's another is NOT acceptable. \$\endgroup\$ – Olin Lathrop Mar 17 '15 at 13:27
  • \$\begingroup\$ I could not find the phototransitors \$\endgroup\$ – RSM Mar 17 '15 at 13:30
  • 1
    \$\begingroup\$ Quick question Olin if you care to respond to me, if you were disgruntled with the lack of consistency in may question why didn't you post a comment? \$\endgroup\$ – RSM Mar 17 '15 at 14:01
  • \$\begingroup\$ Would you have objected if RSM had used NPN transistors without base connections, and a note to the side that they were phototransistors? \$\endgroup\$ – W5VO Mar 17 '15 at 17:38

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.