Design of digital intelligent electronic calorimeter based on single chip microcomputer

Publisher:剑戟辉煌Latest update time:2013-11-12 Source: dzsc Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

  1. Introduction

  Weighing devices are indispensable measuring tools in industrial and agricultural production and the expansion of commodity circulation. Electronic scales are favored by people for their accuracy, speed, convenience, intuitive display and many other advantages. With the improvement of people's living standards, as the whole nation pays attention to health and the quality of life is improving, in addition to being able to achieve weighing, intelligence and the development of new functions are the main trends in design and research and development. The development of intelligent calorie scale functions has become a new direction, applying electronic technology to daily life, solving and filling the deficiencies and gaps in certain functions of practical household appliances. This paper studies the design of electronic scales based on single-chip microcomputers, develops new functions of electronic scales without increasing costs, designs digital intelligent electronic calorie scales, guides people to live a healthy life, and has practical application and promotion value.

  2. Electronic calorimeter system design

  The weighing sensor senses the measured gravity. In this design, a resistive strain gauge pressure sensor is selected as the electronic weighing sensor. When vertical pressure is applied, the sensor converts the change in resistance value into a weak millivolt voltage signal output. The voltage signal is amplified by the amplifier circuit and input into the analog/digital (A/D) converter, converted into a digital signal and then output to the single-chip microcomputer for processing. The single-chip microcomputer outputs the result obtained by the electronic heat scale to the LCD display according to the heat information input by the matrix keyboard. The overall design of the system is shown in Figure 1.

  

  In Figure 1, the sensor signal conditioning and conversion circuit uses the HX711 chip. The HX711 is a 24-bit A/D converter chip designed specifically for high-precision electronic scales. It has built-in gain control, high precision, and stable performance. The chip communicates with the microcontroller via a 2-wire serial method. The microcontroller reads the measured data, performs calculations and conversions, and then displays it on the LCD screen.

  3. System hardware design

  3.1 Load Cell

  In this design, the weighing sensor uses a high-precision resistance strain pressure sensor with a measuring range of 0-10kg and a measuring accuracy of up to 5g. The resistance strain pressure sensor is mainly composed of an elastic body, a resistance strain gauge cable, etc. It has good stability, high accuracy and sensitivity, long life, and is not very strict on the measurement environment. The internal Huygens bridge is composed of 4 resistance strain gauges. When the strain gauge is stretched or compressed to produce deformation, its resistance value will change, causing the bridge to lose balance and generate a corresponding differential signal for subsequent circuit measurement and processing. The measurement principle of the resistance strain sensor is shown in Figure 2.

  

  3.2 HX711 Circuit

  Figure 3 is a weighing signal conditioning and conversion circuit composed of HX711. Channel A is connected to the sensor, and pins PD_SCK and DOUT form a serial communication line to output data and select input channels and gains.

  

  When the data output pin DOUT is at a high level, it indicates that the A/D converter is not ready to output data. At this time, the serial port clock input signal PD_SCK should be at a low level.

  When DOUT changes from high level to low level, PD_SCK should input 25 to 27 clock pulses. The rising edge of the first clock pulse will read out the highest bit (MSB) of the 24-bit data, until the 24th clock pulse is completed, and the 24-bit output data is output bit by bit from the highest bit to the lowest bit. The 25th to 27th clock pulses are used to select the input channel and gain of the next A/D conversion.

  The number of PD_SCK input clock pulses should not be less than 25 or more than 27, otherwise it will cause serial communication errors. When the input channel or gain of the A/D converter changes, the A/D converter needs 4 data output cycles to stabilize.

  DOUT will change from high level to low level and output valid data only after 4 data output cycles.

  3.3 Matrix keyboard

  When there are many keys in the keyboard, in order to reduce the occupation of I/O ports, the keys are usually arranged in a matrix. In a matrix keyboard, each horizontal line and vertical line are connected by a key at the intersection. In this design, the P1 port of the 8051 microcontroller is used as the keyboard I/O port. The column line of the keyboard is connected to the lower 4 bits of the P1 port, and the row line of the keyboard is connected to the upper 4 bits of the P1 port. The column lines P1.0-P1.3 are connected to the positive power supply +5V respectively, and the column lines P1.0-P1.3 are set as input lines, and the row lines P1.4-P1.7 are set as output lines. 4 row lines and 4 column lines form 16 intersections. Setting a 4×4 matrix keyboard at the intersection can display 0-9 numbers, a decimal point and five function keys.

  3.4 LCD Display

  The LCD uses the 128*64 Chinese character screen JLX12864G-086-PC to display information. This display module can be used as an ordinary image-type LCD display module (i.e., it can display ordinary image-type monochrome pictures), and it also contains the JLX-GB2312 font library IC, which can read the dot matrix data of the built-in font library from the font library IC and write it into the LCD driver IC to achieve the purpose of displaying Chinese characters.

  4. System software design

  This design uses STC89C52 as the core device, uses the keil C51 compiler, and combines the proteus software to perform functional simulation of the design. The system software consists of a timer interrupt module, a keyboard scan module, a display module, and a main program module. The timer is used to achieve weighing every 0.5 seconds. The main program flow chart is shown in Figure 4.

  

  5. System performance test

  In the process of designing the circuit, we first simulated it in the proteus software. The voltage value of the simulated weight is controlled by the potentiometer in the circuit. Changing the voltage is equivalent to changing the output voltage of the weight on the pressure sensor. This is to achieve the process of simulated weighing. After the simulation is successful, the circuit model is actually made, the unit calorie parameters of the food are input, and the physical object is debugged to meet the design requirements.

  6. Summary

  A new type of digital electronic calorimeter has been developed with the microcontroller as the core. It realizes intelligent weighing under the control of software and hardware, and directly converts the weight into the calories of common foods. The design has high accuracy and good stability. Without increasing the cost, the microcontroller technology is used to develop new functions of electronic scales at zero cost, opening up new application paths for electronic scales and making them a must-have electronic product that modern families can afford. Today, when the whole nation pays attention to health and the quality of life is improving, the actual application of electronic technology in daily life provides health references for every household, solves and fills the deficiencies and gaps in certain functions of practical household appliances, and has broad promotion and application value

Reference address:Design of digital intelligent electronic calorimeter based on single chip microcomputer

Previous article:Application of digital filtering anti-interference technology in A/D conversion
Next article:Design of intelligent car based on AT89C51

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号