Title: Interfacing of Digital Humidity & Temperature Sensor (DHT-11) with Arduino MUC
Objectives:
• Identification of various pins for interfacing DHT-11 Sensor.
• Reading and Recording the values of Humidity and Temperature in Realtime using
Arduino.
• Demonstration of Functioning of Arduino Uno board as MCU for taking various
signals from BMS of Electric Vehicle.
Theory:
The Arduino Uno is an open-source microcontroller board based on
the Microchip ATmega328P microcontroller (MCU) and developed by [Link] and
initially released in 2010. The microcontroller board is equipped with sets of digital and
analog input/output (I/O) pins that may be interfaced to various expansion boards (shields) and
other circuits. The board has 14 digital I/O pins (six capable of PWM output), 6 analog I/O
pins, and is programmable with the Arduino IDE (Integrated Development Environment), via
a type B USB cable. It can be powered by a USB cable or a barrel connector that accepts
voltages between 7 and 20 volts, such as a rectangular 9-volt battery. It has the same
microcontroller as the Arduino Nano board, and the same headers as the Leonardo board. The
hardware reference design is distributed under a Creative Commons Attribution Share-Alike
2.5 license and is available on the Arduino website. Layout and production files for some
versions of the hardware are also available.
The word "uno" means "one" in Italian and was chosen to mark a major redesign of the Arduino
hardware and software. The Uno board was the successor of the Duemilanove release and was
the 9th version in a series of USB-based Arduino boards.[8] Version 1.0 of the Arduino IDE for
the Arduino Uno board has now evolved to newer releases.[4] The ATmega328 on the board
comes preprogrammed with a bootloader that allows uploading new code to it without the use
of an external hardware programmer.
While the Uno communicates using the original STK500 protocol, it differs from all preceding
boards in that it does not use a FTDI USB-to-UART serial chip. Instead, it uses the
Atmega16U2 (Atmega8U2 up to version R2) programmed as a USB-to-serial converter.
Technical specifications[edit]
Arduino Uno R3 board with ATmega328P MCU in DIP-28 package
Uno R1 to R3
• Microcontroller (MCU):
• IC: Microchip ATmega328P (8-bit AVR core)
• Clock Speed: 16 MHz on Uno board, though IC is capable of 20 MHz
maximum at 5 Volts
• Flash Memory: 32 KB, of which 0.5 KB used by the bootloader
• SRAM: 2 KB
• EEPROM: 1 KB
• USART peripherals: 1 (Arduino software default configures USART as a
8N1 UART)
• SPI peripherals: 1
• I²C peripherals: 1
• Operating Voltage: 5 Volts
• Digital I/O Pins: 14
• PWM Pins: 6 (Pin # 3, 5, 6, 9, 10 and 11)
• Analog Input Pins: 6
• DC Current per I/O Pin: 20 mA
• DC Current for 3.3V Pin: 50 mA
• Size: 68.6 mm x 53.4 mm
• Weight: 25 g
• ICSP Header: Yes
• Power Sources:
• USB connector. USB bus specification has a voltage range of 4.75 to 5.25
volts. The official Uno boards have a USB-B connector, but 3rd party
boards may have a miniUSB / microUSB / USB-C connector.
• 5.5mm/2.1mm barrel jack connector. Official Uno boards support 6 to 20
volts, though 7 to 12 volts is recommended. The maximum voltage for 3rd
party Uno boards varies between board manufactures because various
voltage regulators are used, each having a different maximum input rating.
Power into this connector is routed through a series diode before connecting
to VIN to protect against accidental reverse voltage situations.
• VIN pin on shield header. It has a similar voltage range of the barrel jack.
Since this pin doesn't have reverse voltage protection, power can be injected
or pulled from this pin. When supplying power into VIN pin, an external
series diode is required in case barrel jack is used. When board is powered
by barrel jack, power can be pulled out of this pin.
General pin functions
• LED: There is a built-in LED driven by digital pin 13. When the pin is high
value, the LED is on, when the pin is low, it is off.
• VIN: The input voltage to the Arduino/Genuino board when it is using an external
power source (as opposed to 5 volts from the USB connection or other regulated
power source). You can supply voltage through this pin, or, if supplying voltage
via the power jack, access it through this pin.
• 5V: This pin outputs a regulated 5V from the regulator on the board. The board
can be supplied with power either from the DC power jack (7 - 20V), the USB
connector (5V), or the VIN pin of the board (7-20V). Supplying voltage via the
5V or 3.3V pins bypasses the regulator, and can damage the board.
• 3V3: A 3.3 volt supply generated by the on-board regulator. Maximum current
draw is 50 mA.
• GND: Ground pins.
• IOREF: This pin on the Arduino/Genuino board provides the voltage reference
with which the microcontroller operates. A properly configured shield can read
the IOREF pin voltage and select the appropriate power source, or enable voltage
translators on the outputs to work with the 5V or 3.3V.
• Reset: Typically used to add a reset button to shields that block the one on the
board.
• Communication
• The Arduino/Genuino Uno has a number of facilities for communicating with a
computer, another Arduino/Genuino board, or other microcontrollers. The ATmega328
provides UART TTL (5V) serial communication, which is available on digital pins 0
(RX) and 1 (TX). An ATmega16U2 on the board channels this serial communication
over USB and appears as a virtual com port to software on the computer. The 16U2
firmware uses the standard USB COM drivers, and no external driver is needed.
However, on Windows, a .inf file is required. Arduino Software (IDE) includes a serial
monitor which allows simple textual data to be sent to and from the board. The RX and
TX LEDs on the board will flash when data is being transmitted via the USB-to-serial
chip and USB connection to the computer (but not for serial communication on pins 0
and 1). A SoftwareSerial library allows serial communication on any of the Uno's
digital pins.
DHT11 Sensor and Its Working
Humidity is the measure of water vapour present in the air. The level of humidity in air affects
various physical, chemical and biological processes. In industrial applications, humidity can
affect the business cost of the products, health and safety of the employees. So,
in semiconductor industries and control system industries measurement of humidity is very
important. Humidity measurement determines the amount of moisture present in the gas that
can be a mixture of water vapour, nitrogen, argon or pure gas etc… Humidity sensors are of
two types based on their measurement units. They are a relative humidity sensor and Absolute
humidity sensor. DHT11 is a digital temperature and humidity sensor.
DHT11 is a low-cost digital sensor for sensing temperature and humidity. This sensor can be
easily interfaced with any micro-controller such as Arduino, Raspberry Pi etc… to measure
humidity and temperature instantaneously.
DHT11 humidity and temperature sensor is available as a sensor and as a module. The
difference between this sensor and module is the pull-up resistor and a power-on LED. DHT11
is a relative humidity sensor. To measure the surrounding air this sensor uses a thermistor and
a capacitive humidity sensor.
Working Principle of DHT11 Sensor
DHT11 sensor consists of a capacitive humidity sensing element and a thermistor for sensing
temperature. The humidity sensing capacitor has two electrodes with a moisture holding
substrate as a dielectric between them. Change in the capacitance value occurs with the change
in humidity levels. The IC measure, process this changed resistance values and change them
into digital form.
For measuring temperature this sensor uses a Negative Temperature coefficient thermistor,
which causes a decrease in its resistance value with increase in temperature. To get larger
resistance value even for the smallest change in temperature, this sensor is usually made up of
semiconductor ceramics or polymers.
The temperature range of DHT11 is from 0 to 50 degree Celsius with a 2-degree accuracy.
Humidity range of this sensor is from 20 to 80% with 5% accuracy. The sampling rate of this
sensor is 1Hz .i.e. it gives one reading for every second. DHT11 is small in size with operating
voltage from 3 to 5 volts. The maximum current used while measuring is 2.5mA.
DHT11 sensor has four pins- VCC, GND, Data Pin and a not connected pin. A pull-up resistor
of 5k to 10k ohms is provided for communication between sensor and micro-controller.
Applications
This sensor is used in various applications such as measuring humidity and temperature values
in heating, ventilation and air conditioning systems. Weather stations also use these sensors to
predict weather conditions. The humidity sensor is used as a preventive measure in homes
where people are affected by humidity. Offices, cars, museums, greenhouses and industries
use this sensor for measuring humidity values and as a safety measure.
It’s compact size and sampling rate made this sensor popular among hobbyists. Some of the
sensors which can be used as an alternative to DHT11 sensor are DHT22, AM2302, SHT71.
Which of the specification of the DHT11 sensor was helpful for your application?
Conclusion: