NED University of Engineering and Technology
Department of Electrical Engineering
EMBEDDED
SYSTEMS
EE-354
SECTION: D
COMPLEX ENGINEERING PROBLEM
PRELIMINARY REPORT
GROUP MEMBERS:
Mawra khan (EE-139)
Wania Imtiaz (EE-141)
Usman Ali (EE-163) Submitted to:
Aman ul Haq (EE-169) Miss Aiman Najeeb
Complex Engineering Problem for Embedded Systems (EE-354)
1. Project Title:
To plan, assess, and manage the design and synthesis of a Temperature - Humidity measurement system
utilizing ATmega328P microcontroller, suitable sensor(s), and peripherals / components for measurement
and display interface.
2. Abstract:
This project involves the design and development of a temperature and humidity measurement system
based on the ATmega328P microcontroller. The system integrates an SHT21 sensor, which communicates
with the microcontroller using the I2C protocol for precise temperature and humidity readings. The
acquired data is processed and displayed in real time on an OLED screen, ensuring clear and immediate
feedback for users. Key components of the system include the ATmega328P microcontroller, SHT21 sensor,
OLED display, and power management circuitry. The design prioritizes accurate data acquisition, efficient
processing, and reliable display updates. Additionally, considerations for power efficiency, error handling,
and sensor calibration are incorporated to enhance system reliability. This system is suitable for applications
such as environmental monitoring and home automation. Future enhancements may include data logging
and wireless communication capabilities for remote monitoring. The project aims to provide an efficient,
cost-effective, and user-friendly solution for real-time temperature and humidity measurement.
3. Task Identification
3.1 Literature Review
❖ METHODS OF TEMPERATURE AND HUMIDITY MEASUREMENT:
1. Methods of Temperature and Humidity Measurement:
Temperature and humidity are measured using different sensing techniques. These methods vary in working
principles, accuracy, and response time.
1.1 Temperature Measurement Methods:
● Thermocouples: Generate voltage based on temperature difference; used in high-temperature
applications.
● Resistance Temperature Detectors (RTDs): Measure temperature by varying resistance; highly
accurate but expensive.
● Semiconductor Sensors: Use integrated circuits (ICs) for temperature sensing; common in
embedded systems (e.g., LM35).
1.2 Humidity Measurement Methods:
● Capacitive Sensors: Measure humidity by detecting changes in capacitance (e.g., DHT11, DHT22).
● Resistive Sensors: Detect changes in resistance due to moisture absorption.
● Thermal Conductivity Sensors: Measure humidity by comparing heat conduction between dry and
moist air.
Not all capacitive and resistive sensors are exclusively for humidity measurement; some, like the SHT21 and
HTU21D, incorporate both temperature and humidity sensing within a single module for accurate environmental
monitoring.
2. Overview of Commonly Used Sensors:
Sensor Type Accuracy Response Time Digital/Analog
DHT11 Capacitive ±5% RH, ±2°C 1s Digital
SHT21 Capacitive ±0.3°C, ±2% RH 8s Digital
SHT31 Capacitive ±2% RH, ±0.3°C <1s Digital
LM35 Semiconductor ±0.5°C 1s Analog
3. Comparison of Sensor Technologies:
Feature Capacitive sensors Resistive Sensors Thermal Conductivity Sensors
Accuracy High Moderate Low
Response Time Fast Moderate Very Fast
Cost Moderate High Low
Stability Excellent Moderate Low
Calibration Required Yes Yes Minimal
4. Comparison of Analog and Digital Sensors:
4.1 Analog Sensors:
● Provide continuous voltage or current output.
● Require ADC (Analog-to-Digital Conversion) for microcontroller integration.
● More susceptible to noise and calibration drift.
4.2 Digital Sensors:
● Output data in digital format via I2C, SPI, or proprietary protocols.
● More accurate and resistant to signal interference.
● Easier to interface with microcontrollers like ATmega328P.
❖ DISPLAY AND DATA LOGGING METHODS FOR MEASUREMENTS:
1. Display Technologies:
● LCD (Liquid Crystal Display): 16x2 or 20x4 LCD modules are commonly used.
● OLED (Organic Light Emitting Diode): Better contrast, requires more power.
● 7-Segment Display: Simple but limited to numeric values.
2. Data Logging Methods:
● EEPROM (Electrically Erasable Programmable Read-Only Memory): Stores small amounts of data in
microcontrollers.
● SD Card Module: Used for storing large datasets.
● Cloud-Based Logging: Uses IOT platforms (e.g., Firebase, Thing Speak) for remote access.
❖ INTERFACING SENSORS FOR MICROCONTROLLERS WITH EMBEDDED SYSTEMS:
1. Communication Protocols:
Protocol Type Advantages Disadvantages
I2C Serial Supports multiple devices, simple wiring Slower than SPI
SPI Serial Fast data transfer, used in displays & SD Requires more wires
cards
UART Serial Simple and widely used Point-to-point only
Analog (ADC-based) Direct Continuous signal reading Prone_to_noise interference
2. Sensor-Microcontroller Integration:
● Digital Sensors (DHT11, DHT22): Use one-wire communication (easy to interface).
● Analog Sensors (LM35): Require ADC (Analog-to-Digital Conversion).
● I2C Sensors (SHT31): Communicate via I2C, allowing multiple sensors on the same bus.
3.2 List of Tasks needed to be completed to fulfill the Problem Statement requirements
1. Interfacing Temperature and Humidity Sensor with ATmega328P:
● Select a suitable sensor (e.g., DHT11, DHT22, and SHT21).
● Connect the sensor to the ATmega328P and write code to read temperature and humidity data.
● Verify the accuracy and response time of the sensor.
● Outcome: Sensor successfully reads and displays temperature & humidity values.
2. Interfacing OLED/LCD Display for Real-Time Data Visualization:
● Choose an appropriate display module (e.g., 16x2 LCD, OLED, 7-segment display).
● Connect the display to the ATmega328P using I2C/SPI/parallel communication.
● Write code to format and display sensor data in a readable format.
● Outcome: Real-time temperature and humidity values are displayed correctly.
3. Implementing Data Logging to EEPROM/SD Card:
● Integrate an EEPROM or SD card module for storing temperature-humidity readings.
● Write code to log sensor data at regular intervals.
● Verify data retrieval and integrity from storage.
● Outcome: Data is stored and can be retrieved for analysis.
4. Adding Push Button Interface for Menu Navigation:
● Connect push buttons to ATmega328P for user interaction.
● Develop a simple menu system for settings, log retrieval, and display options.
● Test menu navigation and responsiveness.
● Outcome: User can navigate different options using buttons.
5. Power Management and System Optimization:
● Choose an appropriate power source (battery, adapter, or USB).
● Implement power-saving techniques (e.g., sleep mode, efficient display usage).
● Measure and optimize system power consumption.
● Outcome: The system operates efficiently with minimal power consumption.
4. Resource Identification
Human Resource (Project Team)
S.No. Name Roll No. Section
1 Wania Imtiaz* EE-22141 D
2 Mawra Khan EE-22139 D
3 Aman Ul Haq EE-22169 D
4 Syed Usman Ali EE-22163 D
Hardware Resource Identification
S. No. Hardware Component/Equipment Name Where/How to acquire
1 Microcontroller ATmega328P Sir Syed Electronics
2 SHT-21 Daraz
3 LCD Sir Syed Electronics
4 Battery Sir Syed Electronics
5 Varo board Sir Syed Electronics
6 Jumper wires Sir Syed Electronics
7 Capacitors Sir Syed Electronics
8 Resistors Sir Syed Electronics
Software Resource Identification
S. No. Software Name Where/How to acquire
1 EasyADA https://easyeda.com/
2 Multisim https://www.ni.com/en/support/downloads/software-
products/download.multisim.html?srsltid=AfmBOoqULf
0CnM1IeYqBbzEujHkNmdLfEe-
dHKwiVP3xxYI1DOeSWcTg
3 Code blocks https://www.codeblocks.org/downloads/
4 Tinker cad https://www.tinkercad.com/
5. Project Objective Statement
The objective of this project is to design, develop, and implement a Temperature-Humidity Measurement System
using the ATmega328P microcontroller. The system will integrate a suitable temperature-humidity sensor to
accurately measure environmental conditions and display the real-time data on an OLED/LCD screen. Additionally, it
will include data logging capabilities using an EEPROM or SD card for record-keeping and analysis.
6. Project Deliverables
❖ Tangible Outcomes of the Project:
1. Fully Functional Temperature-Humidity Measurement System:
● A working prototype featuring an ATmega328P microcontroller, a temperature-humidity sensor (e.g.,
DHT22, SHT31), and a display module (OLED/LCD) for real-time monitoring.
● The system will accurately measure and display environmental data, ensuring reliable performance
during the final evaluation.
2. Embedded Software (Firmware) with User Interaction Features:
● Fully developed and tested firmware code that enables sensor data acquisition, display updates, and
user interaction via push buttons/menu navigation.
● The software will include data logging features, storing temperature-humidity records on an EEPROM
or SD card for future analysis.
3. Project Documentation & Technical Report:
● A detailed project report covering system design, hardware components, software implementation,
circuit schematics, and test results.
● Circuit diagrams, block diagrams, and PCB design (if applicable) to illustrate the system’s architecture.
● Analysis of system performance, accuracy, and possible improvements for future iterations.
7. Resource Allocation and Time Scheduling
Hardware/Software Resource Allocation
CHART FOR RESOURCE ALLOCATION:
Time Scheduling
Gantt Chart:
8. Budgeting and Bill Of Materials (BOM)
Estimated BOM
S.No. Equipment/Component Name Estimated Cost (PKR)
1 Microcontroller ATmega328P 1500
2 SHT21 700
3 LCD 200
4 Battery 150
5 Varo board 250
6 Jumper wires 300
7 Capacitor and resistors 300
Total Cost: 3400
Budget Funding
The project will be entirely funded by team members, with each member contributing a set amount to
cover necessary expenses. The total budget will be divided among all team members based on agreed
contributions, ensuring that costs for hardware, software, and other resources are evenly distributed.
Regular financial tracking will be maintained to manage expenses efficiently and avoid any shortfalls. If
needed, additional contributions may be collected as the project progresses.
9. Risk Assessment
Risk Assessment
To ensure project success, we have identified key risks across different categories:
● Technical Risks: Hardware failures, software bugs, and data loss could disrupt progress. Regular
system checks and backups will mitigate these risks.
● Operational Risks: Team member unavailability or miscommunication may cause delays. Clear
communication and balanced workload distribution will help manage this.
● Schedule-Related Risks: Delays in skill-building or unexpected personal commitments could affect
timelines. Buffer periods and progress tracking will be implemented.
● External Risks: Power outages, internet issues, or changing requirements may impact the project.
Backup solutions and adaptability will help minimize disruptions.
Mitigation strategies include regular testing, effective communication, contingency planning, and backup
resources to ensure smooth execution.
10. References
ChatGPT:
OpenAI. (2025). Response on complex engineering problems for embedded systems [Large language model].
Retrieved February 9, 2025, from https://openai.com
Youtube:
Tech Trends Shameer. (2021). Temperature Display in OLED | Arduino Projects [Video]. YouTube.
https://youtu.be/QhOcyZ5bziE
SurtrTech. (2020, March 16). SHT-21 HTU-21 measure temperature and humidity with Arduino OLED LCD. SurtrTech.
https://surtrtech.com/2020/03/16/sht-21-htu-21-measure-temperature-and-himidity-with-arduino-oled-lcd/
Soldered. (n.d.). SHT21 & SHT20 temperature and humidity sensor – guide and tutorial. Soldered.
https://soldered.com/learn/hum-sht21-sht20-temperature-and-humidity-sensor/
Submission at the time of Evaluation
1) Original source file for Gantt Chart
2) Partial/complete set of equipment bought for the project
Extent of Achievement
Skill(s) to be assessed
50% 65% 80% 100%
Resource identification and Unable to Partial Partial identification or Complete
allocation identify and identification and Partial allocation identification and
allocate allocation allocation
Task identification and Unable to Partial Partial identification or Complete
scheduling identify and identification and Poor scheduling identification and
schedule poor scheduling proper scheduling
Bill of Materials (BOM) and No BOM and Incomplete BOM Complete BOM and Complete BOM and
budgeting budgeting and budgeting budgeting with errors budgeting with no
errors
Risk assessment and Unable to Identifies risks Partial risk identification Comprehensive risk
management identify risks correctly but and partial mitigation plan assessment and
and unable to unable to propose proposed mitigation plan
propose mitigation plan presented
mitigation plan