271 [Complete Course Design] Design of Alcohol Concentration Tester Based on 51 Single Chip Microcomputer-MQ3-ADC0832-WIFI

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

51 Alcohol Concentration Tester Design-MQ-3-ADC0832-LCD1602-KEY-BELL-WIFI

The design is composed of single-chip core circuit + MQ-3 alcohol sensing circuit + A/D sampling ADC0832 circuit + LCD1602 liquid crystal display circuit + button control circuit + WIFI module circuit + buzzer circuit + power supply circuit.

1. The first line of LCD1602 displays the current solubility of alcohol in real time, and the second line displays the set alarm concentration.

2. The alcohol concentration alarm value can be set by pressing the button, and it has the function of power-off storage. When the detected alcohol concentration exceeds the set threshold, an audible and visual alarm will be issued.

3. Upload the alcohol concentration to the mobile APP in real time via the WiFi module.
 

#define uint  unsigned int	 //无符号整型 宏定义	变量范围0~65535

sbit CS=P2^3;		//CS定义为P2口的第3位脚,连接ADC0832CS脚
sbit SCL=P2^2;		//SCL定义为P2口的第2位脚,连接ADC0832SCL脚
sbit DO=P2^1;		//DO定义为P2口的第1位脚,连接ADC0832DO脚

sbit beep = P3^2;   //蜂鸣器IO口定义
long dengji,s_dengji = 50;     //酒精等级

bit flag_300ms ;
uchar key_can;		 //按键值的变量
uchar menu_1;        //菜单设计的变量
uchar flag_clock;
unsigned char MesCount;	   //串口发送计数
unsigned char xdata dis0[16];//定义显示区域临时存储数组

#include <intrins.h>
#include "eeprom52.h"
#include "lcd1602.h"

void uartSendStr(unsigned char *s,unsigned ch

Guess you like

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