I needed to measure an AC signal from one sensor and I wanted to do with my Arduino Uno,
The first problem I found is Arduino cannot read negative values and the signal is centered on 0V. So, I used two difente methods
Bias CircuitI used this small circuit to bias the signal and centered in approximate 2.5V.
In the graph bellow you can see the oscilloscope tracing for the raw signal (Scale 1V/Time 20ms).
After applying the bias circuit, the signal shifted in 2.34V that is the voltage I applied.
With this arrangement you can measure the signal in the Arduino and the average value for RMS was 0.600V and for Peak-to-Peak 1.625V(using the code attached)
You can also see those signals with the Arduino serial plotter (just uncomment line 54 and 56 and comment line 148 in the code). This is the kind of graph you will get from Arduino
Another way to do this is using an OpAmp like LM324 with the advantage that you can also amplify the signal. I used LM324 because you need only a positive supply. This the circuit using th LM324
This is the signal once amplified by the LM324 and the readings from Arduino of RMS and Peak-to-Peak voltages were 1.555V and 4.314V
Comments