Yeahhh...you're at the top of my "I REALLY dig your project videos" list. Thanks for sharing the goodness man!
@RalphBacon7 жыл бұрын
Thanks for saying so, John, it's greatly appreciated. And luckily for you, there are quite a few project videos here, not to mention all the other ones just generally demonstrating something Arduino-related! Nice to hear from you.
@jeffbluejets26265 жыл бұрын
Almost 4 years on and still getting compliments ....great stuff...love you videos and explanations ...excellent.
@RalphBacon5 жыл бұрын
Has it really been that long? That load cell coffee coaster of mine still works too! Thanks for your kind words, Jeff, good to hear from you.
@stephenhenry10388 жыл бұрын
Thank you so much for posting this! I have my little 100g scale up and running finally. I was struggling with an instrument amp but once I swapped it out for an HX711 my load cell is giving me a nice, steady reading. Just what I needed!
@RalphBacon8 жыл бұрын
That's great news, congrats on getting it working (simple when you know how, right?). My Coffee Cup Coaster is the envy of all my workmates and I still have to build another for home use.
@nickcooper71336 жыл бұрын
Great video, very informative. I must admit @ 21:20 I was thinking "they are all gonna tumble and land on the HX711 board & short it out" lol. Thankfully they didn''t else you would have been waiting on the slow boat again! ... Keep up the great work, I find them very inspiring. Much appreciated.
@RalphBacon6 жыл бұрын
Ha Ha! I see how you might have thought that, but they did balance quite nicely. Thanks for your support, nice to hear from you.
@whitefields55957 жыл бұрын
Ralph, thanks for doing all the heavy lifting for us on this technology and hanging it all together. As a cyclist I want to measure the power I am using. Commercial devices use a load cell on the crank arms but are £lots. I will build upon your work here, using wireless and let you know!
@RalphBacon7 жыл бұрын
Good luck with your project, whitefields5595 and thanks for posting.
@fabioarias56767 жыл бұрын
Thank you for your patience. 1. the weight scale has a surface or platform where I place objects and that surface has a weight where I place that value. Where can I subtract that weight? 2. That value of scale.tare (20) the 20 of where it leaves.
@RalphBacon7 жыл бұрын
Hola Fabio! You do not subtract the weight of the platform on which you place objects. You must leave the platform ON the Load Cell and then run the zeroise (scale.tare) function. Then you have calibrated to 0g WITH the platform on the Load Cell. Think of a kitchen scale. You leave the ingredients bowl ON the scale when you add the ingredients, right? This is explained in my final sketch (I put my EMPTY cup on the coaster, run the zeroise function and then it will recognise whether coffee is in the cup or not). I hope this makes sense and helps you move forward in your project.
@JohnUllrey8 жыл бұрын
This video will be a big help to me on a project I have in mind. Thanks for posting it. I was going to comment about your seed value earlier in the video still having .95 on it while you added 5 or subtracted 5. Glad to see you went to a whole number for your calibration_factor in the final code. Cheers!
@RalphBacon8 жыл бұрын
+John Ullrey I'm glad the video helped. That's what they are there for, to get people thinking "Well if he can do that I could ..." and so on.
@HermannKerr4 жыл бұрын
Ya I got it into my head to build a beer making machine using smaller batches (
@RalphBacon4 жыл бұрын
Good luck with this, Hermann, sounds like fun!
@JDI4DAVID7 жыл бұрын
Hi Ralph. Your videos are very useful and I will soon be relying on one of them for wireless connecting multiple Nanos to a central data logger. My system uses the HX711 to read a 200 kg load cell. This clever chip is an adjustable gain ADC giving an output proportional to the bridge voltage ratio. That is the ratio between the voltage between the A+ and A- pins and the excitation voltage applied between E+ and E-. The load cells should come with a certificate that tells you what this is at the rated capacity and this will typically be about 2 mV/V. This ratio is factored up by the gain of the HX711 which you can select up to 128. In my case 0.002 V/V becomes 0.256 V/V. The HX711 has a full range of - 0.5 to +0.5 which it represents as a 7FFFFF to 800000 in HEX. So if my 200 kg load cell produces 2 mV/V at its rated capacity this will give a digital output of 0.256/0.5 x 0x800000. This is how one can calculate the calibration factor for your load cell.
@RalphBacon7 жыл бұрын
Interesting data there, David, and the fact that you expect (in this case) 2mV/V change per kg it means we're expecting that the change is linear (well, it *has* to be: if we calibrate at one weight we expect the change to be linear). I expect that once we exceed its rating the value just tops (or bottoms) out - with my Coffee Cup Coaster I notice that a very big cup of coffee (probably) weighs more than 500g and the coaster just reports 500g (or thereabouts) for some time. It still detects tiny amounts of coffee left, though, even though the relative weight is much less (compared to my normal, lightweight cup). At higher weights (like your 200kg one) I'm guessing it must be more difficult to get the granularity of small weight changes (eg 1g or even 100g) that is easy to detect with my 500g Load Cell.
@JDI4DAVID7 жыл бұрын
Ralph S Bacon My load cell has an output of 2 mV/V at 200 kg. I suspect your cell will produce 2 mV/V at 500 g.
@JDI4DAVID7 жыл бұрын
I looked up your load cell and discovered that it has an output of 1 mV/V. The text states: 'Model: YCZ-191 Rated Load: 500 (g) Rated output: 1.0 ± 0.15mV / V. So you might expect a nominal to output of 0.001 x 128/0.5 x 0x800000 at 500 g.
@JDI4DAVID7 жыл бұрын
What often catches me out is that this hexadecimal figure is a twos compliment value so that the decimal has two be halved to represent a voltage ratio of 0.5 I calculate a nominal sensitivity of 2148 per gramme for your setup. This is not a perfect match for the figure you determined for your range of test weights but at least it is in the right ballpark.
@SimpleEnough2k95 жыл бұрын
I'm pretty new to the Arduino world, so please bare with me. As a small Arduino project, I considered to create some sort of water dispenser logging unit. The older water distributors have the bottle upside down on the top. The model I bought has the bottle in the base, hidden from the view. Since the bottle isn't visible, I thought to create something to indicate roughly how much water there is left. I didn't want to go for intrusive ultrasonic sensors or alike. I came up with the simple idea to simply weight the bottle and evaluate the quantity left. I have four cells and a HX711 mounted on a MDF board, used as the weighting plate. I've been able to calibrate and weight different items with a decent amount of accuracy. Unfortunately, when there is a power outage, or if the Arduino is reset, the values returned by the HX711 are no longer valid unless the bottle is removed. Is there a way to get around this situation ? Simply put, the weight reading before a reset or power outage should be pretty much the same as the one read once the Arduino has restarted, which actually isn't the case. By the way, would the "tare()" command be called or not, has no effect on the outcome. Some guidance and advice would be greatly appreciated.
@RalphBacon5 жыл бұрын
Unfortunately, once the weight is on the HX711 then that becomes part of the calculated initial weight. A bit like having a cooking bowl on a kitchen scale and adding flour. Then switching off the scale and back on. Now the tare (zero) weight includes both bowl and flour, you can't separate the two. There are two immediate ways forward I can think of: 1. Have you considered adding in some sort of battery powered backup to your Arduino? A single LiPO could power it for quite a while, especially if you put the Arduino to sleep between measurements. I did a video on a suitable 18650 battery module (battery not included) in video 115 (kzbin.info/www/bejne/bpfMiqmkd6mmeqc) that could at least give you some ideas. 2. Log the latest weight (eg in grams) to the Arduinos EEPROM. On switch on, the Arduino reads the EEPROM to determine whether there is a "last known weight" and adds / subtracts that onto/from the current bottle weight. When you refill the bottle (reset the system) just let the Arduino know to clear the EEPROM to zero. If you would like to discuss this further off-line my email is in the About tab on this channel on a PC (not on your mobile app) and you can contact me to explore this (even) further. Good luck with whatever approach you decide.
@SimpleEnough2k95 жыл бұрын
@@RalphBacon Hi Ralph, I succeeded at fixing my problem. I added a call to the get_offset() function during the calibration process of the unit. Once the calibration was done and the scale_factor with the scale_offset were determined, I saved the corresponding values aside. In my project's sketch, the setup() is setting the offset using the set_offset(scale_offset) function. I also included the set_scale(scale_factor) function call, using the scale_factor I saved earlier. Doing so, there is no more need to call the tare() or set_scale() functions without parameters. I only need to set the offset and scale factor once in the setup() and perform a get_units() call where ever needed. After a power cycle or a reset of the Arduino, the readings are resuming with the proper values, no need to remove the bottle from the plate. Now I can concentrate on other sections of my project knowing that the scale portion is pretty much under control. Still need to do more to incorporate the logic in my final project but at least it looks good so far. Thanks for your help !
@RalphBacon5 жыл бұрын
Glad to hear it, always good when a project works according to plan.
@jeffbluejets26265 жыл бұрын
Ralph...did you see I put a link to another library for the HX711 which seemed to fix a compile error I had with another program AND "FENRIR from 3 months ago" had the same with your code when using the bogde library. Still waiting for my load cells to arrive to try it and make sure it works ok but the different library fixed the compile error. Do you think there might have been a change in the bogde library causing an error.??
@RalphBacon5 жыл бұрын
I saw that Jeff, thanks. That why these days I usually put a copy of the library I actually used in my GitHub because we know THAT version worked. Breaking changes are a fact of life, I'm afraid. They call it an "improvement"!
@RalphBacon8 жыл бұрын
Incidentally if you don't already have Notepad++ installed on your computer do it now! It's free and deals with all sorts of files - the above files in the HX711 library can all be read using Notepad++ which is easier than having to fire up the Arduino IDE everytime. Website: notepad-plus-plus.org/
@doverivermedia39372 жыл бұрын
Excellent, interesting and insightful videos John. Very helpful as I'm a newbie to micro electronics. Thank you ! Would you mind if I pick your brains on something ? So one project I'm about to embark on requires a weight measurement (sub 1kg) to be remotely txt to me on a weekly basis. From what I'm seeing on you tube my initial thoughts are an Arduino Nano to GSM Sim 800L hooked up to a 500g load cell and HX 711 board. Are there better suggestions ? And would it be possible to get it all to 'wake up' and transmit the txt with weight (and remaining battery life info) then shut down again automatically ? Alternatively to just txt me when the weight drops to the 'tear point' ... I'd prefer not Lipo due to fire risk so ideally a standard 9v battery ? It will be in a remote location so needs to be super low consumption to extend the battery life and avoid frequent visits. Any pointers would be highly appreciated. Thanks. Phil ... 🇬🇧
@RalphBacon2 жыл бұрын
I'm sure I replied once to this comment before! Your system seems OK but if you don't want to use (LiPO) batteries then the system needs to be powered all the time. If that is true then there is no need to "sleep". If you use traditional Duracell-style batteries they would last a long time if you just send the data weekly. Frankly, if it were me, I'd use an ESP32 (TTGO v1.7.1) which has provision for a small (LiPO) battery to be attached (as I have here in the workshop) that sends the data every 15 minutes. In your case, you could send the data to ThingSpeak hourly / daily / weekly for no charge then look at the data one time to see what the history of measurements were. Your phone could even run a free ThingSpeak widget to see the data (as I do). Because the ESP32 can sleep for long, long periods it is ideal to run from a LiPO or other (non-flammable) battery although you will need to investigate the best module for battery operation. I've found the ThingPulse Feather has a low standby current requirements of about 14μA - not quite the 2μA of a native ESP32 but would still last a long time. If you don't like the ThingSpeak idea, you could log the information within the ESP32 on a webpage and interrogate that on demand (which I also do for my workshop heater controller). Depends on your programming skill level, I suppose. Let me know if you think this is of interest.
@doverivermedia39372 жыл бұрын
@@RalphBacon Thats Odd Ralf. I didn't send a repeat to my knowledge. Must be gremlins in the works somewhere. Anyway, your response is super helpful and I'll digest further when I'm back home. I've just taken delivery of a comprehensive elegoo arduino kit, so I'll be getting to grips with their sensors and associated tutorials / basic coding before heading off with my bespoke project. Once again, many thanks for your responses.and pointers ... 🇬🇧
@gabrielm48504 жыл бұрын
lovely gadget. Now you may want to use a WS2812 as a status LED. Very helpful.
@RalphBacon4 жыл бұрын
Good idea!
@youwuyou8 жыл бұрын
I am going to build a load sensor design for my grad project. Subscribed and hope it goes well.
@RalphBacon8 жыл бұрын
+youwuyou Glad you found it inspirational for your grad project! And thanks for subscribing too.
@elkodude4 жыл бұрын
Say Ralph, can you help me? I got here via John Hart's Dragon weigher. Keep getting an error when I try to verify either of the codes you fellows have posted. Has to do with the HX711 scale (DOUT CLK); line. "no matching function call to 'HX711::HX711 (int,int)'
@RalphBacon4 жыл бұрын
This (probably) means that whilst Arduino has found the HX711 library (class) it cannot find a function called "scale" that allows two parameters (DOUT, CLK) both of type int. Check the variable type(s) you passing to this function and use what is expected (see my demo sketch).
@elkodude4 жыл бұрын
@@RalphBacon Thank you for the prompt reply, unfortunately, my 75 year old brain is not what it used to be. After watching more videos and looking at code and libraries for several hours, I am still lost.
@elkodude4 жыл бұрын
FIXED! Removed the "DOUT,CLK" from the "HX711 scale (DOUT,CLK);" statement, then after the "Serial.begin(9600);" line, I added a new line: "scale.begin(DOUT,CLK);" Now to get the LCD display working.
@daboogie742 жыл бұрын
Nice project, for knowing is there coffee in cup you could use Tare value not specific made up number, so regardless of you cup type it would know is weight greater than cup own weight, that means something inside. And probably for this project you can use integers no need in decimals.
@RalphBacon2 жыл бұрын
Yes, you are right. If I designed this again (for a non-specific cup) I would do just that.
@dennis81962 жыл бұрын
The drift mentioned around 17 minutes is partly due to thermal changes causing expansion and contraction of the metal on a microscopic level. Thats a very sensitive load cell for just a few pennies.
@RalphBacon2 жыл бұрын
Sounds very plausible, Dennis, thanks for clarifying! 👍
@Fenrir55305 жыл бұрын
Hi. can you tell me please what to do with this code #include "HX711.h". how do i include the skets HX711.h ??? Also i am using an UNO board my load sensor says use board pin AO and A1
@Fenrir55305 жыл бұрын
sorted it now!!
@RalphBacon5 жыл бұрын
Here I am, just about to reply to your comment and I find you have figured it out, well done! I'm guessing this also resolves your other comment's query?
@fabioarias56767 жыл бұрын
Ralph thanked the attention paid. I would like if you could guide me in the following aspects: 1. I know that with the balance when there is no object she is in 0 but she does not give me. Or if with a command I can put it in or stabilize it in that range. 2. I made an application in delphi which has a weight reading for fabric rolls. Which I already do the communication. But it does not make me in the arduino configuration that I stay in 0. Now I could stabilize it from the application I made. 3. The scale that I am going to use is 100k the tray to be used for the support of the rolls has a weight of 2620 grams. Where I can set this tare. In a part where you do the show scale.tare is there where I should configure it or do exactly. 4. One question is also that I saw that there are load cells of 100k as I saw that the value is on the label. But it can be configured for less weight. I do not speak English, so there are things I do not understand but I thank you for your cooperation Fabio
@RalphBacon7 жыл бұрын
Hola Fabio! Y bienvenido tambien. Espero que usted entiende mis respuestos. 1. When you have correctly calibrated the Load Cell then it will be quite stable to 1 decimal place. So it might drift a very small amount but will normally be very stable. If you follow my design in videos #31 and #32 exactly you should be able to achieve the same results. 2. Lo siento pero no entiendo la pregunta - por favor, inténtelo de nuevo. I don't understand your question - please try again! 3. Choose a Load Cell that is suitable for the weight you are trying to measure. A 100kg Load Cell may not be accurate enough at low weights. For example, fabric rolls of 2.6kg may be shown as 2.5kg but this is a guess - my sketch uses a 500g Load Cell so could be quite different in its behaviour. 4. Once again, a Load Cell will measure weights below its *maximum* weight (that's the number you saw on my Load Cell perhaps?) So I can weigh anything from 1g to 500g. If you have a 100kg Load Cell then you should be able to weight items from 0.5kg to 100kg but probably only in increments of 500g (once again, a guess, as I don't have a Load Cell like that). Finally I would suggest you follow my examples exactly as shown from both videos - once you have a working example the rest may be obvious to you. Just a suggestion! Ay caramba! Es difícil entender exactamente las preguntas pero espero que mis respuestas le hayan ayudado. Y no hablo espanol muy bien (eso es obvio, creo!) pero podemos tener éxito con paciencia! Thanks for posting, I'm sort of hoping someone else might be able to help you too! Hasta luego y gracias por su publicación.
@xinloongfoo29514 жыл бұрын
May i know where to buy that transparent plate?
@RalphBacon4 жыл бұрын
The "transparent plate" as you call it, is just an acrylic coaster, for putting drinks on. They are available in all colours, transparent or opaque, round or square. For an example see this UK listing: www.ebay.co.uk/itm/Acrylic-Coasters-Square-Round-Kitchen-Table-Mats-Qty-1-Mix-Match-by-Displaypro/191823393624
@stevensheldon92712 жыл бұрын
When I try to run your calibration routine I get: calibration2:5:22: error: no matching function for call to 'HX711::HX711(int, int)' HX711 scale(DOUT, CLK);
@RalphBacon2 жыл бұрын
Check the parameter types (DOUT, CLK) you are trying to pass. This error means you are passing two integers but the constructor expects something else.
@bharatkumar90489 ай бұрын
Plz update did u able to solve the this error?
@stevensheldon92719 ай бұрын
@@bharatkumar9048 Sorry, I don't remember. I stopped fiddling with Arduino some time ago.
@cristianrojas72414 жыл бұрын
Hello, I add the library on the link in part 1 video, and in the LoadCell_CoffeCoaster.ino file that I download I got a error LoadCell_CoffeeCoaster:13:22: error: no matching function for call to 'HX711::HX711(int, int)' Do you know what mean that error? Greetings
@RalphBacon4 жыл бұрын
It probably means you are not using my exact, unchanged demo sketch Christian. Or you are using a different library (newer?) to me. If I have uploaded a library use that to avoid backward incompatibility. Get my sketch working first before making any amendments, that is my advice.
@colinwise30642 жыл бұрын
Hi I get error message Compilation error: no matching function for call to 'HX711::HX711(int, int)' while compiling any of the sketches. If i remove (DOUT, CLK) Then add scale.begin(DOUT, CLK); in the void setup then it compiles ok. I just wondered why?
@RalphBacon2 жыл бұрын
I suspect that the library you are using has changed since I did this. Previously the CLK and DOUT pins were passed to the library when the 'scale' object was created: HX711 scale(DOUT, CLK); It now seems that they are passed to a new 'begin' function of the 'scale' class. HX711 scale(); scale.begin(DOUT,CLK); If you can use this different method to achieve the same results then that's perfectly acceptable. Since this video was made, my practice is to keep a copy in my GitHub of the actual library version I used, to prevent such issues!
@colinwise30642 жыл бұрын
@@RalphBacon thanks for the reply. I thought this must be the case , I can't remember how i got the Library (HX711-master) , I'm sure i followed a link . The important thing is it all worked in the end and thanks for the video it was really helpfull in getting me started with the HX711 and load cell. Very easy to follow and a good starting point to grow a project.
@swananddeshmukh76837 жыл бұрын
Hey Ralph, How can I use the same sketch with a Quarter Bridge strain gauge circuit..? If I cant, is there any alternative sketch...?
@RalphBacon7 жыл бұрын
Hello Arduinite! I'm currently on vacation 5,000 miles away from home so I'll have to be brief with these comments until my return, mid-July. See my reply to your other post - basically, this will have to wait until I return from vacation so I can so some quick research into your issue!
@abpccpba7 жыл бұрын
Thank You very much; have parts now onward.
@RalphBacon7 жыл бұрын
Good luck, Paul. Remember to not to skip any steps! Get the calibration figure first and make sure the values you are getting from the load cell are reliable and repeatable before putting it into any kind of final container. If values are not stable check your wiring! Basically follow all the steps in the demo and it will work like a dream (as does my coffee cup coaster at work, although I did ignore the rather insistent flashing yellow LED today and ended up with stone cold coffee).
@sidibejefferson79267 жыл бұрын
hello ralph , please i would like to know what is the RST variable that you have defined in the sketch and to what pin of the Hx711 do i have to plug it on the arduino board? thank you
@RalphBacon7 жыл бұрын
Hi Sidibe, glad to have you back here! The RST pin (GPIO pin 4) is nothing to do with the actual Load Cell or HX711. This is used by a tilt switch built into my Coffee Cup Coaster which, if activated, causes the Arduino sketch to reinitialise the "zero weight" point. So... So, during this re-initialisation process (about 4 seconds) I put my empty coffee cup on the Coaster so it knows how much an empty coffee cup weighs and treats this as the zero weight point. A push button connected to pin 4 would achieve the same purpose, but for me a tilt switch placed within the top and bottom coasters was neater. I hope this makes sense!
@sidibejefferson79267 жыл бұрын
thank you ralph because i have try to use your code that you've described on your video 32 but it's not working as i have expected, i can not find a solution yet , maybe because i'm using a 5kg load cell and you are using a 500g load cell, your could it be the poblem?
@RalphBacon7 жыл бұрын
Hi Sidibe. sorry to hear you're having problems. Have you followed all the steps starting with getting the basic, uncalibrated readings using the sketches here and in video #31? Until you get the first steps working none of the other steps will work either. The fact you have a 5kg Load Cell is not significant except that it will be less sensitive than mine (that is, it will require larger weights before it responds). So, you need to work through each sketch getting the expected results before implementing the sketch you are now having issues with. And double check your wiring! Let me know how far you get, OK?
@sidibejefferson79267 жыл бұрын
thank you ralph i will check the previous video skecth and get the right values but i have followed the steps in order but i'll try back and i'll let you know my results thank you a lot for the fast answers
@john-paulwallcraft93623 жыл бұрын
Do you need the *.95 at the end of the seed?
@RalphBacon3 жыл бұрын
I'm guessing that this is some sort of correction factor that I had calculated.
@sidibejefferson79267 жыл бұрын
hello ralph it's me again sorry to bother this much, at the step done by you on this video at 5:15, when i do the same my serial monitor gives back a value of 135, firts it's not negative and different from the value -53959, well we are not using the same load cell but i wonder if it normal value for a 5kg load cell ?
@sidibejefferson79267 жыл бұрын
*it's
@RalphBacon7 жыл бұрын
There's is no "normal", Sidibe, for a Load Cell. It's whatever value that is returned to you! It doesn't have to be negative or a large number. If you had 100 Load Cells to calibrate I bet they would all give you different results within a very large range. The acid test here is to use the value you have determined (and which is repeatable) and plug it into the next step. Keep going!
@wowcoolm8608 жыл бұрын
My simplified version of your scales is returning a weight double what I expect. Any ideas as I am confused? Best I can guess is that it is something to do with the gain.
@RalphBacon8 жыл бұрын
+Wow Coolm That is odd and I can only assume that the initial calibration might be off; did you follow the video at position approx 5:47 where you got the initial value and divided by your known weight? And is your weight what you think it is? (I know, basic questions, but I must ask them!). Is the return value from the calibration a *float* ? Oh, and did you include the sign in your calculations (note that mine is *minus* 2697.
@PRAKHAR1997ful8 жыл бұрын
around 7:00 i measure with 15 grams on load cell and the set scale value i get is 0.00 so i divide 0.00 by 15 == 0 and put that in set scale value in our code . And after uploading the code the the output i get in serial monitor is "set Scale value is nan" .could you tell me what is going wrong here.??
@RalphBacon8 жыл бұрын
+Prakhar Tanu Hi Prakhar, I see you're having 'fun' trying to get this working so let's investigate a bit. Firstly, the message "value is nan" means the value is Not A Number (NaN). So the variable x is not being set to a recognised number. Mmm, we need to find out why. Secondly, if you are using the EXACT same code as in my video, what value are you using in scale.set_scale? You would have determined this using another sketch in video #31 which demonstrates how to calibrate the load cell. I don't quite understand where you getting the 0.00 value from, nor why you are dividing by 15. The line that says "float x = scale.get_units(10)" is requesting the average of 10 measurements; it does not do anything with the weight you are trying to measure. See if the above explanation helps you understand that code better, otherwise post back the EXACT code you're using (and if it is not the same as mine, I would suggest using my sketch first before making any amendments and getting that working). And ensure you are also using the EXACT same library (HX711.h) as me too! Solutions are merely problems that have been solved so don't give up!
@PRAKHAR1997ful8 жыл бұрын
here sir , is the exact code i am using currently . #include "HX711.h" #define DOUT A2 #define CLK A3 //float seed = -2712.95; -- your value HX711 scale(DOUT, CLK); void setup() { Serial.begin(9600); scale.set_scale(360.3); scale.tare(); Serial.println("place weight on scale"); while(!Serial.available()) {}; float x = scale.get_units(10); Serial.print("Set Scale value is "); Serial.println(x); } void loop() { } I have 2- 15g weight . And now i dont have problem with "nan" . I am having different measurement everytime for same weight and these measurement are not even correct . for example -> -- for only one weight this shows on monitor place weight on scale Set Scale value is 14.04 place weight on scale Set Scale value is 16.49 place weight on scale place weight on scale Set Scale value is 11.62 place weight on scale Set Scale value is 12.46 place weight on scale Set Scale value is 10.97 place weight on scale Set Scale value is 16.09 -- for two weights this shows on monitor place weight on scale Set Scale value is 13.86 place weight on scale Set Scale value is 14.34 place weight on scale Set Scale value is 11.72 place weight on scale Set Scale value is 14.13 place weight on scale Set Scale value is 7.97 place weight on scale Set Scale value is 9.90 I checked all the wired connections between arduino and hx711 and with load cell. They are fine. I don't know where i am going wrong. Help me here, and thanks for your motivational words :)
@RalphBacon8 жыл бұрын
Mmm, I think we need to go back to basics on this one. Read this message in full before actually trying anything though! There are 4 steps: 1. Have you mounted the load cell correctly (eg on a board) in the same manner as I showed in Video #31. Basically, so that it hangs over the edge of the piece of wood, with nothing to stop it moving up and down a millimetre or two? And it is firmly attached with no vertical slackness? 2. Why are you using A2 and A3 in your sketch? Whilst analog pins can be most certainly be used as digital output pins, I have no idea what the library is doing with these pins so please use digital pins 2 & 3 as shown in my sketch. 3. Are you SURE your calibration factor of 360.3 reading is correct, as shown in video #31? I'm not suggesting it is wrong I just want you to double check it. To be honest, even if it were very wrong the readings you get would probably be consistently wrong not all over the place like you are getting but then again, who knows? Check that calibration factor again. 4. I've created an even simpler example program that you can try here: www.dropbox.com/s/kjfv6rsseh08ovw/HX711_Test_Sketch.ino?dl=0 which assumes that everything else is 100% correct. Have a go and see whether that works AFTER you have completed steps 1 through 3 though! YOu may have resolved the issue by this step though. I hope this helps because this is where I have to draw the line at support, I'm afraid. If you follow my videos exactly (with no shortcuts and no errors) then the sketches WILL work, but you, ultimately have to learn how to debug something that does not work, whether that is at the hardware or software level. It's all good practice, even though it can be (very) frustrating at times. Finally, general hardware or coding problems can be posted at the Arduino forum (forum.arduino.cc/index.php) who will be delighted to help as long as you can show you have already taken some logical steps to resolve issues and have some results to show (like you have above). And whatever you do, don't mention my name! Good luck, keep at it and you will be able to resolve it.
@superargo47014 жыл бұрын
A good video. Go one step further and activate a relay, when the scale reaches a target weight; make that target weight adjustable via two buttons (+ve / -ve).
@RalphBacon4 жыл бұрын
Well now, what you're suggesting is more than the bare-bones I'm demoing so I will leave it to each maker to implement your suggestions as they are very worthwhile! Thanks for posting, appreciated.
@karthickkumar98217 жыл бұрын
Thankyou! Really a helpful video.. And i need one help, how to modify this code if it want a LED to flash if the weight is over certain limit Eg.2 Kg, because i am going to implement this in a project of weight overload detection.. and i am using 10Kg loadcell... Please Help..
@RalphBacon7 жыл бұрын
Hello Karthick! I'm glad you like the Load Cell video. What you are trying to do is very simple once you have got the Load Cell part working correctly - that is, calibrated and weighing correctly. Do this bit first. Follow the demo in both videos #31 and #32 and you will succeed (but remember that your 10Kg Load Cell is a lot less sensitive than my 500g one). You will then be able to programmatically detect weights over 2Kg and implement a simple LED flasher (see the Arduino example sketches for details on how to BLINK an LED).
@tinytuny975 жыл бұрын
Thank you very much kind sir you are the best best wishes for you and your cat
@RalphBacon5 жыл бұрын
Benny, my cat, thanks you for your kind wishes! Thanks for posting.
@lexee506 жыл бұрын
Rather than spitting out raw data is it possible to interface the unit to software to produce a graph of any change to the load?? Thankyou
@RalphBacon6 жыл бұрын
Well now, lexee50, you could log the data to an SD card, sampling every few seconds, minutes or whatever makes sense to your project. Or perhaps just when there is a change, but then you might need to also record the date/time so you know how quickly it changed. The data on the SD card could easily be read by any spreadsheet software if you format it correctly (eg comma separated variables). Look at my video on SD card logging, video #22 for ideas, OK?
@lexee506 жыл бұрын
Yes, to an SD card is one method but this is after the event. I want to capture/ plot realtime data as this gives me the ability to quarantine the faulty item(s).
@RalphBacon6 жыл бұрын
I see what you mean. Well, you can certainly transmit the data back to a PC via the standard serial bus, but how something like Excel would grab that data I am not sure. BUT, you cannot be the first person in the world to want to do this so in this case, Google might be your best friend, as it must surely be possible. If you find a method you might consider letting us know here what you found?
@ChuckBussey6 жыл бұрын
It’s possible to use the arduino serial bus to output and run a program on a pc using python and read the serial input. There are many python libraries that can read the serial input and actively graph it.
@Fenrir55305 жыл бұрын
help, why do i get this message, please HX711_Load_Cell_Coffee:8:20: error: no matching function for call to 'HX711::HX711(int, int)' HX711 scale(DT, SCK);
@RalphBacon5 жыл бұрын
Did you get this sorted too, James?
@jeffbluejets26265 жыл бұрын
@@RalphBacon I had this error come up with some other code from somewhere........ www.hackster.io/integza/diy-torquemeter-device-to-measure-dynamic-torque-6608ae I switched the library to another one and seems to have cured the error. Have yet to try with a load cell as waiting on the post. Will find the address and post back here.......found it....... kzbin.info?q=https%3A%2F%2Fwww.electroniclinic.com%2Fwp-content%2Fuploads%2F2019%2F08%2FHX711.zip&redir_token=3Oa0J7qWBnBvNqe1k5R0usZNfU18MTU3ODkxMTYyNkAxNTc4ODI1MjI2&stzid=UgxXk-v08pKqxD-OoDB4AaABAg.93b6cw7MvQQ93caAplofkq&event=comments
@jacquesgilbert27748 жыл бұрын
Nice video well explained, thank you. I do have a couple of comments, however: - You adjust the seed value by +/- 5, but kept the decimal part of the original seed (.95). That seems a bit inconsistent. If you are going to use 5 as the step value, it seems you might as well round your seed to the nearest 0 or 5? - It would have been interesting to see if you could get more consistent readings by adjusting the seed more precisely. Perhaps, after getting the first adjustment (+/- 5 with a 20g load), you could have gone to +/- 2 with a 10g weight, and then +/-1 with a 5g weight. I do not know that it would give more accurate results, but it would be interesting to see if it does. Also, during the adjustment cycle, you could have taken an average of 100 measures (it seems they are pretty fast), and eliminate the variations that you saw? - Still, as far as precision goes, the bigger issue for me is that a single load sensor, by its geometry seems to measure torque, not force. The value measured would then be dependent on the position of the weight on the plate. I think a scale using these sensors would have to use several - 3 or 4 - to hold the plate and then do a sum of their readings, to eliminate the torque effect. Alternatively, if you want more accuracy in a future project, you could mark the place on the plate where the weight should be placed. For example draw a circle for the cup, if you want to weight grains of sugar in your coffee, or see how much of it evaporates per hour ;-)
@RalphBacon8 жыл бұрын
Yes, indeed, your points are all well made. If this had been to actually measure weights (rather than the presence of a coffee cup weight) on a display (eg eBay parcels) then I would probably have had a harder job getting those readings consistent. In a Real World situation, however, I've had zero accuracy problems with my coffee cup coaster which is extremely reliable(measures down to the last teaspoon of coffee), and this is in use every day - finally no more cold coffee at work! Regarding your comment about torque vs force I don't know enough about physics on this matter but a bathroom scale certainly uses 2 or 4 such sensors to measure a person, perhaps for that very reason? Thanks so much for your comment, others will read it too and maybe get their grey matter working on it - as long as it stimulates thinking then my job is done!
@AmilaDGamage7 жыл бұрын
Hi I used same codes and board for 100 kg load cell....but it shows 0.00 only...what could be the reason...load cell voltage is not enough?
@RalphBacon7 жыл бұрын
Unlikely, Amila, but of course anything is possible. (Welcome to my channel, by the way!) I would check your wiring from the Load Cell to the HX711 board. Make sure the polarity is correct and you are using the correct pins. Some boards have an additional set of pins for another Load Cell which should not be connected. I think my demo shows this too. If you are sure you have connected things up correctly did you manage to successfully calibrate the Load Cell? That should prove whether it is reading data from the Load Cell successfully even when it is not calibrated. Finally, as you are using a 100kg Load Cell (mine was for 0.5kg, 500g) you may find your load cell is not as sensitive and requires a heavier weight to register (eg 0.5kg minimum). I hope these suggestions are useful in getting your project working. :)
@nrich47047 жыл бұрын
Your video work is quite impressive. If you don't mind me asking, what software packages are you using to produce them?
@RalphBacon7 жыл бұрын
I use the open source package OBS (Open Broadcast Studio) which, once you've grasped how to add a camera and microphone works well and is well supported too with frequent updates - mainly for gamers videoing their heroic struggles against the bad guys (so fast moving action etc) but it works for me too.
@nrich47047 жыл бұрын
Thx!!!
@mrstanlez8 жыл бұрын
Hi, nice sensor. Can you measure 1g of sugar or salt ? For cooking. Thank you
@RalphBacon8 жыл бұрын
Yes, indeed, it's quite accurate once you've done the initial calibration. And even with a 10% variance I don't suppose 1.1g or 0.9g will make that much difference in cooking? But this is more accurate than you might think! Link it to an LCD display and it would do well I reckon.
@mrstanlez8 жыл бұрын
Thank you. But I need a precision. I build a cooking robot: varim-europe.eu/index-en.html
@RalphBacon8 жыл бұрын
How would you measure precision here? 10%? 5? 1%? I bet a real life chef is not *that* precise! A 'pinch' of salt? A teaspoon of sugar - absolutely flat, slightly rounded? Ignoring the culinary merits of being absolutely spot on, I believe a load cell has the ability to be accurate enough for your needs if you calibrate it correctly to start with (and buy a set of mini weights like I did so you KNOW when it is calibrated correctly).Your cooking robot will thank you for this!
@beehivescale95358 жыл бұрын
hy Ralph, i like your videos. i like to assemble weight scale with 16/2 lcd but i'm stuck and i cannot caibrate load cell. i like the weight goes to 0 at start and then show only kilograms (kg). im trayng to do this with library you give link but i faild. can you help.
@RalphBacon8 жыл бұрын
+zoran b Let's see if I can put you on the right path. First of all, if you follow my Load Cell demo code you should be able to get the weight in grams, without any LCD screen involved. Have you got this bit working (it's a case of using my code and it should 'just work'). Then, knowing that there are 1000 grams in 1 Kg you divide by 1000 (use a float variable if you want partial Kg such as 0.5Kg to be displayed, otherwise you will only get whole kilos displayed). Use the serial monitor window to do all this first. When the above is working to your satisfaction then create a brand new sketch, and plug in the LCD display. Is it an I2C display (which I highly recommend as it makes things so much simpler)? Using the demo code in the arduino forum playground for LCD displays (although see my demo video too using a much better I2C library) get that bit working with some simple strings and values. Then put the two projects together; don't try and do both projects together until each one works independently. If you are still getting stuck please post your questions on the arduino forum as there are many experienced people there just waiting to help. You may even spot me answering the odd question or two (and believe me, some of those questions are really odd!). Good luck and I'm glad you like my videos - don't forget to share, thumbs up and if not already subscribed then please consider that too!
@ayugustiarapasha28167 жыл бұрын
Hi sir, sorry to ask again and again^^ when i upload this callibration and in serial monitor shows "place weight on scale" "set scale value isinf" can you tell me why? i very confused and i dont know what "isinf" mean and when i upload theres no eror. is done uploading
@ayugustiarapasha28167 жыл бұрын
i done put weight on load cell. but its not read in serial monitor
@RalphBacon7 жыл бұрын
What is the exact name of the sketch you're using, Ayu, I can't find that funny message! Let me know and I'll take a look.
@ayugustiarapasha28167 жыл бұрын
Ralph S Bacon i running ur code HX711_Load_Cell_demo.ino sir but i dont know why output in serial monitor is different from u. maybe my load cell is defective? how to check the load cell to know its work or not?
@RalphBacon7 жыл бұрын
I think that demo sketch has been renamed, Ayu, to make it clearer what each sketch was doing. Go to my Github (github.com/RalphBacon/Load-Cell-Part-1) and use the sketch(es) there. The final sketch is in another Github (github.com/RalphBacon/Load-Cell-Part-2). See if that solves your issue - if you get more problems let me know which sketch and I will have a look.
@amar83217 жыл бұрын
Thank you Sir..Really helpful video ...Sir will you upload same video for 40kg load cell with 5 wires...because i am going to implement same thing in my BE projects.... i am getting very confused with five wire ,out of these five wires 2 wire are black..... So i need your help please sir...
@RalphBacon7 жыл бұрын
Hi Amar! I'm afraid I don't have any experience of 5-wire Load Cells but they do say "Google is your best friend" so with a bit of research you will probably find what you are looking for. Hopefully my demo will still be applicable to your device. Good luck with this!
@bctan34857 жыл бұрын
Hi, Raiph, may you share how much is the total cost of this project on the items only?
@RalphBacon7 жыл бұрын
Let's see: Load Cell £4.23 HX711 board about £1 LED 5 pence transparent coasters (I used two) about £1 each tilt switch 10p Arduino Nano £2.00 So that's just under £10 for the complete thing. I didn't include the tiny bit of strip board I used for the LED mounting, nor the cost of the wiring, nor that of the solder. You going into business Bc Tan? Do I get commission, heh heh!
@swananddeshmukh76837 жыл бұрын
Whenever I use this sketch with a quarter bridge strain gauge circuit, the values either go on increasing or go on decreasing.I hav checked the connections and they are okay..Please help me calibrate the strain gauge..it wuld be very helpful...
@RalphBacon7 жыл бұрын
Hello Arduinite! I'm currently on vacation 5,000 miles away from home so I'll have to be brief with these comments until my return, mid-July. This requires more attention than I can give it here in East Malaysia right now, I'm afraid. If you detail the exact sketches you're using (and have not amended them) I can look at your issue when I return, I hope that is OK?
@swananddeshmukh76837 жыл бұрын
Ralph S Bacon Basically I am using the same sketch as you are in this video but instead of using a load cell ,I am using a strain gauge quarter-bridge circuit paired with a HX-711...but the results are not even analogues to what you are getting using a load cell...the vary absurdly...
@swananddeshmukh76837 жыл бұрын
Ralph S Bacon Can you suggest a method of calibrating a strain gauge bridged circuit..? Thanks for rplyin Ralph.....
@swananddeshmukh76837 жыл бұрын
Ralph S Bacon Take your time..sorry for interrupting your vacations ...enjoy em'....
@ffelt7 жыл бұрын
Nice project 👍🏻👍🏻👍🏻
@RalphBacon7 жыл бұрын
Hello Arduinite! I'm currently on vacation 5,000 miles away from home so I'll have to be brief with these comments until my return, mid-July. Glad you liked it Frederic, nice to hear from you!
@rashmimahadevaiah83216 жыл бұрын
can you share the link to the coaster to order?
@RalphBacon6 жыл бұрын
Indeed I can but it is a UK seller. If you don't live in the UK you may find a similar item: www.ebay.co.uk/itm/Square-Coaster-Acrylic-Mix-Match-Kitchen-Dining-Outdoor-47-Colours/292152173518 I hope this helps you. PS when drilling the coaster do NOT apply much pressure, do it very gently so it does not crack!
@Bahu_Balli8 жыл бұрын
how did you get set scale value -53959.00?
@RalphBacon8 жыл бұрын
Hi Juilee, that value was the result of the calibration sketch done in Part 1 (using my sketch HX711_Load_Cell_Demo.ino). Each load cell is unique and the calibration value can be *anything*, a positive or negative number, large or small. Once you've calibrated the load cell (that is, determined that 'magic number') you can proceed with the next sketch to actually weigh things. Good question, thanks for posting it here.
@Bahu_Balli8 жыл бұрын
thanks a lot sir
@rajkamals21346 жыл бұрын
Thank you for the explanation, i was having a hard time fingering this out, thank you so much.
@RalphBacon6 жыл бұрын
You are most welcome rajkamal .s, I'm glad you like the video. Nice to hear from you.
@SodAlmighty5 жыл бұрын
+Raj That's what she said.
@RalphBacon8 жыл бұрын
Link to GitHub for the HX711 library: github.com/bogde/HX711 Just download the Zip by clicking the "Download ZIP" button on the right hand side of this website, unzip it and copy the library into your Arduino library folder. Rename the top-level library folder as HX711 which will then contain the "HX711.cpp" and "HX711.h" files plus a few others including the "Example" folder and "Readme.md"
@Mantamanny8 жыл бұрын
Hi, i loved the video could you please provide a list of all the things i need for this project. I'm doing a similar task to what you have done here however i need it to send an email or send out a twitter tweet when it gets below a certain weight. Do you know of a way to achieve this goal? Thanks
@RalphBacon8 жыл бұрын
Good day Captain! Glad you liked the video on my Load Cell. To send out a message will require an ESP8266 module - easy to do but I haven't done a video on how to integrate such a module with an Arduino yet (although there is a video on how to create a simple ESP8266 server *instead of* using an Arduino in your project). So you have two choices. Instead of using an Arduino for this project, use an ESP8266 board such as the Wemos D2 or the ESPDuino OR wait for my video on how to integrate a small ESP8266 module with an Arduino (using it simply to send/receive messages rather than as a replacement microcontroller). Note, however, that the ESP8266 only has a single analog input which may be a restriction too far if you want to use one as a complete replacement for a UNO, for example. How about I move my project up the list that integrates a UNO/Nano with an ESP module - it could be used then for ANY Arduino-based project. In fact, I have a need myself to do this so I'm motivated to do it. One caveat: the time taken from when I have an idea like this, to the actual finished video can take several weeks so you may have to exercise patience. But you could build your project without the ESP part for now, and retrofit that when it is available. What say you? Update: When I say ESP8266 module, that also includes WiFi shields which I also have, so I might include both into the video :)
@RalphBacon8 жыл бұрын
CODE SAMPLES Ultra simple demo code to calibrate your Load Cell: db.tt/ZE1n8KQM My coffee cup coaster code (base on above demo): db.tt/78mbPBI1 Also remember that there is an example sketch in the HX711 library folder under Examples - a bit convoluted but sound!
@stevensheldon92712 жыл бұрын
Can you please re-upload the code? Thanks.
@ajitthalange86447 жыл бұрын
i used the same code for calibration but in my case "scale.get_units()" is changing every time i run the code.
@ajitthalange86447 жыл бұрын
i am using an 50kg load cell. From link below www.sparkfun.com/products/10245 is it like it will measure minimum 40 Kg and not below that, because in specification its written that Capacity 40-50 Kg. Thank You
@RalphBacon7 жыл бұрын
Hi Ajit! No I don't think that specifies the minimum, it seems to be more of a range that it can measure to. If you have calibrated the Load Cell correctly you should get it to 0.0 (with a small amount of drift but not permanently increasing or decreasing, just hovering around the zero point). Once you have successfully calibrated the Load Cell so it registers 0.0 then try a weight of about 1kg and ensure you get consistent results; if you don't then I suspect a wiring error (assuming you are using the demo sketch or one very similar). Incidentally, that Load Cell you have is normally used in sets of four so it can measure the weight of a person. Are you sure it can be used singly?
@ajitthalange86447 жыл бұрын
Thanks for reply i bought another load cell "CZl501" and got the readings nearby. Can you please suggest the color coding for the load cell link provided in last comment ?.
@RalphBacon7 жыл бұрын
Hi Ajit. I'm glad you got a different Load Cell to function properly. Regarding the Sparkfun Load Cell can you confirm how many wires come from the device: three or four? And the colours please.
@ajitthalange86447 жыл бұрын
spark fun colour coding are "red", "black" and "white".
@eriksunandar1437 жыл бұрын
hello Mr I want to ask you, why my code can't to uploading to arduino after i give a value at scale.get_scale i follow the code like your code at the video. thanks Mr please reply
@RalphBacon7 жыл бұрын
Well, Erik, when you say "can't upload" what error message are you getting?
@ss45528 жыл бұрын
Very helpful video!!!
@RalphBacon8 жыл бұрын
+Shaishav Shah Glad you found it useful and/or enjoyable! Thanks for taking the time to post your comment here :)
@mr.mythoclast44514 жыл бұрын
some amount of Neopixels to display how much coffee is left and a DS18B20 to check the temperature
@RalphBacon4 жыл бұрын
A good suggestion that would be very nice to do!
@ReflectingMe20247 жыл бұрын
This only works Ralph if one has an accurately known calibration weight. Doesn't it?
@RalphBacon7 жыл бұрын
Well, John, it depends whether you're going to display the actual weight (you want to weigh letters, for example) or whether you want to just detect *something* like I do with my Coffee Cup Coaster. Although I calibrated mine accurately I don't display the weight anywhere as I just needed to detect the presence of coffee (down to a gram or two) which is a relative measurement when compared to an empty coffee cup. Those tiny weights I used were pretty cheap but if you have a 10Kg Load Cell then I guess bags of sugar might be accurate enough! Interesting question, did you have a project in mind?
@ReflectingMe20247 жыл бұрын
Yep, you are absolutely right, Ralph. It's not something I had thought of doing a mini project on, but of course, after seeing your super video, it has now made me want to do something myself! :)
@fabioarias56768 жыл бұрын
hello Why do you do (z == '-') seed -= 5 and (z == '-') seed += 5
@RalphBacon8 жыл бұрын
Hello there Fabio! You're talking about the calibration sketch 'HX711_Load_Cell_Simple_Demo', I think. The statement *if (z == '-') seed -= 5;* means: if the character read from the Serial Monitor data window (in variable z) is a minus sign, then decrement the seed value by 5 points. The *seed-=5* is standard C++ shorthand for *seed = seed - 5* but just more concise. I hope this helps and it's great you asked this question, there are probably others who will benefit, thanks for posting.
@fabioarias56767 жыл бұрын
¡Thank you!
@RalphBacon7 жыл бұрын
No problem. Glad to help. :)
@eastern8157 жыл бұрын
thanks for upload
@RalphBacon7 жыл бұрын
Glad it helped, and thanks for posting here!
@amitjagtap7957 жыл бұрын
Hey Ralph..can you please send me the connection diagram..I mean the hardware connection Please
@RalphBacon7 жыл бұрын
Hey Amit, this has been asked before on video #31! So here's *that* answer which might help you: The HX711 boards are normally colour coded with names like "RED, BLK, GRN" etc marked on the board and which correspond directly to the Load Cell wires. If your HX711 board does not have this, then it probably has "A+, A-" and the like. In this case, Red is E+, Black is E-, Green is A+, White/Grey is A-. NOTE: The A+ and A- wires may need to be switched but try it this way first). The seller has this documentation: Wiring Red: Power + Black: Power - Green: Signal +, White: signal - On the other side (the wiring to the Arduino) you have the standard 5v power and GND connections and the centre two pins are the DATA and CLK lines - see the sketch to see which pins are expecting this information. Don't connect anything to the "B+" or "B-" terminals (if you have them) as they are for a dual/bridged load cell. Let me know if this does not work for you.
@rontuttle28118 жыл бұрын
Sketch hangs up at "Place weight on scale". Nothing happens when I put character in Send box and press enter. I haven't used "while (!Serial.print.....etc.)". Obviously missing something obvious. Otherwise a very useful tutorial.
@RalphBacon8 жыл бұрын
Hey Ron, sorry to hear that you're having problems with this sketch. Let me refresh my memory with the sketch tonight and I'll update this message (I'm in the UK, so GMT time). On a general note, the way you read characters from that serial monitor window is by checking that there is something to receive, then receive it. As an example: // If there is something on the port to read if (Serial.available() >0) // Read the single character char data = Serial.read(); // // Now do something with that variable's value // I'll check back this evening, OK?
@rontuttle28118 жыл бұрын
Thanks very much for offering to help me! I'll keep working on it today...Mountain Time U.S. Denver.
@rontuttle28118 жыл бұрын
Seems like the scale.set_scale method does not see the character that I send. Just hangs up waiting.
@RalphBacon8 жыл бұрын
Hello again Ron! I've looked at my sketches and I think you're running the HX711_Load_Cell_Demo.ino which calibrates the scale? If this is not the case let me know. I'll assume you are. The character that you type into the Serial Monitor (a plus sign or minus sign) is read at line 109 in pretty much the way I described to you earlier today. It then adjusts the calibration_factor variable by a couple of points and loops round again. What you SHOULD be seeing is a series of: Reading 5g calibration factor -32876 or similar depending on your precise set up. If you are not getting ANYTHING on the Serial Monitor at all then I suspect your comms between the Arduino and your PC is playing up. Baud rate 9600? "No line ending" option selected on Serial Monitor window? I'm taking it as a given that you have programmed the Arduino via the USB cable on a particular port (and that you specified the correct board etc)? If the program on the Arduino is running you should see one of the small LEDs on board flashing as it tries to transmit information back to the Serial Window. If all the above is not happening download the ultra simple sketch (and screenshot which shows you what to set) in the following folder to prove your USB to Arduino comms is working correctly: www.dropbox.com/sh/0zk6hhfuomh82mf/AABn9qEsPM7gpddI0UBYthlta?dl=0 Place the ino file in a folder of the same name in your Arduino Sketches folder, compile, upload and run. What happens? BTW we don't have any mountains in the UK worthy of a whole time zone for themselves. I feel so insignificant now. :(
@rontuttle28118 жыл бұрын
The problem is with the "!Serial.available()" statement. If I remove the !, at least the program responds altho' with incorrect data. I copied your program, which works for you but not me? ! I tried different endings such as newline, carriage return, etc. with no effect. The program thinks that no characters have been transmitted. I am using a Sketch within Win10.
@erikisberg38864 жыл бұрын
Cool project, I need one! I have played with the cheap HX711 boards and found that accuracy is improved if You sample at a constant rate. Your problem with offset on setting zero immediately seems familiar.... It tends to go away if You set the zero in a setup loop using the same sample rate as when You measure and averaging a couple of readings. Also adding the 10 uF capacitor that is in the DS helps. A good quality non polarizing 0.1uF across the bridge and not grounding the bridge minus helped my accuracy. Also the cheap aluminium sensors I tried drift a lot more than the amp after these mods. Interesting AD article: www.analog.com/en/analog-dialogue/articles/a-reference-design-for-weigh-scales.html# A simple moving average filter is a good idea.
@RalphBacon4 жыл бұрын
That is very useful to know, Erik, thanks for sharing your experiences. For my Coffee Cup Coaster, the slight inaccuracy and drift was not a problem but it would be if I was trying to accurately measure something. Thanks for posting.
@norberthartmann50755 жыл бұрын
thanks !!
@RalphBacon5 жыл бұрын
No problemo, Norbert, glad you liked it (I'm still using mine in my workshop, I've added a beeper, a bit annoying but does make sure I drink while the beverage is still hot/chilled).
@اختراعاتوابتكارات-ج3ع4 жыл бұрын
I want an amendment to the HX711 code so that when I get to a weight of 1 kg, the LED works on port number 13
@RalphBacon4 жыл бұрын
If you get the demo sketch running it should be obvious when you get to a 1kg weight and then you can light up an LED. Surely you can work this out?
@NeilHodgsonDARKHOURS7 жыл бұрын
Hello i went to download the sketch and got Sorry, that file doesn’t live here anymore. thanks for the great videos
@RalphBacon7 жыл бұрын
Thanks for letting me know, Neil. Dropbox have changed their way of sharing files (one reason why I've moved away from them and to Github). However, for this video I've updated the link in the video description, please do let me know if you get further problems. When I have a spare pico-second or two I'll have to move all my old Dropbox files to Github which is a much better platform for code and file sharing.
@doglabdogtraining-gus.88733 жыл бұрын
somehow it doesn't work with my nano , tried everything , now buying a uno to see if it works
@RalphBacon3 жыл бұрын
An UNO an a Nano are effectively the same device in a different form factor. How far did you get in Part 1 of this video? Each step must be completed successfully before moving onto the next stage or it will never work!
@cigoli35424 жыл бұрын
How to reduce zero drift effective in loadcell on no load. Weight increase continously in the loadcell although it has no load.
@RalphBacon4 жыл бұрын
Does it just continue to increase or fluctuate? Ensure your power supply is stable (or add in a couple of caps, eg 100nF and a 10μF in parallel). If you have wired it up correctly it should remain pretty stable.
@cigoli35424 жыл бұрын
@@RalphBacon thank you very much. I will try your recommendeds. Then I will share this experiments
@DeeegerD5 жыл бұрын
Never touch your test weights - skin oil will add weight and attract dirt throwing the accuracy off.
@RalphBacon5 жыл бұрын
I never considered that, Digger, but it seems very obvious now that you mention it. I shall clean mine and never touch them again. Good suggestion, thanks for posting.
@kuijpersdijk6 жыл бұрын
Hi, when I try out the code the values just keep adding up?? i am using a 1Kg scale with the HX711 and an arduino UNO. i've tried several calibration codes but I keep having the same problem :( do you have any idea why this is, and do you have an easy solution?? thanks in advance!
@RalphBacon6 жыл бұрын
Did you also follow the steps in video #31, Rob? The very first thing to do is to determine the *calibration* value (you don't try various values, it will tell you what it should be, it might be negative, it might be positive, it is different for each Load Cell). Once you have that then the Load Cell will be stable and you will see weights (not in grams yet) giving the same figure each time. That is the first step, then continue with video #32. Any good?
@kuijpersdijk6 жыл бұрын
Ralph S Bacon thanks for the response, I will try it out And let you know if it worked :)