Weight_Sensor_Module_V1 - jimaobian/DFRobotWiki GitHub Wiki

Introduction

Weight Sensor Module(SKU:SEN0160) weight sensor module is based on hx711,which is a precision 24-bit analog-to-digital convertor designed for weigh scale and industrial control applications to interface directly with a bridge sensor.compared with other chips, hx711 not only has a few basic function,also contains high integration,fast response,immunity,and other features.the chip lowedrs the cost of the electronic scale,at the same time,improving the performance and reliability.

The input interface of this weight sensor module is used sensor interface,which is compatible with Arduino I/O port.The output adopts compact terminal that makes weight sensor module easier to connect the weight sensor.It's the best choose for electronic enthusiast to do some tiny home scale.

The weight sensor module can be combined with weight sensor on the market. We also help you to pick a small range of weight sensor.

Hardward Requirement

  1. 1x DFRduino UNO R3
  2. 1x Weight Sensor Module
  3. 1x Weight Sensor
  4. 1x Custom 3D printed Framework

Note:The framework will be made by yourself according to the weight sensor machine drawing.The following figure show the weight sensor machine drawing. 500px

Fixing framework figure

450px 450px The figure can be combined with the following connection diagram.

NOTE: Some batch will have an opposite arrow, if you find the data is very large and not correct, just put arrow up.

Connection Diagram

650px

Physical Picture

450px

Note: If you found beating amplitude data changing largely,you should check whether the connection is firm.Or weight sensor wasn't placed flat.

Sample code

Please download the libraries for the sensor first!

/*
 * description:
 * The sample code for digital weight scale of hx711. The weight will be printed in the serial.
 * library host on https://github.com/aguegu/ardulibs/tree/3cdb78f3727d9682f7fd22156604fc1e4edd75d1/hx711
 * connection:
   Hx711.DOUT - pin #A2
   Hx711.SCK  - pin #A3
*/


#include <Hx711.h>
Hx711 scale(A2, A3);

void setup() {
  Serial.begin(9600);
}

void loop() {
  Serial.print(scale.getGram(), 1);
  Serial.println(" g");
  delay(200);
}

Zero adjustment

Thus, far ,the weight scale will be finished within one more step-- zero adjustment.

Open the Hx711 library folder , and find the file Hx711.h, open it. Locate the statement

void setScale(float scale = 1992.f);

You only need to adjust the number 1992 to find the appropriate value for weight scale. Save the h file, and upload the above code again.

Additional information

  • How to calibrate the weight sensor

Answer: For calibrate the sensor for fixing the feedback floating from different sensor, need to set the Scale using the function named "setScale". Default status: void setScale(float scale = 1992.f) *The structure of the weight sensor 450px

image:nextredirectltr.pngGo shopping weight sensor module(sku:sen0160) category: Product Manual category: SEN Series category: Sensor

category: Diagram category: DFRobot

⚠️ **GitHub.com Fallback** ⚠️