Simple and robust project using Dragino LSN50

Hi everybody,

After 2 years of usage, My home made monitoring scale (arduino, sigfox) took on water. My case was not waterproof enough, wire was not really made to stay outside… so many problem…

Recently I found a prepackaged lora component : Dragino LSN50

This system seems to fit perfectly to my need (robust, low power, wireless…) except the load cell connectivity.

My idea is to plug directly my load cell. And using the internal 12bit ADC .

I know I will not get the same accurency if I’m using a dedicated HX711. But for me, as I’m using a 72kg load cell (HBM PW2C), I should get 17.5g precision (72/4096 = 0.01757). And this precision is enough for me.

Any comment about this solution ? I’m totally wrong ? Is it something feasible ?

Aurelien

I [edit] don’t think the (any) internal ADC is sensitive enough to directly measure a load cell (the voltage differences are quite tiny).
The HX711 costs about 3€ from ebay. The LSN50 has 18 IOs. I guess you can spare two of them for the HX711. :slight_smile:
Also the LSN50 uses a STM32. That thing should be able to run Micropython so you could use the firmware we are currently developing [1].


  1. GitHub - hiveeyes/hiveeyes-micropython-firmware: Hiveeyes MicroPython Datalogger - data logging for humans ↩︎

Please be aware of the details. As far as I know, there has been an important reason for using a 24-bit ADC for that purpose.

@IngoP asked the other day:

@clemens answered (machine translation):

Code für ADS1232 oder ADS1234 - #19 by clemens

Maybe @clemens or @weef can elaborate this even better when writing plain English.

Aaargh - typo! Sorry! I wanted to write ‘I don’t think the (any) internal ADC is sensitive enough…’!

Else the rest of the paragraph wouldn’t make much sense… :stuck_out_tongue_winking_eye:

Many thanks for the nice finding! Cortex M0 with an interesting setup!

About the scale: The HX711 is not only an ADC but also a PGA, it amplifies the signal before it is digital encoded. So you will not be happy with this, perhaps you can use some percent of the full range. So even if you would have 24 bit it will not work as expected.

But that’s no problem! Why not using the HX711 near the scale and transmit the digital data over the longer part of the wire? There are tiny IP6x rated cases you can put in the HX711 and position it near the load cell. Just for the ideas see HX711 Junction Board für 4 Wägezellen

Thanks all for you quick reply,

It’s what I expected, ADC is not enough to built a load cell amp/converter.

If I’m going to the HX711 solution as mentioned by @poesel and @clemens … regarding the firmware code, what is your recommendation to have the simpliest code adjustment ? To enhance the existing Dragino code or to go on the proposed solution by @poesel ?

the code functionnality of dragino is managed by AT command, I didn’t go inside the code but I can imagine to develop a new AT command for the scale funcitonnality…

Thanks
Aurélien

Dear Aurélien,

Despite being popular within this community, we would like to mention that when aiming at a more solid solution and when being capable enough, we actually recommend the ADS1231 from Texas Instruments.

The HX711 has apparently become popular for reducing costs, but in fact it’s just a cheap clone of the ADS1231 and it has its issues. You will find something about this guy in the forum and additionally, @weef or @roh might want to elaborate further on this topic.

Thanks for listening and with kind regards,
Andreas.

What software are you currently using?

Actually I don’t get any LSN50, I have only work on my previous arduino project (arduino based code).

Else I contacted Dragino support to ask them if they are ready to upgrade their firmware to add a new AT command in order to manage a load cell. For the moment they not said no… but they are interested to know how much devices I’m ready to buy. So if other members of this community are interested we can maybe influence on… Do not hesitate to put your hand up.

I know AT “interfaces” from SIM modules only and I fear that you will not be able to realize the integration by adding some ATs, there must be a second layer of code that triggers the ATs. Is this open source and available, is this C or what language? I think it depents on this practical issues. In case you can program the device like an Arduino I would go this way. We have some firmware that works with this hardware base but not fully developed LoRa / TTN functionality, you may ask @Thias about details.

Btw. the Beep project used a Dragino Mini basec on an ATmega328P not Cortex M0 but code could be compatible also.

Hmm, I see

  • Li/SOCI2 unchargable battery
  • Capacity: 4000mAh

and a consumption of

  • STOP Mode: 2.7μA @ 3.3v
  • RX Mode: 7.2mA
  • TX Mode: 125mA@ 20dbm

How often will you measure your hive and transmit data? What battery (capacity) did you use for your Sigfox setup and how long did it work?

The moste helpful documents I found were

You may consider not to use the HX711 but the SparkFun Qwiic Scale - NAU7802 - SEN-15242 - SparkFun Electronics, it is based on the NAU7802 and has a dedicated I2C interface, the current AT-software supports an I2C temperature sensor, so the integration of the NAU7802 I2C data may easier then the HX711 output.

Regarding my actual equipment using sigfox, I work also on LI-SOCl2 unchargeable battery (3600mah) and I hope to stay up to 5 years up and running, but as I said, the weather has decided differently for me and my setup ;-).

I measure every 25 minutes.

1 Like

thanks for your input @clemens, I’m also refering to this documents when I said I want a new AT command for my use case. Because as per my comprehension of the LSN50, it is delivered with a built in firmware customizable by AT command depending on the use case (temperature sensor, rain gauge…) not need of particular code bu just activating the good part of the firmware using AT command…

I will have a look to NAU7802 …

Wow! That would be great. My head seems to be messed up with bad WiFi and GSM consumption values! ;-)

After some exchange, Dragino development team is currently working on integration of HX711 chip.
This will be available for all of us. wait and see…

1 Like

I’ve made my first prototype with GSM shield, it was working but the power comsumption was a nightmare. And as my beehive are in middle of nowhere, I’ve not a plug in my apiarie… ;-)

They kept their promise:

last firmware 1.6.2 (before current 1.6.3), released end of Dec '19, contains two HX711 commands (with variable names like “weight_shiwu” and “weight_maopi” ; )

  • AT+WEIGAP get or set the gap value (calibrate factor) of measurement
  • AT+WEIGRE set the weight to 0g (zero calibration)

… but nowhere a “AT+WEIGET” or thelike… :(

And - what I missed completely: if one doesn’t like the precompiled fw files, no easy “make” to rebuild; it’s a Keil µVision project and would have been ported over to a GNU toolchain…

2 Likes

A nice writeup from Matthew Brandes about a hive monitorins setting with the LSN50 (v2): http://www.n523rv.com/HiveMinderBeehiveMonitorInstructions.pdf

HiveMinderBeehiveMonitorInstructions.pdf (2.9 MB)

3 Likes