Go Down

Topic: Measuring the weight of a beehive (Read 67782 times) previous topic - next topic

blimpyway

One problem with strain gauge between wheel and freezer is that when you move it a little bump on the floor will have a stress/impact far greater than normal load. Strain gauges usually resist 150-200% stress of their nominal measuring force limit, but more than that will very likely affect their readings.
I would use a fixed weight-measuring frame with screws to lift the fridge a few mm once it is in its place.

igorstelmastchuk

Very good idea Blimpyway.
Can you tell me how can I connect the weight scale sensor with a gsm data logger (data logger model/ what I have to check to ensure the weight sensor compatibility)?

blimpyway

I'm not sure I understand the question.

You should look into tutorials, examples about how to:
- Connect HX711 (strain gauge sensor) to arduino.
- Connect arduino to a GSM module or modem to send SMS-es

Combine the two in a arduino program that reads weight and sends weight data via SMS

If there-s any chance the freezer be located in a WiFi coverage area, I would use Wifi instead of GSM.

Gert_O

Clemens is there a chance that you can find time to make af software version for Stalker V3.1 (DS1337S RTC and GPSBee ) of yours OpenHive ?



Bole

Hello Clemens and other guys,

Clemens, I have some questions for you if you can answer please.

I am working on Arduino based bee scale project and I am experiencing some problems with ADC and GSM module interference.
I am using shielded HX711 breakout board and SIM800L module. Everything works ok till SIM800L module starts to communicates with network. When GSM module receives SMS or voice call ADC data become corrupt so weight is not correct. All is powered from 3.7V 4000mAh Li battery. I've tried to power GSM module from other battery but problem still persist. It looks like interference comes from RF side.
I have made dual side PCB (photo attached) with separate ground planes and decoupling for analog, digital and GSM sections but again problem persist. ADC reading is averaged in firmware but it does not helped a lot.
I do not know what else to try.
What about your experience about GSM module and bee hive weight scale?

