I am currently working on a project that requires to be able to calculate/monitor the RMS AC current and voltages for different circuits for safety monitoring and reporting, which will have threshold sets on the RPi for current usage and voltage levels etc. These circuits may/will have different current loads and are all AC, and some may be using 240VAC while others maybe 48VAC. However I'm not sure how to best acehive what I need it to do with the current hardware and code, due to inaccurate readings and sinewave data capture/sampling issues etc.
I have got a few ADC Pi's a few months ago and bought some sensors to test with, the ACS712 for AC current sensing and the LC Technology ZMPT101B Voltage sensor module for AC voltage sensing (https://www.ebay.co.uk/itm/LC-Technology-AC-Voltage-Sensor-Module-ZMPT101B-250V-Arduino-Flux-Workshop/112306532975?). I am using the demo_readvoltage.py and demo_acs712_30.py from the github ABELectronics ADCPi python libraries. However after hours of testing, I have found the current sensor on AC seems to be inaccurate and give different readings on each test run of the script, regardless on if the same ampage test current is applied or not, Ie not always on either side of 0V on screen, I've tried another sensor same issue. When testing the AC voltage sensor this seems to be more stable in its sinewave like analog output, always either side of 2.5V. However I have adjusted the on board potentiometer, so this may sorted that, hard too tell based on the output to the screen. I have also noticed the sinewave of both voltage and current sensor modules on screen seem to a bit slow to refresh/capture the sinewave. Is this the os.clear function or a possible sampling speed issue by the ADC Pi, I currently have it set on 18?
I have tested the current sensor on DC current to see where the issue may lie, again with the demo code (albeit a slight change to the calc_current function, changed workings out to be 2.5) * 10), however it seems to be near accurate current reading with DC so seems to be just an issue with AC.
What I'd like to know is whether these two sensor modules would work as desired with the the ADC Pi on AC supplies and if so how I would go about coding the calculation for the current and voltage based on the sinewave input, and if not what other solutions I could look at implementing to acheive this. Ideally I'd like to keep it with the RPi and ADC Pi' s due the rest of the project incorporating other ABElectronics libraries etc.
The other options I can think of that could work if the above doesnt, is RMS to DC converters, however I am not sure how these would work when mesauring AC current, and if it did, the below item doesn't look like it supports much current at all. I can see how it would work for AC voltage but not for current, further to this I am not sure how I would begin to code this to work out a voltage to display on screen. I have found one here but not sure if this would be suitable, if it came to finding one: https://www.ebay.co.uk/itm/LTC1966-Converter-Precision-Micropower-Delta-RMS-to-DC-Convert-Module-UK/192520243176?
The other only option apart from above I can think of would be to buy an Arduino, or two and connect the analogue inputs to this. The Arduino would then sample the data from the sensor modules and feed the calculated voltage and current readings back to the RPi, or the RPi would poll/request for the calculated voltage and current readings. As Arduino is a new thing to me I'd rather stick with the ADC Pi and Raspberry Pi, due to not knowing how to code in Arduino languages at all, and also how I would set the the Pi and Arduino communcation and analog inputs up properly.
Any assistance with this and or how to best go about this would be greatly appreciated, its starting to send me slowly insane. If only it could all be DC for this project, it would be much easier. Sorry about the post length, realised I've gone on a bit.