I actually have a software background so my experience in electrical engineering is somewhat lacking. Never the less, I have given my first Arduino project a go and for the most part I am quite happy. However I feel as though there could be a vast amount of improvement that can be achieved regarding the load cell readings.
I am building a digital scale that weighs a maximum of 40Kg. At the push of a button, the scale outputs the current weight to a pc connected via USB. Everything is working quite well except I am getting a lot of bounce when reading the analog input from the loadcells.
I have 4x 50kg 3-wire loadcells (the ones typically found in bathroom scales – similar to these https://www.sparkfun.com/products/10245 - my wires were different colors, blue, black, red) wired in the configuration below:
I am using an INA125P to amplify the signal to my Arduino as per the diagram below:
- I have a regulated 9v dc external supply powering the entire system.
- I am using a booster to increase the voltage to 10V to the load cells as that is the specified excitation voltage. I am also using this 10V supply to the INA125P
- I have modified a USB cable such that it is a data-only cable by removing the voltage line, so that when the power supply is turned off the entire system turns off and is not powered by the connected USB.
I have basically followed a bunch of online articles, pulled apart a scale, read a bunch of tutorials, a bit of trial and error and came to the above arrangement. This much I was able to do on my own. I have smoothed out the analog readings dramatically on the software end by using a running median combined with an averaging function but still get to much bouncing.
There are loads of articles online that are very helpful in showing exactly how to create a scale using an Arduino and the INA125P, but I was unable to find one that clearly demonstrated how to apply a negative voltage to the INA125P. I recall reading somewhere that I should be able to achieve better resolution by applying a negative voltage to the INA125P but struggled to understand how it was done and now I can’t seem to find where I read it to begin with. Even if I somehow worked out how to create the negative voltage and then worked out how to apply it to the INA125P and managed to use the entire 10-bits of the Arduino’s built in ADC to get a resolution of 1023 I still feel as though the bounce I am experiencing is unusually high, especially on the lower end of the weight (I get almost 200 grams of swing when weighing an object that weighs 400 grams).
After a lot of tinkering and testing I discovered the following unusual behavior…
- The voltage at A0 varies slightly when I change the USB from one pc to another (even such that the usb cable’s voltage line is removed) and as a result the reading on the scale changes slightly from one pc to another.
- The voltage at A0 increases if the PC connected to the USB has the Arduino Leonardo drivers installed (so it is not just connected as a HID device).
I should note that… - Changing the USB from PC to PC shows no change to the excitation voltage or the voltage supplied to the INA125P from the buck booster. - Changing the USB from PC to PC shows no change to the voltage at Aref or at Vin.
I was hoping that I could get the answers to the following questions.
- How can I modify my circuit so as to reduce the bouncing and stabilize the analog signal from the INA125P at A0?
- How do I create the required negative voltage and how do I then apply it to my circuit such that I am able to achieve the full 10bits of resolution?
- How do I stop the voltage variation at A0 when connected via USB to different PC’s?
Any help would be greatly appreciated.