Question regarding stepping down voltage

Hi! I've looked at this link from the building blocks:

I want to ask that if my transformer steps down to 25.4Vrms from 230VAC and I use 10Kohms for R1 and 270K for R2, using the same 470K for R3 & R4 with a capacitor similar to the connection in the link, will it work? Is the analog input voltage 0.907 V? I use 25.4*(10000/280000) voltage divider method. 

I'm also unsure what the two 470K resistors do? Why must it be 470K? So arduino analog input accepts any value from 0-5V right?

Sorry, just want to clarify! Thanks in advance!

Robert Wall's picture

Re: Question regarding stepping down voltage

Your Arduino needs to see an alternating voltage that goes from just above 0 V at the negative peak to just below 5 V at the positive peak. Doing the sums, that gives you a peak-peak value of a bit less than 5 V, which equates, if your voltage is a true sine wave, to about 1.6 V rms (leaving a few percent of headroom). Therefore, to divide your 25.4 V down to 1.6 V you need 10 kΩ for R1 but 148 kΩ for R2. [You got your numbers wrong from somewhere.] You can't buy one of those, a 150 kΩ will be fine, but 180 kΩ will be better and will allow for when your mains voltage is 10% high. The other two resistors bias the voltage into the middle - you did read the explanation, didn't you? - and a pair of equal values anywhere in the range 10 k - 470 kΩ will be fine.

If you go to the Building Blocks section and read about Calibration theory, you can work out what your voltage calibration constant will be.

lamela's picture

Re: Question regarding stepping down voltage

Thanks for the reply!

Do I take the Vpeak-peak value from the transformer or the Vrms? Because if I take the Vpeak-peak which is 69.4Vpeak-peak and I use 10Kohms for R1 & 150Kohms for R2, I will get 4.3375V? Is it alright? Currently I'm using the 270Kohms for R2 and I already connected and tested the voltage, it gives me about 230V+ after the calculation.

If this is correct then I don't have to change? Thanks in advance!

Robert Wall's picture

Re: Question regarding stepping down voltage

As long as you're consistent, which you use within the calculations won't matter. The way I work is to use the "rule of thumb" rms values of 1.1 V for the emonTx (3.3 V supply) and 1.6 V for the Arduino (5 V supply). Again, there's a BB page "ACAC Component tolerances" that delves into this in great detail.

You can safely stay with the higher value resistor, you lose a little on input resolution but that is of no consequence for the voltage input, as it only varies by ±10%. That's not the case with the current inputs, where the current varies over several orders of magnitude, so you need to use every tiny bit of input range and resolution available to you so that you maintain accuracy as low as possible.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.