Last year, in Mic modeling lab rethought, I designed the DC measurement of an electret microphone around the capabilities of the Arduino analog-to-digital converters:
- The highest voltage allowed is 5v and the lowest is 0v.
- The resolution is only 10 bits (1024 steps).
- The steps seem to be more uniformly spaced at the low end of the range than the high end (so differences at the high end are less accurate than differences at the low end).
- The external reference voltage AREF must be at least 0.5v (this is not in the data sheet, but when I tried lower AREF voltages, the reading was always 1023).
This year we’ll be using the KL25Z boards, which have different constraints:
- The highest voltage is 3.3v and the lowest is 0v.
- The resolution is 16 bits (15 bits in differential mode).
- Differential mode only works if you stay away from the power rails—clipping occurs if you get too close.
- The external reference must be at least 1.13v. With less than a 3-fold range for the external reference, varying the external reference to get different ranges seems rather limited.
I think I’ll still have the students start with using the multimeter and the bench power supply to measure voltage and current pairs for 1V to 10v in steps of 1v. But then I’ll have them wire up a different test fixture. The resistor R2 is one that students will have to choose to get an appropriate measuring range. Resistors R3 and R4 keep the voltages for the differential measurements E20–E21 and E22–E23 away from the power rails. I tried using smaller values, but 200Ω was not enough—I still got clipping problems. So 63mV is too close to the rails, but 275mV seems fine. I suspect that the limit is around 100mV to 150mV, but I did not try to narrow it down.
I found that the differential measurements had less noise than single-ended measurements, despite having a resolution of about 100µV rather than the 50µV of single-ended measurements. Doing 32× hardware averaging also helped keep the noise down. (Note: the data sheet for the KL25 chip does claim a higher effective number of bits for differential measurement than for single-ended measurement, perhaps because of reduction in common-mode noise.)
I was able to get fairly clean measurements with just two different resistor sizes, to which I fit 4 different models:
- linear resistance:
- constant current
- blended with exponent:
Because of the large characters used for the data points, the lines look fat, but the noise level is fairly small—about ±300µV Some of that may be due to the movement of the potentiometer, as the voltage and current aren’t measured at precisely the same time, but I suspect most is electrical noise in the processor itself.