Figure 1’s silly-simple voltage-to-time ADC is an exercise in dynamic range. Assuming that it is used with a 10-MHz counter/timer, its resolution is roughly 10 µV per count for inputs around 0 V and 100 mV per count at 1 kV, and it never really over-ranges. The simple trick that provides this multi-decade measurement span is the inherent logarithmic behavior of RC timing networks.
![]() |
|
Figure 1. | U1 works with R1, R2, and C1 to logarithmically digitize 0 kV to 1 kV inputs while tying up only one microcontroller I/O pin. |
Here’s how this one works.
Between conversions, U1’s reset pin 4 is held active-low either by the connected GPIO pin, or by U1 itself. Using a 555 in this self-resetting mode is unusual but is very handy here. This holds the C1 at zero or very near, since the RON of pin 7’s open-drain FET is typically just 15 ohms.
A conversion starts when the I/O pin is programmed for output and pulsed high, overriding U1 pin 3 (OUT) and releasing the reset as sketched in Figure 2. The I/O pin is then immediately tri-stated and reprogrammed as input, gating an internal counter/timer peripheral for measurement of the conversion time T.
Because U1’s pin 2 (TRG) is held low, the end of reset also sets pin 3 high and releases pin 7, allowing C1 to begin to ramp positive. When it reaches the 2.048 V (Threshold) voltage on pin 5, conversion will complete and the time T that was required to do so is the conversion result. Arrival of pin 5 at the threshold voltage drives pins 3 (Out) low, thereby both pin 4 (RST) and GPIO, the latter being the “conversion complete” status bit to the microprocessor. Meanwhile, pin 7 is driven low to discharge C1. This process completes in about 12 µs, readying the converter for another cycle.
T versus VIN is given by the following equation:
This is plotted in Figure 3 for VIN = 10 mV to 1 kV.
![]() |
|
Figure 3. | The conversion time (T) in milliseconds for VIN from 0.01 V to 1000 V. |
To recover VIN from a T acquisition, do this:
Finally, here’s something in the nature of a reality check.
You might be wondering why R1 is shown as a series connection of four 1M resistors instead of a single 4M component. The answer is the somewhat obvious fact that 1 kV is some serious voltage and the somewhat less obvious fact that resistors, somewhat like capacitors, have voltage ratings. Resistors rated for 1 kV are not the usual breed of cat.
And speaking of cats, please remember the old story about what curiosity did to one unfortunate feline and consider that prudent and proper safety practices are literally vital when choosing to work with voltages of this magnitude.
Me–OW!