0% found this document useful (0 votes)
13 views

SMART HOME REPORT - Google Docs

Uploaded by

azwaparzon
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)
13 views

SMART HOME REPORT - Google Docs

Uploaded by

azwaparzon
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/ 16

‭COLLEGE OF ENGINEERING‬

‭UNIVERSITI TEKNOLOGI MARA (UiTM)‬

‭MAIN CAMPUS SHAH ALAM‬

‭MINI PROJECT REPORT‬

‭SEMI SMART HOME‬

‭COURSE‬ ‭: INSTRUMENTAL AND MEASUREMENT‬

‭COURSE CODE‬ ‭: MEK576‬

‭DATE OF SUBMISSION‬ ‭: 3 JULY 2024‬

‭PREPARED FOR‬ ‭:‬‭PN NORHAFLYZA BINTI MARBUKHARI‬

‭PREPARED BY:‬

‭NO‬ ‭STUDENT NAME‬ ‭STUDENT ID‬ ‭GROUP‬

‭1‬ ‭NURUL FARAH AZWA BINTI PARZON‬ ‭2022604168‬ ‭EMK4M1A‬

‭2‬ ‭ADRIANA BINTI HISHAMUDIN‬ ‭2022856028‬ ‭EMK4M1A‬

‭3‬ ‭FATIN NORAISHAH BINTI AHMAD NAZZARAN‬ ‭2022470272‬ ‭EMK4M1A‬

‭4‬ ‭CAHAYA ATHIRAH BINTI MOHAMMAD TAUFIK‬ ‭2022619154‬ ‭EMK4M1A‬


‭TABLE OF CONTENTS‬

1‭ . INTRODUCTION‬ ‭‬
2
‭2. PROBLEM STATEMENT‬ ‭2‬
‭3. OBJECTIVES‬ ‭3‬
‭4. PROJECT METHODOLOGY & PLANNING‬ ‭4‬
‭5. RESULTS‬ ‭5‬
‭6. DISCUSSION‬ ‭7‬
‭7. CONCLUSION‬ ‭7‬
‭8. APPLICATION OF KNOWLEDGE AND SKILLS‬ ‭8‬
‭I. APPENDICES‬ ‭9‬

‭1‬
‭1.‬ ‭INTRODUCTION‬

‭ he‬ ‭semi-smart‬ ‭home‬‭setup‬‭leverages‬‭basic‬‭IoT‬‭gadgets‬‭to‬‭essentially‬‭improve‬‭comfort,‬


T
‭security,‬ ‭and‬ ‭natural‬ ‭observing‬ ‭inside‬ ‭a‬ ‭household.‬ ‭Central‬ ‭to‬ ‭this‬ ‭system‬ ‭is‬ ‭the‬ ‭ESP32‬
‭microcontroller,‬ ‭an‬ ‭effective‬ ‭and‬ ‭flexible‬ ‭component‬ ‭mindful‬ ‭for‬ ‭overseeing‬ ‭information‬
‭processing‬‭and‬‭communication‬‭by‬‭means‬‭of‬‭Wi-Fi.‬‭This‬‭microcontroller‬‭shapes‬‭the‬‭backbone‬‭of‬
‭an‬ ‭organization‬ ‭that‬ ‭integrates‬ ‭different‬ ‭sensors‬ ‭and‬ ‭gadgets‬ ‭to‬ ‭form‬ ‭a‬ ‭cohesive‬ ‭and‬ ‭effective‬
‭home automation framework.‬

‭ ‬ ‭basic‬ ‭component‬ ‭of‬ ‭this‬ ‭setup‬ ‭is‬ ‭the‬ ‭DHT11‬ ‭sensor,‬ ‭renowned‬ ‭for‬ ‭its‬ ‭capacity‬ ‭to‬
A
‭monitor‬‭temperature‬‭and‬‭humidity‬‭in‬‭real-time.‬‭By‬‭giving‬‭accurate‬‭and‬‭up-to-date‬‭data‬‭on‬‭indoor‬
‭natural‬ ‭conditions,‬ ‭the‬ ‭DHT11‬ ‭ensures‬ ‭that‬ ‭the‬ ‭home‬ ‭remains‬ ‭comfortable‬‭all‬‭through‬‭the‬‭day.‬
‭The‬‭ESP32‬‭microcontroller‬‭forms‬‭the‬‭information‬‭from‬‭the‬‭DHT11‬‭sensor‬‭and‬‭can‬‭automatically‬
‭adjust‬ ‭warming‬ ‭or‬ ‭cooling‬ ‭systems‬ ‭as‬ ‭required.‬ ‭This‬ ‭not‬ ‭as‬ ‭it‬ ‭were‬ ‭improves‬ ‭consolation‬ ‭but‬
‭moreover‬ ‭contributes‬ ‭to‬ ‭vitality‬ ‭productivity,‬ ‭as‬ ‭the‬ ‭HVAC‬ ‭frameworks‬ ‭work‬ ‭as‬ ‭it‬ ‭were‬ ‭when‬
‭essential, decreasing superfluous vitality utilization.‬

