I have a BBB (Beaglebone black) connected to a few capes.

I need to interface with 4 HX711 boards with loads sensors, I've yet to find anyone who has used any weight sensors with the BB; I've seen the PI do it with python and a possible port that could be used here: Python port for RaspberryPI of the HX711 Breakout Board

HX711 Image

Can anyone recommend a method of interfacing with 4 HX711's on a BBB?

If it's not possible, I'm considering having a small Arduino nano / similar before the BBB to process the weight and pass over all the results to 4 pins that I can use directly

  • \$\begingroup\$ How many spare GPIOs do you have ? \$\endgroup\$ – Long Pham Aug 10 '18 at 10:34
  • \$\begingroup\$ Bit bang this chip isn't hard. You need 2 GPIOs for each module. \$\endgroup\$ – Long Pham Aug 10 '18 at 10:35
  • \$\begingroup\$ I've got quite a few GPIOs available, at least the 8 available needed for the 2 per chip — Bitbanging going to be the only way to get this data? 4 chips all processing at the same time, will it cause delays / interrupts between them? \$\endgroup\$ – Andrew Lazarus Aug 10 '18 at 11:02
  • \$\begingroup\$ The problem is that the chip runs by its own clock, so you can't sync them. \$\endgroup\$ – Long Pham Aug 10 '18 at 12:37
  • 1
    \$\begingroup\$ Absolutely. There is a c pseudocode driver in the datasheet: mouser.com/ds/2/813/hx711_english-1022875.pdf \$\endgroup\$ – Scott Seidman Aug 10 '18 at 13:54

There are basically two ways to do it:

  1. Connect it directly to BBB and write or obtain software to run it. You say that you have not found examples for it so you would have to roll your own.
  2. Use Arduino or similar micro controller platform to manage sensors and them use whatever standard interface between it and BB to send preprocessed data to it. It could be as simple as UART interface with a complexity that your project needs. This path would allow you to utilize existing Arduino libraries and introduce a generic interface between your sensors and application processor (BBB). Furthermore, it would allow development, testing, and debugging both parts separately by connecting either part to computer via serial interface.

I would go for the 2nd approach, unless there is a solid reason to invest time in developing some sort of a driver for HX711 for BBB. For some it might be a trivial task, but if the goal is to get it to work, why not take the path of least resistance?

  • \$\begingroup\$ just means more things that need debugging if anything goes wrong, more possible failure points when this is in the exhibition \$\endgroup\$ – Andrew Lazarus Aug 12 '18 at 21:13
  • 1
    \$\begingroup\$ It boils down to what is more accessible and familiar to the developer. Bit banging approach is more professional while BBB-Arduino-ADC approach is more maker-friendly by facilitating what is available. \$\endgroup\$ – Jurkstas Aug 12 '18 at 21:43
  • 1
    \$\begingroup\$ the weights are one aspect of a larger machine, so even if i could get the values from the hx711, there is calculation still needed to convert to weight, then pass these values over to the next task. I think Arduino in between removes a lot of software needed to achieve the same results \$\endgroup\$ – Andrew Lazarus Aug 12 '18 at 21:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.