Society of Robots - Robot Forum

Software => Software => Topic started by: ballbreaker on October 01, 2010, 04:29:46 AM

Title: Infrared Emitter Detector coding help
Post by: ballbreaker on October 01, 2010, 04:29:46 AM
what kind of values could i give for the infrared emitter detector (http://www.societyofrobots.com/schematics_infraredemitdet.shtml (http://www.societyofrobots.com/schematics_infraredemitdet.shtml)

i mean what is the highest and lowest value possible? and is low value for dark and high value for white or vice versa ?

thank you
Title: Re: Infrared Emitter Detector coding help
Post by: macdad- on October 01, 2010, 10:19:09 PM
If you are using the setup in the first schematic then the voltage will decrease when more light strikes upon the photodiode as then the photodiode allows current to follow creating a voltage divider.

You'll have to do your own tests on the photodiode itself, namely an inline Current measurement after the photodiode as well as a Diode test on the photodiode to determine it's voltage drop.

Vout = ((VCC - Vce) * (Idiode / (VCC - Vce))) / (R1 + (Idiode / (VCC - Vce)))

Where:
Vout is the Voltage output from the detector
VCC is the voltage of the battery or regulator.
Vce is the voltage drop of the photodiode.
Idiode is the current flowing through the photodiode when light strikes upon it.
R1 is the resistor above the photodiode, your reference resistor.

Again, you'll have to do some tests but just use the formula above as a baseline for your code to predict(or atleast have a good idea) for the high values and low values of your IR Emitter/Detector pair.

,macdad-(Nick)
Title: Re: Infrared Emitter Detector coding help
Post by: ballbreaker on October 02, 2010, 06:14:36 AM
really helpful thank you