I‭ n‬‭terms‬‭of‬‭security,‬‭the‬‭system‬‭employs‬‭CCTV‬‭cameras,‬‭which‬‭are‬‭moreover‬‭controlled‬
‭by‬ ‭the‬ ‭ESP32‬ ‭microcontroller.‬‭These‬‭cameras‬‭give‬‭nonstop‬‭observation,‬‭guaranteeing‬‭that‬‭each‬
‭corner‬‭of‬‭the‬‭home‬‭is‬‭observed‬‭around‬‭the‬‭clock.‬‭Property‬‭holders‬‭can‬‭get‬‭to‬‭live‬‭camera‬‭bolsters‬
‭remotely‬ ‭through‬ ‭the‬ ‭Blynk‬ ‭app,‬ ‭a‬ ‭user-friendly‬ ‭stage‬ ‭that‬ ‭permits‬ ‭for‬ ‭simple‬ ‭interaction‬ ‭with‬
‭different‬ ‭IoT‬ ‭gadgets.‬ ‭This‬ ‭capability‬ ‭guarantees‬ ‭that‬ ‭homeowners‬ ‭can‬ ‭keep‬ ‭an‬ ‭eye‬ ‭on‬ ‭their‬
‭property‬ ‭from‬ ‭a‬ ‭place‬ ‭within‬ ‭the‬ ‭world,‬ ‭giving‬ ‭real-time‬ ‭monitoring‬ ‭and‬ ‭the‬ ‭capacity‬ ‭to‬ ‭reply‬
‭quickly to any recognized exercises or potential security dangers.‬

‭ he‬ ‭integration‬ ‭of‬ ‭a‬ ‭light‬ ‭clap‬ ‭sensor‬‭system‬‭advances‬‭home‬‭automation‬‭by‬‭advertising‬


T
‭an‬ ‭instinctive‬ ‭strategy‬ ‭of‬ ‭controlling‬ ‭lighting.‬ ‭This‬ ‭system‬ ‭recognizes‬ ‭the‬ ‭sound‬ ‭of‬ ‭claps,‬
‭enabling‬‭clients‬‭to‬‭turn‬‭lights‬‭on‬‭or‬‭off‬‭without‬‭requiring‬‭to‬‭utilize‬‭physical‬‭switches.‬‭This‬‭not‬‭as‬
‭it‬‭were‬‭includes‬‭a‬‭layer‬‭of‬‭comfort‬‭but‬‭moreover‬‭progresses‬‭openness‬‭for‬‭people‬‭with‬‭versatility‬
‭issues or those who basically prefer hands-free control of their lighting systems.‬

‭ hereas‬ ‭the‬ ‭ESP8266‬‭microcontroller‬‭is‬‭additionally‬‭a‬‭portion‬‭of‬‭this‬‭semi-smart‬‭home‬


W
‭setup,‬‭it‬‭primarily‬‭supports‬‭remote‬‭communication‬‭inside‬‭the‬‭system.‬‭Not‬‭at‬‭all‬‭like‬‭the‬‭ESP32,‬
‭the‬‭ESP8266‬‭isn't‬‭specifically‬‭overseen‬‭through‬‭the‬‭Blynk‬‭app.‬‭In‬‭any‬‭case,‬‭it‬‭plays‬‭a‬‭crucial‬‭part‬
‭in‬‭guaranteeing‬‭a‬‭solid‬‭network,‬‭encouraging‬‭consistent‬‭farther‬‭observation‬‭and‬‭control‬‭by‬‭means‬
‭of‬ ‭the‬ ‭ESP32.‬ ‭The‬ ‭ESP8266's‬ ‭capabilities‬ ‭improve‬ ‭the‬ ‭by‬ ‭and‬ ‭large‬ ‭strength‬ ‭of‬ ‭the‬ ‭home‬
‭automation organization, ensuring that all gadgets stay interconnected and responsive.‬

