Skip to main content

wokwi-hx711 Reference

HX711 Load Cell Amplifier

Pin names

VCCVoltage supply (5V)
DTSerial data
SCKSerial clock

note that E+/E-/A+/A-/B+/B- pins are non-interactive and rendered based on attributes


NameDescriptionDefault value
typeEither "50kg" (default), "5kg", or "gauge""50kg"


{ "type": "5kg" }
{ "type": "50kg" }
{ "type": "gauge" }


The HX711 amplifier allows you to easily read load cells and evaluate changes in resistance. A Wheatstone bridge is used to connect load cells to the IC, which is in turn connected to the microcontroller via VCC, DT, SCK, and GND. Use begin() to initialize the scale and set_scale() and tare() to calibrate it. power_down() and power_up() can be used to bring the ADC into and out of low power mode. get_value() and get_units() are used to read the ADC minus tare and divided, passing an optional integer value to obtain that number of values, averaged. Refer to the HX711 Arduino library for more details on features and calibration.

Arduino code example

#include "HX711.h"

HX711 scale;

void setup() {
Serial.println("Initializing the scale");
scale.begin(A1, A0);

void loop() {
Serial.println(scale.get_units(), 1);

Try this example on Wokwi

Simulator examples