Part Number: AMC1210
I want to measure the current in a shunt resistance (a shunt resistance that we connect in series to a device to measure its current consumption). I can choose the value of the shunt resistance among 4 resistances that are in parallel.
The goal is to measure the current of 4 devices at the same time with the 4 module filters in the AMC1210. But first, I want to measure the current in one device with the 3rd module filter.
I use a NUCLEO-L446RG to communicate with the AMC1210 by SPI bus. And, in front of the AMC1210, I use an AMC1305 (delta-sigma modulator) to convert the analog voltage at the shunt terminals into a digital voltage.
I use the third order sinc filter of the 3rd module filter. I diseabled the Comparator filter, the Time unit and the Integrator unit.
I use the pin ACK with an interrupt to get the digital data back from the filter.
Configuration :
Control Register = 0x0B00
Clock Divider Register = 0x0000
For 3rd module filter :
Control Parameter Register = 0x0000
Sinc Filter Parameter Register = 0x0F1F
Integrator Parameter Register = 0x0000
Comparator Parameter Register = 0x0000
For the other module filters : default values
My problem is the digital data that the filter sends to the STM32 from its Data Register, it does not correspond to the analog voltage that I measure at the input of the AMC1305.
It seems like the conversion of the analog voltage into a digital voltage is not made correctly.
And if I add some lines of code in my program the digital data is a bit different. The digital data value is different according to the time the program takes to get it back.
Maybe there is something that I didn’t understand about the filter and the timings.
|
Shunt 1 |
Current (A) |
0,5 |
1 |
1,5 |
2 |
2,5 |
3 |
3,5 |
4 |
|
|
(0,01Ω) |
Input voltage AMC1305 (mV) |
2,6 |
9,1 |
15,6 |
22,2 |
28,7 |
35,2 |
41,8 |
48,3 |
|
|
Vdevice = 5V |
Data value theoretical (signed 16bits) |
1699 |
5948 |
10196 |
14510 |
18758 |
23007 |
27320 |
31569 |
|
|
Output data value AMC1210 (signed 16bits) |
3536 |
6796 |
10352 |
13702 |
17276 |
20576 |
23882 |
27832 |
||
|
Difference |
1837 |
848 |
156 |
-808 |
-1482 |
-2431 |
-3438 |
-3737 |
||
|
Shunt 2 |
Current (A) |
0,05 |
0,1 |
0,2 |
0,3 |
0,4 |
0,5 |
|||
|
(0,1Ω) |
Input voltage AMC1305 (mV) |
1,5 |
6,6 |
16,9 |
27,2 |
37,6 |
47,9 |
|||
|
Vdevice = 5V |
Data value theoretical (signed 16bits) |
980 |
4314 |
11046 |
17778 |
24575 |
31307 |
|||
|
Output data value AMC1210 (signed 16bits) |
2846 |
5595 |
10853 |
16279 |
21679 |
27125 |
||||
|
Difference |
1866 |
1281 |
-193 |
-1499 |
-2896 |
-4182 |
||||
|
Shunt 3 |
Current (A) |
0,01 |
0,03 |
0,05 |
0,07 |
0,09 |
0,1 |
|||
|
(0,5Ω) |
Input voltage AMC1305 (mV) |
2,4 |
12,5 |
22,5 |
32,6 |
42,6 |
47,7 |
|||
|
Vdevice = 5V |
Data value theoretical (signed 16bits) |
1569 |
8170 |
14706 |
21307 |
27843 |
31176 |
|||
|
Output data value AMC1210 (signed 16bits) |
2709 |
8137 |
13408 |
18481 |
23959 |
26650 |
||||
|
Difference |
1140 |
-33 |
-1298 |
-2826 |
-3884 |
-4526 |


