English
Language : 

AN2615 Datasheet, PDF (1/37 Pages) STMicroelectronics – In general the ADC embedded in the ST7 microcontroller
AN2615
Application note
A high precision, low cost, single supply ADC for
positive and negative input voltages
Introduction
In general the ADC embedded in the ST7 microcontroller is enough for most applications.
But, in some cases it is necessary to measure both positive and negative voltages. This
requires an external ADC with this particular capability. Most external ADCs require a dual
supply to be able to do this. However, microcontroller-based applications usually only have a
positive supply available.
This application note describes a technique for implementing an ADC for measuring both
positive and negative input voltages while operating from a single (positive) supply. This
converter is based on a voltage-to-time conversion technique. Like other slope converters,
this ADC also uses an integrating capacitor, but the measured time is inversely proportional
to the input voltage. An additional comparator with a voltage reference is used to improve
conversion accuracy.
As shown in the circuit diagram (Figure 1 on page 6), the converter is implemented using an
integrating capacitor, resistor, external op-amp, comparators and some microcontroller I/O
pins. The ST72F264 microcontroller is used in this application note as an example, but the
implementation is feasible using any ST7 microcontroller. The 16-bit timer of the
microcontroller measures the time using its input capture pins (PB0 and PB2). These pins
are connected to the output of the Comp1 and Comp2 comparators. The I/O pins PB1 and
PB3 are used to switch the M1 and M2 switches on or off. The circuit could also work with a
microcontroller equipped with an 8-bit timer. Only a small modification to the software would
be needed.
August 2007
Rev 1
1/37
www.st.com