‭2‬
‭ he‬ ‭Blynk‬ ‭app‬ ‭serves‬ ‭as‬ ‭the‬ ‭central‬ ‭interface‬ ‭for‬ ‭clients‬ ‭to‬ ‭connect‬ ‭with‬ ‭their‬ ‭home‬
T
‭automation‬‭system.‬‭Through‬‭this‬‭app,‬‭clients‬‭can‬‭easily‬‭screen‬‭CCTV‬‭camera‬‭feeds,‬‭get‬‭real-time‬
‭alerts,‬‭and‬‭control‬‭different‬‭gadgets‬‭inside‬‭their‬‭home.‬‭The‬‭app's‬‭intuitive‬‭plan‬‭makes‬‭it‬‭open‬‭to‬
‭clients‬ ‭of‬ ‭all‬ ‭tech-savviness‬ ‭levels,‬ ‭ensuring‬ ‭that‬ ‭anybody‬ ‭can‬ ‭take‬ ‭advantage‬ ‭of‬ ‭the‬‭upgraded‬
‭security and comfort it gives.‬

I‭ n‬ ‭summary,‬ ‭this‬ ‭semi-smart‬ ‭home‬‭setup‬‭effectively‬‭combines‬‭simplicity‬‭with‬‭advanced‬


‭observation‬ ‭and‬ ‭natural‬ ‭observing‬ ‭capabilities.‬ ‭By‬ ‭integrating‬ ‭key‬ ‭components‬ ‭just‬ ‭like‬ ‭the‬
‭ESP32‬‭microcontroller,‬‭DHT11‬‭sensor,‬‭CCTV‬‭cameras,‬‭and‬‭a‬‭light‬‭clap‬‭sensor‬‭system,‬‭it‬‭makes‬
‭an‬‭all‬‭encompassing‬‭approach‬‭to‬‭home‬‭automation.‬‭The‬‭framework‬‭guarantees‬‭that‬‭homeowners‬
‭can‬‭appreciate‬‭a‬‭comfortable,‬‭secure,‬‭and‬‭effortlessly‬‭sensible‬‭living‬‭environment,‬‭making‬‭home‬
‭observation clear and available for everybody.‬

‭2.‬ ‭PROBLEM STATEMENT‬

I‭ n‬‭this‬‭day‬‭and‬‭age,‬‭it‬‭may‬‭be‬‭difficult‬‭for‬‭homeowners‬‭to‬‭maintain‬‭safe,‬‭comfortable‬‭yet‬
‭energy-effective‬ ‭houses‬ ‭without‬ ‭making‬ ‭their‬ ‭everyday‬ ‭lives‬ ‭more‬ ‭challenging.‬ ‭Modern‬
‭households‬ ‭seek‬ ‭a‬ ‭level‬ ‭of‬ ‭safety,‬ ‭convenience‬ ‭and‬ ‭energy‬ ‭saving‬ ‭that‬ ‭older‬ ‭home‬ ‭systems‬
‭usually‬‭don't‬‭provide.‬‭Homeowners‬‭are‬‭looking‬‭for‬‭a‬‭reliable‬‭way‬‭to‬‭save‬‭energy‬‭costs,‬‭simplify‬
‭daily‬ ‭tasks,‬ ‭and‬ ‭secure‬ ‭their‬ ‭properties.‬ ‭Through‬ ‭the‬ ‭addition‬ ‭of‬ ‭innovative‬ ‭technologies‬ ‭into‬
‭standard‬‭household‬‭systems,‬‭this‬‭initiative‬‭aims‬‭to‬‭ease‬‭these‬‭worries‬‭and‬‭provide‬‭families‬‭with‬‭a‬
‭safer, simpler, and more cost-effective living.‬

‭3.‬ ‭OBJECTIVES‬

‭ oosting‬ ‭the‬ ‭level‬ ‭of‬ ‭safety,‬ ‭ease‬ ‭of‬ ‭living‬‭and‬‭energy‬‭consumption‬‭is‬‭the‬‭primary‬‭goal‬


