Help with HX711 Strain Gauge #988
Replies: 6 comments
-
Posted at 2016-05-18 by @gfwilliams Hi - I think one issue is that You might have more luck changing it to:
At 1uS pulses, the above will be fine (due to code execution speed it's very unlikely to ever exceed 1uS there :) Also, as far as I can tell, the gain is selected by the number of clock pulses. I think (and this could be the main issue) the loop you have ( As it is, I think instead of sending 25 pulses (24+1) you're actually sending 48 (24*2). Hope that helps! |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-05-18 by @gfwilliams Someone else just asked about the HX711, and there is a possibility that using normal JS code will be a bit too slow for it. If your code doesn't work, I posted some ideas here: http://forum.espruino.com/conversations/258182/#comment12991634 |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-05-18 by user64817 yes it's me. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-05-19 by AaronB Gordon, I have tried your minified code from the other thread and I am receiving and I am getting the following
Does this appear reasonable? the load cell is currently laying on the table. I can get a reading using digitalPulse but it is much larger at around 338642 and differs by a few hundred between readings. Many thanks again... |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-05-20 by @gfwilliams Well, the fact that it only differs by a bit each time sounds good. It's a 24 bit number, so could give you anything up to 24 million. The fact it's 169k probably means it's basically unloaded. I'd experiment by putting different stresses on it and seeing how it changes. Also, 338642 / 2 = 169321 - so it seems like the digitalPulse code might be working too, although maybe you're reading one too many bits, which is pushing the value up. Personally I'd avoid digitalPulse though because the async-ness of it might make it less reliable. The SPI method is quite efficient too. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-07-16 by @gfwilliams There's some code for this posted up in another thread now: http://forum.espruino.com/conversations/287046/#comment14322664 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2016-05-17 by AaronB
Hello,
I am trying to get the HX711 IC to work with espruino. I have had some issues with getting it to work and would be very grateful if someone could advise me. The datasheet can be found at
https://cdn.sparkfun.com/datasheets/Sensors/ForceFlex/hx711_english.pdf
My code so far:
I am trying to measure the torque from a bicycle by measuring tension of the chain. A load cell will be cantilevered off of the frame and a idler wheel will pull the chain up by around 10 deg. I am thinking that the force pulling the pulley down will be around 20% of the total force in the chain. I would then like to use the measurement to drive a electric motor.
I may also use it to weigh our fat cat...
Thank you in advance
Beta Was this translation helpful? Give feedback.
All reactions