Digital Weighing Scale With Improved Visibility and Battery Life Extension Timer

by MassimoF11 in Circuits > Sensors

896 Views, 6 Favorites, 0 Comments

Digital Weighing Scale With Improved Visibility and Battery Life Extension Timer

Fig 1.jpg

Common commercial bathroom scales allow a long battery life thanks to the use of low-consumption displays (typically LCD without backlight) which, however, in low light conditions are not easily readable.

My idea was to build a load cell based scale with a high-visibility 7-segment LED display, and a timer to completely shut down the circuit at the end of each weighing cycle. My goal was to achieve a battery life of at least 2 years, considering to perform 4 weighing cycles per day.

In addition, to make it user friendly and avoid having to bend every time, the turning on of the scale had to be possible with the simple touch of the foot on a touch-sensitive area of the footboard.

 

Supplies

I used the following materials, but you may find many equivalent or better parts:

  • 3 x 1.5V AA alkaline battery
  • AA battery box, 3 slot like this one (but I recovered an used holder from my scrapped parts box)
  • Cable with JST connector 2 PIN 2,54mm, like this one
  • JST male connector 2 PIN 90° 2,54mm, like this one
  • Touch key switch TTP223, I bought it here
  • 2 x resistor 2.2K, 1/4W
  • NPN transistor BC547, or similar
  • Reed relay 5V SIP-1A05, bought here
  • Diode 1n4004, or similar
  • Arduino Pro Mini 5V/16MHz microcontroller module, like this one
  • Strain gauge weighing kit, 4x50kg cells + HX711 amplifier module, I bought it here
  • LED display module, 4x7segments, I2C interface, like this one
  • Standard DuPont non polarized connectors, right female and bent pin headers strips
  • 3-wire flat cable, 10cm
  • Prototyping board, 90x20mm
  • Prototyping board, 40x20mm
  • Square or rounded square plate, solid wood 250x300x18mm
  • same shape & size plate, plywood 250X300X5mm
  • same shape & size non-slip mat
  • 70 cm adhesive cable duct 1.3x0.7cm, like this one
  • 3D printed parts (see attached .stl files)
  • Wood screws, 8 x M4x16mm - 6 x M2x6mm - 2 x M2.3x5mm - 5 x M3x10mm
  • 3 x neodymium magnet 8x2mm, bought here

Theory

Fig 2.jpg

On the Web you can find many scales designs based on load cells with explanation of how strain gauges convert weight into a change of electrical resistance and instructions on how to build a digital scale.

Personally I found very useful this tutorial by Indrek Luuk (thanks Indrek!), with indication of the files for 3D printing of the supports and the software library to be used.

Although the article is very clear, for a better understanding in the figure above I highlighted the circuit diagram of the cell connections and the equivalent Weathstone bridge. This is also useful for checking the connections with a ohmmeter after the completion of the wiring. For example:

between terminals E+ and E- and between A+ and A- : R=2k

between A+ and E+ / A- and E- / A+ and E- / A- and E+: R = 1.5k

Wiring Diagram

Wiring Diagram_1.PNG

The scale is powered by 3 x 1.5V batteries in series. When the system is turned off, the only load is the touch key switch TTP223. The output pin I/0 is LOW and the total absorption is negligible (less than 10μA). Once the sensor is activated, the output goes HIGH and the reed relay K1 is excited via the T1 transistor. The K1 contact closes and feeds the power to the entire circuit. Immediately after powering on, the microcontroller puts the I/O pin D10 in HIGH state and locks the relay on, even if the touch sensor is released. After a programmable interval (in my case 20 seconds seems adequate) D10 goes LOW and the system is automatically turned off.

The connections between the Weathstone Bridge, the HX711 amplifier and the Pro Mini microcontroller are the standard ones of all similar digital scale designs with Arduino. The LED display communicates with microcontroller via I2C bus.

The FTDI interface of the Pro Mini module, which is required for microcontroller programming and system calibration (see Step 6), does not appear in the wiring diagram, because in normal operation it remains unconnected.

Control Unit

20231009_170307.jpg
20231009_170316.jpg
20231009_170208.jpg

