![adc analog to digital converter adc analog to digital converter](https://media.ncd.io/sites/2/20170721153832/0-10V_ADC_8C_1_0f74af71-ad0c-440d-a049-77f179a0887c.png)
Normally all MCU has an option to set internal reference voltage, meaning you can set this voltage internally to some available value using software (program). During an ADC conversion the value of unknown voltage is found by comparing it with a known voltage, this is known voltage is called as Reference voltage. (ADC Resolution / Operating Voltage) = (ADC Digital Value / Actual Voltage Value)Īnother important term that you should be familiar with is the reference voltage. We can use the below formulae to calculate the digital value that will be read by the MCU based on the Resolution of the ADC and Operating voltage. With this if the actual input voltage is 0V then the MCU’s ADC will read it as 0 and if it is 5V the MCU will read 1024 and if it somewhere in between like 2.5V then the MCU will read 512. Meaning 1024 is the resolution for a 10-bit ADC, similarly for a 8-bit ADC resolution will be 512 (2 8) and for a 16-bit ADC resolution will be 65,536 (2 16). Let us assume that our ADC range is from 0V to 5V and we have a 10-bit ADC this means our input voltage 0-5 Volts will be split into 1024 levels of discrete analog values(2 10 = 1024). This will vary for different types of Microcontrollers. Not every pin on a microcontroller can read Analog voltage, the term 8-channel means that there are 8 pins on this ATmega328 microcontroller which can read Analog voltage and each pin can read the voltage with a resolution of 10-bit. For instance an Arduino UNO’s ATmega328 has a 8-channel 10-bit ADC. When you read the specification of any Microcontroller or ADC IC, the details of the ADC will be given using the terms channels and Resolution (bits).
#ADC ANALOG TO DIGITAL CONVERTER HOW TO#
In order to know how to use an ADC we should first get familiar with some basic terms like, channels resolution, range, reference voltage etc. Once it is converted to voltage we can read it with the help of ADC’s. For example to convert temperature values into voltage we can use a Thermistor similarly to convert brightness to voltage we can use a LDR. So which ever parameter we wish to measure, it should be converted into voltage first, this conversion can be done with the help of sensors.
![adc analog to digital converter adc analog to digital converter](https://wiki.analog.com/_media/university/courses/electronics/text/chptr20-f1.gif)
An ADC can only convert analog voltage values into digital values. But wait!! Can an ADC convert temperature and speed directly into digital values like 0’s and 1’s? So what are these analog values? These are the ones that we see in our day to day life like temperature, speed, brightness etc. In this article we will learn everything about ADC and how to use them.Īs said earlier ADC stands for Analog to digital conversion and it is used to convert analog values from real world into digital values like 1’s and 0’s. This something is called the Analog to Digital Converters or ADC for short. So we need something which will convert all these analog values into 0’s and 1’s so that our microcontrollers and microprocessors can understand them. But our electronic devices which run on microcontrollers and microprocessors cannot read/interpret these analog values directly since they run only on 0’s and 1’s. The world has always been analog in nature, for instance everything that we humans feel and experience like speed, temperature, air velocity, sunlight, sound etc are analog in nature. In today’s digital age we are all surrounded by the advanced digital electronic devices, this might deceive us to think that everything around us is digital in nature, which is not true. Then slowly the landline phones were replaced by modern mobile phones, CRT Televisions and monitors were replaced by LED displays, computers with vacuum tubes evolved to be more powerful with microprocessors and microcontrollers inside them and so on.
![adc analog to digital converter adc analog to digital converter](https://www.beis.de/Elektronik/ADDA24QS/Images/ADDA24QS_Enclosure_Rear_1280.jpg)
![adc analog to digital converter adc analog to digital converter](https://5.imimg.com/data5/SELLER/Default/2020/10/VB/TB/YM/59387089/ads1115-16-bit-i2c-adc-analog-to-digital-converter-500x500.jpg)
The Analog world with digital Electronicsįew years back the entire electronics devices that we use today like phones, computers, Televisions etc were analog in nature.