Hello All,
I am using the ADC of Arduino NANO. I am sampling at the rate 5 mins. As you are aware that ADC is not very stable , i am planning to do averaging of the ADC samples. I don't want spike or error sample in my data logged. Is there any standard to take averaging of the samples or i can do any way. I need your guidance & support.
For your information, I am measuring the Pressure Sensor (4-20 mA Output). I am using current to voltage converter & then reading the voltage via ADC pin A0. Also, I am using AREF pin for better results.
Niteshverma:
As you are aware that ADC is not very stable
No, not aware of that. Actually I find it pretty stable, as long as the input signal is stable. So that's probably where your problem is. Or unstable Vcc, can also be a problem. Anyway, as long as you use it correctly it's pretty stable.
Thanks for the response. It has 2^10= 1024 bit values. I observed that the last bit is keep varying even if the input is stable. So, my further conversation have some errors.
That is why i want to average the converted values.
Fix the source of the errors. For that you'll need to understand things like how the ADC works, what sources of errors there are, and the difference between absolute and ratiometric. So there's your homework.
If you're looking for help with that, start by posting clear schematics of your setup.
4-20mA sensors are best read using the internal reference, or a fixed external reference. That is, unless you can be VERY sure that your Vcc is in fact constant and stable. That's usually too much to ask.
The output of your transducer May move about anyway ( you are measuring to 0.1% resolution which maybe better than the transducer can provide ( in which case you can throw away some resolution)- have a look at its spec . You can average by taking say 10 readings adding them together then dividing by 10.
The internal reference as said is a very good move and allows you to use a smaller burden resistor for the transducer to get 1v full scale . As the pin can still with stand 5v you get better protection.
Bring all your grounds to one place to avoid any voltAge drops that could affect your readings .
Or google “ rolling average” for another method .
You don’t need anything connected to the Aref pin.
It might be worth using some input protection on the analog pin, if a wire comes adrift from your transducer you may put a higher voltage on the pin than it will stand .
SDA and SCL are not connected to anything. Apparently something is missing here.
What is that "16V regulator to 9V"?
What is this "power" block?
Where does Vcc gets its power from?
What is J14 "Current to Voltage Converter" exactly? No part number. Normally a simple 47Ω resistor is all you need for a 4-20mA sensor.
If it's really only the last bit that changes, it's going to be hard to improve on that. I see it's "sub sea pressure", that means you're going to see currents and pressure changes from waves/surf and whatnot. That's noise, and that's always going to stay.
Niteshverma:
Also, I am using AREF pin for better results.
That's a big NO.
Don't connect anything to that pin, unless you are going to use an external reference voltage.
wvmarle:
What is J14 "Current to Voltage Converter" exactly? No part number. Normally a simple 47Ω resistor is all you need for a 4-20mA sensor.
+1
You basically only need a resistor (I would use 51ohm E24 1% metalfilm) to measure a 4-20mA sensor.
And maybe some protection parts if the sensor can be disconnected.
Any 'converter' will make things worse.
Note that you only get ~800 A/D values/steps with Arduino's 10-bit A/D. That might be enough.
If not, then use an external voltage/absolute A/D, like an ADS1115 breakout board (16-bit).
You will need a different value load resistor for this chip.
Leo..
And... the diagram doesn’t show wiring layout - if you have say the various 0v connections scattered about as suggested by your diagram, then currents in these wires can upset the accuracy of your readings due to voltage drops being added to the actual
Measurable.
All the measurement 0v lines should go straight to a single point.