Measuring low level cap/inductance and stroboscopic mode
The scheme we have used so far to measure capacitor is to generate a square pulse and capture the voltage waveform.
For reference, the STM32/GD32 MCUs have very decent 12 bits ADC that can go down to ~ 0.5/1us sampling frequency.
For capacitors, the time constant of the waveform is proportional to Resistor*Capacitance, so if we use the bigger resistance (470k) we can have a few points even with very small caps.
NB: The waveform is V*(1-exp(t/RC)), so with 2 known points we can calculate R*C. Since R is known , C can be computed.
It gets problematic with inductance.
The time constant is proportional to L/R, so with the smallest R (470 Ohm) and 100 uH inductance that leads to time constant in the order of ~ 100E-6/470= 200 ns, which is way too small compared to the ~0.5/1 us resolution of the ADC.
Additionally, we need at least something like 5 points to have a valid guesstimate. So we are out by a factor of 10.
I've been scratching my head on that one for some time and finally looked at how the "transistor tester" was doing.
The transistor tester is based on a Atmel 328p chip with has worse ADC and is much slower than the STM32/GD32.
On the other hand, it has some features the STM32/GD32 lacks. Do they use those features ?
What they do is actually pretty smart.
They use a stroboscopic effect to increase the sampling frequency indirectly.
The gist of it is the following :
- Repeat the pulse every N cycles
- Do a ADC sampling every N+x cycles
Since the pulses are periodic, what we end up with are samples separated by x cycles, whatever the actual sampling frequency is.
This is exactly how a stroboscope works.
With a clock at 72 Mhz, it means we can go down to ~14 nanoseconds pseudo sampling frequency.
With 5 points that translates to Inductance of 33 uH.
This looks very reasonable, often the inductance are in the N*100uH range.
Let's see if that actually works in practice.
Comments
Post a Comment