Lesson plan introduction
Smart Home with AI
Welcome to the "Smart Home with AI" lesson plan. In ten (10) lessons, we will allow students from 10th to 12th grades to introduce Artificial Intelligence in their everyday home lives.
In this course, students will participate in hands-on projects in designing and developing algorithms and circuits in order to create a Smart Home model that utilizes AI for its functions. The course will consist of 3 modules and a final project:
In the first module, they will learn to design the ‘’brains’’ of their Smart Home using Artificial Intelligence concepts in the Python programming language (with libraries provided by us) with the following steps:
An introduction to the concepts and advantages of Artificial Intelligence in the modern industry.
An introduction to Computer Vision in Python.
An introduction to Machine Learning in Python.
Creating a final project in the end of the current module.
In the second module, they will learn to design the ‘’body’’ of their Smart Home using the Raspberry Pico W microcontroller along with MicroPython:
Introduction to the use of Raspberry Pi Pico and MicroPython in Home Automation.
Inputs and Outputs
Servo, PIR and Soil Humidity sensor
LCD I2C Protocol and DHT11 sensor
In the third module, they will learn to use the MQTT Protocol (Message Queuing Telemetry Transport) in order to access the Smart Home from the Internet:
MQTT and Smart Home
After these modules, the students will be challenged to make their own Smart Home project.
In each lesson, the students will use Integrated Development Environments (IDEs) for Python and MicroPython programming. We recommend the popular VSCode IDE for Python programming and Thonny for MicroPython programming on the Raspberry Pico. For the circuit design, students will use breadboards, small cables and connectors, components, and sensors.
Smart Home with AI
Students can create a complete Smart Home model after completing Modules 1, 2 and 3. The model and its circuits will be first built using the knowledge from the second Module, its AI capabilities from the first module and its WiFi communication capabilities from the third module. We will provide the building instructions, programming libraries, and links to get all the components needed for this project.
Artificial Intelligence for your Smart Home
1. Introduction to Artificial Intelligence in Python.
Artificial Intelligence has been the leading sector in the technology industry since the start of the decade. Since this is the first lesson of the module, the students will be introduced to the basic concepts of Artificial Intelligence, Machine Learning and Deep Learning. After that, students will try simple applications in the Python programming language that use AI and ML to see the advantages of AI in the modern application industry.
2. Introduction to Computer Vision using OpenCV.
Computer vision is a big field of AI that allows computers to capture and interpret information from image and video data. Students in this lesson will learn the concepts and importance of Computer Vision and then be introduced to the OpenCV module in Python. Then, they will try (with the help of the educator) to design basic algorithms using the module in Python (such as controlling the computer’s camera, setting its dimensions and storing images).
3. Introduction to Machine Learning using Mediapipe
Machine Learning is a field of AI that specifies in the use of data and algorithms that enable computers to think and learn the way humans can. Students in this lesson will be introduced to the basic concepts of Machine Learning and its use in Python. With the help of the Mediapipe module by Google, they will learn to design and develop algorithms that use ML, such as face recognition, hand and finger tracking, etc.
4. Creating a program for hand and finger tracking
This is the last lesson of the module, where students will be challenged to create a program for basic hand and finger tracking, using their knowledge from the past lessons and the useful libraries we will create. After that, they will be ready to tackle the final challenge: creating a working Smart Home structure using AI algorithms.
Raspberry Pi Pico & MicroPython in your Smart Home
1. Introduction to the use of Raspberry Pi Pico and MicroPython in Home Automations.
Raspberry Pi Pico and MicroPython are widely used in automation. In the first lesson, students will get familiar with the Pico pinout (Power Pins, Grounds, GPIOs), functionality and abilities. Also, some time will be devoted to learning to use the Programming IDE that will be used for the lessons (Thonny). After that, students will learn the two big categories of Signals: Digital and Analog.
2. Inputs and Outputs
After learning the differences between Digital and Analog Signals, distinguishing the Inputs from the Outputs is the next important step. To do so, LEDs, potentiometers, buttons, etc., will be used alongside Pico to help the students understand. All circuits will be constructed on a breadboard using short cables.
3. Servo, PIR and Soil Humidity sensor
In the third Lesson, students will learn to use the simplest components a Smart Home will be equipped with. Servo motors will be used to control door automation. Next, a Soil Humidity Sensor will be combined with LEDs to inform the user to water the plants. Last, A PIR sensor will be added to the project for intrusion detection.
4. LCD I2C Protocol and DHT11 sensor
In the last lesson, students will learn to use the DHT11 sensor that measures Temperature and Relative Humidity. Afterwards, the project will be equipped with a Liquid Crystal Display that uses the I2C communication Protocol. In the last part of the project, the data read from the DHT11 sensor will be printed on the Display to inform the users.
MQTT Protocol to access your Smart Home Wirelessly
1. MQTT introduction
In the first lesson of the last Module, students will learn the use of the MQTT protocol in Automation (Smart Homes, Industries, etc.) and its function. In addition, a sort reference will be made on using MQTT Protocol instead of the Internet of Things using a PDF presentation. Students will start using the Adafruit Broker to understand its use in creating their Website.