B
‭for this mini project. Each feature plays a different purpose for reaching the goal.‬

‭ or‬ ‭the‬ ‭Door‬ ‭Lock‬ ‭System,‬ ‭it‬ ‭enhances‬ ‭security‬ ‭through‬ ‭an‬ ‭automated‬ ‭locking‬
F
‭mechanism‬‭where‬‭it‬‭ensures‬‭that‬‭only‬‭individuals‬‭with‬‭the‬‭keycode‬‭can‬‭enter‬‭the‬‭premises.‬‭At‬‭the‬
‭same‬‭time,‬‭it‬‭gives‬‭the‬‭homeowner‬‭a‬‭peace‬‭of‬‭mind‬‭knowing‬‭that‬‭they‬‭don’t‬‭need‬‭to‬‭worry‬‭about‬
‭forgetting their key or access card in order to enter their home.‬

‭ he‬ ‭LED‬ ‭Clap‬ ‭System‬ ‭reduces‬ ‭wasteful‬ ‭energy‬ ‭consumption‬ ‭which‬‭leads‬‭to‬‭increasing‬


T
‭energy‬‭efficiency‬‭but‬‭still‬‭offers‬‭an‬‭easy‬‭lighting‬‭experience‬‭to‬‭the‬‭user‬‭since‬‭it‬‭can‬‭be‬‭operated‬
‭remotely, just by a clap of a hand to turn ON or turn OFF the lights.‬

‭ ext,‬‭the‬‭Temp-Fan‬‭System‬‭includes‬‭an‬‭accurate‬‭temperature‬‭and‬‭humidity‬‭sensor‬‭which‬
N
‭provides‬ ‭real-time‬ ‭data‬ ‭to‬ ‭guarantee‬ ‭ideal‬‭indoor‬‭conditions.‬‭It‬‭is‬‭set‬‭to‬‭maintain‬‭a‬‭comfortable‬
‭and‬ ‭healthy‬ ‭indoor‬ ‭condition‬ ‭through‬ ‭the‬ ‭fan‬ ‭speed‬ ‭based‬ ‭on‬ ‭the‬ ‭data‬ ‭obtained‬ ‭from‬ ‭the‬
‭temperature‬ ‭and‬ ‭humidity‬ ‭sensor.‬ ‭This‬ ‭system‬ ‭is‬‭especially‬‭useful‬‭not‬‭only‬‭to‬‭increase‬‭comfort‬
‭but also improves energy conservation.‬

‭3‬
‭ astly,‬ ‭the‬ ‭Camera‬ ‭System‬ ‭allows‬ ‭the‬ ‭homeowner‬ ‭to‬ ‭monitor‬ ‭their‬ ‭property‬ ‭remotely‬
L
‭with‬‭the‬‭use‬‭of‬‭smartphone‬‭app,‬‭Blynk‬‭that‬‭offers‬‭real-time‬‭monitoring.‬‭A‬‭faster‬‭reaction‬‭time‬‭to‬
‭security‬ ‭concerns‬ ‭are‬ ‭made‬ ‭possible‬ ‭from‬ ‭the‬ ‭increased‬ ‭awareness,‬ ‭guaranteeing‬ ‭that‬ ‭any‬
‭suspicious activities are being dealt with immediately.‬

‭4‬
‭4.‬ ‭PROJECT METHODOLOGY & PLANNING‬

‭METHODOLOGY‬

‭FLOWCHART (EXPLAIN)‬

‭GANTT CHART (PLANNING) :‬

‭Task‬ ‭Week 10‬ ‭Week 11‬ ‭Week 12‬ ‭Week 13‬ ‭Week 14‬

‭Planning and‬ × ×
‭Research‬

‭Design‬ × × ×

‭Buying instrument‬ × × ×

‭Development‬ × ×

‭Integration and‬ × × ×
‭Testing‬

‭Documentation and‬ × ×
‭Reporting‬
‭Table 1: Gantt Chart for Semi Smart Home.‬

‭a.‬ ‭Working Principle‬


