0% found this document useful (0 votes)
5 views5 pages

Task 4

The document outlines a task involving an Arduino Uno that reads analog data from a potentiometer to control an LED's brightness and display the corresponding temperature using an LM35 temperature sensor. It details the components needed, including the Arduino board, LED, potentiometer, and jumper wires, as well as the LM35 sensor's specifications and connection instructions. The temperature is calculated using a simple formula based on the sensor's output voltage.

Uploaded by

Hoda Hisham
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views5 pages

Task 4

The document outlines a task involving an Arduino Uno that reads analog data from a potentiometer to control an LED's brightness and display the corresponding temperature using an LM35 temperature sensor. It details the components needed, including the Arduino board, LED, potentiometer, and jumper wires, as well as the LM35 sensor's specifications and connection instructions. The temperature is calculated using a simple formula based on the sensor's output voltage.

Uploaded by

Hoda Hisham
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Task #4 (PWM)

Objective:
Read Analog Sensor Data: The code reads analog data from a variable resistor
connected to pin A1 of the Arduino Uno. This data is used to determine the
brightness level of an LED, and display the read value, the output voltage to the
led and the corresponding temperature.
Components:
1. Arduino Board.
2. 1LED
3. Potentiometer.
4. Resistor (220 Ohm).
5. Breadboard.
6. Jumper Wires: These are thin wires for connecting the components on the
breadboard.

Circuit diagram
Code
Screenshot from the task
LM35 Temperature Sensor
The LM35 is a low voltage, precision centigrade temperature sensor. It is a chip
that provides a voltage output that is linearly proportional to the temperature in
°C. It does not require calibration and provides a typical accuracy of ±0.5°C at
room temperature and ±1°C over a full −55°C to +155°C temperature range.
The sensor can be powered with a 4V to 30V power supply and consumes less
than 60µA during active temperature conversions, providing very low self-heating
(less than 0.08°C in still air).
How to Measure Temperature
Connect the left pin to power (4V to 30V) and the right pin to ground (assuming the flat
side of the sensor is facing you). Then the middle pin will have an analog voltage that is
directly proportional (linear) to the temperature in °C. This can be easily seen in the
output voltage vs temperature characteristic. Note that the analog output voltage is
independent of the power supply.

To convert the voltage to temperature, simply use the basic formula:

Temperature (°C) = Vout * 100

Connecting the LM35 Temperature Sensor to an


Arduino

The positive voltage connects to ‘+Vs’ and ground connects to ‘GND‘. The
middle pin ‘Vout’ is the analog signal output from the sensor and connects to
the A0 analog input of an Arduino.

You might also like