当前位置:网站首页>03 design of urban road dedusting and cooling system based on ZigBee
03 design of urban road dedusting and cooling system based on ZigBee
2022-07-19 02:01:00 【Steam steam】
1 Preface
Now , The development of science and technology continues to expand the field of wireless communication , The widely used wireless communication technologies are UWB、Wifi、NFC、ZigBee wait , They all have different attributes and characteristics more or less , But in terms of networking capability and flexibility ,ZigBee Technology can have excellent development prospects . This design is based on artificial intelligence , Collect urban road data in real time with high accuracy , And take effective measures to remove dust and reduce temperature , It has promoted the development of urban informatization and improved people's happiness index , Improve people's healthy life with modern technology . The main goal of urban road dust removal and cooling system is to replace the traditional road cleaning method , Break through the barrier of traditional wiring , Realize modern road cleaning . Compared with the traditional wired communication, connect the detection node and the control node , It is more convenient to realize through wireless networking , Good compatibility . The development of the city has gone from the original sound basic facilities to today's refined management and is constantly moving towards a new level , This design will provide an efficient method for urban road environmental data monitoring and processing 、 Intelligent service platform .
2 The system realizes the function
- Networking of all sections : Adopt star topology to space 50 M road greenbelt completed monitoring , Implement multiple ZigBee Terminal node and ZigBee Coordinator node networking .
- Real-time monitoring : Realize the monitoring of all sections of urban roads PM2.5 Concentration and temperature , Monitor the water level of the reservoir in the road .
- Manual mode : adopt ZigBee The key settings on the coordinator node adjust the... Of each road section according to the seasonal changes PM2.5 And temperature threshold , The dedusting and cooling devices of each road section can be switched on and off according to the user .
- Automatic mode : When the road environment PM2.5 The concentration is higher than the optimal threshold in this season and there is water in the reservoir in this section , Automatically turn on the cooling and dust removal device ; When the road temperature is higher than the set value and there is water in the reservoir in this section , Automatically turn on the cooling and dust removal device .
- Alarm function : The water level of the reservoir in each section is too low, and an audible and visual alarm is sent , Remind to add water .
- Host computer design : The upper computer realizes the remote interaction and control with the information of each road section .
3 Design of the lower computer of the system
3.1 Hardware selection of lower computer
Serial number
modular
model
1
Single chip microcomputer
CC2530 Single chip microcomputer
2
Communication module
ZigBee
3
Temperature sensor
DS18B20
4
Water level sensor
——
5
Buzzer
——
6
PM2.5 sensor
GP2Y1010AU0F
7
Water pump drive module
——
8
Display module
OLED The screen
3.2 Physical display of lower machine

4 Host computer design

