background image

SparkFun_HX711_Calibration (https://codebender.cc/sketch:123175?
referrer=sarahalmutlaq) by sarahalmutlaq
(https://codebender.cc/user/sarahalmutlaq?referrer=sarahalmutlaq)

È

 Clone & Edit

(/?

referrer=sarahalmutlaq)

3

 Download

(https://codebende

referrer=sarahalmu

[

 Edit

Please select a board

/*
 Example using the SparkFun HX711 breakout board with a sca
 By: Nathan Seidle
 SparkFun Electronics
 Date: November 19th, 2014
 License: This code is public domain but you buy me a beer 

 This is the calibration sketch. Use it to determine the ca
 outputs the zero_factor useful for projects that have a pe

 Setup your scale and start the sketch WITHOUT a weight on 
 Once readings are displayed place the weight on the scale
 Press +/

­

 or a/z to adjust the calibration_factor until th

 Use this calibration_factor on the example sketch

 This example assumes pounds (lbs). If you prefer kilograms
 calibration factor will be significantly different but it 

 Your calibration factor may be very positive or very negat
 and the direction the sensors deflect from zero state
 This example code uses bogde's excellent library: https://
 bogde's library is released under a GNU GENERAL PUBLIC LIC
 Arduino pin 2 

­

> HX711 CLK

 3 

­

> DOUT

 5V 

­

> VCC

 GND 

­

> GND

 Most any pin on the Arduino Uno will be compatible with DO

1
2
3
4
5
6
7
8
9

10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

…

 To program your Arduino from your browser, please use 

Google Chrome (http://www.google.com/chrome/)/Chromium 

(version 41 and above on Linux) or Mozilla Firefox

(http://www.mozilla.org/en-US/firefox/) (32bit only on Windows). 

Dismiss

Once you have calculated your calibration factor of your load cell set up, 
you can move on to other code, such as the simple scale output example 
code, “SparkFun_HX711_Example”:

SparkFun_HX711_Example (https://codebender.cc/sketch:122922?
referrer=sarahalmutlaq) by sarahalmutlaq
(https://codebender.cc/user/sarahalmutlaq?referrer=sarahalmutlaq)

È

 Clone & Edit

(/?

referrer=sarahalmutlaq)

3

 Download

(https://codebende

referrer=sarahalmu

[

 Edit

Please select a board

/*
 Example using the SparkFun HX711 breakout board with a sca
 By: Nathan Seidle
 SparkFun Electronics
 Date: November 19th, 2014
 License: This code is public domain but you buy me a beer 

 This example demonstrates basic scale output. See the cali
 specific load cell setup.

 This example code uses bogde's excellent library: https://
 bogde's library is released under a GNU GENERAL PUBLIC LIC

 The HX711 does one thing well: read load cells. The breako
 based load cell which should allow a user to measure every
 Arduino pin 2 

­

> HX711 CLK

 3 

­

> DAT

 5V 

­

> VCC

 GND 

­

> GND

 The HX711 board can be powered from 2.7V to 5V so the Ardu

*/

#include "HX711.h"

#define calibration_factor

­

7050.0 //This value is obtained

#define DOUT

3

1
2
3
4
5
6
7
8
9

10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

…

 To program your Arduino from your browser, please use 

Google Chrome (http://www.google.com/chrome/)/Chromium 

(version 41 and above on Linux) or Mozilla Firefox

(http://www.mozilla.org/en-US/firefox/) (32bit only on Windows). 

Dismiss

Check out the other example code in the Github repo, or Codebender for 
powering down the HX711 (github, codebender) and known zero startup 
(github, codebender).

Page 9 of 10

Содержание HX711

Страница 1: ...e of the various load cells we carry at SparkFun What You Will Need For this simple hook up guide we will just be hooking up a load cell with the HX711 amplifier and showing how you would hook up four load sensors with a combinator board and the HX711 amplifier To follow along you ll need SparkFun Load Cell Amplifier HX711 Any Strain Gauge Based Load Cell Load Cell 200kg Disc TAS606 SEN 13332 Load...

Страница 2: ...ell you are using the configuration of how it should be hooked up to plates or surfaces will change Below are a few different types of setups Load Cell 10kg Straight Bar TAL220 SEN 13329 Load Cell 10kg Wide Bar TAL201 SEN 13330 1 1 Strain gauges are two wired organized metal foil or wires that are set up in such a way that the resistance changes when it is compressed or stretched When a strain gau...

Страница 3: ...nfiguration in something like a bathroom scale Bar strain gauge based load cells Usually with larger non push button bar load cells you will want to hook up the load cell between two plates in a Z shape with fitting screws and spacers so that the strain can be correctly measured as shown below Page 3 of 10 ...

Страница 4: ...ng is hitting the same spot on the load cell each time but it is not necessary Make sure to read the datasheet for the load cell you are using and get the correct screws to fit into it Note If you are hooking together four of the SparkFun Load Sensors using the Combinator board you should position the four load sensors equidistant from each other just like the bathroom scales shown in this tutoria...

Страница 5: ...metimes instead of a yellow wire there is a larger black wire foil or loose wires to shield the signal wires to lessen EMI Four strain gauges SG1 through 4 hooked up in a wheatstone bridge formation Here we have a large black wire some loose wires and foil and loose wires respectively as EMI buffers In General each load cell has four strain gauges that are hooked up in a wheatstone bridge formatio...

Страница 6: ...cell VDD is the digital supply voltage used to set the logic level PRO TIP In many cases you can just short VCC and VDD together If your microcontroller uses 3 3V logic however you ll want to connect VCC to 5V and VDD to 3 3V Load cell wires hooked up to the HX711 Amplifier board The example code has DAT and CLK hooked up to pin 3 and 2 respectively but this is easily changed in the code Any GPIO ...

Страница 7: ...tched the red and white wires were swapped Also only two of the four sensors used a white wire for the center tap of the load sensor the other two used green I connected the black wires to the red to and the white and green wires to C To determine how to hook up your single strain gauge load cells to the combinator measure the resistance between the three wires You should find a larger resistance ...

Страница 8: ...ce away from your scale consider using an RJ45 connector and an ethernet cable to connect the combinator to the HX711 amplifier Arduino Code Now that you have your load cell amplifier and microcontroller hooked up you can add your code and start calibrating your setup You can download the most up to date code and libraries from the link below GITHUB REPOSITORY If you have never worked with downloa...

Страница 9: ...a Firefox http www mozilla org en US firefox 32bit only on Windows Dismiss Once you have calculated your calibration factor of your load cell set up you can move on to other code such as the simple scale output example code SparkFun_HX711_Example SparkFun_HX711_Example https codebender cc sketch 122922 referrer sarahalmutlaq by sarahalmutlaq https codebender cc user sarahalmutlaq referrer sarahalm...

Страница 10: ...Need even more Check out this awesome article wheatstone bridges and load cell types Getting Started with Load Cells JUNE 11 2015 A tutorial defining what a load cell is and how to use one Page 10 of 10 9 9 2016 https learn sparkfun com tutorials load cell amplifier hx711 breakout hookup guide ...

Отзывы: