RC FILTER ADD NOISE TO ANALOG SIGNAL

Hello Everybody,
I have an analog pressure sensor and a digital flow sensor whose data are sent to arduino uno.
I have implemented a simple RC filter (R=69Kohm,C=270nF, fcut=8,5 Hz) for the analog singnal.
The problem is that I get low noisy data if I directly connect the analog signal to arduino A0 port, while I have really bad data passing through the RC filter.
-Which might be the problem?
-How can I know the sampling frequency of the analog signal?

I also plot the data with “Processing” and I don’t know if the delay introduced between the acquisition and serial printing may be responsible of the noise when i cut the frequency.

This is the arduino sketch:

#include <Wire.h>
#define address 0x40
#define offset 32768
#define scale_factor 120

unsigned int d;
byte a,b,c;
int a1,b1,c1;
float flusso;
int pin=8;
int i=0;

void setup() {
pinMode(pin,INPUT);
Wire.begin();
Serial.begin(9600);

}

void loop() {
if (digitalRead(pin)==HIGH){
if( i==0 ){
Wire.beginTransmission(address);
Wire.write(16);
Wire.write(0);
Wire.endTransmission();
i=i+1;
}
Wire.requestFrom(address,3);
a=Wire.read();
b=Wire.read();
c=Wire.read();

a1 =int(a);
b1=int(b);
d=(a1*256)+b1;

Serial.print("\t");
flusso=((d-offset)/float(scale_factor));
Serial.print(flusso);
Serial.print("\t");

int sensorValue=analogRead(A0);
float pressione=(sensorValue*0.3965)-40.3512-160;
Serial.print("|");
Serial.print("\t");
Serial.println(pressione);
}
else if (digitalRead(pin)==LOW){
i=0;
}
delay(30);
}

The second strange thing is that if “flusso=((d-offset)/float(scale_factor));” is done before the first “Serial.print(”\t");" the data printed are completly wrong.

  • Which could be the problem here?

Thank you

What is "low noisy data" and how does it compare to "really bad data"?

What analog pressure sensor?

How have you connected it? How is power supplied? How clean is the power (hint USB power is usually
very noisy)?

The frequency you are sampling is the same as the frequency your serial printlns are printing it, which
at 9600baud will be very slow.

Why 9600 baud? Use 115200 unless there's a reason not too.

Previously I omitted that after sending data from sensors to arduino, the data are sent to my PC via Bluetooth (RN-42 module).
I have noticed that data sent via bluetooth are different form those sent via arduino serial port bypassing bluetooth (see images attached).
The baudrate is set the same for bluetooth and arduino (115200).
Which might be the problem?
The code is the same for arduino-usb-pc and arduino-bluetooth-pc.

Not much information there. no scale, no timescale, datapoints less than a pixel wide?