5 Part of the source code of the lower computer
void APP_Config(void) { usart_config();// Serial port initialization configuration timer_config();// Timer initialization configuration gpio_config(); //IO Port initialization configuration #if defined(ZDO_COORDINATOR) // The coordinator key_config(); // Press the key to initialize the configuration flash_config(); flash_read(122,0,flash_temp,8); if(flash_temp[0]!=0xff){ min_wendu=flash_temp[0]; max_wendu=flash_temp[1]; min_shidu=flash_temp[2]; max_shidu=flash_temp[3]; mode_relay=flash_temp[4]; max_pm25=flash_temp[5]; max_pm25=max_pm25<<8; max_pm25=max_pm25+flash_temp[6]; } display_info_config(); #else HalAdcSetReference(HAL_ADC_REF_AVDD); P0DIR &= ~0x60; //P0.5 P0.6 Defined as input port #endif usart_sentstring("APP Initialization complete \r\n"); printf("printf is ok\r\n"); } void APP(unsigned char task)// The user polls the process { #if defined(ZDO_COORDINATOR) // The coordinator if(flag_beep==1){ if(cnt_beep>2000){ BEEP_ON; cnt_beep=0; }else{ if(cnt_beep>100){ BEEP_OFF; } } }else{ BEEP_OFF; } key_server();// Press the key to scan the process App_Report(); #endif switch(task) // Task progress { case 0:// Serial port process if(rx_update) // Serial command process , received \r\n Update order { rx_update=0; // Clear the update flag bit printf("receive usart command:%s\r\n",rx_temp);// Print received data rtc_usart_time_set(); // Serial port settings RTC Time function usart_set_mode(); usart_set_relay(); usart_set_range(); usart_check_mode(); usart_check_relay(); usart_check_range(); flash_erase(122);// eliminate FLASH delayms(100); flash_temp[0]=min_wendu; flash_temp[1]=max_wendu; flash_temp[2]=min_shidu; flash_temp[3]=max_shidu; flash_temp[4]=mode_relay; flash_temp[5]=max_pm25>>8; flash_temp[6]=max_pm25; flash_write(122,0,flash_temp,8); display_info_config(); wipe_buffer(rx_temp,50);// Clear the serial port cache data rx_index=0; // Serial port cache pointer back 0 rx_flag=1; // The serial port allows you to receive timer1cnt=0; } break; case 1:// Display the refresh process if(keymode==0) { #if defined(ZDO_COORDINATOR) // The coordinator { display_info(); // Temperature and humidity display } #else // Terminal or route { } #endif } break; case 2:// Switch the display process if(keymode==0) { #if defined(ZDO_COORDINATOR) // The coordinator if(timer1cnt>1000) // Timer process { rf_temp[0]='1'; rf_temp[1]='1'; rf_temp[2]='1'; rf_temp[3]='\r'; rf_temp[4]='\n'; rf_temp[5]=mode_relay+0x30; rf_temp[6]=status_relay+0x30; rf_temp[9]=0; RF_ACK(rf_temp); timer1cnt=0; } #else if(timer1cnt>800) // Timer process , Every time 3 Flip the display once every second { timer1cnt=0; } task=0; #endif } break; case 3:// Relay control process #if defined(ZDO_COORDINATOR) // The coordinator #endif task=0; break; case 4: break; case 5: break; default: task=0; break; } } void display_info(void) { unsigned char i; LCD_P8x16(40,0,&number[pm25/100]); LCD_P8x16(48,0,&number[pm25%100/10]); LCD_P8x16(56,0,&number[pm25%10]); LCD_P8x16(40,2,&number[temperature/10]); LCD_P8x16(48,2,&number[temperature%10]); LCD_P8x16(40,4,&number[soil/10]); LCD_P8x16(48,4,&number[soil%10]); if(mode_relay==0){ for(i=0;i<2;i++) LCD_P16x16Ch(16*i,6,22+i);// Automatically }else{ for(i=0;i<2;i++) LCD_P16x16Ch(16*i,6,24+i);// Manual } if(status_relay==1){ LCD_P16x16Ch(112,6,28);// open }else{ LCD_P16x16Ch(112,6,29);// Turn off } flag_beep=0; if(mode_relay==0) status_relay=0;// In automatic mode , Shut down first if(temperature>max_wendu){ if(mode_relay==0){ status_relay=1;} flag_beep=1; } if(pm25>max_pm25 ){ if(mode_relay==0){ status_relay=1;} flag_beep=1; } if(soil<min_shidu){// There is no water at all , Call the police flag_water=0; flag_beep=1; }else{ if(soil<max_shidu){// There's almost no water , Alarm, but it still works flag_beep=1; flag_water=1; } else { if(soil>max_shidu){// Sufficient water flag_water=2; } } } if(flag_water==0)// Water shortage , Regardless of the mode , Turn it off { status_relay=0; } }
边栏推荐
- Activity的启动模式
- Fair Attribute Classification through Latent Space De-biasing
- Hands on deep learning - deep learning computing
- ROC 曲线讲解 (Receiver Operarating Curve)
- 集成学习
- Fair Attribute Classification through Latent Space De-biasing
- uniapp打包H5 空白页面 报错 Uncaught SyntaxError: Unexpected token ‘<‘
- MATLAB :Warning: the font “Times” is not available
- Cocos Creator 3.0 基础——常见操作
- Learning Transferable Visual Models From Natural Language Supervision
猜你喜欢
![[literature reading] counting integer points in parametric polymers using barvinok's rational functions](/img/a2/3e1b248c7cd853ffea7a835111db65.png)
[literature reading] counting integer points in parametric polymers using barvinok's rational functions

【MySQL】windows安装MySQL 5.7

Mxnet network model (V) conditional Gan neural network
Mxnet network model (IV) Gan neural network

L1,L2范数

集成学习

Integrated learning

【文献阅读】MCUNet: Tiny Deep Learning on IoT Devices

Fair Attribute Classification through Latent Space De-biasing

电解电容特性及应用要点
随机推荐
02基于ZigBee的智能家居系统设计
bais mintigation post-processing for individual and group fairness
[literature reading] multi state MRAM cells for hardware neural computing
Leveraging Semi-Supervised Learning for Fairness using Neural Networks
Startup mode of activity
ROC 曲线讲解 (Receiver Operarating Curve)
2章 性能平台GodEye源码分析-数据模块
windwos 下载安装OpenSSH
判断两个数组是否完全相等
[literature reading] vaqf: full automatic software hardware co design framework for low bit vision transformer
Yolov5训练建议
01基于RFID的智能仓储管理系统设计
禁止自作聪明的Safari打开网页时自动播放
Hands on deep learning -- multi layer perceptron (MLP)
集成学习
ResNet
Neutralizing Self-Selection Bias in Sampling for Sortition
二階邊緣檢測 - Laplacian of Guassian 高斯拉普拉斯算子
【Go语言】动态库和静态库详解
06基于STM32的智能电子药盒设计