Read HX711 and send it to a Electron


Hi all

Can anybody help me with this questioning?

I want to read values from scales via HX711 module with a bluz and send it to an other Board where a Electron sends the Data via 3G to a Webserver.
I have seen code in Internet available for the Particle Photon / Electron to read HX711 Values.

Now i have some Questions:

  • Is this possible with bluz Modules or should i use better Xbee Modules?
  • If its possible with bluz, which bluz Hardware do i need to realize that?
  • How many “bluz Stations” (reading HX711) can i use
  • Whats the Range for a single Bluz Module (how far away can the “Electron Internetstation” be)
  • Can i use the same Electron / Photon Code to read the HX711 on bluz?
  • Can the bluz modules battery be charged with a solar cell

Regards, neurotrade


This is definitely possible and I would say bluz is very well suited for this application.

What you would want is the gateway shield with an Electron attached to it. You can then automatically have the individual bluz DK’s talk to the Electron through the gateway shield and process or send the data wherever you want. You can see a good tutorial for this here:

You can currently connect up to 3 DK to the gateway shield in this fashion, but in the future this will expand up to 8 total. Range is very dependent on your surroundings, but indoor range should be 50-100 feet while outdoor range could be more like 150 feet. Again, your mileage will completely vary based on your surroundings and other sources of RF interference.

The sensor itself looks relatively straight forward. I haven’t used it before, but looking at the library available on the Particle Web IDE, I think you could use it directly on bluz with no modifications. I cannot say for sure, though, since I haven’t tried it. It may take a little fiddling, but it looks pretty simple.

As each DK is pin-compatible with a Photon, you can use any battery shield/solar shield that is available for the Photon. So yes, you could hook up a LiPo battery and solar panel/charger. There are some good options available for this through SparkFun or Adafruit if you are looking for something.

Let me know if you have any other questions.


Hi eric

Thank you for the Response!

It’s good to hear that my project is possible using bluz :slight_smile:
The Idea is to measure Wheigts of multiple Beehives (outdoor) with bluz and send the Data to a Electron Board to the Internet. What is the best way to fit bluz DK (btw. what means DK?) and electron together on a custom Board?

How can Triggering (when the bluz HX711 Modules should read and send Data to Electron Board) be done? Any Ideas?

Thank you for your Help



DK stands for Development Kit. Basically, that is the main board behind bluz.

So you would have multiple of these DK hooked to the weight sensors and power sources under your beehive.

Then you would use the gateway shield with an Electron:

This already has a Bluetooth LE radio on-board that each bluz DK would connect to wirelessly. This is the BLE central radio, and can handle multiple DK’s talking to it at once. So you would have one of these with an Electron.

So all the hardware is available and ready, you don’t have to worry about combining a DK and an Electron, you would just use the gateway shield and an Electron as a “hub”.

The example code in the link I sent you earlier shows how you can send data back and forth between the two, it is very straight forward.

As for triggering, you could use a time-based approach where the DK wakes up every X seconds and sends the weight, you can use Software Timers for that. Or you could trigger somehow through some other means, it depends on your application.

Let me know if all that makes sense or if you have any more questions.


Hi eric

Thank you for the Explanations!

Because i have already a custom Board with a few sensor connectors and the Electron on it, i would like to integrte the bluz on the same board if this is possible.

I know i have to change the Board Design then.

All other answers from you makes me confident to start developing :slight_smile:


You want to use that board for the DK portsion that goes on the beehive? Actually, you may not have to change the design at all.

The Electron is pin-compatible with bluz too, except for the fact that there are less pins. So the D0-D7 and A0-A7 pins on the Electron are the same as the ones on bluz DK. As long as you aren’t using the “extra” pins on the Electron, this board may work just fine.

While bluz is almost fully pin-compatible, there are a few slight differences that could potentially cause issues. You may want to look at this list to see if there are any potential conflicts:

But as long as your board is only using pins that are in the bluz/Photon footprint and there are no conflicts with the above list, you may be able to use that board directly with bluz.


Hi eric

This is a good information that i can use the same Board for the bluz DK also.
But … I probably did not understand anything.

