IoT Weighing Scale




About: Hey! I'm Henri and I love making things. I'm currently studying to become an architect

Intro: IoT Weighing Scale

UPADTE 23.02.2018

Details of how to use this device with the platform IFTTT now included. This provides a quick and simple way of setting up mobile notifications.


Hi, thanks for taking the time to come and have a look at my instructable. It has been super fun undertaking this project, in making it I have learnt so much and, I hope in reading this you might learn something too.




Through my girlfriend I was introduced to the food sharing app OLIO, an amazing initiative whose goal is to reduce food waste through peer-to-peer food sharing. Check it out and spread the word. With food waste on my mind and the IoT Builders competition here on instructables, I decided I would try and create something that could help reduce food waste.

What I have come up with is essentially a WiFi enabled weighing scale. The device is configured to IBM's Watson IoT Service and from there the data stream is sent through a Node-RED flow to visualise the data.


How can it be used?


This device is not limited to combatting food waste, it can monitor just about anything. A few examples of what you could keep track of:

  • the amount of milk in the fridge
  • any food in the kitchen, never buy something you don't need again!
  • the weight of a plant, so you know when to water it
  • medication, so you can know when an elderly loved one needs to order more
  • keys by the door of a student flat, so you know when your friends are home

The possibilities really are endless, if it can be weighed and its weight changes, this device could be very useful.

Step 1: How Does It Work?

I am an architecture student, not a computer scientist and as such this project has been a steep learning curve. I'm sure there are a great many ways of creating this project, perhaps more simple ways too. I have tried to keep the project as simple as possible. This project handles data in this way:

  • Node MCU ESP8266 receives data from the load cell via the HX711 board
  • NodeMCU connects to the internet via WiFi and sends data to Watson IoT Service
  • Node-RED receives data from Watson IoT Service and visualises the data
  • Data can be accessed from anywhere at the url

What are all these things?

  • NodeMCU ESP8266

The easiest way to describe the NodeMCU ESP8266 is that it is an incredibly cheap "Arduino-like" development board which has WiFi built in. I paid just £3.91 for mine on eBay. Best of all you can program it in the Arduino IDE.

  • Load Cell

This is simply a bar of aluminium with two holes drilled at the centre - when supported at one end and with a load applied at the other an analogue reading is produced.

  • HX711 Board

This is an amplifier which converts the analogue reading produced by the load cell into a digital one readable by the NodeMCU ESP8266. I bought the HX711 and Load Cell together for £3.42 also on eBay.

  • Node-RED

Node-RED takes a lot of the work out of IoT. It requires a much lesser understanding of programming and languages since it is visually based. It is exceptionally easy to link your project to Twitter and send tweets or link your email account and send an email from it.

  • IBM Watson IoT Service

An online cloud service that can securely host you IoT project. Basically in this project the sensor data is sent to IBM's Watson IoT Service where it is received stored and sent on to other places on the internet.

Step 2: What You Will Need - Materials

Shopping List:

This project requires very little in the way of materials. They are as follows:

  • NodeMCU ESP8266 link
  • HX711 Board and 5kg Load Cell link
  • Slide switch equivalent link
  • Dupont cables link
  • HTC Cell phone battery link
  • 100mm x 100mm x 27mm of Oak (you can use equivalent hardwood)
  • Sprung 4 point contact (I salvaged mine from an old printhead)
  • 2 pieces of translucent acrylic 100mm x 100mm x 7mm
  • 2 x M4 countersunk machine screws 18mm long
  • 2 x M5 countersunk machine screws 18mm long
  • 2 x M4 pan-head bolts 15mm long
  • 6 x M5 washers
  • 2 x M5 nuts


My brother had an old HTC cell phone lying around that didn't work anymore hence the battery being used in this project. I am still able to charge the battery using the old phone. If you were to buy the above battery make sure you have some way of recharging it.


I was lucky enough to be able to find the acrylic and oak in the waste bins at my university workshop. I also had a scrap printer lying around from which I salvaged wires, a switch and a spring contact. I also already had most of the nuts, bolts and washers. Altogether I spent around £10.

