Build A Talking Scale With An Arduino, HX711 And The Talkie Library

The following is a brief tutorial covering the construction of a talking scale based on a 328-based Arduino, an HX711 module and the Talkie speech synthesis library. While large talking scales for kitchen and bathroom use do exist, nobody manufactures a miniature pocket scale of the type used to weigh jewellery – and in my case, the tracking force of a turntable’s stylus. Digital scales are readily available for this purpose, but being unable to see their screens I was reliant on a 3rd party for accurate setup of a turntable cartridge. I therefore set about manufacturing a digital scale based on the same principle, but using an Arduino and an interfacing module based around the HX711 ADC chip.

The scale uses a clone of the 328-based Arduino Nano, readily available from most electronics outlets and eBay for a few pounds (or pennies if you’re prepared to weight for China shipping). The same goes for the HX711 module, which is sold under a plethora of brands and names but are all essentially identical.

The load cell used to measure the weight was pulled from a Neoteck digital tracking force scale, available for less than £10. While a load cell on its own can be purchased for less, these scales come with a stainless steel weighing platform which is ideal for weighing a turntable’s cartridge. They also ship with a 5-gram calibration weight which we’ll use.

Other parts including the project box, power button, calibration button, speaker, battery box and wire were from Bitsbox, and I had this 5V booster module left over from a Raspberry Pi project that never got off the ground. The USB connector was removed from the 5V booster module to reduce its profile. There is a tutorial Here which shows a picture of the USB pinout.

Having prototyped the scale and produced the software, the first step was to machine the project box. As I am not especially skilled at freehand cutting with a Dremel, I opted for a range of hand files including a large flat file and a pack of miniature needle files, used to cut the various slots and speaker grill. 3 mm, 2 mm and 7 mm drill bits were required to drill the holes for the buttons, battery wires, pilot holes for cutting the slots and the two screw holes to mount the load cell to the bottom of the case.

Talking Stylus Scale Scale Left View With Buttons And Usb

The battery box with clip-on cover has a switch on its underside which is useless for our purposes. Prying off the plastic retainer over the switch allows you to lift the contacts free, remove the switch and solder directly to the two contacts. It also leaves a nice slot for your wires to protrude from the bottom of the box rather than its end, which in turn were pushed through two small holes in the top of my scale case. The battery box was then secured in place with double-sided tape.

Talking Stylus Scale Internal View Of Boards And Wiring

Perhaps the most challenging aspect of the box design was cutting a slot for the micro USB connector of the Arduino. I wanted this accessible to facilitate software updates and fault diagnosis but wanted it to look neat. I drilled a pilot hole roughly in the centre of the slot position and cut a rectangular slot to the correct dimensions using square and flat needle files. I also had to file away some of the material on the PCB mounts either side of the Arduino as the board was fractionally too wide to slot into place. None of the boards would fit the PCB mounting in the box, so were simply glued flat to the inside top of the case to minimise interference with the load cell beneath.

Talking Stylus Scale Close Up Of Boards

The speaker grill was cut with a slotted design with angled slots to allow for thicker slots and greater coverage, and not at all because I failed to cut my first slot in a straight line. I rather like the design myself and prefer it to the grid of 2 mm holes used in my first attempt at this design which was ruined by a slip of a drill. The speaker is secured with aluminium foil tape which helps to prevent any electromagnetic interference affecting either the internal components of the scale or of course the phono cartridge; particularly where the cartridge is a moving coil with strong magnets. Most of the box is lined with said tape too, besides the top onto which the boards are glued.

Talking Stylus Scale Rear Speaker Grill

Cutting the slot for the load cell wasn’t difficult. Following the dimensions of the original scale casing, I filed a flat slot in the centre of my box where the bottom panel meets the moulded casing. I then filed away the ridge around the bottom panel in that area to form a smooth opening through which the end of the weighing platform can protrude. I had a spare damaged load cell from my prototyping exercise, so secured it in place with double-sided tape and used it as a guide to drill the two mounting holes. A spacer of approx. 1.5 mm in thickness was cut from the base of a spare tool clip and mounted beneath the load cell to raise it slightly off the bottom of the case.

Talking Stylus Scale Overall View Of Open Box With Scale

Turning to the software, the scale uses the HX711 library to read data from the HX711 module and the Talkie library for speech synthesis. This fixed version of the Talkie library is updated to support the latest Arduino compiler. Hex values for words and numbers were pulled from one of the Talkie examples, though a Mac app called Bluewizard can be used to generate them from 16-bit, 8kHz wav files. The EEPROMEx library provides simplified functions to read and write various data types to the EEPROM for permanent storage and is used here to read and write the calibration factor so that the scale need not be calibrated each time power is lost.

Rather than run through the code line by line, I have provided a package including the sketch file and necessary libraries. The code is commented and can be downloaded Here.

Talkie outputs sound via Arduino digital pin 3, which in this case is connected directly to the speaker. This produces a sound of audible volume, though those wishing for louder speech will need to implement some kind of amplifier. Personally, I prefer any talking devices to do so quietly and given a speaker of reasonable efficiency and good speech data the Arduino is perfectly loud enough.

The calibration button is connected to digital pin too and uses the Arduino’s onboard pullup resistor. When held for the duration of the loop (a few seconds), it diverts to the calibration function which allows you to set the calibration factor to a known weight, 5 grams in this case. The calibration factor is stored in EEPROM so the scale doesn’t have to be calibrated each time, though this is recommended for the best accuracy as load cells can drift, especially if mishandled. We use the EEPROM update function to avoid too many writes to the EEPROM, which is rated at approximately 100,00 write cycles. I do intend to implement a tare function whereby the calibration button is pressed momentarily, but am struggling to implement an interrupt on the same button while retaining the calibration function.

Here is a complete list of connections. Note that your modules may differ in naming, but all should be largely the same. Note too that there are many standards for load cell wiring, and the colours may not match up. Here is a colour chart but it is by no means complete, though in my experience most of these cheap tracking for scales share common cell colours.

  • Power:

  • Battery Positive > switch > module +
  • Battery Negative > module –
  • Module 5V > Arduino VIN
  • Module out ground > Arduino gnd
  • Controllers:

  • HX711 SCK > Arduino D5
  • HX711 DT > Arduino D4
  • Speaker + > Arduino D3
  • Cal Button > Arduino D2
  • HX711 VCC > Arduino 5V
  • HX711 ground, speaker -, cal button > Arduino GND (I did this by ground all to one side of the cal switch)
  • E+ > Red
  • E- > Yellow
  • A- > White
  • A+ > Blue

The final step in this project was to manufacture a suitable storage case to protect the scale when not in use. Load cells are especially delicate, hence why commercial tracking force scales have a protective cover. A small wooden box was constructed from some leftover timber, slightly oversized in length with a divider in the lid to prevent the scale sliding forward in place and damaging the weighing platform. felt-lined internally and varnished on the outside, I think it finishes the project off nicely.

Talking Stylus Scale Case Open

This project has been in the works for a while and is one that I’m glad to have finally completed, not least because it is one that serves to aid in a task with which I’ve always struggled. More details, a video demonstration and future software updates can be found on the Project Page. I’m sure there will be more Arduino-base projects on the horizon, watch this space! Until next time…

Join The Discussion