‭DOOR LOCK SYSTEM :‬
‭1.‬ ‭Start‬
‭2.‬ ‭Lcd Display “Welcome To Door Lock System”.‬
‭3.‬ ‭Lcd Display “Insert Password”.‬
‭4.‬ ‭Enter Password.‬
‭5.‬ ‭Correct Password “Door Locked”.‬
‭6.‬ ‭Servo On : Locked State‬
‭7.‬ ‭Lcd Display “Enter Password”.‬
‭8.‬ ‭Correct Password “Door Password” , “Open The Door”.‬
‭9.‬ ‭If Password = False, Buzzer On.‬
‭10.‬ ‭Lcd Display “Wrong Password !” , “Please Try Again”.‬
‭11.‬ ‭Select “C” to Reset Password.‬
‭12. Select “D” to Enter Password.‬
‭13.‬ ‭End.‬

‭5‬
‭LED CLAP SYSTEM :‬

1‭ .‬ ‭ tart.‬
S
‭2.‬ ‭1‭s‬t‬ ‭Clap : Led On‬
‭3.‬ ‭2‭n‬ d‬ ‭Clap : Led Off‬
‭4.‬ ‭End.‬

‭CAMERA SYSTEM :‬
‭1.‬ ‭Start‬
‭2.‬ ‭Connect To Blynk Apps‬
‭3.‬ ‭Select Camera Section‬
‭4.‬ ‭Turn On Camera‬
‭5.‬ ‭Watch Livestream‬
‭6.‬ ‭Turn Off Camera‬
‭7.‬ ‭End‬

‭5.‬ ‭RESULTS‬

‭Figure 1: The Finished Product of the Semi Smart Home.‬

‭Semi Smart Home Video Results‬

‭6‬
‭Figure 2 : Blynk App’s Interface for Camera System.‬

I‭ ntegrating‬ ‭the‬ ‭Blynk‬ ‭IoT‬ ‭platform‬ ‭for‬ ‭camera‬ ‭control‬ ‭in‬ ‭a‬ ‭smart‬ ‭home‬ ‭setup‬ ‭offers‬
‭helpful‬‭observation‬‭and‬‭security‬‭management.‬‭Through‬‭the‬‭Blynk‬‭app,‬‭users‬‭can‬‭remotely‬‭get‬‭to‬
‭live‬‭camera‬‭feeds,‬‭enabling‬‭real-time‬‭checking‬‭of‬‭their‬‭home‬‭environment‬‭from‬‭anywhere.‬‭This‬
‭capability‬ ‭enhances‬ ‭security‬ ‭by‬ ‭allowing‬ ‭homeowners‬ ‭to‬ ‭keep‬ ‭an‬ ‭eye‬ ‭on‬‭entry‬‭points,‬‭monitor‬
‭exercises‬ ‭in‬ ‭specific‬ ‭ranges,‬ ‭and‬ ‭receive‬ ‭immediate‬ ‭alerts‬ ‭for‬ ‭identified‬ ‭movement‬ ‭or‬ ‭security‬
‭breaches.‬ ‭The‬ ‭app's‬ ‭user-friendly‬ ‭interface‬ ‭encourages‬ ‭easy‬ ‭route‬ ‭between‬ ‭camera‬ ‭sees‬ ‭and‬
‭supports‬ ‭customization‬ ‭choices‬ ‭for‬ ‭setting‬ ‭up‬ ‭cautions‬ ‭based‬ ‭on‬ ‭particular‬ ‭events.‬ ‭This‬
‭integration‬ ‭not‬ ‭as‬ ‭it‬ ‭were‬ ‭improves‬ ‭home‬ ‭security‬ ‭but‬ ‭also‬ ‭gives‬ ‭peace‬ ‭of‬ ‭mind‬ ‭by‬ ‭enabling‬
‭proactive monitoring and response to potential threats or emergencies.‬

‭Figure 3 : Blynk Apps Flowchart‬

‭7‬
‭6.‬ ‭DISCUSSION‬

‭ he‬ ‭semi-smart‬ ‭home‬ ‭venture‬ ‭exhibits‬ ‭how‬ ‭essential‬ ‭IoT‬ ‭innovations‬ ‭can‬ ‭altogether‬
T
‭progress‬‭the‬‭way‬‭of‬‭life‬‭at‬‭home.‬‭By‬‭utilizing‬‭the‬‭ESP32‬‭microcontroller‬‭as‬‭the‬‭central‬‭brain,‬‭the‬
‭framework‬ ‭robotizes‬ ‭errands‬ ‭like‬ ‭altering‬‭temperature‬‭and‬‭mugginess‬‭levels‬‭based‬‭on‬‭real-time‬
‭information‬ ‭from‬ ‭the‬ ‭DHT11‬ ‭sensor.‬ ‭This‬ ‭not‬ ‭as‬ ‭it‬ ‭were‬ ‭upgrades‬ ‭consolation‬ ‭but‬ ‭moreover‬
‭possibly decreases vitality utilization.‬

