Weigh Machine

By S. Bera

0
1508
Comment errors or corrections found for this circuit, and get the chance to win big! You can find our comments section at the end of this page.

Eight years back I purchased a small bathroom scale from @Home ,Mumbai and it cost me a good amount of money then. It’s a simple analog weigh machine. You stand up on the scale, the needle deflects , read the weight – simple and straight forward. It’s big brother – the digital weigh meter was far more costlier then.

But to be frank the digital weigh machine is far more easier and simple if the design is concerned. While the analog machines drifts from zero setting quite frequently which you have to set by turning a thumb wheel and seeing the needle, the digital machines drift can be set extremely easily besides it’s readings are more accurate and precise.

The following article will describe how to build up a simple cheap yet very effective 5KG (max) kitchen weight machine for a penny ! Change the strain gauge for a bigger capacity and your bathroom scale is just ready – all are just the same.

The MCU we would use is an Arduino with boot loader, a strain gauge ,a 16*2 LCD panel , HX711 analog amplifier few contraption, hardware fitting , nuts ,bolts and washers and your weigh machine is up and ready.

Bill of Materials:

Arduino (any make) / ATMEGA328 with boot loader – $2 to $3
5KG weigh scale (strain gauge) – $3 to $4
16*2 LCD panel – $2 to $3
Instrument amplifier HX711 – $1 to $2

While all the above prices are aliexpress.com price some prices are quite comparable from ebay.in & dx.com also.

Preparation: I prefer HX711 over any other instrument amplifier like INA105P because HX711 has a digital output, cheap and it has an adafruit header file for Arduino which makes it further easier to use. The weight scale has a metallic structure surrounded by strain relieving frames which picks up the strain when subjected to weight. The strain gauges are arranged in wheat stone bridge format. One side a voltage is applied while the other side measures the changes in voltage depending on strain it suffers.

Figure 1: wheat stone bridge and load cell connections (Courtesey:instrumentationengineering.org)

That is a typical load cell arranged in a wheat stone bridge format. The output is clubbed into 4 wires. The load is applied at the free end. The strain gauges are applied on all 3 sides to pick up compression and expansions which is nothing but load signal which is processed and measured for weight measurements. The color code of the 4 wires that comes of it has uniform meaning – Red, white, black & green.

RED = + Excitation : This will go to +5Volt or E+ of the HX711 board
BLACK = – Excitation : This will go to ground or E- of the HX711 board
WHITE = – Signal : This will go to A- of the HX711 board
GREEN = + Signal : This will go to A+ of the HX711 board
YELLOW = (may be there or not) : This is the shield wire, to be connected to ground.

The HX711 has another channel left unused or if you have one more load cell to take average , you can connect it to the other channel : B- & B+

That’s more or less uniform for HX711. See picture.

Figure: a typical HX711 module (Courtesy:aliexpress.com)

Operation : The software is built on Arduino-on-board principle. After burning the code into an ATMEGA328 ,the chip is taken out and put onto the production board. The initial reading may have errors as the probe is not yet calibrated. So press the push-button connected to digital pin 10 once and the probe will self calibrate and the initial reading of 0.0 will be shown. The zero set figure will then be stashed into the inbuilt EEPROM of the Arduino. Next time when you restart it after a switch off operation ,the zero set reading will be read from the EEPROM and then the internal calibration will be adjusted according to that and would be shown on the top line. The 2nd line will show 0.0.

While taking reading if you find that the reading reduces when you increase load then just reverse the white and green wires and it will be solved.

Figure: Author’s Prototype

Calibration: The calibration is an important part of measuring devices. For HX711 there is one calibration factor – 7050 which works well for the adafruit modules. Therefore, I’ve not changed it. The other one is the zero_set factor for which I’ve made provision to do it dynamically during operations. After each calibration the zero_set figure goes into EEPROM memory of the Arduino. Next time when you restart the machine , this value will be fetched from EEPROM and then the zero_set is achieved. Thus the zero_set figure moves with the internal EEPROM of the machine.

However, to change the zero set reading , like weighing milk (in a container) you would not be interested to measure the container weight and then deduct it etc. So you put the container on the scale and press the push-button. The container weight will be added to the zero set reading and then a new zero reading will be shown. Now just pour milk and read the weigh reading. To remove the container from the zero set reading just remove the container and press the push button one more time.

Multiplying factor: Since this load cell comes from China ,I don’t know which conversion factor they use. Therefore, change this factor suitably by putting a known weight on the load tray first time. Once this is done next time onwards your machine is through. See this factor commented in the code section very clearly.

Fitting of the scale: If you look at the load cell, it has strain gauge attached on all three side with suitable strain relieving frames in-built with the design. Put some thick washer and then tight it with the base plate and the load plate so that the strain gauges are free from rubbing with the base plate as well as the load plate – our weigh machine is ready now.

Figure: Fitting details

Look at the screw driver – the body of the load cell is cleared of the base plate by using two thick washers. So is the top plate (which is a CD here) is fitted with two thick washers so that the strain gauges fitted on the body of the load cell does not come in contact of the body. Hard flat plates are best suitable for this. This load cell is capable of weighing upto 5KG. I’ve checked with measuring tooth picks (1.7 grams – 4 nos) , plastic tea cup (2.8 grams) to 4.3 KG thick books and each time the same reading appeared. I must say the machine has got excellent repeatability. The error in the measurement is +- 1gm. For precise measurement put the machine in some place where there is no air movement like overhead fan etc.

Figure: Schematic Diagram

Software: The software consists of HX711 header files and the arduino sketch. First add the library files to the Arduino IDE and then run the sketch. To calibrate the probe, press the push button once.

To reduce the number of reading to take for averaging change the following script.

x=scale.get_units(25)*45.3592 ; //convert to gram for 25 readings
scale.read_average(5); //to read 5 average

This line takes 25 or 5 readings and then averages it. To increase the speed ,reduce the number of averages. If it is kept blank ,it will not take any average.

Source Folder: click here


 

LEAVE A REPLY

Please enter your comment!
Please enter your name here