All components of the control unit are soldered onto the 90x20mm prototyping board. Both the micrcontroller and the HX711 breakout board are mounted on female headers for easy replacement in case of failure, and to allow access to the fixing holes of the unit below the two components.

On the Pro Mini board the two analog pins A4 (SDA) and A5 (SCL) required for the I2C bus are not accessible via the pin headers, so it is necessary to connect them directly to the corresponding pins of the J4 output connector with 2 wires soldered on the bottom face of the board.

Touch Sensor

20231016_215119.jpg
Touch Sensor_3_dimensioned.jpg
Touch Sensor_1.jpg

From the 40x20mm prototyping board I made a small "L" shaped board. The TTP223 sensor is mounted via 3-pin male and female pin headers, which also have the function of a 17mm spacer.

I replaced the red SMD LED of the TTP223 with a 3mm blue LED oriented downwards, in order to illuminate the floor and make the activation of the scale more visible even from above.

On the opposite side I glued the 2-way JST connector for the battery and soldered it to the pads in "SMD style".

Finally, I soldered directly on the pins of the 3-pin header the 10 cm flat cable headed with a DuPont female connector.

Assembly - Footboard

Touch sensor
Footboard_bottom.jpg
Footboard_top_dimensioned.jpg
Cover_bottom.jpg
Cover_top.jpg

The frame of the footboard is made of the 18mm thick wooden plate, from which two housings for the battery pack and the touch sensor must be cut out. Of course the cutout size for the battery depends on the battery case you're going to use, consider the dimensions I have indicated in the top view only for reference. The battery case can be secured with a hot glue gun, while the touch sensor module is screwed to the frame bottom, so that the sensor surface is at the same level as the top face of the frame.

In the bottom view you can see the assembly of the load cells on their brackets (3D .stl file attached). Regardless of the shape of the frame, the cells must be placed at the corners of a quadrilateral as large as possible, to ensure optimal weight distribution and mechanical stability.

The electrical wiring is done according the diagram on Step 1. It is important to solder the ends of the cell wires accurately and protect the connections with heat shrink sheats. The wires should not be shortened because it is important to preserve the symmetry of the resistive paths with respect to the slightest changes in cell resistance as a function of load. Excess length should be carefully wrapped and stored in the cable ducts previously cut and attached to the frame.

On the upper face of the frame, 3 M3x10mm screws must be inserted in the positions indicated, which must match the magnets inserted in the plywood cover.

In order to limit the distance between the foot and the touch sensor within its sensitivity range, in the upper left corner of the cover (bottom view) it is necessary to engrave a small area of about 20x20mm with a depth of about 3mm in correspondence with the touch sensor mounted on the frame below. I'm not an expert in woodworking and I haven't got any specific tools, but plywood is quite soft and can be worked manually even with a simple cutter. Be careful, both for this engraving and for the magnet housings, not to pierce the plywood. In this way, the top surface of the plywood cover will be smooth so that the non-slip mat can easily be glued on top of it.

Finally, you can complete the assembly of the footboard by adhering the plywood cover to the frame below by means of the magnetic force of attraction.

Before proceeding to the next step, we need to adjust and test the touch sensor. Using the travel allowed by the pin headers, push the top surface of the sensor as far as possible into the engraved area, until it contacts the bottom of the engraving. After connecting the batteries, place a finger close to the area of the non-slip mat above the sensor – the blue LED will light up. Move your finger away, the blue LED will turn off (see video).

Firmware, Programming and Calibration

Flashing.jpg

The Pro Mini module does not have a USB interface and an appropriate FTDI USB to serial adapter is required to program it. If you're not acquainted with the Pro Mini programming, on the WEB you can find many exhaustive tutorials.

Unfortunately, the Pro Mini's serial interface is not easily accessible once all the electronics have been assembled in its enclosure. Therefore, it is advisable to connect it to the PC for flashing and calibration before the final assembly of the components. For a correct calibration, it is necessary that all suspended parts, even if with low weight (except for the enclosure whose weight is negligible) are taken into account, placing them on the footboard.

