Using the ATAVRAUTO200
ATAVRAUTO200 User Guide 2-7
7698A–AUTO–01/07
2.4.4 Current measurement
Motor c urrent is measured using a shunt r esistor. E xternal d ifferentia l amplifie r (on
board) is connected to ADC to measure shunt resistor voltage.
Amplifer output (current image voltage) is connected to
ADC0 pin for current acquisition
AIN1 pin to detect max current peak (compared to AIN0 through internal analog
comparator)
The c urrent measur ement (I) can be p erforme d using the A/D con verter. See the
ATmega48/88/168 datasheet for how to use the ADC. The input voltage value (V
ADC-0
)
is calculated with the following expression:
Analog comparator allows peak current detection. It provides interrupts on analog com-
parator output change. See the ATmega48/88/168 data sheet for how to use the Analog
comparator. Comparison voltage is determined for a 12A peak which leads to:
V
AIN0
= 1.5V
Figure 2-6. Current Acquisition chain and current Peak detection
2.4.5 Speed/Position measurement inputs
A screw connector with 4 inputs can be used to plug two hall effect sensors. The two hall
effect sensors inputs are connected to the two external interrupt pins (INT0 and INT1) of
the microcontroller.
Figure 2-7. Hall sensor effect interface
VADC-0 Gain V shunt Gain R shunt I××=×30,16 0.005 I××= =( )
VADC-0 0.151 I×=
+Vcc
Hall1
Hall2
GND