
Set up the ESP32 development environment, wire a PIR sensor, and build firmware that uses MQTT for real-time intrusion alerts, and design an enclosure.
Install Visual Studio Code and Platform IO to set up an open-source IoT development environment for ESP32; install via extensions, restart VS Code, and access Platform IO from left panel.
Learn the basics of ESP32, compare boards, and simulate projects with Wokwi, then set up PlatformIO and Arduino to blink an LED on a real ESP32.
Explore how the atsr 505 pir sensor detects motion via infrared light and provides a digital output, wiring to ESP32 with vcc 5v, gnd, and out for security and automation.
Explore mqtt, a lightweight publisher/subscriber messaging protocol for IoT devices; learn broker, topic, and how messages flow from publisher to subscribers.
Learn to interact with an MQTT broker using an ESP32, publishing motion events from a PIR sensor and subscribing to a topic to receive messages via two ESP32s in Wokwi.
Explore Tinkercad basics for 3d design, using the workplane, basic shapes, the align and group tools, adding text, creating holes, and exporting to stl for 3d printing.
Model the final ESP32 and HC-SR505 PIR sensor enclosure in Tinkercad for 3D printing, using precise dimensions and a 60 by 32 mm box with 10 mm height.
Demonstrate the printed box for an ESP32 intrusion detection setup, placing the PIR sensor below the ESP32 and testing the four fixation points. Expect STL corrections in the next class.
Refine the 3d model to fit the pir sensor head and esp32, reduce each fixation point by 1 mm and lower the cylinder by 1 mm in tinkercad.
Mount the circuit on ESP32 and PIR sensor, solder vcc, data, and gnd, connect PIR data to ESP32 pin 5, and secure in a 3d printed box with hot glue.
Explore how to use ESP32 flash memory with the preferences library to save and retrieve integers, strings, and structs, including removing and clearing keys.
Learn to synchronize time on the ESP32 with NTP to accurately timestamp intrusion events, using wifi, time.h, and pool.ntp.org time servers.
Master ESP32 threads with FreeRTOS to achieve concurrency by running multiple tasks like led blinking and sensor control. Use xTaskCreate, vTaskSuspend, vTaskResume, semaphores, and queues to manage and synchronize tasks.
Create the final firmware for an ESP32 intrusion detection system by integrating the PIR sensor, MQTT alerts, FreeRTOS tasks, and flash storage for data persistence.
Watch a final demonstration of a motion sensor with ESP32 and MQTT, using the IoT MQTT Panel to connect to the EMQX broker and read intrusion messages in real time.
Welcome to "Secure Your Space: DIY Intrusion Detection with ESP32"!
This course is your step-by-step guide to creating a fully functional intrusion detection system using the powerful ESP32 microcontroller. Whether you’re a hobbyist, a student, or an engineer looking to dive into IoT projects, this course will equip you with the skills to build and customize your own security device.
What You'll Learn:
Understand the basics of the ESP32 microcontroller and its various applications in IoT.
Explore the principles of motion detection using the PIR sensor.
Master the MQTT protocol for efficient communication between devices.
Develop firmware that integrates multiple tasks, such as reading sensor data and handling MQTT communication.
Learn how to store and retrieve data using the ESP32’s FLASH memory.
Simulate your projects using Wokwi, an online platform for ESP32 simulations.
Design and create a 3D enclosure for your device, ready to be 3D printed.
Deploy an MQTT broker and connect your device for real-time monitoring.
Integrate NTP for precise timekeeping within your system.
Who Is This Course For?
Makers and hobbyists interested in home automation and security.
Students and professionals looking to enhance their IoT skills.
Anyone with basic programming knowledge who wants to explore the ESP32 and build a practical project.
Course Prerequisites:
Basic understanding of programming (C/C++).
Familiarity with electronic components and circuit design is helpful but not required.
Why Enroll?
By the end of this course, you'll have a working intrusion detection system that you can customize and expand to suit your specific needs. You'll gain hands-on experience with key IoT technologies, including MQTT, FLASH memory, and FreeRTOS, and develop a strong foundation in using the ESP32 for real-world applications.
Enroll now, and start securing your space with your very own DIY intrusion detection system!