Sorry for my bad English. :-[

Bole

Here is picture...

Gert_O

Bole dont you think its because of the unshielded wire from your loadcell ? The wire should be as short as possible, othervise the vill act as "a pickup" for any noise (and the GSM-signal).

Sorry for my bad English. :-[

NZbeek

Hi all.
Since I last posted I have still been working on my scales but sporadically. I have working code - and it was working well, I thought I had it at the point where I just needed to start tidying it (understatement). I had the scales running for about 1 week continuously, then was out of the country for 3 weeks. On returning I set it up again and without changing the code it returned an error when trying to upload the scale data. I am not too sure why but my best guess is that when I send the USSD to retrieve balance info, the returned message is overflowing the buffer and causing the AT+CIPSEND to fail. I assume that when it was working the message returned from the network provide was less than the 64 bytes and so the error was not occurring...would this make sense as a reason for the error to occur? The reason I know retrieving the balance is what causes the failure is because the upload works without error when I temporarily remove the balance function.

Please advise if best addressed under another thread.

The flow of the code is:
Normal setup
Power SIM900 and connect network
Query current date and time and send to RTC
Set interrupt alarm time depending on current time

Get weight
Get Balance
Get SIM900 IMEI
Upload
Power down
Sleep

wait for interrupt



Int
Serial output:
Code: [Select]

~⸮⸮⸮⸮⸮
RDY

+CFUN: 1

+CPIN: READY

Call Ready

*PSUTTAT+CGATT=1

OK
AT+CSTT="internet"

OK
AT+CIICR

OK
AT+CIFSR

100.104.40.165
AT+CIPSPRT=1

OK
AT+CIPQSEND=0

OK
AT+CLTS=1

OK
AT+CCLK?

+CCLK: "17/06/26,10:04:29+48"

OK
RTC Time: 2000/1/1 0:1:7
Old datetime:  2000/1/1 0:1:8
New datetime:  2017/6/26 10:4:28
A1 Enabled for 4 PM
A1 Enabled for 4 PM in Setup
AT+CIPSHUT

SHUT OK

NORMAL POWER DOWN
<⸮⸮⸮⸮
RDY

+CFUN: 1

+CPIN: READY

*PSUTTZ: 2017, 6, 25,AT+CGATT=1

OK
AT+CSTT="internet"

OK
AT+CIICR

OK
AT+CIFSR

100.102.156.30
AT+CIPSPRT=1

OK
AT+CIPQSEND=0

OK
Weighing Mode Active
ForceValueRaw>
521
 grams>
71
 LoadB>
8000
 ValueA>
490
 ValueB>
3974
 PC>
0
AT+CUSD=1,"*100*1#,15"

OK
check balance string:
20
Second Pass
013949000670615
15
AT+CIPSTART="tcp","sxxxxs.xxxxxxxxxxxxx.co.nz","80"

OK
AT+CIPSEND

ERROR
GET http://sxxxxs.xxxxxxxxxxxxx.co.nz/pass-data?scale_id=013949000670615&weight=71&bal=20 HTTP/1.0



ERROR
AT+CIPCLOSE

CLOSE OK
AT+CIPSHUT

SHUT OK

NORMAL POWER DOWN
A1 Enabled in Loop
Going to Sleep Now



My reponse code (which I think could use significant improvement:
Code: [Select]

void Response()
{
  delay(100);
  while(!GPRS.available());
  if(GPRS.available()){
    while(GPRS.available()){
      Serial.write(GPRS.read());
    }
  }
}


and the balance query code:
Code: [Select]

void Balance(){
  GPRS.println("AT+CUSD=1,\"*100*1#,15\"\r");
  Response();
{
  while(!GPRS.available());
  if(GPRS.available()>0){
    while(GPRS.available()){
      //balance_character = GPRS.read();
      balance_content=GPRS.readString();
     
      int startPos = (balance_content.indexOf("$"));
   
do
{
    if (isdigit(balance_content.charAt(startPos)))
        break;
}
while (++startPos < balance_content.length());

// Then find the index of the last digit   
int endPos = startPos;
do
{
    if (isWhitespace(balance_content.charAt(endPos)))
        break;
}
while (++endPos < balance_content.length());


    bal = balance_content.substring(startPos, endPos);
    bal.trim();
    Serial.println(bal);
    }
  }
 
  GetID();
}
}



 Just to emphasise, the code worked well previously and the only thing I can think changed is the Network response to balance inquiry. What I don't understand is why the CIPSEND fails and I can only assume that when the buffer overflowed it times out the SIM900 "session". I am not a proficient coder. I have written all the code with a lot of trial and error, which I know people wont appreciate - but ultimately I am a beekeeper and truly understanding this language has been beyond me.

Thanks in advance.

NZbeek

EDIT^

I found a quick solution - but as with all quick solutions it may not be the best. I just terminate the USSD session, as I had suspected it seems to be that the session is remaining open, either waiting for a reply or because I am not managing the buffer input well.

I end the session with

Code: [Select]

GPRS.println("AT+CUSD=2\r");
  Response();


I would really like to improve my code, but as stated I have done my best with the skill level I have - is there somewhere on the forum I could submit my code for critique / improvement? or is this offered as a service?

thanks

pierrepoulpe

#114
Dec 22, 2017, 10:23 am Last Edit: Dec 22, 2017, 10:29 am by pierrepoulpe
Hello Folks!

With a friend beekeeper, we started to dig the subject a few yars ago.
Like everybody, we started with the cheapest strain gauge we could find. Stability of the measure was disastrous.
We thought about buying better load cell.
But after research, and discussion with another beekeeper who also searched on the subject, and who has a background in physical measurement, came out of these discussions that there were no good tradeoff between price of the components, and quality (especially stability).

So we moved to a completely different approach, which can be much more DIY-friendly than load cells : we built an automated mechanical scale.
Principle is pretty simple, you take a roman scale, a beam, suspend mass to weigh on one side, slide a counterweight the other side, an articulation between, and that's it. Mass to weigh = ratio of the distance  articulation-counterweight / articulation-mass * mass of the counterweight.

Electronically, it becomes very simple, arduino has to drive a stepper motor, and check the status of a sensor (optical, reed..) to detect the balance. No analog layer...

Stability of the measure is dependent on the structural stability of the beam on its length, given there is no constraint on it in the length direction, we could say problem of stability is solved.

The tricky part is now to build something that integrates nicely under a hive.
It's what we worked on.
Quickly, we had prototypes that worked very well.
Then we wanted to make a version that was easy to replicate if we needed to make 10, 20, 30.....
And when we started this "industrialization", we thought about making more and sell it as kit.

Here we are, project is mature enough now :
We release all the sources (mechanic, dedicated board, firmware, cloudware) for DIYers
And for beekeepers who don't have {time/energy/skills} we propose for sale a kit.

If it sounds interesting enough, you may visit our website :
www.openhivescale.org

And the sources :
https://github.com/openhivescale

Cheers, Pierre

TomGeorge

Hi,
Fantastic project... I like the fact that you have discussed the pro and cons of various methods, and your product looks good.


Tom.. :)
Everything runs on smoke, let the smoke out, it stops running....

pierrepoulpe

#116
Dec 22, 2017, 12:30 pm Last Edit: Dec 22, 2017, 09:09 pm by pierrepoulpe
Thanks Tom!
I posted here pictures of the previous designs, maybe more adapted to the build of a single scale on your own.

http://www.openhivescale.org/forum/viewtopic.php?id=4

TomGeorge

Hi, mate.
I'm not a beekeeper, but it will be a good source of reference for the number if times that we get questions about weighing beehives.

There must be other applications that a platform like yours can be use for.

Thanks Tom...Merry Christmas
Everything runs on smoke, let the smoke out, it stops running....

Gert_O

#118
Jul 21, 2018, 04:35 pm Last Edit: Apr 25, 2019, 08:31 am by Gert_O
My last creation, a 4-point BeeScale. You are velcome to follow my scale on:  http://www.minibier.dk  My scale are named Beder-2.

Update every ½ hour at Sigfox net. Battery last more than a hole year.

https://www.dropbox.com/s/ldk195fgg0p7f5q/DSC_0192.JPG?dl=0
https://www.dropbox.com/s/44455ocnmfuthsi/DSC_0193.JPG?dl=0
https://www.dropbox.com/s/2otgwj1izl4zbw2/IMG_3626.JPG?dl=0
https://www.dropbox.com/s/2sxtvyhxwepx4ok/Beder%201.jpg?dl=0

(Cut and paste too your browser)




KalleMP

#119
Feb 04, 2020, 12:47 pm Last Edit: Feb 05, 2020, 06:15 pm by KalleMP
Hi Bee folks,

I have pondered this set of requirements more than once, have had family hives and a family friend was a commercial keeper and now have half a dozen hives for a family friend on my mothers small forest plot.

To justify the development of a cheap system the volumes should be large so that some knock off company starts to make a tolerable clone at falling prices.

So the key for volume is for this to be of value to larger apiaries.  This means the replicated unit must be cheap and easy to install.

The reason I came here today and registered was that I saw by chance a new device I had not seen before and thought that it shared similarities to the task at hand and might work as a starting platform or at least as inspiration to some.  This was a propane cylinder digital scale that are used to measure remaining cooking or heating gas.  Prices were in the sub US$20 on Amazon with wired and wireless options.  The same company could make a beehive scale for similar money and the search for everyone would be over.

However my solution to the problem if one wants to have something perhaps a bit more elegant was as follows.  A force multiplying and summing 4 corner linkage such as one would see in a vintage mechanical bathroom scale but instead of a spring with position readout or a force sensor I had the idea to use another bit of consumer technology to load the links.  My idea was to use the guts (or equivalent) of a blood pressure monitor to inflate or contract a membrane actuator and at a certain pressure it would cause the link to flip position (say 30mm movement) on cause a magnet to approach a reed-switch on a embedded IoT device such as the RuuviTag which can measure the temperature of the hive bottom and the position of the magnet and communicate via Bluetooth low energy (BLE) to a central station in the neighbourhood (they have achieved over 800m range in tests).  The hives would have a mechanical weigh base with an actuator similar to the automotive units used to control the internal air-conditioning, central locking or turbo charger waste-gates.  These are commodity actuators and will be repeatable.  The base station would have a pipe loop with taps to each hive in the area and pump air or vacuum into the actuators and wait for each device to report that the magnet has changed position.  It would then slowly (just like a blood pressure reading) let the pressure drop and listen for the reports from each RuuviTag for the moment when each hive comes back down to rest.

The benefits are no electrical connections between hives to cause electrical interference to electronics or bees due to lightning induced currents.  Each hive has a free base temperature monitor.  Each hive has a tamper indicator if the hive is lifted and the temperature changes or the base is lifted so the links flip over or extra sensors top and bottom.  Base station can monitor cloud cover and ambient temperature for the group.  Base can have GSM connection to data collection site and WiFi to keeper to do testing locally. Cost of pump and pressure sensor are shared between all the hives in one cluster.  Base station can be run with power from electric fence that is used to keep out wild animals. The active lifting of the hive (only a millimetre or two needed) will break any propolis, mud or snow encrustations.  There is only one well protected small sealed electrical enclosure in the hive with a 5 year CR2350 cell so minimal chance of rain causing a problem.  Only one accurate pressure sensor required so drift and temperature can be managed better, perhaps even with one or two dummy hive base/s with an identical mechanical and pneumatic link system and known mass/es.  Remote mounting the pump will mean that the hives only have a tiny disturbances once or twice a day at midnight and at sunrise (programmed) to wake the hive up for the new day.

The problems are cost compared to falling prices of cheap propane scales.  The need to have periodically replaced desiccant on the air inlet port to prevent water in the pipes.  The chance or lawnmowers or wild animals damaging the pipe system. And lastly the need to replace batteries periodically though the base could be solar powered in most places and the remotes have a many year life and can be shut down until the reed-switch is activated.

I prefer the idea of a vacuum rather than pressure as pipes will not try to jump off.

All that is needed is to make a viable prototype and a design from cheap materials (powered coated steel) and get quotes from 100 manufacturers and wait for one of them to clone it :-)  I like the idea of a crowd designed open source design that has a ROBUST set of specifications and interfaces so that there would be a number of low cost sources. The market such scales will keep growing now with the threat to bee populations and desire to increase monitoring.  The design will work with any product that needs accurate daily or twice daily measurements.

Regards

Kalle
--
Lahti, Finland

Go Up