CEIS101 IOT HOME SECURITY PROEJCT MATT NYCE INTRODUCTION This is a course project done for CEIS101 at DeVry University. I had a lot of fun and learned quite a bit during this project. The most interesting part to me, was the networking portion. This will be displayed in the later slides. Thank you and enjoy! INVENTORY • The items on the next slide were included in this project from start to finish. • It is important to keep all material used during projects organized and ready to go when you need them. • All material were provided by DeVry University. ORGANIZATION Arduino Megaboard Resistor - 220Ω LED Breadboard Motion Sensor Wire(s) Buzzer Esp32 Board PLANNING • Before beginning the project itself, flowcharts were made to plan out the process. • Originally, it was not known exactly what was required. • I over planned a little bit, however, things still worked out in the end. WHO USES FLOWCHARTS What companies use flowcharts? All industries have an applicable use for flowcharts. Pertaining to this course, the most important type of company in my mind is computer programming companies. Why might they use flowcharts? These companies use flowcharts in order to plan out projects so they are done in an organized manner. It’s important to use flowcharts when starting a project so that things are done properly and in order. This is especially needed when doing a project as a team. INPUT – PROCESSING - OUTPUT Input Process Output Motion Detection Light Flash + Buzzer Set away Read user input Light on Set home Read user input Light off FLOWCHART This is the original flowchart I had made for the project. Things didn’t go quite exactly as I had originally thought. The only portion of the flowchart focused on is the middle portion. FIRST STEP – RUNNING THE BLINK CODE • The first step taken was to do a simple test. • The LED was hooked into the Arduino board. • Code was provided that sent a signal from pin13 on the Arduino turning the LED on. • See next slides for the circuit and the code used to do this. CIRCUIT (PICTURE OR VIDEO) Arduino and breadboard with LED connected to breadboard CODE (SCREENSHOT) Screenshot of code in Arduino IDE SECOND STEP – MOTION SENSOR AND BUZZER • For the second step, a motion sensor was hooked into the Arduino. • There was a buzzer added as well. • When the motion sensor detects motion, the buzzer goes off. CIRCUIT Arduino with breadboard including motion sensor CODE (SCREENSHOT) The output in this code, or LEDPin, actually refers to the buzzer. All comments stating LED are also referring to the buzzer. CODE EXPLANATION What pin is the input pin? What pin is the output pin? How do you know? • Answer: The output pin is 7, as that is the pin that tells the buzzer there is motion and to go off. The input pin is 8 as that is the motion sensor input telling the board there is motion. How many times does the Arduino IDE setup() function run? • Answer: It will run as many times as there is motion on the sensor, it’s a loop. THIRD STEP – MONITORING THE SYSTEM • At this time, there was a need for an output so it was possible to see the motion detected. • In the screenshot a few slides after, you can see the monitor displays the motion detected. • Very little hardware change was necessary for this step. CIRCUIT (PICTURE) Motion sensor circuit with new resistor SERIAL MONITOR (SCREENSHOT) Screenshot of serial monitor showing voltage difference and count of motion detected. DATA DISPLAY What is the code that displays the count of how many times motion has been detected? • Answer: Everytime motion is detected, count+1 is assigned to the count variable which is then printed via the println function. count=count+1; Serial.print("Motion detected!"); Serial.println(count); Serial.print(v1); Serial.print(" "); Serial.print(v2); Serial.println(); How can viewing data on the serial monitor give you information about your circuit? • Answer: The voltage will change depending on the speed of the motion. The faster the motion, the higher the voltage. FOURTH STEP – LOCAL NETWORK CONFIG • The next thing done was to connect the system to the internet. • This was done via the router provided through a local network. • The code created a website through a local IP address that allowed the LED light to be turned on and off remotely. • In this step, the Arduino board was removed in favor of the ESP32 board for WiFi functionality. ROUTER (SCREENSHOT) Screenshot of router setup page CIRCUIT (PICTURE OR VIDEO) Picture of circuit with ESP32 board on breadboard with LED WEB PAGE (SCREENSHOT) Web server screenshot showing turning on and off the light from the web. CHALLENGES To me, the most challenging part of this project was keeping track and color coding all of the wires to ensure my circuit was correct. One mistake would be enough to make the entire security system not work. This means that in order to find the mistake, you may have to rewire some or all of the project before continuing. This only happened to me once, fortunately. LEARNED SKILLS • Planning – flowchart and wire color coding • Electronics – Working with boards, basic wiring skills • Programming – Using and understanding code with Arduino IDE • Networking and Security – Setting up the router and securing the SSID and password • Time Management – All steps were done weekly and in a timely fashion CONCLUSION I greatly enjoyed experimenting with the materials given to us while creating the security system. The most enjoyable part, being the local network portion, was really awesome. Creating a remote system yourself and being able to turn that LED on and off via a website felt really great. Thank you for following my progress through this project!
Enter the password to open this PDF file:
-
-
-
-
-
-
-
-
-
-
-
-