Projects / Arduino
Arduino Scale with LCD
A classic Arduino build: load cell, 24-bit amplifier, LCD and three buttons.
Overview
If you learned on an Arduino Uno or Nano, this project is for you. The ET-M08 is a 5 V, 16 MHz ATmega328PB board that works with the Arduino IDE, and its 5 V Qwiic port drives a standard 16×2 character LCD through the ET-D10 backpack.
The ET-S67 HX711 amplifier reads a bar load cell with 24-bit resolution. The ET-A20 pad gives you tare, units and calibrate buttons, and the calibration is saved in the microcontroller's EEPROM.
- Reads in grams or ounces
- Tare, units and one-button calibration
- 16×2 LCD with backlight
- Calibration saved in EEPROM
What you need
ElectroTrical boards
You'll also need
- 16×2 character LCD (HD44780, 5 V)
- Bar load cell, 4-wire (1 kg or 5 kg)
- Two rigid plates and screws with spacers
- A known weight for calibration (e.g. 500 g)
- 1 Qwiic cable, jumper wires
Wiring
The ET-M08 runs at 5 V, so everything here is 5 V. Don't connect 3.3 V-only boards to its Qwiic port without the ET-A09 adapter.
LCD
| From | To | Note |
|---|---|---|
| ET-M08 Qwiic | ET-D10 Qwiic | 5 V I²C, address 0x27 |
| ET-D10 header | LCD 16-pin header | Solder the backpack to the LCD |
ET-S67 → ET-M08
| From | To | Note |
|---|---|---|
| VBUS | VIN | |
| GND | GND | |
| D2 | DOUT | |
| D3 | SCK |
Load cell → ET-S67 terminals
| From | To | Note |
|---|---|---|
| Red | E+ | |
| Black | E− | |
| White | A− | |
| Green | A+ |
ET-A20 → ET-M08
| From | To | Note |
|---|---|---|
| VBUS | VIN | |
| GND | GND | |
| D4 | B1 | Tare |
| D5 | B2 | g / oz |
| D6 | B3 | Calibrate |
Build it
- 01
Build the scale
Screw the load cell between the two plates with spacers so it can flex, arrow pointing down. Only its end blocks may touch the plates.
- 02
Fit the LCD backpack
Solder the ET-D10 to the back of the LCD. After the first upload, turn its contrast trimmer until the characters are clear.
- 03
Set up the Arduino IDE
Add the MiniCore URL (https://mcudude.github.io/MiniCore/package_MCUdude_MiniCore_index.json) in Preferences and install MiniCore. Select board “ATmega328”, Variant “328PB”, Clock “External 16 MHz”, then the board's COM port.
- 04
Calibrate
Upload, empty the scale and press B1 (tare). Put your known weight on, press B3, and the scale saves the factor. Change CAL_GRAMS in the sketch if your weight isn't 500 g.
- 05
Weigh
B1 tares, B2 switches between grams and ounces.
Arduino code
Written for the ET-M08 ATmega328PB Nano-Style Board. Install these libraries from the Arduino Library Manager:
- HX711 Arduino Library by Bogdan Necula
- LiquidCrystal I2C by Frank de Brabander
#include <Wire.h>
#include <EEPROM.h>
#include <HX711.h>
#include <LiquidCrystal_I2C.h>
const int DOUT = 2, SCK_PIN = 3, B_TARE = 4, B_UNIT = 5, B_CAL = 6;
const float CAL_GRAMS = 500.0;
HX711 scale;
LiquidCrystal_I2C lcd(0x27, 16, 2);
bool ounces = false;
bool pressed(int pin) {
if (digitalRead(pin) == LOW) { delay(30); while (digitalRead(pin) == LOW); return true; }
return false;
}
void setup() {
pinMode(B_TARE, INPUT_PULLUP); pinMode(B_UNIT, INPUT_PULLUP); pinMode(B_CAL, INPUT_PULLUP);
lcd.init();
lcd.backlight();
lcd.print("ElectroTrical");
lcd.setCursor(0, 1); lcd.print("Scale starting");
scale.begin(DOUT, SCK_PIN);
float factor;
EEPROM.get(0, factor);
if (isnan(factor) || factor == 0) factor = 420.0; // rough default until calibrated
scale.set_scale(factor);
scale.tare(20);
lcd.clear();
}
void loop() {
if (pressed(B_TARE)) { lcd.clear(); lcd.print("Tare..."); scale.tare(20); lcd.clear(); }
if (pressed(B_UNIT)) ounces = !ounces;
if (pressed(B_CAL)) {
lcd.clear(); lcd.print("Calibrating...");
scale.set_scale(); // factor 1
float raw = scale.get_units(20);
float factor = raw / CAL_GRAMS;
scale.set_scale(factor);
EEPROM.put(0, factor);
lcd.clear(); lcd.print("Saved"); delay(800); lcd.clear();
}
float g = scale.get_units(5);
lcd.setCursor(0, 0);
lcd.print("Weight: ");
lcd.setCursor(0, 1);
if (ounces) { lcd.print(g / 28.3495, 2); lcd.print(" oz "); }
else { lcd.print(g, 1); lcd.print(" g "); }
delay(200);
}
Troubleshooting
LCD lights but shows nothing
Turn the contrast trimmer on the ET-D10. If still blank, check the address: some LCD backpacks are set to 0x3F instead of 0x27.
Weight negative
Swap the white and green wires (A− and A+), or turn the load cell over.
Upload fails
Check the board settings: MiniCore → ATmega328, Variant 328PB, External 16 MHz, and the right COM port.
Take it further
- Add the ET-A16 buzzer to beep at a target weight
- Count identical parts by weight
- Log weighings to the ET-C06 microSD board
Turning this into a product?
We design custom boards that combine these sensors on one PCB, with firmware and production.