Arduino Et AM35
Arduino Et AM35
Arduino Et AM35
Scientifique
TP01: Resume of
ARDUINO &
Sensor(LM35)
STUDENT: CHENAFI
MUHAMMED SIEF EL ISLAM
PROFESSEUR: R.SAADI
3 ème année Licence Electromécanique
2023/2022
Contents
INTRODUCTION :..................................................................................1
ARDUINO UNO :....................................................................................
SENSORS LM35:................................................................................9
CONCLUSION:....................................................................................19
RESSOURCES:.........................................................................................
2
INTRODUCTION :
:
2
ARDUINO UNO
is a : microcontroller board based on the
ATmega328P,It has: 14 digital input/output pins (of which 6 can be used
as PWM outputs), 6 analog inputs, a 16 MHz ceramic resonator, a USB
connection, a power jack, an ICSP header and a reset button.
Bord components:
2
1. Microcontroller - this is the brain of an Arduino and is the
component that we load programs into. Think of it as a tiny
computer, designed to execute only a specific number of
things.
2
6. 5V / 3.3V pins- these pins are used to power external
components.
8. VIN - stands for Voltage In, where you can connect external
power supplies.
2
Interfacing LM35 Temperature Sensor with
Arduino:
2
output that is linearly proportional to the temperature in °C and is,
therefore, very easy to use with an Arduino.
The LM35 temperature sensor is fairly precise, never wears out, works
under many environmental conditions and requires no external
components to work. In addition, the LM35 sensor 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).
Here are the complete specifications:
Power supply 4V to 30V
Current draw 60µA
Temperature range −55°C to +155°C
Accuracy ±0.5°C
Output scale factor 10mV/°C
Output at 25°C 250mV
2
The LM35 uses a solid-state technique to measure the temperature. It
makes use of the fact that the voltage drop between the base and
emitter (forward voltage – Vbe) of the Diode-connected transistor
decreases at a known rate as the temperature increases. By precisely
amplifying this voltage change, it is easy to generate an analog signal
that is directly proportional to temperature.
How to Measure Temperature:
The LM35 is easy to use; just 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.
Testing the LM35 Sensor:
Testing the LM35 is pretty easy, just connect the left pin to 4V to 30V power
supply (Four AA batteries work great) and the right pin to ground (assuming the
flat side of the sensor is facing you). Now connect your multimeter in DC voltage
mode to ground and the middle pin. At the room temperature (25°C), the voltage
should be about 0.25V.
Try squeezing the plastic case of the sensor gently to see a rise in temperature.
try squeezing lm35 to see rise in temperature.
2
LM35 Sensor Pinout
The LM35 comes in three different form factors, but the most common type is the
3-pin TO-92 package, which looks just like a transistor. Let’s take a look at its
pinout.
Vout pin produces an analog voltage that is directly proportional (linear) to the
temperature. It should be connected to an Analog (ADC) input.
2
Connecting the LM35 Temperature Sensor to an Arduino:
Hooking up the LM35 to an Arduino is super simple. You only need to connect
three pins: two for power and one for reading the sensor value.
The sensor can be powered from 5V. 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.
To measure air temperature leave the sensor in the open air or attach it to an
object you want to measure the temperature of, such as a heat sink.
-The following diagram shows you how to wire everything :
2
There is no capacit but it is there this figue incorrect.
ARDUINO PROGRAMMING
1-Language is:
C++, It was chosen because it is the language closest to the machine, in
addition to providing the machine with the most important features of
programming languages such as object-oriented programming. functional
programming, in addition to the ease of learning and many other
features.
Arduino programming language can be divided in three main parts:
functions, values (variables and constants), and structure
2- Arduino sketch basics (The structure of an Arduino sketch):
Header scoop:
for declaring a variables, functions, including libraries ..
etc.
2
Setup scoop: for setting up the Arduino board to determine
the inputs and outputs, in addition to how to deal with them
or to running and initializing software libraries, in addition
to how to communicate with the computer.
Loop scoop: To deal with sensors and electronic circuits
and implement commands on them.
There are two special functions that are a part of every Arduino
sketch: setup() and loop().
The setup() is called once, when the sketch starts. It's a good place
to do setup tasks like setting pin modes or initializing libraries.
The loop() function is called over and over and is heart of most
sketches.
You need to include both functions in your sketch, even if you don't
need them for anything.
2
3-Content of arduino sketch:
2
Arduino IDE: is an open-source software, designed by Arduino.cc
and mainly used for writing, compiling & uploading code to almost
all Arduino Modules.
2
FUNCTIONS:
2
Variabels
Structure
2
CONCLUSION:
2
RESSOURCES:
- Debug Club- DBC Arduino.pptx of monsafe kaha
- https://docs.arduino.cc/learn/starting-guide/getting-started-
arduino
- https://www.arduiplanet.ma/comparatif-des-differentes-
cartes-arduino/
- https://store.arduino.cc/products/arduino-mega-2560-rev3
- https://rootsaid.com/arduino-temperature-sensor/
- https://lastminuteengineers.com/lm35-temperature-sensor-
arduino-tutorial/