-------------------------
📌Introduction
-------------------------
This Arduino project shows how to build a simple thermometer using LM35 analog temperature sensor.
In this project ST7735 TFT screen is used to display environment temperature in degree Celsius, Kelvin and degree Fahrenheit.
The ST7735 TFT is a color display which has a resolution of 128×160 pixel and it communicates with the master device using SPI (Serial Peripheral Interface) protocol.
The LM35 temperature sensor is a three pin device (VCC, OUT and GND) with an output voltage linearly related to Centigrade temperature. Since the LM35 output varies with dependent to the temperature, we need an ADC (Analog-to-Digital Converter) module to measure this voltage. Arduino UNO microcontroller (Microchip ATmega328P) has one ADC module with 10-bit resolution.
The LM35 output has linear +10mV/°C scale factor means the following:
If the output voltage = 10mV — temperature = 1°C
If the output voltage = 100mV — temperature = 10°C
If the output voltage = 200mV — temperature = 20°C
If the output voltage = 370mV — temperature = 37°C
and so on.
-------------------------
📌 LM35 Futures (from datasheet)
-------------------------
1. Calibrated Directly in ° Celsius (Centigrade)
2. Linear + 10 mV/°C Scale Factor
3. 0.5°C Ensured Accuracy (at +25°C)
4. Rated for Full −55°C to +150°C Range
5. Suitable for Remote Applications
6. Low Cost Due to Wafer-Level Trimming
7. Operates from 4 to 30 V
8. Less than 60-μA Current Drain
9. Low Self-Heating, 0.08°C in Still Air
10. Nonlinearity Only ±¼°C Typical
11. Low Impedance Output, 0.1 Ω for 1 mA Load
The ADC module converts analog data into digital data. The ATmega328P MCU has a 10-bit ADC module and a built-in reference voltage of 1.1V. Using the reference voltage should give better results.
-------------------------
📌 Circuit
-------------------------
The ST7735S shown in project circuit diagram has 8 pins: (from right to left): RST (reset), CE (chip enable), DC (or D/C: data/command), DIN (data in), CLK (clock), VCC (5V or 3.3V), BL (back light) and Gnd (ground).
Normally the ST7735 display works with 3.3V only, but many boards of this display have a built-in 3.3V regulator (AMS1117 3V3) like the one shown in the circuit diagram. This regulator supplies the display controller with 3.3V from 5V source.
All Arduino UNO board output pins are 5V, connecting a 5V pin directly to the ST7735 display board may damage its controller circuit. To avoid that, I connected each control line of the display to the Arduino board through 1k ohm resistor.
So, the ST7735 display is connected to the Arduino board as follows ,
RST pin is connected to Arduino digital pin 8
CS pin is connected to Arduino digital pin 9
D/C pin is connected to Arduino digital pin 10
DIN pin is connected to Arduino digital pin 11
CLK pin is connected to Arduino digital pin 13
-------------------------
📌 Tags
-------------------------
#arduino #lm35 #TFT_Display
-------------------------
📌 The Code
-------------------------
Given In Comment Section
The following Arduino code requires 2 libraries from Adafruit Industries:
1. The first library : Adafruit ST7735 display library
2. The 2nd library : Adafruit graphics library
After the download, go to Arduino IDE\Sketch\Include Library \Add .ZIP Library … and browse for the .zip file
📌 Tune With us so you never miss any update
-------------------------------------------------------------------------------------------------------------------------------------------------------------
🏷️Telegram : https://t.me/electronicsdeveloper
🏷️Facebook : / electronicsdeveloper
🏷️Instagram : / electronics_developer
🏷️Tweeter : https://twitter.com/Electronics_Dev?s=09
🏷️LinkedIn : / electronics-with-shreyash
🏷️Pinterest : / electronics_developer
Copyright Disclaimer under Section 107 of the copyright act 1976
--------------------------------------------------------------------------------------------------------------------------------------------------------------
Copyright Disclaimer under Section 107 of the copyright act 1976, allowance is made for fair use for purposes such as criticism, comment, news reporting, scholarship, and research. Fair use is a use permitted by copyright statute that might otherwise be infringing. Non-profit, educational or personal use tips the balance in favour of fair use.
---------------------------------------------------------------------------------------------------------------------------------------------------------------
About Electronics Developer : YouTube certified creative essentials and asset monetization
---------------------------------------------------------------------------------------------------------------------------------------------------------------