133 [Complete course design] Design of multi-function elevator system based on STM32 single-chip microcomputer (schematic diagram + program + paper)

1. This product is composed of STM32F103C8T6 microcontroller core circuit + digital tube display circuit + button circuit + LED light indicator circuit + buzzer alarm circuit + power circuit.

2. When the floor height is fixed and the elevator running is known, it can accurately know and display the current position of the elevator with a seven-segment digital tube.

3. Through the stepper motor display, after pressing the button from the 1st to the 7th floor, the stepper motor starts to rotate forward. After reaching the top floor, if you press the 7th floor and the 1st floor, go down, and the stepper motor reverses.

4. The number of floors to go to can be manually set. When the elevator reaches the floor, the system can make interruption processing and stop at the floor.

5. When the elevator works in an unsafe state, the system can make corresponding abnormal processing reactions, such as alarm prompts and the switch will be automatically turned off.

6. The core circuit of the single-chip microcomputer of this design has a power-on reset circuit, a button reset circuit and a crystal oscillator circuit.

[Resource download] The download address is as follows:
https://docs.qq.com/doc/DTlRSd01BZXNpRUxl

#define DIRSHANG 0x01
#define DIRXIAAA 0x02
#define DIRCLOSE 0x03
u8 KEYval=0;
u8 smg_du[10]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f};	 //段码显示
u8 MOTOR_DIR=MOTOR_STOP; 		//步进电机状态	 时钟中断中处理
void JianTou(u8 Dir);	//箭头方向函数
void DisDuan(u8 duan);	 //显示段码
u8 dt_value=1;		  //电梯楼层
u8 HuJiaoCeng[8]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};	//存储所在层标志
u8 dt_s_x;				  //电梯上下标志
u8 YingJFlag=0;			 //应急标志 按键中处理
void LEDopen(u8 num);
 int main(void)
 {
 	u8 i,midceng;
 	SystemInit(); 			 //系统时钟初始化为72M	  SYSCLK_FREQ_72MHz
	delay_init(72);	    	 //延时函数初始化	  
	NVIC_Configuration(); 	 //设置NVIC中断分组2:2位抢占优先级,2位响应优先级
 	LED_Init();			     //LED端口初始化
	KEY_Init();

Related Posts