当前位置:网站首页>Electronic scale weighing system design, hx711 pressure sensor, 51 single chip microcomputer (proteus simulation, C program, schematic diagram, thesis and other complete data)
Electronic scale weighing system design, hx711 pressure sensor, 51 single chip microcomputer (proteus simulation, C program, schematic diagram, thesis and other complete data)
2022-04-23 14:23:00 【Jiang Yuzhi】
The design requirements
1. The system can realize the basic weighing function of the electronic scale ( The weighing range is 0~10Kg, The weight error shall not be greater than ±0.005Kg);
2. The system shall have keyboard input function , Display weight , The function of calculating the total price ;
3. The unit of unit price and total price is yuan , The maximum amount is 999.99 element , The amount error shall not be greater than 0.01 element ;
4. The system is out of the maximum measurement range 10Kg when , With alarm indication function ( Buzzer 、LED Warning light );
5. The electronic scale is designed with both peeling function and weight calibration function ;
Design Overview
The electronic scale system is mainly composed of the minimum system of single chip microcomputer 、 data acquisition system 、 Human computer interface system 、 The alarm system consists of five parts .
The minimum system of single chip microcomputer mainly includes AT89C51 And classic reset circuit ; The data acquisition part consists of a load cell 、 Signal amplification and A/D The conversion part consists of , Signal amplification and A/D The conversion part is mainly composed of special-purpose high-precision 24 position AD Conversion chip HX711 Realization .
The human-computer interaction interface is keyboard input and dot matrix liquid crystal display , The main use of 4*4 Matrix keyboard and 1602 Liquid crystal display , It can input data conveniently and display data intuitively ; The alarm system consists of buzzer and LED The lamp consists of .

Simulation circuit diagram


Schematic diagram of electronic scale

Analysis of simulation results
open Proteus Simulation file , Its suffix is DSN. Double click the MCU , load main.hex file ( Position in : MCU loading file ); then , double-click HX711 chip , load HX711.hex file ( Position in :HX711 Module load file ).

Click on Proteus Run button in the lower left corner of the software , Run the simulation .LCD1602 Liquid crystal display (LCD) :Welcom to Use Electronic Scale.

Then , After a prompt tone , Red LED The light is on ,LCD Display weight 、 Unit price and total price , All values are 0. here , The system is waiting for the goods to be weighed .
LCD According to the 3 The parameters are :WE(Weight, Abbreviation for weight )、PR(Price, Abbreviation for unit price ) and MONEY( Indicates the total price ).

Press down ‘ weight +’ or ‘ weight -’ key , Simulate cargo weighing , The weighing range is :0~10Kg. If the weight is greater than 10Kg, Overweight alarm , The buzzer beeps , Red LED flashing ,LCD in WE Show :-.–.


Enter the unit price through the matrix keyboard (PR), The maximum input unit price is 99.9, You can enter a decimal point , The unit price is set to the nearest corner . Such as input 5.4 element , Enter the number key 5、 Dot keys and number keys 4 that will do .
Unit price input completed , Automatically display the total price (MONEY), The total price is accurate to the decimal point 1 position ; The maximum total price is 999 element , Greater than this value ,LCD Show ‘-.–’ Indicates that the display range is exceeded .


This simulation design has calibration function , adopt ‘ calibration +’ and ‘ calibration -’ Two keys , It can be used in a small range ( Press down 1 Time , The weight display changes 0.001Kg) Calibrate the weight of the goods displayed on the scale . for example , Put the weight by 3.576Kg Calibrated as 3.574Kg.

After weighing the goods , Click on ‘ eliminate ’ key , Clear the unit price and total price , Click on ‘ peel ’ Key to clear the weight display , Note that the peeling key has the function of clearing the weight display ; Then you can weigh next time .

Simulate peeling function
First, press ‘ weight +’/‘ weight -’ key , Simulate the weight of a basket or box , When this weight is set , Press down ‘ peel ’ key , At this time, the weight display is cleared .
for example , Press down ‘ weight +’ key , Set basket weight 1.083Kg, And then click ‘ peel ’ key ,WE The display is cleared .


After peeling , Press again ‘ weight +’ Simulate the net weight of the goods 4.880Kg, then , Enter the unit price 3.0 element , The total price 14.06 element .

Press again ‘ peel ’ key , here WE Displays the net weight of the goods plus the weight of the basket , The total price also calculates the part of the basket , Press again ‘ peel ’ key , The weight is cleared .

