L77hRM

ruishaMCU

 
Overview

1. Function overview

        Using Renesas MCU as the main control, the 24-bit analog-to-digital conversion chip HX711 measures the output analog voltage of the pressure sensor to obtain the pressure value, which is displayed on the 0.96-inch OLED screen. It is also equipped with TP4054 and DW06D for battery charging and discharging, and The total price can be calculated by inputting the price by touching the buttons.

Physical map

2. Schematic design description

    Electronic scales mainly include measurement, display, battery and touch input modules.

1. HX711 module

2. Microcontroller part

3. Battery management module

4. Touch button module

3. PCB design instructions

    The picture below is the PCB diagram of the functional part. Here, the battery PCB and the PCB of the microcontroller are assembled and separated manually by Jiali Chuang. Pay special attention to the fact that the soldering of FPC connectors is troublesome. I used a heating table to add solder paste for soldering. If you use a soldering iron, it is recommended to extend the soldering pad a little more.

    The location of the interface here is not reasonable, which led to some problems when drawing the 3D model. It was only when making the actual object that I discovered that adjustments were needed. Since I did not get the 3D printing roll, no adjustments were made later.

     Below is the PCB of the touch button. Note that copper cannot be laid around the touch button or on the bottom layer, otherwise it will affect the touch button.

4. Software description

      Use Renesas' library functions to rewrite the control code of HX711, and it can be used normally according to the actual test. Note: The delay time of the for loop cannot exceed 26us (written in the timing of HX711) or it is okay not to need a delay. Some online ones that write a delay of 1ms cannot obtain the data correctly at all.

     Also different from stm32 is that reading the IO level requires using a bsp_io_level_t type variable to accept it, and then making an if judgment, which is different from stm32 directly returning 0 or 1.


3D diagram description

    The picture below is a simple shell made of Lichuang professional prints. The rectangular area is for placing the microcontroller control board, and the circular area is for placing the pressure sensor. Since the resin is not strong enough, three holes are placed at the bottom (the positions are set according to the actual situation, here according to Triangular placement), used to fix the acrylic plate, and then place the pressure sensor on the acrylic plate.

   However, due to the unreasonable PCB layout, some excuse settings are not user-friendly enough for 3D drawings.

Physical display instructions

     Put the Huawei mate30epro mobile phone on the electronic scale (the weight is 198g according to Baidu), and get about 198g from the OLED screen.
   

      Put two Logitech mouse counterweights (both 3.6g) on ​​the electronic scale, and the measured weight is 7g, which is consistent with the measurement results.

   

The OLED screen can also display the time.

As for the touch button function, since the button generation requires jlinkv9, and I don’t have jlinkv9 on hand (poor), I can only give it a try for the time being. Now I can learn to get v9 myself online.

Thoughts on subsequent upgrades

Flash memory can be added in subsequent upgrades to record each transaction, and an intelligent electronic scale can be realized through the wifi module. In the warehousing field, it can measure the use of materials and report them to the cloud. In retail, it can record every transaction. transactions to facilitate monthly turnover statistics.

Demo video

https://www.bilibili.com/video/BV1Wu411r71v/

 

参考设计图片
×
Design Files
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-07-01 01:10:23

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
community

Robot
development
community

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号