275 [Complete Course Design] Infrared Controlled Trash Can Design Based on 51 Single Chip Computer-Infrared Obstacle Avoidance

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

51 infrared control trash can design-infrared obstacle avoidance-infrared pair tube-voice-RELAY

This design is composed of STC89C52 single-chip circuit + infrared obstacle avoidance sensor circuit + infrared pair tube circuit + voice module circuit + relay module circuit + power supply circuit.

1. If the infrared obstacle avoidance sensor detects an obstacle, the relay is closed, otherwise, the relay is disconnected. (The relay is connected to the electromagnetic lock)

2. If the infrared pair tube detects that the garbage is full, the voice loop alarm: the garbage is full, please replace it as soon as possible (voice messages can be recorded by yourself). Otherwise, no alarm is issued.

sbit srd = P1^2;		//继电器
sbit isd = P1^3;		//语音模块

bit isdFlag;		//语音标志位

unsigned long time_20ms=0;		   //定时器计数

void Init_Timer0(void);
void uartSendStr(unsigned char *s,unsigned char length);
void UART_Init(void);
void uartSendByte(unsigned char dat);

void main (void)
{     
	Init_Timer0();        //定时器0初始化
	UART_Init();

 

Guess you like

Origin blog.csdn.net/theroadon/article/details/109261651