Shop OBEX P1 Docs P2 Docs Learn Events
Help me understand a Phototransistor better — Parallax Forums

Help me understand a Phototransistor better

Joe DunfeeJoe Dunfee Posts: 31
edited 2006-12-05 02:13 in General Discussion
I am working on a project based on an article on robot navigation by Jim Ubersetig [noparse]/noparse][url=http://www.rssc.org/newsletter/index.html#1]http://www.rssc.org/newsletter/index.html#1[/url

In it he uses a laser to hit reflective targets, and senses the reflected light with a L14P phototransistor, in the circuit image attached.· It is used with a Basic Stamp, and the input is read using a RCTime command.· However, in my case because I want to read barcodes, I need a faster response. I·and am using an analog to ditigal converter on the BS3pe mother board to get my readings.

I've had some electronics training, so I understand the operation of a transistor.· But, phototransistors weren't part of that, and I haven't found·a satisfactory explanation of their function.· I imagine that the light input serves the same as the base current. In Mr Ubersetig's circuit, the 10kto100k resistor seems to just be a pull-up resistor like most input switches used on the stamp... but why the range of values "as needed"?· The directions in Mr. Ubersetig's paper have use simply cutting off the base leads from the phototransistor, but what purpose does this lead have when it is used?

Can anyone recommend a good internet source for a tutorial on phototransistors?· Or perhaps give me some answers directly?

Joe Dunfee

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2006-12-04 06:46
    All transistors are photosensitive. We put them in opaque packages to prevent this. Devices that are sold as phototransistors are optimized in a variety of ways for this purpose. Their response to light (like base current) is non-linear. Sometimes it's useful to bias the base electrically to get a particular idle current or to move normal operation to a different part of the response curve.

    Check the device datasheets for various graphs and sample uses.
  • Joe DunfeeJoe Dunfee Posts: 31
    edited 2006-12-04 18:12
    Thank you for confirming my understanding of the basic operation. But, I am still a bit puzzled by the schematic, and in particular the wide range of the 10k to 100k resistor.

    I've seen several examples of no resistor used to limit current between the source voltage and ground through the phototransistor. I would think this is necessary to prevent it from blowing up from too much current... but perhaps I am missing something.

    Joe Dunfee
  • Mike GreenMike Green Posts: 23,101
    edited 2006-12-04 18:31
    Think of the resistor and the phototransistors as forming a voltage divider with the Stamp sensing the voltage. The Stamp will treat anything over 0.6-1.2V as a logic high value. For a 10K resistor, the resistance of the phototransistor(s) would have to be greater than 2.5K for the Stamp to see a logic high. This would represent a current of 0.4ma or less. For a 100K resistor, the phototransistor(s) would have to have a resistance of greater than 25K for a logic high. This would be a current of 40ua or less. The datasheet for the phototransistor should give some idea of the collector current for a given light level. You can pick the resistor value that results in a logic high value for the light level threshold you want (hopefully).
  • Joe DunfeeJoe Dunfee Posts: 31
    edited 2006-12-04 21:10
    Thank you Mike, you've helped a lot.

    Joe Dunfee
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-12-04 21:55
    Mike Green said...(trimmed)
    Think of the resistor and the phototransistors as forming a voltage divider with the Stamp sensing the voltage. The Stamp will treat anything over 0.6-1.2V as a logic high value. For a 10K resistor, the resistance of the phototransistor(s) would have to be greater than 2.5K for the Stamp to see a logic high. This would represent a current of 0.4ma or less. For a 100K resistor, the phototransistor(s) would have to have a resistance of greater than 25K for a logic high.
    Mike,

    · The Stamp Module will treat anything from 0 through 1.4V as a logic LOW.· Above 1.4V to VDD will be logic HIGH.· I'm not sure if Joe caught what you meant.

    Joe,

    ·· Bear in mind too that an Opto will have the effect of inverting the signal since a high to the LED side will actually swing the Stamp input LOW.· The 10K to 100K range will affect many things, including the input range as well as the speed the line can rise and fall (Slew Rate).· I hope this helps.· Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • PLJackPLJack Posts: 398
    edited 2006-12-04 22:15
    Now that was an interesting thread. Thanks all.smile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - PLJack - - -



    Perfection in design is not achieved when there is nothing left to add.
    It is achieved when there is nothing left to take away.
  • Mike GreenMike Green Posts: 23,101
    edited 2006-12-04 22:31
    Thanks, Chris
    I know I took some liberties in describing the effect of different resistor values. I couldn't remember exactly what the threshold was for the Stamp inputs, but, in any event, the values I mentioned were really based on a 1.0 volt threshold for ease in calculating them in my head. The actual current for a 10K resistor should be more like 0.36ma and, for a 100K resistor, 36ua. In other words, what's the current required to produce a voltage drop of 3.6V (5.0V - 1.4V) for a resistor of 10K or 100K?
    Mike
  • Joe DunfeeJoe Dunfee Posts: 31
    edited 2006-12-05 01:30
    I found this on another discusion somewhere.· It is an application note for phototransistors from Fairchild.· Very helpful.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2006-12-05 02:13
    Along with a bunch of other items, I recently bought a bunch of these -- http://www.goldmine-elec-products.com/prodinfo.asp?number=G13767

    They're SMD, but·they can be soldered easily enough across two pads of an experimenter board.·
    [noparse][[/noparse] The leads are a little tarnished, even though they're still in their protective strip.· Is that why they're 5/$1?· It comes off easily with Tarn-X. ]

    ** Post Edit **· With a range of 400-1200nm, they have response to most all the visible range into the far I-R.

    ··········nm
    red···· 620-750
    orange· 590-620
    yellow· 570-590
    green·· 495-570
    blue··· 450-495
    violet· 380-450



    Post Edited (PJ Allen) : 12/5/2006 2:27:01 AM GMT
Sign In or Register to comment.