Go Down

Topic: Measuring the weight of a beehive (Read 64865 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)




Go Up