Hardware Reference
In-Depth Information
The following diagram shows the circuit for an IR emiter/detector:
An IR emitter/detector for the line following robot
The preceding igure shows a photodiode that is connected to the invering terminal of an
op-amp. The poteniometer (that is connected to the non-invering terminal of the op-amp)
can be used to vary the sensiivity of the sensor.
When light falls on the photodiode, it pulls down the 10K resistor, and hence, the output of
the op-amp is high. The signal diode, 1N4148, acts as a signal level converter between 5V
and 3.3V (Raspberry Pi's GPIO pins are 3.3V tolerant). When the 5V side is high, the 3.3V
side is also high (the diode is reverse biased and hence the pull up resistor keeps the 3.3V
side high). When the infrared sensor is on top of the black surface, the output of the
op-amp is low (since the invering terminal is high) and the pull up resistor on the 3.3V side is
pulled down. Thus, the GPIO pin is pulled down. The infrared sensor shown in the preceding
diagram can only be used in controlled lighing condiions as they are prone to stray infrared
radiaion from daylight.
In condiions where the robot has to operate under broad daylight condiions, the
infrared transmiter and receiver has to be pulse width modulated so that the sensor
can disinguish between noise and the actual signal (more informaion can be found at
http://www.ermicro.com/blog/?p=1908 ).
 
Search WWH ::




Custom Search