To measure weight you can use load cell, which work on measure resistance of 4 strain gauges. Strain gauge is resistor, which change its resistance on bending. Values of resistance, which is change is +- 1 ohm, so it need very sensitive measurement. Also it need temperature compesate element, which in our case, is one of strain gauge. Wheastone bridge is circuit, which is used to measure weight using strain gauges.
Step 1: Parts
1x Arduino Uno (or ESP8266 or any microcontroller)
1x HTX711 - very sensitive analog - digital converter to measure resistance of load cell
1x load cell (but only with green wire, others are fake and not work )
Step 2: Wiring
Firstly, load cell has 4 cables, which are for measure resistance using converter.
Load cell -> HTX711
Red cable -> E+
Black cable -> E-
White cable -> A-
Green cable -> A+
Then you must connect converter HTX 711 with Arduino (or any microcontroller)
HTX711 -> Arduino
VCC -> 5 V or 3.3 V
GND -> GND
SCK (CLK) -> 2 (optional)
DOUT (DT) -> 3 (optional)
Step 3: Code
You must download library HX711.h
Code is in picture, you can change DOUT, SCK pins, and also for measure in real units, you must calibrate load.
Step 4: How It Looks?
Every load cell cointain 4x strain gauges, 3 gauges are for measure and 1 is for compesation temperature differences. Every gauges is resistor, which change resistance with bend + temperature.
I bought one bad load cell, and it didn't work. So I shorted temperature element (resistor which compesate temperature differences). It works, but in different temperature it measure differently.