so raschemmel.. if I am understanding your description of the solution correctly.. I have drawn this circuit diagram of how I would have things wired up. Is this correct?
YES. The circuit schematic is correct, but the values will change in the future (in Reply#21)
In your calculations... Rtotal = Vin / Iload
Can you explain this?
Where is Iload?
The arduino ADC input A0
Let VIN = 130V (Vin of the Voltage Divider)
Let Vout = 4V
Let ILOAD = 1 mA (0.001 A) (ILoad here was the Voltage Divider current)
= 130Vdc /0.001 A = 130 k ohm
is this the current through R1?
Did you pick 1mA for any specific reason?
Not really. I just picked a very low value. After reading your reply I decided my answer was useless without proof of load current so I redid it after looking it up. (Yes. My bad.)
So using the resistor values you have provided, when Vin = 130vdc, then Vout =4vdc. Is this how I can calculate what the Vout will be when Vin = 100vdc?
R2 / Rtotal = Vout / Vtotal
4000 / 130 000 = Vout / 100v
Vout = 3.077vdc.
So when Vin = 100vdc, then the arduino will get a 3.077vdc signal at the analog input pin. Correct?
4 V is to 130 V as x is to 100V
Simply multiply 0.03076 * whatever voltage you are interested in to calculate the input voltage
you should get with that voltage.
(0.03076)*(100) = 3.077 V dc.
Vout = 4V is chosen to be the input voltage to the ADC for 130 V.
Your post title says nothing about rest of your circuit. You post was how to detect the voltage.
(which I answered)
You asked how I picked 1 mA. The answer is I pulled it out of the air.
After you asked me I decided to look it up:
The ADC current is actually 140 uA @ 25 deg C so:
(Section 35.11, Figure 35-40, page 608)
Let VIN = 130V
Let Vout = 4V
Let ILOAD = 0.140 mA (0.000140 A)
= 130Vdc /0.000140 A = 928571 k ohm = approx 1 Mohm.
Vo / VTotal = 4V/130V =0.03076
R2 = (0.03076) * Rtotal = 0.03076 * 928571 ohm = 28562.8 = 28.6 k ohm
R1 = Rtotal - R2 = (928571 ohm - 28.6 k ohm) = 900008.1 ohm = 900 k ohm
R1 (from Vin to R2) = 900 k ohm
R2 (from R1 to GND) = 28.6 k ohm
Vout = connection point of R1 and R2
P(R1+R2) = 140 uA * 130V = 18.2 mW (use 1W for safe margin)
Analog input max voltage = 4V dc @ 130V in.
You have to calibrate your system to the exact ADC current.
R2 should be a 10k fixed resistor in series with a 30k pot to give a good range of adjustment.
(You can play around with combinations like a 20k fixed and a 20k pot (wired as a rheostat) etc
You have to calibrate the circuit using a voltmeter and adjusting the pot until the calculated value read by the arduino matches the value displayed on a DMM. Once you get that far you can
turn off the power and measure the resistance of the pot wired as a rheostat (only wiper and one
terminal used). If you can find a pot 5k above the measured value then you can replace the 30k
pot with the a lower value. Either way the calculation is a first approximation and you have to
determine ILoad (the ADC current) empirically. When the ADC reports the value you
are reading on your DMM then the circuit is calibrated. The ADC current is consistent at the same temp.