Power during programming is provided by the FTDI USB to serial adapter (make sure to select Vsel=5V with the appropriate jumper), so you don't need to connect the touch sensor cable for the time being.

Plug the connectors of the Weathstone bridge and the LED display according to the wiring diagram in Step 2 (in my case the display was supplied with the 4-way I2C flat cable for the connection to the microcontroller, otherwise you have to build it or use jumper wires). Now you can proceed with the connection to the PC and downloading the program with the Arduino IDE. The .ino source code is attached.

In addition to the comments already made in the source code (some of them in Italian, sorry), keep in mind that the measurement unit I used is the kilogram (kg). For pounds, you'll need to convert the result accordingly.

Another note concerns the resolution and the format of the measure. For the purposes of a bathroom scale, I have considered that a resolution of up to the hectogram (a tenth of a kilogram, i.e. only one digit after the decimal point) is sufficient. This means that the rightmost digit of the LED display always represents only the hectograms, while the value in kilos must be aligned to the right starting from the penultimate digit, keeping the dot of this digit always on. Since the addressing of the individual digits of a 4x7-segment LED display (unlike, for example, a 16x2 LCD display) is not very easy, I had to use a somewhat tricky procedure based on checking the weight in grams, before converting it to the desired format.

After downloading the program and putting the system into operation for the first time, the scale must be calibrated. For this, I have included in the source code the "calibrate()" function available in the "Examples" folder of the ADC_HX711.h library. To call this function, open the Arduino IDE Serial Monitor, type the 'r' character, and follow the instructions displayed on the monitor. Note that when prompted to enter the weight of a known mass, the value must be expressed in grams. To minimize linearity errors over the entire measurement range, the larger the weight the better (at least 5kg). Calibration can be repeated at any time, especially when you notice the display not returning to zero after a measurement.

Final Assembly and Test

Assembly_1.jpg
Assembly_2.jpg
Assembly_3.jpg
Digital scale demo

Remove the FTDI adapter and plug the 3-way connector of the touch sensor to the control unit. We can now proceed to the final assembly of the electronics in the enclosure (3D .stl file attached).

Remove the Pro Mini module and HX711 board from their sockets. Attach the control unit to the enclosure with two M2.3x5 screws and reassemble the Pro mini and HX711 onto their sockets. Be careful not to tear or pinch the two SDA and SCL signal wires that must remain under the module.

Secure the display to the respective mounts with 4 M2x6 screws. To improve the appearance and protect the display, I applied a transparent red adhesive film on top. A plexiglas window would be optimal. Fold and store the flat cable as shown in the figure.

Finally, secure the enclosure to the chassis with two M3x10 screws, making sure that the top surface is perfectly even with the mat.

The scale is ready, now you can test it (see video): place your big toe slightly over the upper right corner (yes, it works even when wearing socks!), the LED of the touch sensor lights up and shortly afterwards the symbol "_ _ _ _" appears on the display. Now you can withdraw your foot, wait for "0.0" to appear on the display, now you can get on the footplate and measure your weight. After 20 seconds, the scale switches off.

As far as the power consumption and battery life is concerned, I estimated it as follows:

In standby, the absorption is less than 10 uA, so negligible, while during the weighing cycle the absorbed current is about 40mA. The total duration of one cycle, including the setup time and the delay required to stabilize the HX711, is approximately 30 seconds. This means that each cycle draws about 1200mAs of charge. In order to compare this value with the amount of charge made available by the battery pack, consider that the fully charged battery pack provides up to 3x1.5 = 4.5V. This allows to directly power the circuit without having to add a DC/DC converter which would lower the efficiency. I have checked the datasheets of all components and empirically verified that the system also works with lower voltages, at least down to 3.8V (Pro Mini included). If to be safe we consider a voltage of 4V as the lower limit before the system collapses, this means that we can take advantage of the charge of each AA battery up to the voltage of about 1.3V. According the typical discharge curve of standard 1.5V alkaline batteries this value corresponds to a charge af about 1000mAh. Dividing this by 1200mAs/cycle gives 3600000/1200 = 3000 cycles. Considering taking 4 weighings a day, this finally results in 800 days, so more than two years of autonomy, which was one of the goals of the project.