Basics

...
This digital scale measures the weight of a pen cap as 0.98 grams.
...
This digital scale measures the weight of a pen cap as 0.98 grams.

Digital scales work with the use of a strain gauge load cell. Whereas analog scales use springs to indicate the weight of an object, digital scales convert the force of a weight to an electric signal. Its key components consist of a strain gauge, a device used to measure the strain of an object, and load cell sensor, an electronic device used to convert a force into an electrical signal. A load cell is also known as a force transducer.

Bending the Load Cell

...
A load cell, type double bending beam

When an item is placed on the scale, the weight is first evenly distributed. Under the flat tray of a digital scale you might find, for example, four slightly raised pegs in the corners that serve to distribute the force of the weight evenly. The mechanical design of the digital scale then applies the force of the weight to one end of a load cell. As the weight is applied, that end of the load cell bends downwards.

Deforming the Strain Gauge

...
In this strain gauge, the blue material conducts electricity. It can be pasted onto a backing.

The force of a weight then deforms the strain gauge. The strain gauge can consist of metal tracks, or foil, bonded to a printed circuit board or other backing. When the metal foil is strained, the backing flexes or stretches.

Conversion to Electric Signal

...
Two weights measure 120 grams on this digital scale.

The strain gauge then converts the deformation to an electrical signal. Because the load cell has an electric charge, as it moves downwards, the electrical resistance changes. The resulting small change in resistance becomes an electrical signal. The signal is run through an analog to digital converter, and then passes through a microchip that "translates" the data. As a result of this final calculation, numbers indicating the weight of the object appear on the LCD display of the digital scale.