Skip to content

flexiblestoic/EASYBeeMonitor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

EASYBeeMonitor

Disclaimer of Warranties and Limitation of Liability

Please review the license in the "License" section.

Mission

Affordable, easy to source, easy to make, long range, autonomous behive monitoring device.

EASYBeeMonitor is designed with common components found in most electronic stores with the benefit of being low cost and well supported by the makers community. The Sigfox platform provides good coverage in Europe and its low energy signature fits well with the project's requirements.

Hardware

Note: we are not sponsored by any sellers, the links are provided purely for informational purposes and without any warranty.

  • Microcontroller: ESP12E/F (aka ESP8266) along with a breakout board (eg. seller)
  • Witty cloud to program the barebone ESP23E/F (eg. seller)
  • Weight sensors: 4 x 50 kg load cells coupled with a HX711 load cell amplifier (specs)(eg. seller)
  • Wisol Sigfox Module BRKWS01 and antenna (specs) (eg. seller)
  • HT7333 low consumption LDO (specs) (eg. seller)
  • Two Water proof DS18B20 temperature sensors (specs) (eg. seller)

In order to achieve a low deep sleep current, it is essential to get a bare-bone ESP12E or F chip. The development boards (for eg. Nodemcu or other similar development boards) often embed a linear voltage regulator with significant quiescent current which is not ideal in a low power setting. We recommend a low quiescent LDO such as the HT7333. The barebone solution is best to optimize power consumption. The current is around 0.1mA in deep sleep and 80 mA during transmission (10s every half an hour). In our setup, using 6 AA batteries, we estimate the battery life to be roughly a year.

You are free to choose the way you flash the ESP12. One way is to buy a Witty Cloud and use the flash shield to program the barebone ESP12 + dev board + LDO. However, please be advised that in any case, the barebone is not practical for prototyping. We do recommend a NodeMCU setup (eg. seller) which facilitates the prototyping should you wish to temper with the design.

The schematics of the hardware available here.

Software

The firmware needs to be downloaded onto the micro controller. Please alter the code depending on chosen configuration (1) wifi or (2) Sigfox. Please be careful in the versions of the apps/librairies installed as newer versions may break the code.

  1. Install Arduino
  2. Install ESP8266 control for Arduino tutorial
  3. Install libraries (in Arduino, Tools>Library Manager): DallasTemperature by Miles Burton, OneWire by Jim Studt
  4. We are using the HX711 libraries by Bogdan Necula

Wifi

The micro controller will send sensor information to a chosen database provider, which in the code provided, is thingspeak.com

Sigfox

The micro controller will send sensor information to the Sigfox backend, a call back will have to be configured to route the information onto a database provider (in our case thingspeak.com). Please note that due to limitation of the architecture, the Sigfox network only allows a maximum number of 140 messages per day with each message no longer than 12 bits.

When configuring the Sigfox back end, the custom payload config should be as follows. Sigfox back end tutorial available here.

weight::uint:16:little-endian tempInt::int:16:little-endian tempExt::int:16:little-endian espVoltage::uint:8

Given the fact that the data has been compressed. It needs to be decoded on thingspeak before beeing usable. The following code needs to be added under "apps>all apps>new" in order to translate the coded information into original values (please replace readChannelID and writeChannelID IDs and API Keys with your personal IDs and Keys)

% TODO - Replace the [] with channel ID to read data from: 
readChannelID = 0000000; 
% TODO - Enter the Read API Key between the '' below: 
readAPIKey = 'XXXXXXXX';  
% TODO - Replace the [] with channel ID to write data to: 
writeChannelID = 0000000; 
% TODO - Enter the Write API Key between the '' below: 
writeAPIKey = 'XXXXXXXX';  
%% Read Data %% 
data = thingSpeakRead(readChannelID, 'ReadKey', readAPIKey,'OutputFormat','table');  
analyzedData = data;  
%% Analyze Data %% 

UINT16_t_MAX = 65536
UINT8_t_MAX = 256

analyzedData.('weight') = round(data.('weight') * 300 / UINT16_t_MAX + 0, 2)
analyzedData.('tempInt') = round(data.('tempInt') * 170 / UINT16_t_MAX - 50, 2)
analyzedData.('tempExt') = round(data.('tempExt') * 170 / UINT16_t_MAX - 50, 2)
analyzedData.('espVoltage') = round(data.('espVoltage') * 7 / UINT8_t_MAX + 1, 2)

%% Write Data %% 
thingSpeakWrite(writeChannelID, analyzedData, 'WriteKey', writeAPIKey); 
%% Schedule action: React -> every 10 minutes 

Number coding

In order to optimize message length, 4 pieces of informations (weight, tempInt, tempExt, ESPVcc) are coded onto 7 bits in the current version of the protocol. Each variable has been scaled depending on its useful range.

License

Attribution-NonCommercial 4.0 International (CC BY-NC 4.0)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published