0
\$\begingroup\$

I am working on one project of water pressure measurement, in which i used pressure transducer which gives me output between 4-20mA Current form.

I am using one 250 ohm resistance to convert current into voltage, and than i give this voltage to ADC of arduino UNO channel 0 (A0).

ADC reading is continuously fluctuating up to 10 decimal numbers.

I have also check by connecting multi-meter and measure sensor current reading, for particular pressure. but current reading is stable (even not fluctuate 1 or 2 points.)

also i have checked voltage value after 250 Ohms +Ve and ground. converted voltage is also showing very stable.

but why ADC reading is fluctuating..?

i am using arduino uno, i doesn't have any changes in AREF, AVCC etc...

please suggest effective solution,

Thank in advance.

My code is as follow..


const int analogInPin = A0; // Analog input pin that the potentiometer is attached to

int sensorValue = 0; // value read from the pot

void setup() { // initialize serial communications at 9600 bps: Serial.begin(9600); }

void loop() {

// read the analog in value: sensorValue = analogRead(analogInPin);

// print the results to the Serial Monitor: Serial.print("Reading: "); Serial.println(sensorValue);

delay(1000); }

\$\endgroup\$

bumped to the homepage by Community 7 hours ago

This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.

  • \$\begingroup\$ "... fluctuation ... up to 10 decimal numbers." What does this mean? How many percent? Please format your code properly. There is a button on the editor toolbar. Make sure it is indented in the correct places. Thank afterwards by upvoting and accepting answers. \$\endgroup\$ – Transistor Aug 2 '18 at 17:59
  • \$\begingroup\$ "fluctuation ... up to 10 decimal numbers", mean for any particular fixed output of sensor, adc value is up and down between ten numbers, for example if value should be 100 in normal condition, it become either 95 or 105, and between all values. \$\endgroup\$ – Bhargav Shankhalpara Aug 2 '18 at 18:06
  • 1
    \$\begingroup\$ That is normally reported +/-5 counts on 100 or +/-5%. Put that into the question so that your readers have all the information in the one place. Are you sure that the pressure and input aren't fluctuating by 5%? Have you got mains interference? Don't forget to fix the code formatting. \$\endgroup\$ – Transistor Aug 2 '18 at 18:09
  • \$\begingroup\$ If there is noise on the signal being converted that is harmonically related to the sampling rate with an offset frequency that matches your results, then you have excessive noise. \$\endgroup\$ – Tony Stewart Sunnyskyguy EE75 Aug 2 '18 at 18:29
0
\$\begingroup\$

Your multimeter averages over a good part of a second so it's not really measuring the same thing.

Look at the ADC input signal with an oscilloscope, set to AC range with a sensitivity of perhaps 100mV or 250mV/division. Since your ADC is 10 bits and 5.0V reference, you are reporting (as added in the comments) +/-5% peak-to-peak variation out of 5.0V full-scale, which is +/-250mV (and about +/-50 ADC counts).

That will tell you how real that signal is. It could be caused by actual variations in pressure or vibrations of the sensor.

It could also be affected by interaction between your serial communications ground and any grounding in the sensor circuit.

\$\endgroup\$
0
\$\begingroup\$

A variation of 10 counts out of a maximum 1023 is about 1% of full scale, not bad for an Arduino. This is equivalent to about 50 mV and you probably have that much noise on the input signal and AREF.

If the problem is noise and the noise is a random fluctuation then you should be able to improve the readings by averaging. Try summing 16 or 32 values and then dividing the result by 16 or 32. (I proposed 16 and 32 because they are integer powers of 2 so performing unsigned integer division with these values is easy and fast...shifting.)

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.