In the last video I used a trick to enhance the accuracy of the analog to digital converter in the Arduino. I thought this is worth a small video for all the guys which just want to solve this particular issue. Arduino have a built in 10, bit analog to digital converter, abbreviated ADC. They can be used to read analog values on pin a 0 to a 7. A DC’s need an exact reference voltage to be precise. Unfortunately, the Arduino s use the supply voltage as their reference, because supply voltage voltage can vary. The reading of the ADC also varies to show this. I supply an Arduino with a variable supply voltage and measure a fixed voltage of 3 volts. The measured value is displayed on the TFT screen. You see the supply voltage on the yellow multimeter and the measured voltage on the red one. I start with a supply voltage of exactly 5 volts as foreseen. The reading of the Arduino is correct. If I change the supply voltage to 4.8 volt, the Arduino measures a higher value, it is imprecise. The same applies if I change the supply voltage to 5.2 volt. It is quite clear that this is not acceptable if you need precise measurements. This is, for example, true. If you want to measure any sensors with analog outputs as the ampere meter in my last video, fortunately, a trick exists to correct this value. Arduino have a right, precise, built in voltage reference of 1.
1 volt. If we measure this voltage with our imprecise ADC, we get, of course, a wrong value. We saw this in our last test, but because we know that the internal reference is really 1 point 1 volt. We can use the following formula to calculate the real supply voltage. Vcc equals one point one times, one thousand 23 times one thousand divided by the measured result. We see VCC gets bigger when the measured result get smaller, and this is exactly what we need by the way. The factors 1023 and 1000 are because the ADC has 10 bits, which means 1024. Distinctive values can be measured, let’s check in reality. Again i supply 5 volts arduino measures also 5 volts supply voltage. If i go to 5 point 3 volts, the reading of the arduino is quite correct. Of course, a 10 bit ADC is not completely accurate. If i go down to 4.5 volts, the reading is still correct, even with 4 volts, it stays correct. Now let’s use the measured VCC to correct our initial measurement. The formula is: corrected: measurement equals VCC divided by 5, multiplied times the value measured let’s check this. In reality, I can change the supply voltage between 4 and 5 point 3 volt and the reading stays correct at 3 volts much better than the original. The original value changes between two point: eight volts and 3.7 volts, which is a measuring error of minus 72 plus 23. The code to measure supply voltage is enclosed in the comment it uses some bit panning and works on most of the Arduino.
arduino aref Video
arduino aref news
Posted on Sunday July 28, 2019Fail Of The Week: The Arduino Walkie That Won’t Talkie Hackaday … Continue Reading »
Posted on Tuesday February 26, 2019The No-Parts Temperature Sensor In Your Arduino Hackaday … Continue Reading »
Posted on Thursday October 03, 2013The life of Pi: Intel to give away Arduino-friendly ‘Galileo’ tiny-puter Register … Continue Reading »
arduino aref Social
🔬 Now that you’ve gotten your feet wet, dive into the kit and enjoy all nine experiments. Order yours today: http://bit.ly/2MnQ7fr