preparation_weight.jpg

Scale

Build your own micro:bit scale with a strain gauge sensor and learn how to measure the weight of objects using electronics! This kit uses a strain gauge, an HX711 amplifier, and a micro:bit to accurately measure pressure and convert it to weight. You'll learn the basics of programming, electronics, and working with analog data in a fun way - perfect for teaching physics, math, or experimenting with measurement and calibration at home.

Description

The strain gauge scale is a project that serves as a practical demonstration of measuring weight using material deformation. The module uses a strain gauge and an HX711 amplifier, which convert the pressure acting on the sensors into a measurable value. The micro:bit then reacts to these changes - it can display the measured weight on the display, activate an alarm when a limit is exceeded, or record values for further processing.

This device is ideal for school lessons and home experiments and does not require any advanced knowledge. It will allow children and adults to learn the principles of measurement, mechanics and microcontroller programming in a fun way.

Connection

Strain gauge

The strain gauge is connected using four wires. On the converter we find the pin VCC (power supply), GND (ground), DT (signal) and SCK pins can be used (signal).
Pin VCC We connect it to the white power rail on the board, which will supply a voltage of 3,3 V.
Pin DT connect to pin 0 (P0), pin SCK pins can be used connect to pin 8 (P8) and finally we ground it so that GND connect to the black grounding bar.

Clock display TM1637

The TM1637 clock display has four wires – VCC, GND, CLK a GOD.
VCC We connect it to the white power rail on the board, which will supply a voltage of 3,3 V.
Pin marked CLK connect to pin 1 (P1), pin GOD connect to pin 2 (P2) and finally ground by connecting GND wires to the black strip on the board.

Recommendation

When connecting, the expansion board must be turned off and the micro:bit disconnected from the power supply.

Program

Basic program

After proper connection, the strain gauge will start measuring data. The display will show the average value of 10 readings.

Tasks

Task 1: Continuous measurement

Add an LED strip to your scale. Then adjust the program to determine one correct weight. This allows you to compare and see the differences between individual measurements. This way you can easily see if an object has the desired weight.

Task 2: Averaging values

Modify the program to average five consecutive measurements.