Measuring 20V indicators on an Arduino Uno with a quantizer – Open Electronics

By Marco Ventimiglia on July 26, 2022

As we all know, Arduino Uno features a 10-bit ADC (analog-to-digital converter) inside its ATmega328p, which takes a sign between 0 and 5V and produces a digital worth that varies from 0 to 1023. Nonetheless, attempting to measure any voltage above 5V will trigger some lower than fascinating outcomes, equivalent to creating magic smoke and destroying the microcontroller. To get round this, some makers add a voltage divider that divides the enter voltage by a predetermined issue. This answer reduces the decision of the ADC, as a single step of the digital worth corresponds to a larger voltage variation. To resolve this drawback, the YouTuber referred to as Techoyaki has give you a brand new answer that may measure your entire vary of values ​​with out lowering the decision.


The circuit divides the 0V-20V vary into 4 ranges (0V-5V, 5v-10V, 10V-15V and 15V-20V) translating all of them into the 0-5V vary. After that, these 4 obtained indicators arrive on the Arduino’s 4 analog inputs, which add up the values ​​to provide the equal of an ADC of practically 12 bits, thus resulting in values ​​that fall between 0 and 4092 (1023 x 4 ).

The circuit consists of 4 rail-to-rail operational amplifiers, and numerous resistors, which permit to restrict the voltage obtained within the 0v-5v vary and subtract a DC voltage worth to impact the interpretation within the desired vary.


Extra information


About Marco Ventimiglia

Leave a Reply

Your email address will not be published. Required fields are marked *