‭ ecurity‬‭is‬‭reinforced‬‭through‬‭CCTV‬‭cameras‬‭overseen‬‭by‬‭the‬‭ESP32,‬‭available‬‭remotely‬
S
‭through‬ ‭the‬ ‭Blynk‬ ‭app.‬ ‭Property‬ ‭holders‬ ‭can‬ ‭screen‬ ‭their‬ ‭property‬ ‭in‬ ‭real-time‬ ‭from‬‭anyplace,‬
‭improving peace of intellect and empowering speedy reactions to security episodes.‬

‭The‬ ‭extended‬ ‭tool‬ ‭incorporates‬ ‭a‬‭light‬‭clap‬‭sensor‬‭for‬‭simple‬‭lighting‬‭control,‬‭including‬


c‭ omfort‬ ‭by‬ ‭permitting‬ ‭clients‬ ‭to‬ ‭turn‬ ‭lights‬ ‭on‬ ‭or‬ ‭off‬ ‭with‬ ‭a‬ ‭straightforward‬ ‭clap,‬ ‭decreasing‬
‭dependence on manual switches.‬

‭ enerally,‬ ‭the‬ ‭integration‬‭of‬‭these‬‭advances‬‭disentangles‬‭home‬‭administration,‬‭upgrades‬


G
‭security,‬ ‭and‬ ‭makes‬ ‭strides‬ ‭in‬ ‭consolation,‬ ‭illustrating‬ ‭the‬ ‭commonsense‬ ‭benefits‬ ‭of‬ ‭IoT‬ ‭in‬
‭modernizing private living.‬

‭7.‬ ‭CONCLUSION‬

I‭ n‬ ‭conclusion,‬ ‭the‬ ‭semi-smart‬ ‭home‬ ‭degree‬ ‭utilizing‬ ‭IoT‬ ‭advancements‬ ‭speaks‬ ‭to‬ ‭a‬
‭practical‬ ‭approach‬ ‭to‬ ‭upgrading‬ ‭private‬ ‭living.‬ ‭By‬ ‭coordinating‬ ‭gadgets‬ ‭similar‬ ‭to‬ ‭the‬ ‭ESP32‬
‭microcontroller,‬‭DHT11‬‭sensor,‬‭CCTV‬‭cameras,‬‭and‬‭light‬‭clap‬‭sensor,‬‭the‬‭system‬‭makes‬‭strides‬
‭in‬ ‭comfort,‬ ‭security,‬ ‭and‬ ‭characteristic‬ ‭observing‬ ‭the‬ ‭interior‬ ‭of‬ ‭the‬ ‭home.‬ ‭The‬ ‭ESP32‬
‭successfully‬ ‭manages‬ ‭data‬ ‭preparation‬ ‭and‬ ‭communication,‬ ‭empowering‬ ‭robotized‬ ‭changes‬ ‭to‬
‭household‬ ‭conditions‬ ‭based‬ ‭on‬ ‭real-time‬ ‭sensor‬ ‭data.‬ ‭CCTV‬ ‭cameras‬ ‭allow‬ ‭non‬ ‭stop‬
‭surveillance,‬ ‭available‬ ‭remotely‬ ‭through‬ ‭the‬ ‭Blynk‬ ‭app,‬ ‭which‬ ‭improves‬ ‭security‬ ‭by‬ ‭allowing‬
‭contract‬‭holders‬‭to‬‭screen‬‭their‬‭property‬‭from‬‭anyplace.‬‭The‬‭consideration‬‭of‬‭instinctive‬‭controls‬
‭just‬ ‭like‬ ‭the‬ ‭light‬ ‭clap‬ ‭sensor‬ ‭help‬ ‭improves‬ ‭day‬ ‭by‬ ‭day‬ ‭assignments,‬ ‭exhibiting‬ ‭the‬ ‭reliable‬
‭integration‬‭of‬‭quick‬‭developments‬‭into‬‭standard‬‭of‬‭living.‬‭By‬‭and‬‭huge,‬‭this‬‭expansion‬‭highlights‬
‭the‬ ‭transformative‬ ‭potential‬ ‭of‬ ‭IoT‬ ‭in‬ ‭making‬ ‭more‬ ‭brilliant,‬ ‭more‬ ‭responsive‬ ‭homes‬ ‭that‬
‭prioritize reassurance, security, and capability.‬

