Professional Documents
Culture Documents
analog signal into digital form which could be understood by a digital device
The list of possible analog input signals is endless such as s light, temperature,
speed, pressure etc.
ADC effectively measures the analog input voltage and gives a binary output
number proportional to its size.
ADC types: Successive Approximation, Dual slope, delta-sigma, flash type etc.,
On the Arduino board, these pins have an ‘A’ in front of their label (A0 to A5)
to indicate these pins can read analog voltage
The ADC on the Arduino is a 10-bit ADC meaning it has the ability to detect
1,024 (2^10) discrete analog levels.
Where, D the digital output value, Vi is the input voltage, Vr the reference voltage, n no. of bits in the output
The output binary number D is an integer, for an n-bit number can take any
value from 0 to (2n - 1).
DAY-3 Arduino Programming Workshop 4
Control speed of the DC motor using Potentiometer
Write a program for controlling the speed of the DC motor by varying the
potentiometer connected to one of the analog pin. Simulate and verify this logic on
Arduino Uno using Tinkercad circuits simulator.
API Required:
analogRead(pin) - Reads the value from a specified analog pin with a 10-bit resolution
The sensor measures the small change and outputs an analog voltage
between 0 and 1.75V DC based on it.
To get the temperature, read the output analog voltage and apply simple
math formula to turn it into a number that represents temperature.
https://bc-robotics.com/tutorials/using-a-tmp36-temperature-sensor-with-arduino/
DAY-3 Arduino Programming Workshop 7
Read the temperature value and print its value on serial window
Write a program to read the temperature value from TMP36 temperature
sensor connected to one of the analog pin and print its Fahrenheit and Celsius
value on serial window. Simulate and verify this logic on Arduino Uno using
Tinkercad circuits simulator.