Readings from Opensclae & Loadcell

Hello!

I’m trying to configure my OpenScale and have got serial monitor (via ArduinoISP) working fine to communicate with it on Win7Pro desktop. I tared it out, and calibrated it successfully, and turned off various options no problem. But I can’t seem to change report rate (option 4) or average amount (option 8). It asks for a new report rate/average but doesn’t take in anything I try to send it. What am I doing wrong? It is reliably and accurately displaying “X.XX,lbs,” line after line on the serial monitor very well.

Next - I’m driving your 7Segment Serial Display (Com-11629) off the OpenScale (using the USB interface above) using its VCC and GND pins and connected its RX to the OpenScale’s TX pin. The display is powered up and working but showing gibberish only. How can I fix this?

Thank you!!!

Mark

On the first part, try setting the serial monitor to “no line ending” and see if that fixes things. You might need to experiment with the different settings, I don’t remember specifically which one is needed.

On the second part, the included firmware isn’t setup to drive that display, you’d need to write your own custom firmware that formats data for the display. What the Openscale is sending isn’t in the correct format for the display to understand what is being sent.

Hi Chris - thanks for your prompt reply! Much appreciated!

I followed your advice in your prior post - and have it set for “no line ending” but no matter which option I choose for line ending, it does not want to take.

Ah, okay - I understand what you mean about incorrect format for the 7S Serial display. Is there a simple or direct route to displaying this serial output (the force readings) onto a 7S display? I’m a mechanical engineer - so the electronic stuff isn’t my native language - but I’m deeply interested in learning more.

Thank you, Chris!

Mark

Also, when I entered “400” for report time (it said 391ms was minimum) it gives error message “value out of bounds” when using “carriage return” option.

Hi Chris,

This very capable OpenScale may not be the most direct approach to showing weight measurements on my 7 segment display.

I may be best to (start over) with a basic Arduino, uploaded with HX711 code that’s been modified to serial print to the Serial 7 Segment display in UART, SPI, or I2C format. Do you agree?

Thanks,

Mark

TS-Chris:
On the first part, try setting the serial monitor to “no line ending” and see if that fixes things. You might need to experiment with the different settings, I don’t remember specifically which one is needed.

On the second part, the included firmware isn’t setup to drive that display, you’d need to write your own custom firmware that formats data for the display. What the Openscale is sending isn’t in the correct format for the display to understand what is being sent.

Hi Mark.

That might be the easiest way to go, you could always put the original firmware back later if you wanted to though. :slight_smile:

Hi Chris,

To your excellent point, I’m going to leave OpenScale fully intact - and just revert to a different board for this step: a RedBoard or a Pro Mini I have on hand. I’ll keep you posted!

Thank you; I appreciate your feedback!

Mark

Hi Again, Chris–

Been experimenting with this since our last, and have refined my question as follows:

I’ve made a scale with your load cell SEN-14729, using Wheatstone configuration on your HX711 breakout, and the HX711 Arduino Library (master). All’s well and functioning perfectly on the UNO R3, running both full and basic example sketches.

I’ve also connected to the same Arduino your Sparkfun 7-Segment Serial Display and run your Serial 7-Segment Display Example Code SPI Mode Stopwatch and all’s fine.

My goal is to display the force on my scale on the S7S display, so I’ve cobbled the two programs together. Serial monitor on HX711 is great, and the SPI Stopwatch too. I will need to measure and display a slow, cyclical dynamic force that ramps from zero to 10 lbs and back to zero in about 2 seconds like the top of a sinusoidal trace. (I’m not too concerned, today, on which force point or three on those load cycles I’m measuring/displaying – but ultimately would like to just show peak force on any given cycle.)

I realize the 24 bit ADC on the HX711 is creating binary data output, but even after a fair bit of studying SPI I’m having difficulty doing the SPI transfer (using variants of your S7S SPI sample code) on any of the HX711 variables that work perfectly on the serial monitor.

Error messages say I’m mixing variable types; the arcane sprintf function churns out signed numbers that don’t seem to have anything to do with the (very accurate) data appearing on the serial monitor.

What am I doing wrong and how can I fix it? Please help–:slight_smile:

Thank you so much!

Mark

Hello Again,

After further study, I am able to isolate my question even more. Looks like I’ll need to identify bits I need to print to the display - then do some masking.

Same challenge here as previous question, different different “scale” hardware: To display force on 4 digit 7 Segment display. The HX711 is a 24 bit ADC; incidentally the scale factor my Wheatstone bridge scale setup requires is 43000.

Using the Bogde Library and the example code (full and basic - cobbled) here are some numerical, decimal outputs from the serial monitor indicating FORCE in pounds. Note that a feasible maximum force could be in the hundreds, eg “198.2” which I wish to display, with decimal for tenths in every reading, on the SparkFun COM-11442 four-digit Serial 7 Segment display:

HX711 reading: -829132

18:22:54.621 → | average force: -0.19 (NO LOAD)

18:22:54.821 → get value output: -8048.00

18:22:55.122 → I received: -0.1873720932

HX711 reading: -605081

18:22:48.051 → | average force: 5.04 (LIGHT LOAD)

18:22:48.305 → get value output: 217427.00

18:22:48.552 → I received: 5.0023255348

HX711 reading: 796473

18:18:39.587 → | average force: 37.33 (MODERATE LOAD)

18:18:39.841 → get value output: 1596969.00

18:18:40.089 → I received: 36.9229087829

HX711 reading: 2023354

18:21:42.676 → | average force: 66.42 (HIGHER LOAD

18:21:42.930 → get value output: 2918129.00

18:21:43.177 → I received: 68.9497451782

The “serial monitor” function does not display all the leading or trailing zeroes so I do not know which BITS I need to mask for the output data I want to display (from 0.1 lbs to 299.9 lbs).

The HX711 presumably outputs 24 bits of data each reading. Can you please advise me how to identify WHICH of those bits I will need in my desired force range of 0.1-299.9 lbs, so I can figure out the masking required?

Thanks!

Mark

Unfortunately we’re not able to advise you on code issues but I think what you need to focus on is getting a weight value from the HX711 and then format it to fit your display rather than concentrating on the bits inside the HX711.

Thank you, Chris! I have a perfect readout on serial monitor; it’s the writing (printing) to the S7S that’s been tricky. Serial translates the 2’s complement data smoothly for serial monitor, but when I’ve tried to send (the variable that worked in serial) to the S7S via SPI, the variable types clash - the solution may be extremely simple, I’m just not very experienced with C; I have tried various declarations to no avail. I will revisit those serial variable, see what I can do.

That said, I have discovered the HX711 complies with neither SPI nor I2C - but rather a “non-I2C compliant two wire custom communication” which is laid out nicely in the datasheet. Working with the HX711 bits “should” be straightforward, once I learn a “bit” more. I hope!

Thank you, again!