part C Code
void main()
{
init_eeprom(); // Start initializing the saved data
Init_LCD1602(); // initialization LCD1602
EA = 0;
Data_Init();
Timer0_Init();
// The beginning of junior high school , Disconnect
EA = 1;
// Get_Maopi();
LCD1602_write_com(0x80); // Pointer setting
LCD1602_write_word(" Welcome To Use "); //
LCD1602_write_com(0x80+0x40); // Pointer setting
LCD1602_write_word("Electronic Scale");
// Delay_ms(2000);
Get_Maopi();
LCD1602_write_com(0x80); // Pointer setting
LCD1602_write_word("WE:0.000 PR:00.0");
LCD1602_write_com(0x80+0x40); // Pointer setting
LCD1602_write_word("MONEY: 0.00 ");
Display_Price();
// Get_Maopi(); // Weigh the fur
while(1)
{
// Every time 0.5 Weigh once a second
if (FlagTest==1)
{
Get_Weight();
FlagTest = 0;
}
keycode = Getkeyboard();
// Valid key values 0-15
if (keycode<16)
{
KeyPress(keycode);
Buzzer=0;
Delay_ms(100);
Buzzer=1;
while(keycode<16)
{
if(keycode==12||keycode==13)
{
Buzzer=0;
Delay_ms(10);
Buzzer=1;
KeyPress(keycode);
Get_Weight();
flag_key=1;
}
keycode = Getkeyboard();
}
write_eeprom(); // Save the data
}
}
}
//****************************************************
// Weigh
//****************************************************
void Get_Weight()
{
Weight_Shiwu = HX711_Read();
Weight_Shiwu = Weight_Shiwu - Weight_Maopi; // Get the net weight
Weight_Shiwu = (unsigned int)((float)Weight_Shiwu*10/GapValue)-qupi; // Calculate the actual weight of the object
if(Weight_Shiwu > 10000) // Overweight alarm
{
Buzzer = !Buzzer;
LED=!LED;
LCD1602_write_com(0x83);
LCD1602_write_word("-.---");
}
else
{
if(Weight_Shiwu==0)
LED=1;
else if(Weight_Shiwu>0)
LED=0;
Buzzer = 1;
Display_Weight();
money = Weight_Shiwu*price/1000; //money In minutes
// Show total amount
Display_Money();
}
}
//****************************************************
// Get fur weight
//****************************************************
void Get_Maopi()
{
unsigned char clear;
mm: Weight_Maopi_0 = HX711_Read();
for(clear=0;clear<10;clear++)
{
Buzzer=1;
LED=1;
Delay_ms(100);
LED=0;
Delay_ms(100);
}
Weight_Maopi = HX711_Read();
if(Weight_Maopi/GapValue!=Weight_Maopi_0/GapValue)
goto mm;
Buzzer=0;
Delay_ms(500);
Buzzer=1;
}
The shared resources are
(1) be based on 51 SCM and HX711 The electronic scale system design of pressure sensor is completed, and the complete version of the paper is ;
(2)Proteus Simulation file ;
(3)Keil C Program files ;
(4)HX711 Module information ;
(5)Visio flow chart ;
(6) Schematic diagram of electronic scale ;
(7) List of electronic components ;
(8) Excellent literature translation ;
The full set of resources is as follows






Important things are to be repeated for 3 times !
Important things are to be repeated for 3 times !
Important things are to be repeated for 3 times !
Get the graduation thesis of electronic scale design 、Proteus Simulation 、C Program 、 Schematic diagram 、Visio flow chart 、 List of components 、HX711 A complete set of information such as modules .
Please search WeChat for official account : Jiaoyuan Xiaozhi
版权声明
本文为[Jiang Yuzhi]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204231412472284.html
边栏推荐
猜你喜欢

1分钟看懂执行流程,永久掌握for循环(附for循环案例)

LM317的直流可调稳压电源Multisim仿真设计(附仿真+论文+参考资料)

Qt实战:云曦聊天室篇

ThreadGroup ThreadGroup implémente l'interface threadfactory en utilisant la classe Introduction + Custom thread Factory

flannel 原理 之 TUN模式

555定时器+74系列芯片搭建八路抢答器,30s倒计时,附Proteus仿真等

Processing MKDIR: unable to create directory 'AAA': read only file system

ArrayList集合基本使用

xx项目架构随记

统信UOS PHP7.2.3升级至PHP7.2.24
随机推荐
OpenSSH的升级、版本号的修改
本以为能躺着进华为,结果陆续收到京东/滴滴/爱奇艺offer的我迷茫了
C语言知识点精细详解——数据类型和变量【1】——进位计数制
初始c语言大致框架适合复习和初步认识
ssh限制登录的四种手段
基础正则表达式
MySQL同步Could not find first log file name in binary log index file错误
XX project structure notes
Solve the problem of SSH configuration file optimization and slow connection
Web page, adaptive, proportional scaling
Date的after时间判断
Qt实战:云曦日历篇
初识STL
JS parabola motion packaging method
Logical volume creation and expansion
ThreadGroup ThreadGroup implémente l'interface threadfactory en utilisant la classe Introduction + Custom thread Factory
Docker (V) MySQL installation
API gateway / API gateway (IV) - use of Kong - Integrated JWT and fuse plug-in
爬虫练习题(一)
source insight via samba