measuring weight via USB with electronic kitchen scales and the Arduino

edit: see this commercially available $19 opensource arduino weight shield!

ingredients

  1. arduino, breadboard, wires (just buy the latest Arduino starter kit,~£25), computer:
  2.  <10 ohm resister, e.g.
  3. an amplifier:INA128P (~£10), e.g.
  4.  electronic kitchen scales, e.g. £10 scales (Salter, 1066BKDR08) from Tescos
  5. A really tiny Phillips screwdriver, and a regular Philips screwdriver.

recipe

  1. Dismantle your scales.  The ‘load cell’ (what measures weight) is the metallic block firmly attached to the plastic encasing.  Notice the four wires connecting the load cell to the circuit board have been conveniently labelled on the back of the circuit board.  Best note which wire goes with which label!  For me it was:
    1. E-= black wire.
    2. E+= red.
    3. S-=green.
    4. S+=white.
  2. Either use a soldering iron or cut these four wires close to the circuit board (if you do the latter, strip some plastic from the ends of the wires exposing say 1cm of wire – best to then fold each exposed wire end over and twirl it around to give each some strength).
  3. Remove the old circuit board as we don’t need it any more.
  4. To make sure everything is in working order it is best to connect up all your components on a breadboard.  I decided to solder the ends of the wires from the load cell onto thicker wire, to make them easier to insert into the breadboard.
  5. For completeness, here is where I placed the components and wires on the breadboard and the Arduino uni:
    1. place the left pin next to the dimple on the INA128P amplifier in hole E8 on the breadboard. Put the pin farthest away from it in F11
    2. E-(black wire) in one of many negative holes on the left hand side of the breadboard(see pic above).
    3. E+(red) in one of the many positive holes on the left hand side of the breadboard.
    4. S-(green) in B9.
    5. S+(white) in A10.
    6. Link +5v on the Arduino to one of the many positive holes on the left hand side of the breadboard.
    7. Link a GND (ground) pin on the Arduino to one of the many negative holes on the left hand side of the breadboard.
    8. Link A5 (an ‘analog in’ pin) on the Arduino to I10.
    9. Use a wire to link G11 to a negative hole on the breadboard.
    10. Use a wire to link G9 to a positive hole on the breadboard.
    11. Use a wires to connect D11 to a negatibe hole on the breadboard.
    12. Connect the resister to E8 and G8 (does not matter which way around).
  6. Hopefully no steps have been missed out above!  If all has gone to plan, using the Firmata software with the Arduino plugged into the computer (see this tutorial on how  install the Firmata software on the Arduino and to run the Firmata software) you will see the Analog pin 5 reading vary as you press down on the load cell.

To come:

  • installing plugs in your weighing scale to make a professional build.
  • interfacing with an Arduino Nano (~£10 ebay). 
  • interfacing all this with research software.
  • calibration via research software.
—thanks to the Arduino Forum for helping with the above circuitry—

 

 

20 Replies to “measuring weight via USB with electronic kitchen scales and the Arduino”

  1. Hi, i want to use a load cell that can read values ​​from 0 to 50 kg, it is possible to use the same circuit?
    thanks
    Salvatore

    1. Should work fine. Does your load cell also have 4 wires coming from it? Post back please with how your project goes.

  2. Hi, really thanks for this resource, it’s very helpful.
    Just one question about the analog input. The value is a number between 0 and 646~ but it seems like stop to receive signal when scale is around 700g/1000g.
    Anyway have you write down a code for arduino to convert that input in weight? Or have you some references about that?
    Thank you very very much
    Francesco

    1. Hi there,
      I actually install Firmata (http://sciencestuff.xperiment.mobi/2012/04/19/arduino-setup-with-firmata/) on Arduinos in my projects and use software on the computer to interpret the info from the sensors. I thought it very likely that each sensor (scale in this case) I used would require different functions to transform Arduino input into weight. Because of this I use calibration weights and look at the resulting data on the arduino and use Excel to permute a function to translate arduino data into weight. I then just incorporate that function into my code.

      I have not explored programming the Arduino with such conversion functions but I’m sure it’s straight forward. I recommend asking the guys at http://arduino.cc/forum/ for help with such code. I’m keen to know what solution you adopt! Can you report back? Thanks, Andy.

  3. Just got this working, Same scales too! Thanks for the assistance !

    Worth noting that changing the resistor will change the gain of the amp. You can get examples from the datasheet for the amp.

    1. Best ask this Question at the arduino forum. I did not need to do this myself afraid. Would be good to hear how you achieve this 🙂

  4. What if, the circuit i build cant detect the object less than 350 gramm??? is it something wrong with my amplifier or load cell??

  5. Hello!,

    I connected a 5Kg load cell via an INA128P as instructed above, with 5V of arduino. But my output never reaches above 2.7V. So I´m loosing about half my expected range. I have tried changing the RG from 0 ohms to about 330 ohms, there’s not much change. Any ideas, much appreciated!!!

    1. Hmm, see James’s comment above about changing the resister. Best ask at the Arduino forum though. They are ace 🙂 Let me know how you solve this problem will you?=

  6. Hi Andy,

    Thanks for the excellent explanation. I just wonder if there is a way to import data (weight) from Arduino to Matlab and process it there. Your help would be highly appreciated. I need to connect the scale to Matlab.

    Cheers,
    Iman

    1. Hi Iman,
      You are not a food scientist by any chance? My own use of this was to replace the >$1k solutions for weighing plates every x seconds during a meal with a $20 solution.

      I know its possible (via software interfacing the comm port), as I use an AIR programme to interface with the arduino+scale. Not sure how via matlab but a quick google: http://playground.arduino.cc/Interfacing/Matlab

      Let me know how it goes?

      1. Hi Andy,

        Thanks for your reply. I am not a food scientist 😛 but the app I am working on is related to food 😛

        I found a way to connect it to Matlab and it worked. Just another question came to my mind which is really bugging me. The A/D converter on Arduino has 10 bit resolution (1024 different numbers). I need a scale which can read from 0 to 5000 gram with a resolution of 1 gram, i.e. 5000 different numbers. How can I deal with this problem? Do I need to buy 16 bit A/D converter? Am I missing something? Could you please let me know which range your scale is. Thanks for your valuable help.

        Cheers,
        Iman

  7. Hi,
    it is a great project. But I do not won’t to lose LCD display on my balance. Is it possible to not get rid of display, and still have connected it to the arduino?

    1. Sorry I can’t help Danijel. I am sure it is, but you would not be able to piggy back this project ontop of the electronics already all connected up. Try asking at the arduino forum?

  8. I have a project to be done to measure a weight of an object using the following components
    1. arduino uno
    2. arduino ethernet shield
    3. load cell(0-5)kgs
    4. hx711 load cell amplifier
    kindly post the arduino code if possible asap.. i am newbie to this

Leave a Reply

Your email address will not be published. Required fields are marked *