Smart Home System Design Using STM32 Microcontroller

If you don’t want to miss my updates, remember to check the public account in the upper right corner and set it as a star, and give me a star!

Smart Home System Design Using STM32 Microcontroller
Smart Home System Design Using STM32 Microcontroller
Every year at this time, many students start their graduation projects, but many people can’t think of what project to do, or have a topic but no ideas. Therefore, the graduation project sharing series of Darwin continues to share past graduation projects every Thursday. Of course, if you have graduated and are willing to share your graduation project, you can contact Sister Ni (WeChat: 459888529), and all enthusiastic sharing partners will receive a gift from Darwin.
Back to the point, today our graduation project comes from a Darwin Bilibili fan (ID: Don’t Look, I’m ZK), whose demonstration video has been viewed 76,000 times on Bilibili, which is the video below:

Overview of Smart Home System Functions

The functions of the STM32 smart home demonstrated in the above video are:

Control via voice recognition and upper computer App

Automatic alarm for intrusions

Control of lighting, temperature and humidity, air quality measurement, timing of household appliances, and automatic curtains

The main control unit is the STM32F103RCT6 microcontroller, connected to each sensor. The LD3320 voice chip generates voice signals to the MCU’s serial port, and when the sent data is recognized in the serial port, it can control each sensor. It also connects via Bluetooth HC05 to send AT commands to the mobile App control side, thus controlling household appliances.

Offline Voice Recognition Function:

The voice recognition words are divided into two levels:

The first-level recognition word: “Xiao Bai” is used to wake up the smart home system, at which point the LD3320 module light is always on.

The second-level recognition words are used to control the “home”, such as: “turn on the light”, “turn off the light”, “pull open the curtains”, “pull up the curtains”, etc. At the same time, the corresponding serial information is sent to the STM32. The instruction table and the data sent through the serial port are shown in the table below:

Smart Home System Design Using STM32 Microcontroller

Home Control:

The lights are implemented using LED diodes, the curtains are simulated using DC motors, the fans are implemented using 5V small fans, the doors are simulated using SG90 servos, the sockets are simulated using relays, and the security system is implemented using human optical sensor modules. Smoke alarms are implemented using MQ-135 and passive buzzers.

App:

The App uses MIT’s graphical programming app: App Inventor 2, connecting to the microcontroller via Bluetooth module to control our “home appliances”.

OLED Screen Display:

Used to display the working status of each module, the general interface is as follows:

Smart Home System Design Using STM32 Microcontroller

The security mode is as follows (to judge whether someone is present, it is currently ‘no one’, when someone is present it will change to ‘YES’):

Smart Home System Design Using STM32 Microcontroller

Hardware Composition:

The list of components is shown in the figure below:

Smart Home System Design Using STM32 Microcontroller

In addition, due to the power factor of the components, a 5V 2A switch power supply is needed for power supply.

Interface Overview:

Smart Home System Design Using STM32 Microcontroller

System Block Diagram:

Smart Home System Design Using STM32 Microcontroller

Software Design:

Smart Home System Design Using STM32 Microcontroller
The software code will not be pasted here one by one. Reply to “Darwin Says” with: STM32 Smart Home Graduation Project to obtain the final version of the code and App program.

The voice recognition process uses the previous sharing of Darwin Says:

Smart Home System Design Using STM32 Microcontroller

App Design:

Smart Home System Design Using STM32 Microcontroller

Three final suggestions:

1) Power supply issue: There are many power devices, do not use a buck power module, use a switch power supply (5V 2A)
2) Bluetooth transmission issue: Information errors, check if the serial port interrupt priority is set correctly
3) System stability issue: Too many protocols used, the microcontroller’s computing speed is limited
That’s all for this graduation project. Overall, the implementation difficulty is not very high. If you break down the project by function step by step, it will be much simpler. In addition, there are many projects using Apps now. If you have any useful App tools, feel free to share them in the comments below for others in need.
END
Smart Home System Design Using STM32 Microcontroller

Graduation Project Series:

Temperature/Heart Rate/Step Design Based on STM32

Smart Automatic Light-Seeking Fire Extinguishing Car

51 Microcontroller + HX711 to Achieve Simple Electronic Scale

Low-Cost STM32 IoT Portable Power Meter

STM32 + OV7670 Design License Plate Recognition System

Self-Made Mobile App and Arduino to Achieve Smart Monitoring and Control System

STM32F103 + NB Module + MQTT to Achieve IoT Collection System

7 Days to Complete Gesture-Controlled ESP32 WIFI Digital Photo Frame

Self-Made STM32 Multimeter, Outperforming 500 Yuan Regular Brands

Self-Made Simple Blood Oxygen Heart Rate Monitor STM32 + MAX30100

STM32 + Zigbee Networking Ordering System

STM32 Smart Trash Can Automatically Identifying Various Types of Trash

Based on MCU Development Board + Camera to Achieve “Manual” Parking Assistant

STM32 and MPU6050 Achieving Body Sensing Gimbal Design

Is There a More Intelligent “Xiao Ai”?

STM32F4 + H7 Achieving Bionic Robot Dog

Low-Cost 360° Monitoring System

STM32 Version RFID Medical Order Special Wristband

More Wonderful Content:

Project Sharing | Electric Competition Series | Artificial Intelligence | Postgraduate Entrance Exam

Must-Know Knowledge Points | Graduation Project | Switch Power Supply | Job Seeking

We are Ni Mo, the founder of Darwin, a girl who only talks about technology and does not flirt. The Darwin online education platform aims to serve professionals in the electronics industry, providing skill training videos covering popular topics in various subfields, such as embedded systems, FPGA, artificial intelligence, etc. It customizes layered learning content for different groups of people, such as common knowledge points, disassembly assessments, electric competitions/smart cars/postgraduate entrance exams, etc. Welcome to follow us.
Official website: www.darwinlearns.com
Bilibili: Darwin
QQ Group: Group 1: 786258064 (Full),
Group 2: 1057755357 (Full),
Group 3: 871373286

Leave a Comment

×