Thanks so much for trying to help me get this to work. It has really been bugging me because essentially, this is what the HEM is doing too, isn't it? So, it should be possible for me to do it too. The diode makes much more sense to me. I do have a few questions about the circuit you showed me thought.
First, C1. It says 330uF, what should the voltage be? These are the capacitors that I have readily available. If the value of R2 could be adjusted to use any of these, it would make it MUCH easier for me as I wouldn't have to buy anything else. Have a full range of resistors 10-1M ohm in 1, 22 and 47 increments. (i.e. 10, 22, 47, 100, 220, 470, etc)
6.3v 1000uF (Have a LOT of these)
2.7v 1000uF
16v 100uF
(As a side note, I love amazon but at times like these I really miss being able to run to Radio Shack. You might have paid a bit more for each thing but you were able to buy one capacitor instead a pack of 50 that I'll never use).
As far as the diode goes, can I use an 1N4001? I know nothing of diodes so I wouldn't even try to hazard a guess. The data sheets made my eyes cross. Again, I only ask because I have one on-hand.
Also, to finish out the rest of the diagram, the other side of R2 would go to the ground on the board while the "ADC input" is A0, right?
Also, I wanted to ask about the math you talked about "smoothing factor" and "scaling factor"....it would be a lot easier for me if you just told me what I should change for each of the numbers in my current sketch. I'm not sure that those terms are being used in this case the same way that they are used in the rest of the English language (it happens in every field. Words take on a colloquialism that become accepted "fact" when they don't really mean that.) This is what I have set up in my sketch currently.
static st::PS_Voltage sensor3(F("power1"), 15, 0, PIN_VOLTAGE, 0, 1023, 0, 15.84, 10, 80);
I know it is polling every 15 seconds, I was only doing this for testing and when I was done I was going to bump it back up to 30 or 60. Anything you see that I should change, please, just let me know.
And I'm glad you got something out of this as well. I know that I sure have. It's funny, I definitely know more than the average Joe about this stuff but when you start deep diving like this I really see how small a percentage of the topic I actually know. I do really appreciate your help and any frustration in my "tone" is totally directed at myself for not being able to figure it out and just "make it work".