Edson Brusque wrote... > I'm scratching my head for some days but still haven't found a >simple and working solution to measure the light level on a given ambient. > > I've been trying it with this circuit: > > +5V > | > C > E(phototransistor) > | > +----ADC(PIC) > | > 10k(resistor) > | > GND > > But the results haven't been that good. Lots of noise and very poor >linearity. Also, I've tried I->E (current->voltage) converters using >opamps but still nothing have convinced me. A phototransistor is going to have poor linearity and also a lot of temperature dependence, because the current gain (beta, or Hfe) of the transistor varies with temperature and with collector current. Connecting the load resistor to the base of the transistor instead of the emitter (i.e., using the phototransistor as a photodiode) will reduce the sensitivity, but the linearity will be much better and there will be little variation with temperature. To regain the sensitivity, you can increase the value of the load resistor; then, if you need to drive a low inpedance load, buffer the output with an opamp connected as a unity-gain follower. An LM324 should do. Dave D. -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads