Newbie needs help with ESP8266, HX711 and a load cell


#22

I’m quite pleased with my Cayenne now. It shows weight, temperature, humidity, uptime and RSSI. However, it would be nice with a battery indicator as well. Is it possible to create one in Cayenne and if so, is there any example code somewhere or someone who can help? I am using EPS8266 Wemos D1 mini Pro.


#23

google search to read battery voltage and see first without adding cayenne you can read battery voltage.
here are some post from community Battery Widget and ESP8266 Sleeping Temperature Station


#24

Thanks for support. I’ll check this out.


#26

Hi, you inspire me for a project that control hives in various place.
I am stuck with the weight sensor because i can’t have solid reading. How you manage it? I’m using load cell (10 kg for testing) + hx711 + wemos d1 r2.


#27

can you post the code you are using and first of all solder the pins correctly to HX711.


#28

#include “HX711.h”

// HX711.DOUT - pin #d4
// HX711.PD_SCK - pin #d3

HX711 scale(D4, D3); // parameter “gain” is ommited; the default value 128 is used by the library

void setup() {
Serial.begin(115200);
Serial.println(“HX711 Demo”);

scale.set_scale(); // this value is obtained by calibrating the scale with known weights; see the README for details
scale.tare(); // reset the scale to 0
Serial.print("put know weight);
delay(5000);

Serial.print(":calibration factor is\t");
float fattore= scale.get_units(10)/1000;
Serial.print(fattore);
scale.set_scale(fattore);

Serial.println(“Readings:”);
}

void loop() {
Serial.print(“one reading:\t”);
Serial.print(scale.get_units(), 1);
Serial.print("\t| average:\t");
Serial.println(scale.get_units(10), 1);

scale.power_down(); // put the ADC in sleep mode
delay(5000);
scale.power_up();


#29

The pins are solder correctly and strong i think, i will post a photo tonight


#30


#31

Unless I’m missing something, your readings are not varying by more than 1%. How accurate is the device? (precision!=accuracy)


#32

I don’t have a datasheet, but the cell come from a kitchen balance that have accuracy reading (+ - 100 grams is too much)!


#33

From your screen shot it’s only ±10 grams, unless I’m not understanding it. But like I said in the last post, just because it has 1 digit precision does not mean it is 1 digit accurate and vise versa. Here is a good read about it https://allsensors.com/engineering-resources/white-papers/accuracy-and-precision-for-mems-pressure-sensors