Hx711 Proteus Library Page
Upload this code to the virtual Arduino in Proteus. Use the HX711 library by Bogdan Necula.
#include "HX711.h"#define DOUT 3 #define CLK 2
HX711 scale;
void setup() Serial.begin(9600); scale.begin(DOUT, CLK); scale.set_scale(2280.0); // Calibration factor scale.tare(); // Reset to zero hx711 proteus library
void loop() float weight = scale.get_units(5); Serial.print("Weight: "); Serial.print(weight); Serial.println(" g"); delay(500);
In Proteus, add a Virtual Terminal to see weight readings. Upload this code to the virtual Arduino in Proteus
In the world of embedded systems and IoT prototyping, the HX711 has become an industry-standard analog-to-digital converter (ADC) for load cells and weight sensors. It is prized for its high precision, low noise, and ease of interfacing with microcontrollers like Arduino, STM32, and PIC.
However, before building physical hardware, engineers and hobbyists often simulate their circuits using Proteus Design Suite (ISIS). The problem? Proteus does not come with a built-in HX711 library.
This gap has led to the creation of third-party HX711 Proteus libraries. In this long article, we will explore: void loop() float weight = scale
By the end, you will be able to simulate a complete digital weighing system entirely inside Proteus.
Use this test code to verify the library works with the model:
#include "HX711.h"
// Define pins
#define DOUT 3
#define CLK 2
HX711 scale;
void setup()
Serial.begin(9600);
scale.begin(DOUT, CLK);
// Apply calibration factor (You must change this based on your load cell)
// In simulation, just use a dummy value or calculate it
scale.set_scale(2280.f);
scale.tare(); // Reset the scale to 0
void loop()
// In Proteus, the HX711 model usually outputs a specific raw value
// which changes if you simulate a varying input on pins A+/A-
Serial.print("Reading: ");
Serial.print(scale.get_units(), 1); // Print weight
Serial.println(" kg");
delay(500);