[Graduation project] 7-Wireless transmission design based on STM32 development board (schematic engineering + source code engineering + answer essay + answer PPT)

[Graduation project] Wireless transmission design based on STM32 development board (schematic engineering + source code engineering + answer essay + answer PPT)

mission statement

Main contents:
1. With STM32 microcontroller as the core, cooperate with wireless transmission module;
2. Mainly complete the system's function control, status display, information detection, and the selection of components such as single-chip microcomputers and sensors required for the construction of alarm hardware;
3. Complete the software design and programming of system control;
4. Realize at least one transmission mode among bluetooth, infrared, GPRS, WIFI, etc.
Methods and requirements:
system scheme and overall design: the main content of the design is to complete the drawing of the module circuit diagram and circuit board, complete the writing of the corresponding program, realize the transmission of remote data, and complete the control software design and the drawing and design of the circuit drawing. Contains:
1. Determination of the overall plan; 2. 3. The choice of hardware; Design of each module circuit; 4. Design of software part; 5. Debugging and simulation;
data link
1. Schematic source file
2. System source code
3. Answer paper (low repetition rate)
4. BOM table
5. Answer PPT
6. Paper-related flow chart

design manual

Summary

This design topic is the wireless transmission design based on the STM32 development board. This article chooses to use the STM32 development board to make a smoke and temperature and humidity detection system. The current temperature and humidity are detected by the DHT11 temperature and humidity sensor. The smoke density sends data through the serial port of the microcontroller. The LCD1602 liquid crystal display screen displays the currently detected temperature, humidity and smoke concentration values. The single-chip microcomputer communicates with the mobile phone through the ESP8266 wireless module, and sends the current data to the mobile phone for display. When the detected temperature, humidity and smoke concentration exceed the upper limit, the buzzer will alarm.
The schematic diagram of the system is drawn using AD software, and the programming software used in the program is written in Keil and C language. Purchase components and components for welding and commissioning. Finally, the system is tested and the function of wireless data transmission is completed. Complete this design.

Design framework

insert image description here

Design instructions and design documents

Word count: 21520

insert image description here
insert image description hereinsert image description here

Core code display

int main(void)
{
    
    	
  u16 test,test_adc;	
	delay_init();	    	 //延时函数初始化	  
	NVIC_Configuration(); 	 //设置NVIC中断分组2:2位抢占优先级,2位响应优先级
	KEY_IO_Init();       
  USART3_Init(2400);//串口3初始化,波特率2400	
	TIM2_Int_Init(1000,72-1);  //定时器初始化,定时1MS
	//read_data();//开机读取一次存储值
	delay_ms(300);
  DHT11_Init();	//DHT11初始化
  BEEP_DISENABLE();   //蜂鸣器初始化
	LCD_Init();          // 1602初始化 
	Adc_Init();  //ADC初始化
  esp8266_init();//ESP8266初始化
  while(1)
	{
    
    
test_adc = Get_Adc_Average(ADC_Channel_9,20);//读取通道9的AD值,20ms读取一次
			PPM = test_adc*99/4096;//12位AD,把AD值转换成百分比0~99
			PPM = PPM >= 99? 99: PPM;//最大值不能超过99
		  DHT11_Read_Data(&Temperature,&HUM);//读取温湿度值
		  Get_PM();//获取PM2.5值
		  if(PM25_Value > 999)PM25_Value = 999;
			SHOW_AND_BAOJING_Handle();
      Change_data_handle();//按键调节
		  if(test++>5)//ESP8266延时一段时间,发送一次数据
			{
    
    
					esp_send_buf(0,SendBuf,34);
					test = 0;
			}
			delay_ms(20);
  }
}

Guess you like

Origin blog.csdn.net/qq_22592979/article/details/128125798