‭8‬
‭8.‬ ‭APPLICATION OF KNOWLEDGE AND SKILLS‬

‭9‬
‭I.‬ ‭APPENDICES‬

‭A.‬ ‭Coding‬

‭Coding For Esp32‬

#‭ include "OV2640.h"‬
‭#include <WiFi.h>‬
‭#include <WebServer.h>‬
‭#include <WiFiClient.h>‬

/‭/ Select camera model‬


‭//#define CAMERA_MODEL_WROVER_KIT‬
‭//#define CAMERA_MODEL_ESP_EYE‬
‭//#define CAMERA_MODEL_M5STACK_PSRAM‬
‭//#define CAMERA_MODEL_M5STACK_WIDE‬
‭#define CAMERA_MODEL_AI_THINKER‬

‭#include "camera_pins.h"‬

#‭ define SSID1 "Farah hehh"‬


‭#define PWD1 "Farahazwa00"‬

‭OV2640 cam;‬

‭WebServer server(80);‬

‭const char HEADER[] = "HTTP/1.1 200 OK\r\n" \‬


‭"Access-Control-Allow-Origin: *\r\n" \‬
‭"Content-Type:‬ ‭multipart/x-mixed-replace;‬
‭boundary=123456789000000000000987654321\r\n";‬
‭const char BOUNDARY[] = "\r\n--123456789000000000000987654321\r\n";‬
‭const char CTNTTYPE[] = "Content-Type: image/jpeg\r\nContent-Length: ";‬
‭const int hdrLen = strlen(HEADER);‬
‭const int bdrLen = strlen(BOUNDARY);‬
‭const int cntLen = strlen(CTNTTYPE);‬

‭void handle_jpg_stream(void)‬

‭10‬
‭{‬
‭char buf[32];‬
‭int s;‬

‭WiFiClient client = server.client();‬

c‭ lient.write(HEADER, hdrLen);‬
‭client.write(BOUNDARY, bdrLen);‬

‭ hile (true)‬
w
‭{‬
‭if (!client.connected()) break;‬
‭cam.run();‬
‭s = cam.getSize();‬
‭client.write(CTNTTYPE, cntLen);‬
‭sprintf( buf, "%d\r\n\r\n", s );‬
‭client.write(buf, strlen(buf));‬
‭client.write((char *)cam.getfb(), s);‬
‭client.write(BOUNDARY, bdrLen);‬
‭}‬
‭}‬

‭const char JHEADER[] = "HTTP/1.1 200 OK\r\n" \‬


‭"Content-disposition: inline; filename=capture.jpg\r\n" \‬
‭"Content-type: image/jpeg\r\n\r\n";‬
‭const int jhdLen = strlen(JHEADER);‬

v‭ oid handle_jpg(void)‬
‭{‬
‭WiFiClient client = server.client();‬

c‭ am.run();‬
‭if (!client.connected()) return;‬

c‭ lient.write(JHEADER, jhdLen);‬
‭client.write((char *)cam.getfb(), cam.getSize());‬
‭}‬

v‭ oid handleNotFound()‬
‭{‬

‭11‬
‭ tring message = "Server is running!\n\n";‬
S
‭message += "URI: ";‬
‭message += server.uri();‬
‭message += "\nMethod: ";‬
‭message += (server.method() == HTTP_GET) ? "GET" : "POST";‬
‭message += "\nArguments: ";‬
‭message += server.args();‬
‭message += "\n";‬
‭server.send(200, "text / plain", message);‬
‭}‬