Because english is not my mothers Language its hard to explain and find the right words.
Let me try to explain the Situation once more.

There should be one Board (lets say Basestation) with a Electron and Bluetooth Module which act as Basestation and Gateway to the Internet. It also read sensors like HX711 and DHT22
And there should be Boards with only Bluz DK (lets say satellites) which read the Weight form other Scales and send the Data to the Basestation.

Thats the reason i want to include and integrade one Bluz DK to this Board with one Electron.

Sorry for my bad english


Ok, I think I understand.

So for the satellites, I think we are on the same page.

For the base station, you want to use the gateway shield but also want to hook sensors to it. This may also be possible with the same board that you have here.

The gateway shield has headers on it for the Photon/Electron. What you can do is use the same sensor board you have here, but just put stackable headers onto it. Then you can put the Electron in this board, then stack this board into the gateway shield. So it would stack up something like this:

Now, there are two catches to that approach.

  1. Your sensor board can’t interfere mechanically with the gateway shield. That doesn’t look to be a problem, but I can’t tell for sure, so you’d have to line up the footprints.
  2. There can’t be pin overlap. So we use some pins on the Electron to talk to the BLE radio on the gateway shield, so you would have to make sure the same pins aren’t used on your sensor board.

If those two points above are true, then this would work. The Electron in the base station can measure the sensors AND receive data from the satellites and then send all the info to the cloud.

Let me know if that all makes sense or if I am way off base.



I think we are, like you said, on the same page now. :wink:

Is there a reason you prefer to use the whole Gatewayboard instead of intgrate the Gateway Electronic to the Basestation Board?

Is it possible to put a bluz DK to the Basestation PCB (changing the PCB Layout) that act as Gateway? Do you understand what i mean?


I think I do. It sounds like you want to combine a bluz DK and the Electron yourself to create the gateway (base station).

Unfortunately, this wouldn’t be straight forward. BLE works in a central-peripheral hierarchy. So a central can connect to multiple peripherals, but a peripheral can only connect to one central.

As the real world example, your smartphone is a BLE central. So it can connect to multiple devices (remote controls, headphones, etc.) at once, but those remotes/headphones/etc can only connect to one smartphone at a time.

With bluz, the central and peripheral devices have very different firmwares with very different BLE stacks. So the bluz DK only ships with the peripheral firmware and stack, you can’t just turn it into a central. The underlying hardware is the same, so this could be possible, but it would require a programmer to completely wipe the flash and reprogram it with a modified gateway firmware. The gateway firmware would have to be updated to run on the different pin mappings of bluz as well, so you’d have to change the system firmware of the gateway.

I would recommend using the gateway shield, it will work out of the box and you won’t have to worry about reprogramming anything or updating the underlying firmware.


Ok, thank you for the Explanations eric.

I repeat what I’ve understood so far

So in understand that there are 2 Bluetooth Modes, central and peripheral. The Modules have the same Base but different Firmware.

If I am able to reprogramm the a bluz DK with the central Firmware it is possible to integrate a bluz DK to the Basestation PCB.


  • is the firmware (central and peripheral) open source?
  • if yes, do i need just the J-Link Shield if i want to try to reprogram the DK peripheral to central?
  • do you see other possibilities to reach my goal?
  • is mesh a possibility?

I think its a good Idea to use the gateway board at the beginning as you recommended.
When everything is working we can do the optimizing…i think it will keep me busy for a longer period!

I am grateful for all the help during this time, perhaps other Beekeepers with specific Knowlegde are reading this and are willing to help

Regards, Mario


Your understanding is all correct. To answer the questions:

  • Yes, everything is open source here:
  • Yes, you would need a JLink shield, but also a programmer as the shield is just an adapter. The STLink v2 works quite well and is only around $20. We use a library from Adafruit called Adalink to program the boards, it makes it pretty simple:
  • I think your plan is good, using the gateway shield first is best.
  • We don’t have mesh support today, it is on the longer term roadmap

Is there any specific reason you don’t want to use the gateway shield? Other then the larger footprint, this would be the simplest way to go.