6524 views|1 replies

34

Posts

0

Resources
The OP
 

Smart Internet of Things Dormitory Based on STM32 [Copy link]

This case is a work for an electronic design competition. It mainly realizes non-feature speech recognition control, speaker playback, IoT monitoring and control, voice control and other functions. A demonstration video and related code download address are attached at the end of the article.
[ Hardware Preparation]
The modules used in the project are as follows
Because there are many modules, and the serial port and processing speed of the microcontroller are limited, in order to improve the processing speed and reduce the burden of a single microcontroller, the project uses two microcontrollers, called STM32 device 1 and STM32 device 2. I will not draw a circuit diagram. I will use Visio to draw a simple diagram for you. OLED uses a positive atomic OLED screen, so it uses more pins.
[ Software preparation]
Test APP: Gizwits Demo APP, which can be downloaded from the Gizwits Developer Center, or by searching for “Gizwits” in the App Store.
[ General Description]
I divided the project into three parts, namely the smart access control part, the health monitoring part, and the entertainment part. In terms of controlling lights and fans, 24V voltage was used instead of 220V voltage for demonstration.
[ (1) Smart access control system]
For the convenience of description, I divided the unlocking into primary and secondary levels. The primary unlocking is to turn the door handle to unlock the door. The secondary unlocking is to turn the key two to three times or the door buckle two to three times to unlock the door.
The anti-theft door at home has no handle on the outside. You can only use a key to open the door. Even if you are only going out for a short time, you have to use the key to unlock it again, or leave the door a crack when you go out. This makes it easy for criminals to sneak into the room to steal or be locked out by the wind in the corridor. It is only a first-level switch lock. Because the lock core does not move after closing, you can open the door by turning the door handle from the inside. Only when you are going out or sleeping at night will you use the key to lock the door or the door latch to lock it. This is a secondary unlocking. The following figure is the roadmap of the smart access control system
The functions and effects of the modules used in this smart access control system are as follows:
  • STM32F103ZET6: Based on ARM specifically designed for embedded applications requiring high performance, low cost and low power consumption Cortex-M3 core, as the microprocessor of this project. LD3320 voice recognition module: has non-feature voice recognition function, does not require voice training, and is responsible for recognizing voice commands in this system and sending commands to the STM32 microprocessor through UART. RCC522 RFID module: uses radio frequency identification technology to confirm the identity and open the door by swiping the ID card, mainly used for primary unlocking. AS608 fingerprint recognition module: can enter fingerprints, and send confirmation instructions to the microprocessor to open the door after confirming the identity is correct, mainly used for secondary unlocking. Stepper motor: can rotate at any specified angle, control the door handle to unlock and lock the door at the secondary level. SG-90 servo: limited angle rotation, control the door handle to unlock the door at the primary level, not responsible for locking, need to close the door by yourself to lock the door at the primary level. ESP8266 WIFI module: responsible for communicating with Gizwits Cloud, returning APP commands to the microprocessor through the cloud, and realizing APP secondary unlocking and locking, and primary unlocking. (2) Health monitoring system The technical route is shown in the figure below.jpeg[/img]
    The functions and effects of the modules used in this health monitoring system are as follows:
    • STM32F103ZET6: The microprocessor of this project.
    • DHT11 temperature and humidity module: Monitors the temperature and humidity in the dormitory, and uploads them to the APP for display. When it deviates from the normal value, it will prompt you to open and close the window and the micro 130 motor fan.
    • Light sensor: Monitors the light in the dormitory, and uploads it to the APP for display. When it deviates from the normal value, it will prompt you to open and close the curtains.
    • MQ-2 smoke sensor: Monitors the air quality in the dormitory, and uploads it to the APP for display. When the air quality is poor, it will remind you to open the door and window.
    • HC-SR04 ultrasonic module: used to measure height and upload it to the APP for display. Together with weight, it can be calculated whether the body shape is normal.
    • MAX30100 heart rate and blood oxygen module: measures heart rate and blood oxygen, and uploads it to the APP for display.
    [ (3) Entertainment system]
    The technical route is as follows
    The functions and effects of the modules used in this entertainment system are as follows:
    • LD3320 speech recognition module: It has non-feature speech recognition function and does not require speech training. In this system, it is responsible for recognizing voice commands and sending instructions to the STM32 microprocessor through UART.
    • JQ8400FL-10P voice module: respond to voice commands, play the corresponding MP3 file response, realize simple human-computer dialogue, or play music in the SD card according to commands to relax.
    The expected results of the competition are as follows
    In general, the core of the whole system is the STM32 microprocessor, and the ESP8266 module is used to realize communication and transmission with Gizwits Cloud, and the data is sent to the APP, and then the APP's command is returned to the microprocessor through Gizwits Cloud. The voice and playback of the whole system rely on the voice recognition and playback of the entertainment system, and the smart access control system and health monitoring system rely on various sensors and modules. These modules together constitute the smart dormitory system.
    Application of smart access control system: When you rush out of the dormitory on the sixth floor, you realize that the door is not locked when you get downstairs. Are you reluctant to run to the sixth floor to lock the door? With a smart dormitory, take out your mobile phone and click on the second-level lock, the door will be locked immediately, or you can use the mobile phone APP to lock the door at the second level when you arrive at the classroom and realize that you have not locked the door. Isn't it very convenient? When you return to the dormitory and find that you have forgotten your key, you either have to wait for other roommates to come back, or go to the dormitory manager on the first floor to register for a spare key, or your roommates have not brought their keys, so it's a waste. But with a smart dormitory, you can take out your phone and click on the second-level unlocking, or verify your fingerprint, and the door will open immediately. You go out to the bathroom, and the door is suddenly blown shut by the wind. The door handle cannot be turned from the outside. You knock on the door and ask your roommate to open the door for you, but your roommate is too lazy to get out of bed. What do you do? With a smart dormitory, you can swipe your ID card or click on the first-level unlocking on your phone and the door will open. Or if you order takeout in the dormitory and the takeout is delivered and knocks on the door, if you are on the upper bunk and the person on the lower bunk is unwilling to help you get it, what can you do? Click on the second-level unlocking on your phone and ask the takeout guy to deliver the meal to your bed. Health monitoring system application: After staying up late, do you feel your heartbeat speed up? To determine whether it is abnormal, go to the heart rate and blood oxygen module and shout "I want to measure my heart rate" to the voice system, or click the "measure heart rate" button on the APP, put your finger on the module, and your heart rate and blood oxygen will be displayed on the OLED screen and APP. If you want to know whether there is "twenty-five, drum up", shout "I want to measure my height", stand under the ultrasonic module, and your information will be displayed immediately. 25)]Entertainment system application: If you are bored in the dormitory, you can tease the voice system, "Xiao Feifei, play with me", "Go find Siri, that little bitch, I am busy", isn't it interesting? If you want to listen to music, just shout "play music", and the good songs in the SD card will be played in a loop. If you don't like it, just shout "next song" and the song will be switched immediately.
    [ Actual picture]
    All modules are fixed in a shoe box. The test video address is below. Note that the torque of the SG90 servo in the video is too small, so it is impossible to pull the door handle. You can replace it with an MG995 servo.
    Video Demonstration address:
    v.youku.com/v_show/id_XMzYwMDAzNDI0NA==.html
    Project code download:
    download.csdn.net/download /tichimi3375/10411505
    download.csdn.net/download/tichimi3375/10411666[ /font]
    Author: Only Love Shuyu

This post is from MCU

Latest reply

Like it, it's very good. Like it and save it to study slowly, come on! ! Myself! ! !   Details Published on 2024-10-21 12:37
 

409

Posts

0

Resources
2
 

Like it, it's very good. Like it and save it to study slowly, come on! ! Myself! ! !

This post is from MCU
 
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list