In response to the current epidemic situation, an intelligent epidemic prevention access control system is designed. This system consists of STM32F103C8T6 microcontroller core board, color screen LCD display circuit, voice broadcast circuit, non-contact temperature measurement sensor circuit, steering gear drive circuit, WIFI module, button circuit and power supply. This system can collect human body temperature, record the flow of people, measure the temperature and compare it with the temperature threshold. When the measured temperature is lower than the temperature threshold, the LCD displays "Status: Normal", the voice broadcasts "Temperature is normal", and the servo operates (equivalent to opening the gate) ; If the measured temperature exceeds the set threshold, the LCD displays "Status: Attention! Abnormal", the voice broadcasts "Please pay attention to abnormal temperature", and the servo does not operate (passage is not allowed).
This graduation project is the design and implementation of an intelligent epidemic prevention access control system. The modules included in the design mainly include color screen liquid crystal display circuit, camera module, voice broadcast circuit, non-contact temperature measurement sensor circuit, steering gear drive circuit, WIFI module, and button circuit modules and power modules. Early warning of the epidemic is achieved through the cooperation between modules. Once there is a temperature abnormality, the corresponding personnel will be notified to take relevant measures through gate closing and voice broadcast.
The stm32f103c8t6 collects the temperature from the infrared sensor in real time. If the temperature is lower than or higher than the specified threshold, the operating TFT display screen displays the temperature abnormality and the voice module broadcasts. At the same time, it controls the servo to close, simulates the closed state of the gate, and transmits the temperature information through the WIFI module Upload to the background to remind the background staff to report and process.
The difficulty of this question lies in the use of stm32 microcontroller programming, LCD display, voice broadcast module and non-contact temperature measurement module.
Color LCD display : 1.8-inch 128X160 pixel tft screen, which uses ST7735S driver chip, through 14pin, 0.5mm FPC interface (originally I wanted to directly weld the FPC connector by myself, but the technology was not up to standard, and both of them were scrapped) , so it was replaced with a direct plug) connected to the microcontroller and communicated with the microcontroller through the SPI serial port to display the measured temperature or other necessary information.
There are two interfaces, the pin header interface and the FPC interface, you can choose by yourself (the pin header interface requires an additional adapter board, which is available at the link that sells the screen).
Voice playback chip : adopts NV020C-SOP8 voice chip. This chip has a built-in set of PWM outputs that can directly drive 0.5W speakers. It supports 13-bit DAC output and can also be connected to an external power amplifier module; it adopts flexible multiple operation modes (edge button trigger, Level trigger, random key play, sequential key play, etc.); the peripheral circuit is simple and only requires one coupling capacitor. The static circuit is less than 2uA; this system adopts a one-wire control mode, and the microcontroller only needs one IO port to output a timing signal to control the chip to output audio.
It is simple and easy to use, but the disadvantage is that you cannot burn the voice by yourself.
Non-contact temperature sensor : Use GY-906-DCC module, which is small in size and has its own ambient temperature compensation and linear calibration algorithm. It exchanges data with the microcontroller through SPI communication. When the temperature exceeds the set threshold, the microcontroller performs With timely display and logical processing, the accuracy of this module is very high, which can fully meet the needs of non-contact temperature measurement function (this project uses 10cm accuracy).
WIFI module : ESP12F series modules are a series of low-power UART-WiFi chip modules based on Espressif ESP8266 developed by Shenzhen Anxinke Technology Co., Ltd., which can easily carry out secondary development, access cloud services, and realize mobile phone 3 /4G global control anytime and anywhere to accelerate product prototype design. The module core processor ESP8266 integrates the industry-leading Tensilica L106 ultra-low power consumption 32-bit micro MCU in a smaller size package, with 16-bit reduced mode, main frequency supports 80 MHz and 160 MHz, supports RTOS, and integrates Wi-Fi MAC/ BB/RF/PA/LNA, onboard antenna. Supports standard IEEE802.11 b/g/n protocol and complete TCP/IP protocol stack. Users can use this module to add networking capabilities to existing devices or build independent network controllers. This system uses this module to upload data, which can upload data to the backend server in real time for data storage and big data processing.
Only the rx and tx interfaces of esp8266 are used, controlled through AT commands.
Power Module: AMS1117-3.3 is a forward low dropout voltage regulator with an output voltage of 3.3V, suitable for high-efficiency linear voltage regulators , switching power supply regulators, battery chargers , active small computer systems , interface terminals, laptops Power management battery-powered instrument, this system uses AMS1117-3.3 to regulate the 5V power supply to 3.3V to power the microcontroller and wifi module. Referring to the anti-reverse connection circuit in the teaching video of Lanqiao Cup at Station B, three power supply interfaces (USB, terminal block, round head) are designed.
The anti-reverse connection circuit is as follows: the conduction of GND is controlled through NMos.
Main control module: STM32F103C8T6 (STM32F103C6T6 is also available) is a 32-bit microcontroller based on the ARM Cortex-M core STM32 series . The program memory capacity is 64KB and requires a voltage of 2V~3.6V. This system uses stm32f103c8t6 as the main control module. , collect the infrared sensor to obtain the temperature in real time. If the temperature is lower or higher than the specified threshold, operate the TFT display to display the temperature abnormality and the voice module to broadcast, and at the same time control the servo to close, simulate the gate closing state, and transmit the temperature information through the wifi module Upload to the background to remind the background staff to report and process.
In the smallest system of stm32, filter capacitors should be added to the VDD pins of the chip. I was too lazy to add a [manual dog head]. I hope everyone will not follow my [manual dog head], but the impact will not be big [manual dog head] .
Others: The board has a reserved serial port 2 interface, which can be connected to modules such as openmv or k210. When the temperature is abnormal, it can take pictures and upload them to the background, and display the image on the TFT screen through serial communication.
PCB size is 100mm*50mm.
The TFT screen supporting copper pillars are M3*14mm copper pillars.
The diameter of the through holes at the four corners of the board is M3.
The 32.768KHZ crystal oscillator does not need to be soldered, but can be soldered if required for secondary development.
The USB interface is not easy to solder, so you can use low-temperature solder paste + hot air gun/heating table.
The SWDIO debugging interface, serial port 2 interface, servo interface and temperature sensor interface do not have anti-reverse connection circuits. Be careful not to connect the power supply and GND in reverse, otherwise the microcontroller will be burned.
The 1.8-inch TFT has two reserved interfaces, one is a 2X7 2.54mm pin header interface on the front, and the other is a 0.5mm, 14pin FPC interface on the back. Please choose and use it yourself. Choose the FPC interface if you are confident in your welding skills.
The program is generated through STM32CubeMx, a lazy artifact. The main code is as follows:
int main(void)
{
/* USER CODE BEGIN 1 */
float temp=0.0;
peoples = 0;
error_flag = 0;
/* USER CODE END 1 */
/* MCU Configuration--------------------------------------------------------*/
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
HAL_Init();
/* USER CODE BEGIN Init */
/* USER CODE END Init */
/* Configure the system clock */
SystemClock_Config();
/* USER CODE BEGIN SysInit */
/* USER CODE END SysInit */
/* Initialize all configured peripherals */
MX_GPIO_Init();
MX_DMA_Init();
MX_USART2_UART_Init();
MX_TIM1_Init();
MX_USART1_UART_Init();
MX_TIM2_Init();
/* USER CODE BEGIN 2 */
LCD_Init();
LCD_ShowString(5,60,16,"initializing...",0);
__HAL_TIM_CLEAR_IT(&htim2, TIM_IT_UPDATE);
// 使能定时器2更新中断并启动定时器2
HAL_TIM_Base_Start_IT(&htim2);
HAL_TIM_PWM_Start(&htim1,TIM_CHANNEL_1); //启动定时器1 PWM舵机
Servo_Control(45); //舵机调到45度
HAL_Delay(1000); //等待初始化完成
display_init(); //显示初始界面
/* USER CODE END 2 */
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{
HAL_GPIO_TogglePin(led_GPIO_Port,led_Pin);//led灯闪烁,显示程序运行状态
temp = mlx90614_read_temp()+2; //获取温度
LCD_Fill(64,48,lcddev.width,64,WHITE); //清空温度显示
LCD_Fill(64,80,lcddev.width,96,WHITE); //清空状态显示
if(temp >= 33){ //>=30度才会显示
if(temp < 37.4){
LCD_ShowFloatNum1(64,48,temp,4,GREEN,WHITE,16);
GUI_DrawFont16(96,48,GREEN,WHITE,"℃",0);
GUI_DrawFont16(64,80,GREEN,WHITE,"正",0);
GUI_DrawFont16(80,80,GREEN,WHITE,"常",0);
yuyin(0);
peoples++;
LCD_Fill(72,112,lcddev.width,128,WHITE); //清空人数显示
LCD_ShowNum(72,112,peoples,4,16); //显示人数
Servo_Control(135); //舵机调到135度 模拟开门
HAL_Delay(3000);
Servo_Control(45); //舵机调到45度 模拟关门
}else if(temp >= 37.4 && temp <= 42){
LCD_ShowFloatNum1(64,48,temp,4,RED,WHITE,16);
GUI_DrawFont16(96,48,RED,WHITE,"℃",0);
LCD_Fill(0,80,lcddev.width,lcddev.height,WHITE); //清空状态显示
GUI_DrawFont16(24,96,RED,WHITE,"注",0);
GUI_DrawFont16(40,96,RED,WHITE,"意",0);
GUI_DrawFont16(56,96,RED,WHITE,"!",0);
GUI_DrawFont16(72,96,RED,WHITE,"异",0);
GUI_DrawFont16(88,96,RED,WHITE,"常",0);
error_flag = 1;
while(error_flag){
yuyin(1);
HAL_Delay(1500);
}
display_init();
}
}
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
}
/* USER CODE END 3 */
}
There is nothing to say about the code. Just download the program and burn it in. It uses keil5, and those who are capable can modify it by themselves.
The actual objects are as follows:
The ability to take photos is limited, so it’s just okay.
Main control module: stm32f103c8t6/stm32f103c6t6.
LCD: 1.8-inch tft, 9.5 yuan per piece from Xubao + 4 yuan for the adapter board. Link: https://m.tb.cn/h.f942nTN?tk=scxI2X0OH15
Voice playback chip: NV020C-SOP8, 2.5 yuan per piece on a certain treasure, and the store will help record the audio for free (8W 0.5 ohm speakers are required, and more advanced speakers need to add their own audio amplifier). Link: https://m.tb.cn/h.flcN4YZ?sm=5db856, using 1-wire communication, 00H means the temperature is normal, 01H means please note that the temperature is abnormal.
Non-contact temperature measurement sensor: GY-906-DCC module, priced at 33 yuan each, the most expensive consumable in this project.
Servo drive circuit: None... The servo can be either SG90S or MG996, as long as the power supply current is large enough.
WIFI module: ESP12F, one is free at Lichuang Mall for over 200 yuan, and a certain treasure is more than ten yuan (some fish disassembled parts cost a few yuan each).
Power module: LM1117-3.3/AMS1117-3.3.
The board has an anti-reverse connection circuit, so the terminal blocks are not afraid of reverse connection when supplying power. The power supply must be 4.5V-7.2V (the servo directly uses the power supply voltage for power supply, without a DC-DC module, and the maximum withstand voltage is 7.2V).
If there are any shortcomings, please correct me.
All reference designs on this site are sourced from major semiconductor manufacturers or collected online for learning and research. The copyright belongs to the semiconductor manufacturer or the original author. If you believe that the reference design of this site infringes upon your relevant rights and interests, please send us a rights notice. As a neutral platform service provider, we will take measures to delete the relevant content in accordance with relevant laws after receiving the relevant notice from the rights holder. Please send relevant notifications to email: bbs_service@eeworld.com.cn.
It is your responsibility to test the circuit yourself and determine its suitability for you. EEWorld will not be liable for direct, indirect, special, incidental, consequential or punitive damages arising from any cause or anything connected to any reference design used.
Supported by EEWorld Datasheet