v‭ oid setup()‬
‭{‬

‭ erial.begin(115200);‬
S
‭//while (!Serial); //wait for serial connection.‬

c‭ amera_config_t config;‬
‭config.ledc_channel = LEDC_CHANNEL_0;‬
‭config.ledc_timer = LEDC_TIMER_0;‬
‭config.pin_d0 = Y2_GPIO_NUM;‬
‭config.pin_d1 = Y3_GPIO_NUM;‬
‭config.pin_d2 = Y4_GPIO_NUM;‬
‭config.pin_d3 = Y5_GPIO_NUM;‬
‭config.pin_d4 = Y6_GPIO_NUM;‬
‭config.pin_d5 = Y7_GPIO_NUM;‬
‭config.pin_d6 = Y8_GPIO_NUM;‬
‭config.pin_d7 = Y9_GPIO_NUM;‬
‭config.pin_xclk = XCLK_GPIO_NUM;‬
‭config.pin_pclk = PCLK_GPIO_NUM;‬
‭config.pin_vsync = VSYNC_GPIO_NUM;‬
‭config.pin_href = HREF_GPIO_NUM;‬
‭config.pin_sscb_sda = SIOD_GPIO_NUM;‬
‭config.pin_sscb_scl = SIOC_GPIO_NUM;‬
‭config.pin_pwdn = PWDN_GPIO_NUM;‬
‭config.pin_reset = RESET_GPIO_NUM;‬
‭config.xclk_freq_hz = 20000000;‬
‭config.pixel_format = PIXFORMAT_JPEG;‬

‭12‬
/‭/ Frame parameters‬
‭// config.frame_size = FRAMESIZE_UXGA;‬
‭config.frame_size = FRAMESIZE_QVGA;‬
‭config.jpeg_quality = 12;‬
‭config.fb_count = 2;‬

‭#if defined(CAMERA_MODEL_ESP_EYE)‬
‭pinMode(13, INPUT_PULLUP);‬
‭pinMode(14, INPUT_PULLUP);‬
‭#endif‬

‭cam.init(config);‬

‭IPAddress ip;‬

‭ iFi.mode(WIFI_STA);‬
W
‭WiFi.begin(SSID1, PWD1);‬
‭while (WiFi.status() != WL_CONNECTED)‬
‭{‬
‭delay(500);‬
‭Serial.print(F("."));‬
‭}‬
‭ip = WiFi.localIP();‬
‭Serial.println(F("WiFi connected"));‬
‭Serial.println("");‬
‭Serial.println(ip);‬
‭Serial.print("Stream Link: http://");‬
‭Serial.print(ip);‬
‭Serial.println("/mjpeg/1");‬
‭server.on("/mjpeg/1", HTTP_GET, handle_jpg_stream);‬
‭server.on("/jpg", HTTP_GET, handle_jpg);‬
‭server.onNotFound(handleNotFound);‬
‭server.begin();‬
‭}‬

v‭ oid loop()‬
‭{‬
‭server.handleClient();‬
‭}‬

‭13‬
‭B.‬ ‭Bill of Materials with Cost‬

‭NO‬ ‭COMPONENT‬ ‭BIL‬ ‭COST‬

‭1‬ ‭LCD i2C‬ ‭1‬ ‭RM 8.50‬

‭2‬ ‭KEYPAD 4‬×‭4‬ ‭1‬ ‭RM 3.50‬

‭3‬ ‭BUZZER‬ ‭1‬ ‭RM 1.90‬

‭4‬ ‭MOTOR SERVO‬ ‭1‬ ‭RM 6.90‬

‭5‬ ‭KY038 SENSOR‬ ‭1‬ ‭RM 5.50‬

‭6‬ ‭LED‬ ‭2‬ ‭RM 1.00‬

‭7‬ ‭MOTOR DC (FAN)‬ ‭1‬ ‭RM 2.90‬

‭8‬ ‭DHT 11 SENSOR‬ ‭1‬ ‭RM 4.90‬

‭9‬ ‭L298N MOTOR DRIVER‬ ‭1‬ ‭RM 6.99‬

‭10‬ ‭BATTERY HOLDER‬ ‭2‬ ‭RM 5.60‬

‭11‬ ‭BATTERY AA 1.5V‬ ‭8‬ ‭RM11.80‬

‭12‬ ‭ESP 32- CAM WIFI‬ ‭1‬ ‭RM 35.90‬

‭13‬ ‭ARDUINO MEGA 2560‬ ‭1‬ ‭RM 65.00‬

‭TOTAL‬ ‭RM160.39‬
‭Table 2: List of Materials Used with Costing.‬

‭14‬
‭Figure 4: Connection ESP32-CAM to Power Bank.‬

‭Figure 5: Circuit for Semi-Smart Home.‬

‭15‬

You might also like