Beruflich Dokumente
Kultur Dokumente
board, a load cell, an interface board added a ‘Hold’ button too as that handy
Features for the load cell, an LCD and laser-cut function that is missing from so many
• Up to 5 kgs plastic parts to make a nice, transparent kitchen scales. To cap it all, a trimmer
• OLED display kitchen scale, and so we ordered one was added for easy calibration of the
• Arduino-based for inspection. Because the kit comes scale.
without a shield to hold all the parts — Shall we have a look at how it all works?
everything is supposed to be hooked
At Elektor Labs, when we decided to post- up with jumper wires (included) — Weight or mass?
engineer this project [3] for publication we decided to enhance it with an In modern science weight is defined as
in Elektor Magazine and started looking OLED display, providing not only more mass × gravitational force and as such
for the parts, we discovered that one display options and graphical fun, but it is a force, expressed in newton (N) or,
of our regular suppliers carries a kit for also freeing up I/O pins that may come in SI base units, kg·m·s-2; the SI unit of
exactly such a scale in their catalog. This in handy when the scale has to be mass is kilograms (kg; kgs). A weighing
kit contains an Arduino Uno-compatible interfaced to some other equipment. We scale measures weight, not mass, hence
4k7
4k7
AREF
GND
13
12
RESET OLED Display
11
3.3V
10
5V K2
9 6
GND GND
8 5
GND VCC
4
VIN 7 SCL
3
6 SDA
2
K1 A0 5 RES
1 1
A1 4 DC
2
A2 3
HX711 Module 3
A3 2
4
A4 1
A5 0
S1 S2
P1
10k
Calibrate/ Hold
Tare
150708 - 11
Figure 3. The schematic of the kitchen scale is very simple because all the clever stuff is done by the HX711 breakout board, the OLED display and the
Arduino Uno.
for weighing scales, mainly because it is OLED display connected to K2, and two
widely available on the Internet in the pushbuttons ‘Tare’ (S1) and ‘Hold’ (S2), gram = scale.get_units(10) *
shape of breakout boards (it’s actually pulled up by R1 and R2 respectively. int(factor) / 1000;
quite difficult to obtain just the IC). The K2 is mounted at an angle to improve ounce = gram * 0.0352739619;
breakout board connects to K1. Note readability. bar = gram*40/5000;
that this connector should be mounted
floating above the PCB, otherwise the Software This is a bit misleading, because the
breakout board will not fit. The microcontroller is executing a rather sketch heavily leans on a library that
straightforward program or sketch, takes care of the communication with the
The output of the HX711 is a datastream since we are using Arduino. Most of the HX711. The measured weight returned
(K1, pin 3) clocked (K1, pin 2) into the sketch is actually dedicated to switching by scale.get_units is a 32-bit signed
ATmega328 microcontroller living on an pixels on and off in the right places on integer, converted to grams with the help
Arduino Uno board. The microcontroller the display; reading the load cell and of the calibration factor set with P1.
also reads the position of a 15-turn converting the measured values to The graphics are handled by the
trimmer for calibrating the scale. grams (g) and ounces (oz) is done in ‘Universal 8bit Graphics Library’ (U8glib).
The user interface consists of a graphic two lines of code. The display shows the measured weight
1
2
3
4
5
6
Figure 4. The OLED display shows the weight in
cial use.
grams and ounces, together with a bar graph.
(150708)
4
3
2
1
a bar graph up to 5 kgs (Figure 4).
When the Hold button (S2) is pressed,
the display freezes and the object can
be removed without losing the measured
weight. Pressing Hold again will return
the scale to normal operation.
S1 is the Tare button (see inset),
pressing it will set the displayed weight
to 0 grams no matter if an object is on
the scale or not.
The software for this project is available
free of charge from the Elektor Magazine
website [1].
FROM THE STORE
Calibration 150708-1
Kitchen scale PCB, bare
Connecting the load cell to the HX711
module (see Table 1) completes the 150708-71
Kitchen scale kit of all parts
assembly of the scale. However, before
it can be used in your next baking or
Web Links
[1] www.elektormagazine.com/150708
[2] An Introduction to Stress Analysis and Transducer Design
using Strain Gauges, www.hbm.com
[3] Original project:
www.elektormagazine.com/labs/5-kg-kitchen-scale-built-on-arduino
Arduino Uno HX711 Load Cell Sensor ADC Module 10KG Load Cell
1 www.handsontec.com
Handsontec. com
We have the parts for your ideas
HandsOn Technology provides a multimedia and interactive platform for
everyone interested in electronics. From beginner to diehard, from student
to lecturer. Information, education, inspiration and entertainment. Analog
and digital, practical and theoretical; software and hardware.
2 www.handsontec.com
The Face behind our product quality…
In a world of constant change and continuous technological development, a new or replacement
product is never far away – and they all need to be tested.
Many vendors simply import and sell wihtout checks and this cannot be the ultimate interests of
anyone, particularly the customer. Every part sell on Handsotec is fully tested. So when buying from
Handsontec products range, you can be confident you’re getting outstanding quality and value.
We keep adding the new parts so that you can get rolling on your next project.
P
Engineering Material Mechanical Hardware Electronics Components
3 www.handsontec.com