Introduction: DIY Arduino Smart Digital Scale | ESP8266 + HX711

About: I'am an Electronics student that really enjoy making new things from garbage, and DIY projects. I am here to share my knowledge with you, and learn with you too.

Hello to everyone, today I am here to show you a very insteresting project that I was working on for a while, it consists on a digital scale using the ESP-12S microcontroller plus a load cell and it HX711 wheatstone bridge to i2c converter, it is capable to measure weight precisely in the spectrum of grams, the sensor I am using is limited to 5Kg but you can use one for smaller or bigger weights.

As you can noticed, I am using the ESP8266 so it has WiFi capabilities that let me in the future send the measure data to the cloud.

The code can be modified to allow the scale to count objects, calculate liquid volume or what you imagine to do with force measuring.

Here I leave you a tutorial with all the information so you can make your own version.If you are a visual learner I know that a video worth more than 1000 words, so here is a Tutorial video. (I am a Spanish speaker, so please consider turning on English subtitles):

Step 1: Skills Required:

This project may seem difficult or very complex, but it is definitely not completely, since you will have all the guidance for the construction, it was difficult for me to design it to make life a little easier for you. Any conceptual doubt, you are free to ask it without problems.


  • You should have an understanding of:
  • 3D Printing (Optional for the case).
  • Arduino programming (I give you the code).
  • Soldering through hole components.

Step 2: Components and Parts List

The Electronics discrete components as resistors and transistors will be attached in a BOM file attached here.

🛒Materials to build it without PCB:

🛒Materials to build it wit custom PCB:

Step 3: Circuit Diagram and Schematic

Here is the Circuit Diagram of our project:

It has all the internal conections of the circuit that will us allow to create the PCB design later.

I also attached the PDF of the Schematics so you can see it better.

Step 4: PCB Design and Ordering

For the implementation of a good project we need a reliable assembly for the circuit that makes it up, and there is no better way to do it than with a good PCB.

Here you can download for FREE the Gerber, BOM and Pick & Place Files, the ones you need to order your PCB on your PCB manufacturing company.

I suggest JLCPCB:

$2 for 1-4 Layer PCBs⚡, Get SMT Coupons🎫

Step 5: 3D Design & Parts

Here you have the STL files for the 3D parts of the project.

  • Case.
  • Plate

Step 6: Assambling the Whole Project

  1. Insert the PCB on the 3D printed case.
  2. Fix the load cell.
  3. Wire up everything with jumper wires.
  4. Glue the button panel.
  5. Place and wire the OLED display.
  6. Fix the plate of the scale and close the case with it.

Step 7: Code and Programming the ESP8266 Microcontroller

Download the CODE here for FREE (just insert 0 in the charge box).

Install the Hx711 Library and Ug2lib attached.

After you have opened the code in your Arduino IDE verify:

  1. That line 26 has: float CALIBRACION = 475910.00;
  2. That line 97 is commented://CALIBRACION = eeGetInt(addr);
  3. This let us firstly to set a calibration parameter that would next be tuned to get the right measurements.
  4. Select the NodeMCU 1.0 board. and the right port after connecting the main board of the project to your PC USB port.
  5. Upload the code.
  6. The scale need to be calibrated, see next step.

Step 8: Calibrating the Scale

After uploading the code the first time, the scale is uncalibrated and if you put for example 1 pound of rice (this was my reference) the lecture will be wrong but near, this why I set the "CALIBRACION" variable to 475910.00, this number work for me, could be different for you.

With the reference Load on the scale (1 pound of rice), click the 2nd button for 2 seconds to calibrate (avoid touching the scale plate). It should now shows on the display the corrected weight, if not, repeat the step.

Step 9: Start Weighing All Kinds of Objects and Enjoy Your Project

The 4th button is the "zero set" or "tare" one.

The 3rd button change the unit from kilograms to pounds.

The 2nd button is for calibrating.

The 1st button is free, so you can add the function you want to it.

Step 10: Real Scenario Test - Let's Cook Some Rice (half a Pound)

Here in Dominican Republic the white rice is part of the Dominican Flag plate, so let's cook some rice, for that we need to boil some salted water and oil, the when apply the rice, but we need exactly half a pound so:

  1. We take the DIY Digital Scale to the kitchen.
  2. Place a cup on top.
  3. Click on the Zero set button.
  4. Fill the cup with rice until the display says 0.500 lbs.
  5. Then we are ready to put the rice in the cooking pot.

Hope you like the project.