Step 3: What You Will Need - Tools

I am really lucky to have access to very well equipped workshops at university and before I left for the Christmas break I used a CNC router and Laser cutter. However, you could still achieve this project without those specialist tools. Tools I used were as follows:

  • CNC router
  • Laser cutter
  • Bench-top disc sander
  • Bandsaw
  • Cordless drill
  • Jigsaw
  • Drill bits, various sizes
  • Needle files
  • Sand paper, various grades
  • Wire cutters
  • Pliers
  • G-Clamps
  • 2 part epoxy, Araldite or equivalent
  • Super glue

This list is not exhaustive but the main tools I used are listed here.

Step 4: The Chassis

  • CNC Router

As mentioned earlier I used a CNC router at uni. This is how I made the main enclosure of the device. I have attached the tool-path should anyone want to replicate the piece. I used a 4mm straight router bit.

(At this stage I hadn't completely designed the whole device, it would have been great to have routed out the battery bay and slots in the base. Instead I did this at a later stage with a jigsaw for the battery bay and a drill and needle files for the slots.)

  • Bandsaw

With the CNC router I only marked the perimeter with a 4mm deep cut rater than cutting the entire depth the whole way around. This was because the CNC router is quite slow. I cut the waste off with the bandsaw.

  • Disc Sander

To round off the corners I used a disc sander

Step 5: The Internal Workings

The diagrams above should provide sufficient information on what to wire where.

A few things to note:

  • The load cell should be mounted from the end with the M5 holes. Mine had a sticker showing which way up it should be mounted. I placed 3 M5 washers between the oak chassis and the load cell to give extra space under the suspended end.
  • Make sure nothing ends up under the suspended end of the load cell.
  • Watch the height of the dupont cable connectors. Bend the pins of the NodeMCU ESP8266 if necessary, you don't want them to touch the underside of the weighing pad.
  • I mounted the NodeMCU ESP8266 upside down, this meant I could attach cables more easily. It also means you can reset the module using a pin through a small drilled hole in the oak chassis.
  • Using some very small screws you can secure the NodeMCU ESP8266 and the HX711 to the oak chassis through the pre-drilled holes on both the boards.

Step 6: The Base

Since the battery is rechargeable it was necessary to make it easily accessible. The base is made up of a rounded square piece of acrylic with two pan-head machine screws which protrude the thickness of the base of the oak chassis. These two screws slot in to two key hole slots cut into the base of the oak chassis and slide across to secure the base.

To make the key hole I drilled a 5mmØ and a 3mmØ hole a centimetre to one side. I then used a round needle file to connect the two. You can see the base being removed in an earlier video in the instructable.

Step 7: The Top


The weighing surface (top) is pretty much the same as the base. It is also made from 7mm thick acrylic. Two holes are drilled and countersunk to line up with the load cell mounting holes. These countersunk holes then receive two M4 countersunk machine screws which are 18mm long. It is important they are countersunk to ensure a flat weighing surface.


I placed two M5 nuts over the load cell holes to allow a gap between the underside of the weighing surface and the load cell bar. Place the acrylic on top and tighten.

Step 8: Hardware Is Done

Great, we have finished our hardware. Now time to get the software up and running.

Step 9: Software

Arduino IDE

Download the two .ZIP files. Add the pubsubclient library in the Arduino IDE by going to Sketch>Include Library> Add .ZIP library...

You will also need to add the NodeMCU ESP8266 board to your Arduino IDE. I found this instructable to be very informative and useful in getting started with the Arduino IDE and NodeMCU ESP8266 link.

Open the Arduino sketch and edit the following:

#define WLAN_SSID "your_network_name" //Put your SSID here

#define WLAN_PASS "your_network_password" //Put you wifi password here

You will also need to edit the following 4 lines however you won't know your relevant details until the next part of this step (configuring your IBM Bluemix device):

#define ORG "your_organisation_ID"

#define DEVICE_TYPE "your_device_type"

#define DEVICE_ID "your_device_ID"

#define TOKEN "your_token"

IBM Bluemix

The first thing you need to do is go and sign up for a free trial of IBM Bluemix link. I figured a screen-shot series (above) would be the best way to describe how to configure the online portion of the software. Follow that and once you know your organisation_ID, device_type, device_ID and token go back and edit the Arduino sketch.

Another thing you will need to do is to add the Node-RED dashboard so that you can use the "gauge" node. Instructions are included in the screen shot series.


You will find that the number you get is wrong, i.e when nothing is on the scale it doesn't read 0. Find the line of code in the Arduino sketch:

valCalibrated = (val - 4137240) / 234.20;

Start by substituting this line with just "valCalibrated = val" take a note of the value arriving at the Node-RED debug window. Let's assume that value is 2500 for example. Re upload the sketch with this line:

valCalibrated = val - 2500;

Now you need to work out your scale factor. Place a 100g weight on the scale. Note the number arriving at the Node-RED debug window. Let's assume it is 1500. Since this is the value for 100g our scale factor is 100 times smaller i.e. 15

valCalibrated = (val - 2500) / 15;

A video which really helped me understand calibrating a load cell can be found at the following link

Final Notes

Upload the sketch for a final time. Now go to you should find a nice looking gauge with a live feed of data coming from your IoT Scale. Well done!

Step 10: Use It

Put something on the scale and keep track of it from anywhere you have an internet connection. Any problems at all please leave a comment or message me. Hope you have enjoyed this instructable.

Happy making!

Step 11: Appendix


My original intention was to make the weighing scale pad from concrete, not acrylic as shown. I love the combination of concrete and oak. However, the maximum thickness I wanted to cast it at was too thin and the strength was compromised. I thought it looked pretty and it took me a lot of time to make so I thought it deserved a picture.


At the beginning of the project I was hoping to host the Node-RED flow myself on an Ubuntu server I made from an old laptop. This instructable helped me a lot in doing that link. I then managed to run Node-RED from it after following this tutorial link.

This all worked great on the local network however I couldn't get it to work consistently remotely since I don't have a static IP address. In the end it worked out much better doing it through IBM's platform.

Step 12: Update 2018

In November 2017 I was approached by a fellow instructables member. He runs a home distillery and was looking for a device to keep track of the receptacle collecting the alcohol. He told me my device was the only thing he could find that met his requirement, so he commissioned me to build him two.


Because I was now selling the scale, I decided to make a few small changes that would ensure the device was a bit more durable and easier to use. Firstly there was no need for the devices to be battery powered and as such they now just run off a 5v usb mains socket. This is supplied via a micro usb port (the black protrusion). The biggest change is the way the data is handled.


Using the platform 'If This Then That' commonly abbreviated to IFTTT, makes the process much simpler. I made a Webhooks applet that when triggered sends a notification via the IFTTT app to the user's mobile device. This 2 minute youtube tutorial is all you need to know to make this work.


I have provided the code used to make this new way of handling the data. There are four bits of information you need to change to get it to work for you. 1. Your Internet SSID 2. Your Network Password 3. Your IFTTT key 4. Your IFTTT Webhooks event name. You will also want to change/add conditions for sending a notification. The example I have included will send a notification every 10 seconds if the weight is greater than 400g.


One more thing to consider is the calibration of the scale. Details of how to do this is included in previous steps of this instructable.


Again if you have any questions, please leave me a comment below. Thanks!



    • Electronics Tips & Tricks Challenge

      Electronics Tips & Tricks Challenge
    • Audio Contest 2018

      Audio Contest 2018
    • Plastics Contest

      Plastics Contest

    12 Discussions


    18 days ago

    Hi Henri I am trying to rebuild this unit for a waste management project. I have just about everything done except for getting this error code. I've removed the .h and re-added, but that is not working. Where in the 8266 code can I look for declaring D2.

    exit status 1

    'D2' was not declared in this scope

    1 reply

    5 months ago

    Good Day

    I am working on a scale to send level of certain containers much like yourself, to clients. I have the scale working and sending the data to a server which in return tel client via email that the setpoint has been reached. I am currently prototyping. The problem I have is that I cannot get the HX711 to communicate with the ESP8266-12E. I'm using an INA125 at the moment mut the price is a lot more than the HX711. What code did you use for the HX711.

    1 reply

    Reply 4 months ago

    Hey, all the code I used is within this instructable. For a detailed and very helpful tutorial on the HX711 and amplifier see this video:

    Hope that helps!


    7 months ago

    Actually, I am trying to apply this same approach to create a fitness/performance tracker.. I built it about a year ago with an arduino uno plus load cells and a touch screen but it would make more sense to do it using IoT.

    Since most of it was already built all I had to do was hook up my hx711 to the ESP8266 and add a battery. So, that's done and I think I have the Watson/Node RED stuff done. All that is left to do is get the Arduino code loaded onto the ESP8266. Which i have tried just about everything i can find and nothing is working. The problem seems to be that I cant see the serial port for the board.. Did you have any issues with this?

    As far as the IFTTT I will look into it but I believe I have the Node RED part all set up.

    Here is a pic of the old set up..

    3 replies

    Reply 7 months ago

    Does the picture show a kind of pull-up hanging fitness thing? Looks cool!

    So you are having trouble with the ESP8266, I take it you are using a NodeMCU.

    Have you added the board in the Arduino IDE board manager. If not, have a look at this quick start to NodeMCU instructable:

    I think you will also need to change your baud rate to 115200 when you get into the serial monitor.

    Hope that helps


    Reply 7 months ago

    yeah its called a hangboard for developing fingers strength for climbing.

    And yes, using the NodeMCU you suggested. even bought some extras to make sure i didnt have a bad one.

    I went through the exact set up and added the board as described. the baud rate is set to 115200. I have tried a couple different versions of arduino software and even saw some where describing using a jumper wire on the board. . nothing seems to work. also tried it on a Dell PC and Mac..

    What version of arduino did you use? You never had any issues like this?


    Reply 7 months ago

    I do remember having a couple of issues when I first did the project and found that I couldn't get the board to work properly on my Mac. However, you say:

    "The problem seems to be that I cant see the serial port for the board"

    I was always able to connect the board and upload code, I just got messages in the serial monitor something along the lines of "wdt rest". When I moved over to Windows I had no problems and got the code working.

    Are you able to uplaod any code to the NodeMCU?

    Revisiting the project this year I really had no problems. I'm using 1.6.14 Arduino IDE. I bought standard NodeMCUs from ebay. Have you got more than one board to test against?


    10 months ago

    Great project! How often does is send a measurement? also, How long does the battery last?

    3 replies

    Reply 10 months ago

    Hey! Thanks for your comment. I can't remember how often it sends a measurement, I could look back at the code but I believe it will have been about once a second. Although, you could easily program it to make more or less frequent measurements depending on the application. The battery I used was out of an old mobile phone, on a full charge, since the device requires very little power, the device could operate (I guess) for several days, although I never properly tested it. Alternatively it could be run off the mains electricity continuously.


    Reply 8 months ago

    got it!

    I have have followed all the steps and am creating the flow in Node-Red but when trying to install the node-red-dashboard it wont install.. By this i mean when i click install it does nothing. IBM support states that I "forgot to edit my package.json file" but from what i can tell this requires a git repository..

    I didnt see anything in the pics describing that creating a git repository.. did you have issues with this or were there any other steps left out?

    When i search installing the node-red-dashboard nobody comments on other requirements to install it..


    Reply 8 months ago

    Hey Joshua,
    To be honest I don't remember the Node-Red stuff so well. I actually rebuilt this project very recently. Someone approached me through Instructables to build two for them. As such I revisited the code and decided it wasn't a very user friendly process to setup the Node-Red stuff.


    Instead I setup an applet on 'if this then that' IFTTT. It's a great website which you can do some really neat stuff with. In the case of the person who contacted me to build them two scales I made an applet that sends a notification to their phone that a certain weight has been reached.

    If that sounds like something you would like to do let me know and I'll send you the Arduino sketch. It is super easy to setup so in my opinion drop Node-Red.

    Out of curiosity, have you built a scale. Would love to see a picture if you have :)