This is a multi-part message in MIME format. ------=_NextPart_000_0001_01C3D370.975D7C30 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable John N. Power wrote: > Phototransistors convert photons to electrons, which means=20 > current output.=20 I'd rather say - Photons form electron-hole pairs in the base which=20 creates a base current. > You really should use a current-to-voltage converter. A simple > one could be made by connecting the emitter of the phototransistor > (in your circuit above) to the base of a transistor which has its emitter > grounded. Put a resistor from the collector to +5 volts. The collector > voltage will be +5 volts minus the product of the collector resistor and > the collector current. The collector current will equal the photo current > times the beta (hfe) of the converter transistor. > One problem would be saturation of the transistor by the ambient light > current. This can be taken out with a resistor from base to ground > (emitter). This will subtract a constant from the collector voltage; adjust > this resistor so that ambient light puts the collector voltage at +2.5 > volts... > A good opamp solution can be made with the LM3900. It works from > 5 volts and has current sinking inputs. Connect the phototransistor > to the plus input of one of the amplifiers (the chip has 4), and a > feedback resistor from the output to the inverting input. Additional > current into the inverting input will subtract an offset from the output, > and choosing the value of the feedback resistor will allow setting the > gain. *** "LM2900 schematic.gif" is attached *** By the way, "plus input" current is about 0.02 ma for LM2900. Ever=20 seen a phototransistor with the 0.02 ma output current?=20 Not to say, two transistors without negative feedback (phototransistor=20 and "plus input" transistor) are real killers for the converter linearity=20 and even stability. Temperature signal shift will be much more than working signal range.=20 I'd suggest another (if mentioned already then sorry, I haven't=20 red the hole thread) PIC-based approach: - a n-p-n phototransistor, collector to +V, emitter to the PIC's PWM output with the appropriate resistor and capacitor (and transistor if=20 needed). Resulting voltage should be applied to comparator or A/D=20 input (perhaps over amplifier). - PIC must keep the voltage about a half of +V, adjusting both=20 PWM parameters, duty cycle and period. - for the better precision additional temperature sensor and=20 appropriate look-up table may be used. Best Regards, Mike. P.S. On a non-related wave: For me Olin's stile of writing is like=20 president Reagan's style of communication, John N. Power's=20 is like Bush II's, Russell's The Great Pacifier (or Pacifist - which=20 is better) is like Pope's :-)=20 Hope nobody is offended, if so a thousand apologies, guys. =20 -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body ------=_NextPart_000_0001_01C3D370.975D7C30 Content-Type: image/gif; name="LM2900 schematic.gif" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="LM2900 schematic.gif" R0lGODlhkAHDAYAAAAAAAP///ywAAAAAkAHDAQAC/4yPqcvtD6OctNqLs968+w+G4kiW5omm6sq2 7gvH8kzX9o3n+s73/g8MCofEovEYAACQzKbzWVtCp9SqFaPMSq/crveoPGzD37L5rCOTk1u0+w1H qdvtuP2Ov8zz/L4/Erb2N0jIF1iImBinpdjo+JX1KDkJJUh5iZmpucnZ6fkJGio6SlraaWmaqtqg Fbn6CmvQ6hpbO0ori2q7q4mbywvMqasbXNw4XGesnIi87Kzo6/s83TcrTY2NZ53N/cfYDZ73HU4O N16Obnadzm613g7/9B5PD0Zcj080n8/vs98PMMe/gARpDCyI8MXBhAxVLGwIscTDiBRBTKyIMcO2 jP4cRVi71zEkhY8XRZrMRfJkR5IsW7p8uQqkygova9qEOTNdpJs8e+bUKXNBSz0lf/K6ONTCOaPd SqYkGpSpsqIboSaTSq0oyg1LsWaNeqKr12daP4gdu6ysB7VoTbHl8LbtLbAm4soNZVcj3buw8mLZ yzcm4BF+A28qrHSw4VKIaSpePPdqi8aQJ1GecLmyo8chMmsmxDKG58/VcE7mTFoSTxejUy9qJWZO 69iSXZ9aiussidm21XWNNpt3b0jXpOnujHq4N1qMdq45bja58tJ0XNJOIXw6C+kPclvfKoe79jSu YB9fZzw0As/Zx4cNtAR+kl9C0aNKev19bfdO5P/7l3xIfcmot554DrTH33u//MeGLAteVdxHCrBn YIJR7MGgfA0iA2FVBe63VoUWzlDdhvHFRx9sExIzCwMUgjiiEIJkiOJ8JgLIYYQiChhjf9+YV16N z3WII4s78tijj2MMKcWPBQpIZJHYHZkkD4/pGOWUMFZJ3YDpUbnillwaApwl0FkE5phUqAgeG62x qeYxQDYJp0R1ximnaXaeiSdo3+2JYJ9KtsjVfoQKKoyY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