Interfacing ADC in Arduino Uno
by hIOTron IoT in Circuits > Arduino
6 Views, 0 Favorites, 0 Comments
Interfacing ADC in Arduino Uno
Arduino board has six ADC channels. Out of those any one or all of them can be utilized as inputs for analog voltage.
Supplies
Hardware Components
Arduino UNO
Power Supply 5V/3.3V
LCD - 16x2
Capacitor 100 µF
Single Turn Potentiometer- 100k ohms
Capacitor 100 µF
Software Components
Arduino IDE
Working of Project
Interfacing LCD with Arduino UNO, we should learn about few things
analogRead(pin);analogReference();analogReadResolution(bits);Here we can provide a maximum input voltage of 5V for ADC conversion at any input channel. As some sensors give voltages from 0-2.5V, with a 5V reference hence we gain minor accuracy. By default, we obtain the maximum board ADC resolution which is near about 10bits.
Now if the above conditions are adjusted to default, we can read the value from ADC of channel ‘0’ by straightly calling the function “analogRead(pin);”, here “pin” appears pin where we connected analog signal. First, we require to allow the header file (‘#include ’), this header file has instructions written in it, which allows the user to connect to an LCD to UNO in 4-bit mode.
Second, we require to tell the board which type of LCD we are utilizing here. Once done with all procedures, all there is remain is to transfer data, the data which requires to be displayed in LCD should be written as “ cd.print("Hello, world!");”.