This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Freelancer to connect a load cell, ADC (HX711?) to nRF52DK (810)

We are looking for a freelancer who can help to build a simple Proof of Concept of a load cell (strain gauges) ADC (HX711?) and the nRF52 development kit (810).

Objectives are to show this bacon function works and to determine what the battery lifetime will be of the standard CR2302 battery.

Advertising only when the load change is beyond a certain threshold/level and when the signal is stable (low standard deviation).

We have components available (need instructions how to connect). 

 

Parents
  • Hello,

    Seeing as nobody answered this, I thought I could give an outline of how this can be accomplished.
    I am personally not familiar with neither the weight-cell sensor nor the HX711 ADC, but I found some resources that might be helpful for how to connect this as described.
    First, you will need to connect your weight cell to your HX711 ADC. This sparkfun tutorial covers the theory and approach for how to best do this. In the case of your weight cell(judging entirely from the picture provided) it seems you should just connect the wires with their corresponding color code(i.e green wire to GRN, black wire to BLK, etc). It also mentions how the weight-cell should be mounted on the target, for best results.
    Bear in mind that the HX711 VCC pin powers the weight cell, and should be 5 V, while the VDD powers the HX711 ADC. I have not checked how much current either of these consume, so you will have to make sure that wherever you supply it from can meet its requirements.

    Secondly, you will need to connect the HX711 to your nRF52 DK. The HX711 datasheet details the serial interface that is used to receive the measurements from the HX711. By the looks of it, it seems you just need to toggle the PD_SCK 25 - 27 times whenever a reading is available, to receive the data on the HX711 DOUT pin. You may use any of the nRF52 DK's GPIOS to interface with this sensor.
    If you should get stuck when creating the serial interface, you could take a look at the C++ source code for the Arduino "HX711" library for inspiration.

    To start this application, I would suggest that you use the pin_change_int example as a starting foundation. The examples function is described in the example documentation I referenced. Modify the example to trigger the interrupt on the "Data ready" signal from the HX711(DOUT going low) to start an app_timer, that generates the 25 - 27 pulses needed to retrieve the data, and print out the data using NRF_LOG_INFO to verify the retrieved data. You will also need to create some functions for configuring of the HX711, which means toggling the two serial pins a number of times, as described in the datasheet.

    This should roughly be what you will need to do, to get your sensor and ADC up and running.

    As a side note, I would think that you could circumvent the HX711 ADC entirely, and instead use the onboard 12 bit SAADC directly for this. However I do suppose this will require more work than just using the hardware you already have got - especially given the availability of sparkfun documentation for it. You could consider trying it for future work.

    By the way, I see that you have tagged the post with nRF52810 and it is also mentioned in the title - but your picture and other mentions is of the nRF52 Development Kit. Just in case, I thought I should mention that the nRF52 Development Kit has an nRF52832 SoC.

    Please do not hesitate to ask if anything still should be unclear.

    Good luck with your development!

    Best regards,
    Karl

Reply
  • Hello,

    Seeing as nobody answered this, I thought I could give an outline of how this can be accomplished.
    I am personally not familiar with neither the weight-cell sensor nor the HX711 ADC, but I found some resources that might be helpful for how to connect this as described.
    First, you will need to connect your weight cell to your HX711 ADC. This sparkfun tutorial covers the theory and approach for how to best do this. In the case of your weight cell(judging entirely from the picture provided) it seems you should just connect the wires with their corresponding color code(i.e green wire to GRN, black wire to BLK, etc). It also mentions how the weight-cell should be mounted on the target, for best results.
    Bear in mind that the HX711 VCC pin powers the weight cell, and should be 5 V, while the VDD powers the HX711 ADC. I have not checked how much current either of these consume, so you will have to make sure that wherever you supply it from can meet its requirements.

    Secondly, you will need to connect the HX711 to your nRF52 DK. The HX711 datasheet details the serial interface that is used to receive the measurements from the HX711. By the looks of it, it seems you just need to toggle the PD_SCK 25 - 27 times whenever a reading is available, to receive the data on the HX711 DOUT pin. You may use any of the nRF52 DK's GPIOS to interface with this sensor.
    If you should get stuck when creating the serial interface, you could take a look at the C++ source code for the Arduino "HX711" library for inspiration.

    To start this application, I would suggest that you use the pin_change_int example as a starting foundation. The examples function is described in the example documentation I referenced. Modify the example to trigger the interrupt on the "Data ready" signal from the HX711(DOUT going low) to start an app_timer, that generates the 25 - 27 pulses needed to retrieve the data, and print out the data using NRF_LOG_INFO to verify the retrieved data. You will also need to create some functions for configuring of the HX711, which means toggling the two serial pins a number of times, as described in the datasheet.

    This should roughly be what you will need to do, to get your sensor and ADC up and running.

    As a side note, I would think that you could circumvent the HX711 ADC entirely, and instead use the onboard 12 bit SAADC directly for this. However I do suppose this will require more work than just using the hardware you already have got - especially given the availability of sparkfun documentation for it. You could consider trying it for future work.

    By the way, I see that you have tagged the post with nRF52810 and it is also mentioned in the title - but your picture and other mentions is of the nRF52 Development Kit. Just in case, I thought I should mention that the nRF52 Development Kit has an nRF52832 SoC.

    Please do not hesitate to ask if anything still should be unclear.

    Good luck with your development!

    Best regards,
    Karl

Children
  • Dear Karl,

    thank you so much for your reply!
    Highly appreciated.

    Despite your clear feedback it was unfortunately too complex to get the composition up and running ourselves.
    That was the reason we were looking for a freelancer to help us out. We succeeded to find someone.
    Regarding your feedback:
    - the 12 bit ADC on the nRF52 is not sensitive enough to measure the weight changes accurately, a 24 bit ADC is required 
    - the nRF52DK can operate both as 810 and 832 version. Difference is memory. And later on: costprice in production (the 810 is less expensive). 

    Thank you once more: we hope to get oir killer application up and running soon ;-)

    Best Regards
    Freddy

  • Hello Freddy,

    FreddyH said:
    thank you so much for your reply!
    Highly appreciated.

    No problem at all, I am happy to help!

    FreddyH said:
    Despite your clear feedback it was unfortunately too complex to get the composition up and running ourselves.
    That was the reason we were looking for a freelancer to help us out. We succeeded to find someone.

    I am glad to hear that you were able to find someone to work with on this.

    FreddyH said:
    Thank you once more: we hope to get oir killer application up and running soon ;-)

    Cool, good luck with your development!

    Please do not hesitate to open a new ticket if you should encounter any other issue or question with the nRF in the future!

    Best regards,
    Karl

Related