Paul_KD7HB:
They are primarily used to pass signals while keeping circuits isolated from each other.
True. So, create a signal that is proportional to voltage. Typically this is done with a Voltage Controlled Oscillator [VCO]. A very inexpensive VCO that works quite well, is contained in a CD4046 Phase Locked Loop [PLL].
Feed your voltage divided voltage into the VCO IN pin and then drive the OptoCoupler with the VCO Out [the phase detectors go unused in this scenario]. What you will get is a linear relationship between voltage and frequency. Use one of the timers, in an Arduino, to count pulses per some time period. The count will be proportional to the voltage you wish to read.
V = kx
Where, 'V' is the voltage, 'x' is the count, and 'k' is some factor that converts counts to voltage.
Example: Say the VCO runs at 10 kHz with 1V on the input, and 20 kHz with 2V in. If the Arduino counts for 100 mS [i.e. a tenth of a second window], then a count of 1,000 is 1.000V, and a count of 2,000 is 2.000V. In this case k = 1/1000 or 0.001 .
If you run the CD4046 at 15V, you'll get a better dynamic range. You could set your voltage sensing range to something like 0 to 14V. Or, how about 0-10V [for 0 - 100V], that way there's an easier conversion. And, I would use a frequency range something like: 1 kHz for 0V to 11 kHz for 10V. Then, subtract 1000 from every count, to get the easy conversion to voltage: A count of 11,000 - 1,000 = 10,000 or 10.000V And, of course, that's really 100.00V. A count of 1,000 -1,000 = 0 or 0.000V. A count of 2,356 - 1,000 = 1,356 or 1.356V which is actually 13.56V. And the formula would be:
V = k(x - 1,000) = 0.01(x - 1,000) = (x - 1,000)/10
To make that division more efficient, use a factor more like:
V = (x - 1,000)/8
That way, you can do a right shift [V = (x - 1,000) >> 3], rather than a time intensive division!
You could power the CD4046 from the 100V source -- as long as 0.5mA, or so, is not too much of a load. Just use the internal Zener, and bias it at a nominal 0.505 mA, then connect the Zener Cathode to VDD [BUT, since that 100V will vary, a little more math is needed to keep that zener biased properly, and to determine if using the Zener is even feasible--as the power dissipation limit of 500mW could be exceeded]. But, since this will run the VCO at around 5V, it will only have around half a milliamp to drive the input LED of the OptoCoupler, so select a sensitive one--not too hard, since the output will be driving an Arduino input, which has a high input impedance. Otherwise, run the CD4046 at 10 to 15V [for optimal linearity -- and better current drive].
You could, also, use the counter to time the period [inverse of frequency]. In which case, the voltage would be inversely proportional to the frequency.
The choice of frequency range will depend on how responsive you want this thing to be -- and, of course, a top frequency capped by the Arduinos limitations.
Be sure to ground all unused inputs on that CD4046.
And, it might be possible to do this with a 555 timer, but the translation of frequency back to voltage might be spooky. But, then, with the right math, anything is possible 