I've only had about 20 minutes a night to spend on this.

I did voltage captures with the new software with the electrolytic capacitor. I then removed it and did another capture. Turns out that the data was corrupted on the first capture, so I only have it without the electrolytic cap.

I also did another capture with a different resistor value in the op amp circuit. The Spice circuit simulator showed that it should have given dramatic improvement on the 60 hz noise on the line. Reality was very different. If ruined the signal.

So, I'm back to the original op-amp circuit resistor values. The captures are very clean and look really good. There appears to be 60 cycle noise on the line. I've ordered a couple common mode chokes to test and see if that will clean it up. If not, it's not a problem to filter in software.

Below is a capture of the raw "analog counts" value in red (it's about 7 counts to a volt). The green line below it is the value after software filtering. It's small, but on close examination you can see that the green line is very smooth. The filtering works great. It reads about a volt or two low, but that's easy to compensate for.

The filter algorithm is very lightweight, so it's fast for the processor. It is:
  • new-value = old-value + (new_value - old_value)/20


Click image for larger version. 

Name:	circleCutCountsRawAndFiltered.jpg 
Views:	1848 
Size:	129.8 KB 
ID:	9116

The next chart shows the values read as volts.

Click image for larger version. 

Name:	circleCutVoltage.jpg 
Views:	1733 
Size:	165.1 KB 
ID:	9117

From that chart you can see how stable the voltage is.

I'm really pleased with the performance. I just want to see if I can clean up the noise with a filter choke.