
2003 Microchip Technology Inc. DS00865A-page 1
M
AN865
INTRODUCTION
Photo sensors bridge the gap between light and elec-
tronics. Microchip’s Programmable Gain Amplifiers
(PGAs) are not well suited for precision applications
(such as CT scanners), but they can be effectively used
in position photo sensing applications minus the head-
aches of amplifier stability. When the two, six or eight-
channel PGA is used in this system, the other channels
can be used for other sensors or an array of photo sen-
sors without an increase in signal conditioning hardware
or PICmicro
®
microcontroller I/O pin consumption. The
multiplexer and high-speed conversion response of the
PGA / Analog-to-Digital (A/D) conversion allows the
photo sensor input signal to be sampled and quickly
converted to the digital domain. Switching from chan-
nel-to-channel is then easier with the Serial Peripheral
Interface (SPI™) from the PICmicro microcontroller to
the PGA.
The PGA can be configured with a photo sensor in two
different settings, as illustrated in Figure 1. These cir-
cuits are appropriate for signal responses from DC to
~100 kHz.
FIGURE 1: Photo sensors can be connected directly to Microchip’s PGA. Based on the level of
luminance to the photo sensor, the gain of the signal can be changed through the SPI
™
port of the
MCP6S26, six-channel PGA.
Author: Bonnie C. Baker
Microchip Technology Inc.
V
DD
D
2
UDT
PIN-5DP
0.1 uF
D
1
UDT
PIN-5D
R
1
=
10 to
500 kΩ
(typ)
13
11
10
MUX
PGA
A
W
B
MCP6S26
MCP41100
MCP3201
8
5
6
7
1
2
3
4
1
8
2
3
14
9
4
5
6
7
8,5
4,7
6
MCP6022
3
2
1
4
8
SDI
SCK
CS_ADC
CS_PGA
CS_POT
321
V
REF
6.8 nF
2.2 nF
4.15
7
6
5
CH0
CH1
CH2
CH3
CH4
CH5
0.1 uF
0.1 uF
PIC16C63
For digital sensing, the low pass
Digital
In
CH5
V
DD
0.1 uF
0.1 uF
0.1 uF
0.1 uF
filter and ADC can be bypassed.
V
DD
V
DD
V
DD
V
DD
kΩ
16.3
kΩ
MCP6022
+
–
+
+
–
–
Internal
/SDO
SDO
Sensing Light with a Programmable Gain Amplifier