I'm designing an amplifier to read currents using a CT from 10 mA to 30A with a STM32 with no FPU. I have the following data:
CT turns ratio = 1000:1
Burden resistor = 10 ohms
ADC reference = 3.3 V
DC shift = 1.65V (2048 adc count)
Amplifier gain from 10 mA to 10A = 8
Amplifier gain from >10A to 30A = 2
Let's say I want to read 10 mA:
Secondary current = 10 mA/1000 = 10 uA
Vburden = 10 uA * 10 = 100 uV
Vpeak = 100uV * 1.41 = 141.42 uV
Vadc_in (amplified) = Vpeak * 8 = 141.42 uV * 8 = 1.13 mV
Vshifted = 1.13 mV + 1.65V = 1.65113V
Adc_count = (Vshifted*4095)/3.3 = 2048.90 = 2049
I can also say:
Vadc_in(pk-kp) = 1.13 mV * 2 = 2.26 mV (peak to peak)
Adc_span = (2.26 mV * 4095)/3.3 = 2.8 ~ 3
So if I have 3 counts for a 10 mA primary current,
1 count = 3.33 mA
OR 3.33 mA/ADC count
Now, let's say I want to read 15 mA
Secondary current = 15 mA/1000 = 15 uA
Vburden = 15 uA * 10 = 150 uV
Vpeak = 150uV * 1.41 = 211.5 uV
Vadc_in (amplified) = Vpeak * 8 = 211.5 uV * 8 = 1.692 mV
Vshifted = 1.692 mV + 1.65V = 1.651692V
Adc_count = (Vshifted*4095)/3.3 = 2049.6
Doing the same calculation for 10 A, I get 2.78V peak at the ADC input, and 2749 count.
Is this approach right? I don't need to do RMS, that's why I think I can get away with just finding the peaks. Also, look at the case of 10 mA and 15 mA, the ADC count is almost identical, i.e., 2049. If I do the DC shift subtraction by software, that is, 2049-2048 = 1. There would be a lack of precision I think. I would get the same values for 10 mA and 15 mA. Please, correct me where I'm wrong.
CT turns ratio = 1000:1
Burden resistor = 10 ohms
ADC reference = 3.3 V
DC shift = 1.65V (2048 adc count)
Amplifier gain from 10 mA to 10A = 8
Amplifier gain from >10A to 30A = 2
Let's say I want to read 10 mA:
Secondary current = 10 mA/1000 = 10 uA
Vburden = 10 uA * 10 = 100 uV
Vpeak = 100uV * 1.41 = 141.42 uV
Vadc_in (amplified) = Vpeak * 8 = 141.42 uV * 8 = 1.13 mV
Vshifted = 1.13 mV + 1.65V = 1.65113V
Adc_count = (Vshifted*4095)/3.3 = 2048.90 = 2049
I can also say:
Vadc_in(pk-kp) = 1.13 mV * 2 = 2.26 mV (peak to peak)
Adc_span = (2.26 mV * 4095)/3.3 = 2.8 ~ 3
So if I have 3 counts for a 10 mA primary current,
1 count = 3.33 mA
OR 3.33 mA/ADC count
Now, let's say I want to read 15 mA
Secondary current = 15 mA/1000 = 15 uA
Vburden = 15 uA * 10 = 150 uV
Vpeak = 150uV * 1.41 = 211.5 uV
Vadc_in (amplified) = Vpeak * 8 = 211.5 uV * 8 = 1.692 mV
Vshifted = 1.692 mV + 1.65V = 1.651692V
Adc_count = (Vshifted*4095)/3.3 = 2049.6
Doing the same calculation for 10 A, I get 2.78V peak at the ADC input, and 2749 count.
Is this approach right? I don't need to do RMS, that's why I think I can get away with just finding the peaks. Also, look at the case of 10 mA and 15 mA, the ADC count is almost identical, i.e., 2049. If I do the DC shift subtraction by software, that is, 2049-2048 = 1. There would be a lack of precision I think. I would get the same values for 10 mA and 15 mA. Please, correct me where I'm wrong.