I am working on the Wattcher project and have a couple questions. I have the hardware all built and it is working as best as i can tell. My question is about how to convert the incoming data into volts and current. I am writing my own program in C# so I'm not just copying your code.
1. Converting ADC0 to voltage:
In your loop to convert all the samples to voltage you have this equation: voltagedata[i] = (voltagedata[i] * MAINSVPP) / vpp
What should the value of MAINSVPP be? I figured it should be 340 in order to get a range of +-170
2. Converting ADC4 to current:
In your loop to convert the samples to current you have this equation: ampdata[i] /= CURRENTNORM
What should the value of CURRENTNORM be? I have no idea.
Any help would be awesome. great tutorial btw!