Arduino analog pin input AC to DC problem

Hi,
first post on the new forum! :slight_smile:
I have a turbine (flow force) sensor, which gives readings in AC. I’m converting AC to DC using a diode bridge (scheme attached).
When I pump the turbine the multimeter (checking points marked on the scheme) gives me readings which make sense - between 0 - 1 v.
When I read the voltage using the Arduino (detecting point is between the bridge and the resistor) I’m getting wave readings which seem to ignore the pumping of the turbine all together (no matter if I pump the turbine or not I get this).

0
61
599
1023
659
0
0
0
136
986
1023
305
0
0
81
666
1023
673
0
0
0
21
588
1023
782
0
0
0
0

The code to read the pin:

void setup() {
  Serial.begin(9600);
}

void loop() {
  delay(100);
  int sensorValue = analogRead(A0);
  Serial.println(sensorValue, DEC);
}

Please advise how can I get the correct readings, thanx.

.. the numbers even look like a sign-wave.

You have done the rectification part, to make it all positive, but you need to smooth it with a capacitor.

I can't see the attachment, so a bit of guess-work. Try 100nF to start with. This should be between the signal and ground. If its still too bumpy, the try a higher value.

If you end up using electrolytic capacitors, they have polarity so make sure the negative end goes to ground (positive end is longer lead).

also, I just noticed your signal is maxing out.

So if it still gets upto 1023 after smoothing, you will need a potential divider (Wikipedia) to scale the signal down before it goes into the Arduino.

Umm, very sorry for the wasted time. I didn't ground the circuit :roll_eyes:

Thanks for the replies :)

LOL - as my kids would say ;)