Hello, does anyone have any idea on how to increase the precision of the ADC, I have tried everything that I can think of. So far I have come up with nothing whatsoever.
I have tried using analogReadResolution but apparently it doesn't exist in the Arduino Mega, I'm trying to read the current of a simple circuit and display it on my Serial Monitor, but my issue is that the ADC isn't nearly accurate to detect the changes from 2 decimal places or at least 1 decimal place.
Ideas ? Anyone ?
Here is my code:
#include <ResponsiveAnalogRead.h>
ResponsiveAnalogRead analog(A0, true);
//Global variables
float value=0,value1,value2,value3;
float first;
bool flag;
int Measurements=50;
int counter=0;
int mapping;
AnalogRead() doesn't read current, but voltage. One thing you can do to increase precision is to decrease the range of voltages by setting the top value using analogReference()
I have a current sensor that reads the current in a circuit and gives out a proportional voltage as output which I am using as an input on the Arduino Analog Pin A0, I have seen many posts on analogReference() and since I am using the Mega, I will have to use the INTERNAL1V1.
Unfortunately, I have no clue on how to code the Internal Reference and apply it to my code, but anyways I will start learning more about the Internal Reference.
I will try adding the analogReference() but the issue is that I need my circuit to handle 12V so from what I understood, using analogReference(INTERNAL1V1) will limit my voltage to 1.1V.
As for the current sensor I'm not really sure what it is as I bought it off RADIOSPARE Website and it's number is 866-0795, you can find it's datasheet on the website easily.
Thanks for the replies,
Please keep replying if anyone has any other ideas.
I will try adding the analogReference() but the issue is that I need my circuit to handle 12V so from what I understood, using analogReference(INTERNAL1V1) will limit my voltage to 1.1V.
Be aware your ADC only supports 5V max in ADC.
What is the output scale of your sensor?
It's very unlikely your sensor output a 12V.Most of the current sensor I had deal output a very smal voltage per ampere.If you reduce the analogeReference then your ADC full scale is able to get more small voltage diferences.
In my circuit I have a Rheostat connected to my 12V battery, so I am currently using the max value of the Rheostat so only 0.33 Amps is flowing through my circuit.
The Arduino also can't handle 12V so you will have to scale that down anyway. Doesn't really matter if you scale it down to 5V or 1,1V.
And heck, you can even switch back and forth between 1V1 reference and 5V reference if you read the current sensor and the supply respectively if you want to.
Yamen1:
Hello, does anyone have any idea on how to increase the precision of the ADC, I have tried everything that I can think of. So far I have come up with nothing whatsoever.
You can easily get the answer if you can find the answers to these questions:
What is the precision of your wrist-watch?
What is the accuracy of your wrist-watch?
What is the resolution of your wrist-watch?
Mind it: your wrist-watch could be precise but not accurate; your wrist-watch could be accurate but not precise; your wrist-watch could be both precise and accurate. Resolution is an added feature of the wrist-watch that is set by the manufacturer.