Close
0%
0%

Bin Temperature Monitoring System

A grain monitoring system that will cost about $500CAD (raw materials) instead of $4000 CAD. Also open source instead of closed source.

Similar projects worth following
This project is meant to create a low-cost solution for small to medium-sized farmers who want to monitor their grain while it is in the bin. Currently, there is a solution that is on the market, but it costs roughly $5000 per bin, and it is closed source. The currently operating device and setup costs somewhere around $500 for all the disassembled parts, and it monitors four bins.

The temperature of the grain is critical because if the temperature starts rising the grain may spoil, and the farmer will lose money.

The current strategy is to use the Arduino MKR 1400 (or any MKR board) to control three DS18B20 temperature sensors. The sensors then send the data to the cloud where the farmer can look and see if the grain is heating. Eventually, a webhook will be added so that an alert is sent out if the grain starts heating.

ds18b20_diagram.pdf

schematic of ds18b20 cables

Adobe Portable Document Format - 35.31 kB - 08/28/2021 at 18:27

Preview
Download

pcb_schematic.pdf

the schematic of the PCB

Adobe Portable Document Format - 83.42 kB - 08/27/2021 at 15:50

Preview
Download

Pinout-MKRsgm1400_latest.pdf

Pinout diagram of the MKR GSM

Adobe Portable Document Format - 1.57 MB - 08/27/2021 at 15:49

Preview
Download

View all 11 components

  • LoRa Testing

    Kody Alan Rogers03/12/2023 at 22:38 0 comments

    This project log is sort of announcing a new path for the project. I have decided to further refine this project to the point where it could be considered a product. I am going to use this hackaday page as a place to contain a version that will use solely DIY tools (Arduino, Raspberry Pi, etc.) and a minimal amount of specialty products. 

    This new direction has resulted in me also deciding to use LoRa as the communication protocol. This is because I want the product to be battery powered and my province does not currently have widely available LTE-M. My first testing of LoRa went ok and I'll detail it more below.

    My first attempts were bad because I was using MKRWAN_v2 to update the firmware so that I could use the examples in, https://github.com/sandeepmistry/arduino-LoRa, and it would appears that the firmware MKRWAN_v2 uses is not compatible with that library. Eventually, I used the MKRWAN library to update the firmware and it worked well. The reception between two Arduinos was definitely acceptable.

    My current development plan is roughly as follows:

    1. Communication between Arduino and Raspberry Pi hub
    2. Curate the Arduino data sensibly so that it is easy for the pi to understand (JSON or some other format?)
    3. Create an App and/or database to display the data for the farmer.
    4. Set the Arduino to be battery/solar powered
    5. Polish this proof of concept before starting to create specialized hardware for the final product.

    Now that is a lot simpler of a plan than it will really be, but it gives an idea of what to look forward to.

  • Putting All pieces together

    Kody Alan Rogers12/03/2021 at 23:46 0 comments

    I am just working towards getting some very nice instructions created and creating some instructional videos as well. I also still need to do some investigating on what resistor is best for each distance.


    After reviewing my instructional video below I found that I also need to add a few things to the silkscreen and should consider making the board symetric.

  • Assembled Second PCB Revision

    Kody Alan Rogers11/05/2021 at 15:15 0 comments

    The second PCB Revision was assembly and it is currently deployed and reporting the temperatures from 4 bins. Some things have been learned and have to improved again.

    The two that come to mind are:

    1. A guide for pull-up resistor values need to be made. The standard 4.7K ohm does not work for the two bins I have further away from the MKR 1010 since the capacitance of the wire grows with length an that capacitor (the wire) has to be charged to transmit a 'high' voltage signal. If the resistor is too large the 'capacitor' will not be charged in time. I will give a more detailed description in some sort of document being that a log or a tutorial, but it will be done.
    2. Not pertaining to the PCB the distance of the temperature sensors need to be changed to give better/more usable temperature readings of the grain temperature. Either 4 will be placed 4 feet apart or 3 will be placed 5 feet apart, as opposed to 3 placed 7 feet apart.

    I think there is some PCB changes that I am forgetting to mention, but I will add them after I review my PCB assembly video.

  • Completion Nearing

    Kody Alan Rogers08/27/2021 at 15:30 0 comments

    First I should apologize about the lack of updates, and for my next project I intend to to logs more often.

    The first iteration of this project is more or less completed. I am currently waiting for what I hope to be the final PCB design to arrive from Oshpark, and one of the earlier PCBs is connected to 3 bins that each have a cable and are reporting well.

    At the moment it is just a monitoring system (no alerts) where current and past temperature data can be viewed on the Arduino cloud. I know when the project started it was going to be 100% alert based, but that changed when I realized how easy it was to launch things on the Arduino cloud. 

    The current monitoring is going well, except that some of my dad's peas were increasing in temperature drastically for a while, so it would seem that the design works well.

    One thing that may have to be changed varying on deployments is the size of the pull-up resistor on the PCB board for the DS18B20 sensors. If too large a resistor is used on the long cables then the sensors will not read, and for one of my dad's bins this was the case for the standard 4.7K ohm resistor. In this case a smaller resistor needs to be used, and I will describe this in the instructions in more detail. 

    That brings me to the last major work that needs to be done ..... documentation. It is not my favourite part but it is very necessary, and I hope to have very descriptive documents for this project. The instructions on this project page will be how to build the device from scratch, but there will be other documents on the GitHub on how to build each part of the project separately. Also in the GitHub will be a document describing how to simply assemble the grain sensor with finished cables, an Arduino MKR board, and an assembled PCB board. 

    Of interest to some people might be that I plan to sell kits with all the disassembled components, as well as assembled monitoring cables and assembled PCB boards. The price for the disassembled components will be just above what I paid for them (enough to cover my time of packing it up), so maybe around $550 or so (all together separately the components are $500 or so). A kit with the cables and PCB assembled it will be about $1000 (I calculated this price roughly by paying myself $50 an hour). Both of these kits are to monitor four 5000 bushel bins. A wild card in the price is how spread out your bins are since if the two bins are close together and another two bins are further apart (like my dad's) they way it is set up now a lot more wire will be needed. In a different project log I will give a more updated explanation of pricing.

    The price to run the system once it is assembled is the price of an Arduino IoT account, which for up to two devices is free, and the price of communication. When I was using the GSM Arduino the communication costs were about $10 CAD per month using hologram, but it will vary based on how often you want to report the temperature.

    For anyone interested in this project please do not hesitate to contact me, or to express interest in purchasing the kits.

  • Update to the Instructions and Materials

    Kody Alan Rogers02/28/2021 at 01:19 0 comments

    I have updated the instructions and the materials list. I know it needs a lot of work, and probably next weekend I'll add more detailed instructions and photos.

  • Major Updates Needed

    Kody Alan Rogers02/28/2021 at 00:23 0 comments

    So the project has changed significantly since I last updated this page. I'll list the major news below:

    1. The wooden box is no longer being used and instead, a waterproof junction box is being used. In particular, this one from Amazon is being used: https://www.amazon.ca/gp/product/B075DJQJVY/ref=ppx_yo_dt_b_asin_title_o00_s00?ie=UTF8&psc=1. I made this change since the wooden box was never really a good option, and it fried the Arduino I had inside.
    2. The project is no using the Arduino cloud to monitor the grain and that code can be seen here: https://github.com/PhysicsUofRAUI/binTempSensor/tree/master/code/ArduinoCloud. I will be adding more code there and eventually will be adding a webhook so that an alert is sent if the grain starts heating
    3. A different sensor might be used. The DS18B20 is the sensor that might be used instead and that is because it is waterproof, cheaper, and all three can be wired on one wire. Given that it has not been tested yet I may only deploy it in a few of the bins.
    4. It is up and running and has been for several months now so that is great!

  • Operating in a bin

    Kody Alan Rogers09/28/2020 at 17:36 0 comments

    The set up is currently collecting data from within a bin filled with canola. It is operating as expected, and I will continue to monitor the temperature variations so that I can best decide when a text alert should be sent out.

    For the most part the project is done and working!

    Later, could be awhile, I will give a more descriptive update and more in depth instructions of how to build.

  • Not Working in low temperatures

    Kody Alan Rogers11/20/2019 at 01:30 0 comments

    Hey.

    So I put the current build outside to see how long it would run for in the cold weather. 

    I did not do good. It sent me the first message but then six hours later (what I had set it to send the temperature at) there was silence. 

    I think it is a combination of the battery not being charged very much before and that the battery does not like the cold weather.

    The next update will be switching gears a bit. I will be constructing a 40 foot usb cable to power the arduino off of (this will replace the solar panel and the battery), and then I will put it and the sensors into operation in an empty bin. This will be the first iteration of tests that will be done on a wired version. 

    The wired version is being further pursued at this point because it will be cheaper and will operate at the low temperatures better. 

    A bit off topic, but a contest where a friend and mine were going to present this project has been postponed till March or April.

    Cheers,

  • We are outside wherever now!

    Kody Alan Rogers11/11/2019 at 02:13 0 comments

    Hey!

    I have made an enclosure for the Arduino. Before this enclosure I just left the Arduino in a BBQ to see how long it would work on the solar panel. I also am using a more powerful solar panel. Right now I am mostly testing whether or not the poor battery will freeze in the cold even though it is inside an enclosure (does the Arduino dissipate enough power to keep it warm). My guess is it will freeze. 

    Cheers,

  • The project has went Solar!

    Kody Alan Rogers09/01/2019 at 02:58 0 comments

    Hey!

    I have the BinTempSensor inside the BBQ at home right now attached to a solar panel. Attaching a solar panel is an important step because it is needed to keep the project off the grid and able to be used in any bin. 

    It has been running for almost 3 days now and when it was running only on battery it only lasted two days at most. I have been checking it during the day and it seems to get fully charged (the battery) around noon each day. I would consider it a success.

    The next steps are:

    1. Make an enclosure for the Arduino: made of wood at first, but likely will be a 3D printable enclosure in the end
    2. Move the temperature sensors off of the breadboard onto wires and eventually those wires will be wrapped around a rope or cable that will be dropped into the bin.
    3. The final step for this version will be adding a heating mechanism inside the enclosure (I'm from Canada and it gets cold here). Right now it is planned to be a separate circuit that will be switched on and off by the Arduino.

    I am hoping to list step by step instructions to build the device to the point it is within the next week, but harvest and the new semester are starting so it may not be for a bit longer. For now the instructable I wrote a while back has the set up with the battery and I'll give a bit of a blurb below of how to extend it.

    Instructable: https://www.instructables.com/id/Remote-Temperature-Sensing/

    Next steps are:

    1. Buy the needed supplies: solar panel charging kit, the solar panel, DC jack adapter, and an extra battery is also needed
    2. Cut the wires off the extra battery (we need them)
    3. Now solder the wires from the extra battery to the wires from the charging kit
    4. Plug the battery into the charging port of the solar panel charger
    5. Take one end of the wires that were soldered together and plug it into the load end of the solar panel charger
    6. Plug the other end of the soldered wires into the Arduino
    7. Plug the solar panel into the DC jack of the solar panel charger

    Remember that the set up should be placed in a rain proof, but not water proof, enclosure to ensure that water does not mess things up.

    Sorry for such a brief description I promise that within a month I will have better instructions (hopefully within a week!), but I thought it be good to give an update of where things are at.

    Thanks for reading!

View all 10 project logs

  • 1
    Build Temperature Cable
    1. Measure the size of the bin
      1. Go out and estimate the size of the bin so that you know how far apart to spread the cables. The 5000-bushel bins my dad is monitoring have a sensor spacing of 7ft and that gives one at the bottom, one around the middle, and one a single ring deep at the top.
    2. Mark the location of the sensors
      1. String out some 4 conductor fire alarm wire (or the wire of your choosing), and mark the place where the sensors will be attached. Currently, I just roughly do this myself but eventually, I am going to place markers on the shop floor so that I can measure it more accurately. 
    3. Attach the bottom sensor.
      1. The wires on the DS18B20 sensor are either red, blue, and yellow or red, black, and yellow. In both cases the red is power and the data wire is yellow. That leaves either the blue or the black cable being the ground/negative end. At this point, one has to strip away some sheathing with wire strippers to attach the sensor to the cable. On the cable I have been using there is a red wire, a green wire, a black wire and a blue wire. I have been attaching the red wire to the power, the black wire to the ground, and the blue wire to the data wire. All of these wires must be soldered on and after taped so that they do not touch. I also apply heat shrink where the connections are, and although I do not 'shrink' it until after I would string three sections on now since they can be difficult to get on later. On GitHub, there is a document that contains photos and may explain this better.
    4. Attach middle and top sensor
      1. For these two wire strippers can not be used since they are in the middle of the wire. I use a utility knife to strip away some of the sheathing and then side cutters to cut the sheathing that has been stripped away. I have been told that a propane torch could be used to burn away the sheathing but I have found that after scraping away burnt sheathing my way is just as fast.
    5. Roll out the rest of the length of wire.
      1. In the case of the 5000-bushel bins currently being monitored the total length is about 60ft.
    6. Test the cable and collect addresses.
      1. Currently, I use the following code example in DallasTemperature, https://github.com/milesburton/Arduino-Temperature-Control-Library/blob/master/examples/Multiple/Multiple.ino, but I intend to edit it more to my specific purposes and to make better instructions here.
    7. Shrink the Heat shrink and complete the cable
    8. Go through all steps in step one, except for 8, 3 more times to get a total of four cables.

    The cable schematic include in the files may help for this one, but it is nothing special

  • 2
    Assemble the PCB

    This is the order in which I would assemble the PCB.

    1. Resistors
    2. MKR headers
    3. Cable connectors
    4. Onboard DHT22

    The KiCad files can be found here: https://github.com/PhysicsUofRAUI/binTempSensor/tree/master/ecad.

    I will be selling the bare PCBs as well as assembled PCBs on Tindie and possibly other places.

    Also, I intend to improve these instructions greatly.

  • 3
    Program the Arduino
    // OneWire - Version: Latest
    #include <OneWire.h>
    #include <DallasTemperature.h>
    
    // On board Sensor
    #include <DHT.h>
    #include <DHT_U.h>
    #include <Adafruit_Sensor.h>
    
    #define DHTPIN  A5
    
    #define DHTTYPE DHT22
    
    DHT_Unified dht(DHTPIN, DHTTYPE); 
    
    /*
      Sketch generated by the Arduino IoT Cloud Thing "DS018s_temp_test"
      https://create.arduino.cc/cloud/things/952e3ad9-ef0f-46b0-aa63-a71ab33f7a11
      Arduino IoT Cloud Variables description
      The following variables are automatically generated and updated when changes are made to the Thing
      float top;
      float middle;
      float bottom;
      Variables which are marked as READ/WRITE in the Cloud Thing will also have functions
      which are called when their values are changed from the Dashboard.
      These functions are generated with the Thing and added at the end of this sketch.
    */
    
    #include "thingProperties.h"
    
    #define BIN_ONE_ONE_WIRE_BUS 13
    #define BIN_TWO_ONE_WIRE_BUS 14
    #define BIN_THREE_ONE_WIRE_BUS 5
    #define BIN_FOUR_ONE_WIRE_BUS 2
    
    #define TEMPERATURE_PRECISION 9
    
    // Bin One
    OneWire binOneOneWire(BIN_ONE_ONE_WIRE_BUS);
    
    DallasTemperature binOneSensors(&binOneOneWire);
    
    DeviceAddress one_top_address = {  };
    DeviceAddress one_middle_address = {  };
    DeviceAddress one_bottom_address = {  };
    
    // Bin Two
    OneWire binTwoOneWire(BIN_TWO_ONE_WIRE_BUS);
    
    DallasTemperature binTwoSensors(&binTwoOneWire);
    
    DeviceAddress two_top_address = {  };
    DeviceAddress two_middle_address = {  };
    DeviceAddress two_bottom_address = {  };
    
    // Bin Three
    OneWire binThreeOneWire(BIN_THREE_ONE_WIRE_BUS);
    
    DallasTemperature binThreeSensors(&binThreeOneWire);
    
    DeviceAddress three_top_address = { };
    DeviceAddress three_middle_address = { };
    DeviceAddress three_bottom_address = { };
    
    // Bin Four
    OneWire binFourOneWire(BIN_FOUR_ONE_WIRE_BUS);
    
    DallasTemperature binFourSensors(&binFourOneWire);
    
    DeviceAddress four_top_address = {};
    DeviceAddress four_middle_address = {};
    DeviceAddress four_bottom_address = {};
    
    unsigned long last_time;
    
    void setup() {
      // Initialize serial and wait for port to open:
      Serial.begin(9600);
      // This delay gives the chance to wait for a Serial Monitor without blocking if none is found
      delay(1500);
      
      // get the onboard sensor ready
      dht.begin();
      
      sensor_t sensor;
    
      /*
        Getting Bin One's Sensors Ready
      */
      binOneSensors.begin();
    
      if (!binOneSensors.getAddress(one_top_address, 0))
      {
        Serial.println("Unable to find address for Device 0");
      }
    
      delay(500);
    
      if (!binOneSensors.getAddress(one_middle_address, 1))
      {
        Serial.println("Unable to find address for Device 1");
      }
    
      delay(500);
    
      if (!binOneSensors.getAddress(one_bottom_address, 2))
      {
        Serial.println("Unable to find address for Device 2");
      }
    
      binOneSensors.setResolution(one_top_address, TEMPERATURE_PRECISION);
      delay(500);
      binOneSensors.setResolution(one_middle_address, TEMPERATURE_PRECISION);
      delay(500);
      binOneSensors.setResolution(one_bottom_address, TEMPERATURE_PRECISION);
    
      /*
        Getting Bin Two's Sensors Ready
      */
      binTwoSensors.begin();
    
      if (!binTwoSensors.getAddress(two_top_address, 0))
      {
        Serial.println("Unable to find address for Device 0");
      }
    
      delay(500);
    
      if (!binTwoSensors.getAddress(two_middle_address, 1))
      {
        Serial.println("Unable to find address for Device 1");
      }
    
      delay(500);
    
      if (!binTwoSensors.getAddress(two_bottom_address, 2))
      {
        Serial.println("Unable to find address for Device 2");
      }
    
      binTwoSensors.setResolution(two_top_address, TEMPERATURE_PRECISION);
      delay(500);
      binTwoSensors.setResolution(two_middle_address, TEMPERATURE_PRECISION);
      delay(500);
      binTwoSensors.setResolution(two_bottom_address, TEMPERATURE_PRECISION);
      
      /*
        Getting Bin Three's Sensors Ready
      */
      binThreeSensors.begin();
    
      if (!binThreeSensors.getAddress(three_top_address, 0))
      {
        Serial.println("Unable to find address for Device 0");
      }
    
      delay(500);
    
      if (!binThreeSensors.getAddress(three_middle_address, 1))
      {
        Serial.println("Unable to find address for Device 1");
      }
    
      delay(500);
    
      if (!binThreeSensors.getAddress(three_bottom_address, 2))
      {
        Serial.println("Unable to find address for Device 2");
      }
    
      binThreeSensors.setResolution(three_top_address, TEMPERATURE_PRECISION);
      delay(500);
      binThreeSensors.setResolution(three_middle_address, TEMPERATURE_PRECISION);
      delay(500);
      binThreeSensors.setResolution(three_bottom_address, TEMPERATURE_PRECISION);
      
      /*
        Getting Bin Four's Sensors Ready
      */
      binFourSensors.begin();
    
      if (!binFourSensors.getAddress(four_top_address, 0))
      {
        Serial.println("Unable to find address for Device 0");
      }
    
      delay(500);
    
      if (!binFourSensors.getAddress(four_middle_address, 1))
      {
        Serial.println("Unable to find address for Device 1");
      }
    
      delay(500);
    
      if (!binFourSensors.getAddress(four_bottom_address, 2))
      {
        Serial.println("Unable to find address for Device 2");
      }
    
      binFourSensors.setResolution(four_top_address, TEMPERATURE_PRECISION);
      delay(500);
      binFourSensors.setResolution(four_middle_address, TEMPERATURE_PRECISION);
      delay(500);
      binFourSensors.setResolution(four_bottom_address, TEMPERATURE_PRECISION);
    
      // Defined in thingProperties.h
      initProperties();
    
      // Connect to Arduino IoT Cloud
      ArduinoCloud.begin(ArduinoIoTPreferredConnection);
    
      /*
         The following function allows you to obtain more information
         related to the state of network and IoT Cloud connection and errors
         the higher number the more granular information you’ll get.
         The default is 0 (only errors).
         Maximum is 4
     */
      setDebugMessageLevel(4);
      ArduinoCloud.printDebugInfo();
    
      last_time = millis();
    }
    
    void loop() {
      ArduinoCloud.update();
      // Your code here
    
      if (millis() - last_time > 600000)
      {
        // Get temperature from the pcb
        sensors_event_t event;
        dht.temperature().getEvent(&event);
        
        if (isnan(event.temperature)) {
          pcb_temp = -100.0;
        }
        else {
          pcb_temp = event.temperature;
        }
        
        /*
          Get Bin One Temperatures
        */
        binOneSensors.requestTemperatures();
        one_top = binOneSensors.getTempC(one_top_address);
        if (one_top == DEVICE_DISCONNECTED_C)
        {
          one_top = -100;
          Serial.println("Error");
    
        }
        one_middle = binOneSensors.getTempC(one_middle_address);
        if (one_middle == DEVICE_DISCONNECTED_C)
        {
          Serial.println("Error");
          one_middle = -100;
        }
        one_bottom = binOneSensors.getTempC(one_bottom_address);
        if (one_bottom == DEVICE_DISCONNECTED_C)
        {
          Serial.println("Error");
          one_bottom = -100;
        }
    
        /*
          Get Bin Two Temperatures
        */
        binTwoSensors.requestTemperatures();
        two_top = binTwoSensors.getTempC(two_top_address);
        if (two_top == DEVICE_DISCONNECTED_C)
        {
          two_top = -100;
          Serial.println("Error");
    
        }
        two_middle = binTwoSensors.getTempC(two_middle_address);
        if (two_middle == DEVICE_DISCONNECTED_C)
        {
          Serial.println("Error");
          two_middle = -100;
        }
        two_bottom = binTwoSensors.getTempC(two_bottom_address);
        if (two_bottom == DEVICE_DISCONNECTED_C)
        {
          Serial.println("Error");
          two_bottom = -100;
        }
        
        /*
          Get Bin Three Temperatures
        */
        binThreeSensors.requestTemperatures();
        three_top = binThreeSensors.getTempC(three_top_address);
        if (three_top == DEVICE_DISCONNECTED_C)
        {
          three_top = -100;
          Serial.println("Error");
    
        }
        three_middle = binThreeSensors.getTempC(three_middle_address);
        if (three_middle == DEVICE_DISCONNECTED_C)
        {
          Serial.println("Error");
          three_middle = -100;
        }
        three_bottom = binThreeSensors.getTempC(three_bottom_address);
        if (three_bottom == DEVICE_DISCONNECTED_C)
        {
          Serial.println("Error");
          three_bottom = -100;
        }
        
        /*
          Get Bin Four Temperatures
        */
        binFourSensors.requestTemperatures();
        four_top = binFourSensors.getTempC(four_top_address);
        if (four_top == DEVICE_DISCONNECTED_C)
        {
          four_top = -100;
          Serial.println("Error");
    
        }
        four_middle = binFourSensors.getTempC(four_middle_address);
        if (four_middle == DEVICE_DISCONNECTED_C)
        {
          Serial.println("Error");
          four_middle = -100;
        }
        four_bottom = binFourSensors.getTempC(four_bottom_address);
        if (four_bottom == DEVICE_DISCONNECTED_C)
        {
          Serial.println("Error");
          four_bottom = -100;
        }
        
        last_time = millis();
      }
    
    
    }

    The above code is the .ino part of the code, and the only edits that need to be made is the addition of your particular sensor addresses.  Not adding the addresses will also work, but will probably have more unpredictable results.

    Next is the thingProperties.h file where everything is configured. This file is automatically generated by Arduino if you are programming it through the browser.

    // Code generated by Arduino IoT Cloud, DO NOT EDIT.
    
    #include <ArduinoIoTCloud.h>
    #include <Arduino_ConnectionHandler.h>
    
    
    const char THING_ID[]      = "";
    
    const char SSID[]     = "";    // Network SSID (name)
    const char PASS[]     = "";    // Network password (use for WPA, or use as key for WEP)
    
    
    float one_top;
    float one_bottom;
    float one_middle;
    float pcb_temp;
    float two_middle;
    float two_top;
    float two_bottom;
    float three_top;
    float three_middle;
    float four_bottom;
    float three_bottom;
    float four_top;
    float four_middle;
    
    void initProperties(){
    
      ArduinoCloud.setThingId(THING_ID);
      ArduinoCloud.addProperty(one_top, READ, 900 * SECONDS, NULL);
      ArduinoCloud.addProperty(one_bottom, READ, 900 * SECONDS, NULL);
      ArduinoCloud.addProperty(one_middle, READ, 900 * SECONDS, NULL);
      ArduinoCloud.addProperty(pcb_temp, READ, 900 * SECONDS, NULL);
      ArduinoCloud.addProperty(two_middle, READ, 900 * SECONDS, NULL);
      ArduinoCloud.addProperty(two_top, READ, 900 * SECONDS, NULL);
      ArduinoCloud.addProperty(two_bottom, READ, 900 * SECONDS, NULL);
      ArduinoCloud.addProperty(three_top, READ, 900 * SECONDS, NULL);
      ArduinoCloud.addProperty(three_middle, READ, 900 * SECONDS, NULL);
      ArduinoCloud.addProperty(four_bottom, READ, 900 * SECONDS, NULL);
      ArduinoCloud.addProperty(three_bottom, READ, 900 * SECONDS, NULL);
      ArduinoCloud.addProperty(four_top, READ, 900 * SECONDS, NULL);
      ArduinoCloud.addProperty(four_middle, READ, 900 * SECONDS, NULL);
    
    }
    
    WiFiConnectionHandler ArduinoIoTPreferredConnection(SSID, PASS);

    This one is using the MKR WiFi, but any MKR device will work and Arduino Cloud will change the correct code if you are using a different device. The next step will show you how to configure the device/thing and that will take care of thingProperties.h so don't worry too much about it.

View all 7 instructions

Enjoy this project?

Share

Discussions

Chris wrote 11/03/2022 at 21:34 point

Would this setup work with existing cables? 

  Are you sure? yes | no

nodemcu12ecanada wrote 08/28/2021 at 15:46 point

I don't see how the cost can be $500 let alone $5,000.

A $4 NodeMCU and a $2 DS18B20 and a few other inexpensive components can send temperature to a free MQTT HMI on Adafruit for display and recording visible from anywhere.

If the bins are not in WiFi range then ESP-NOW can send the data over 100 m to another NodeMCU that is on WiFi.

I guess if you must use GSM the above is not an option.

https://sites.google.com/site/nodemcu12e/home#h.bagvjtiwx7l3

https://hackaday.io/project/181289-esp-now-inexpensive-microcontroller-scada-system

  Are you sure? yes | no

Kody Alan Rogers wrote 08/28/2021 at 17:12 point

Thanks for your comment!

All the components combined cost $425.26 CAD for GSM, and about $50 cheaper if using MKR WiFi. The cheapest waterproof version of a DS18B20 I have found is around $10 CAD and for four bins 12 are needed, so $120 for all of them. MKR GSM is $100 CAD roughly, so now up to $220. Then a waterproof enclosure ($20 ish) and the PCB ($20 ish) I made to clean up the wiring, and it gets to $425.26. Then the wire has to be added, and that could vary if the bins are far apart. Eventually, I do want to make wireless communication between nodes to keep wiring costs down. 

$500 CAD is an overestimate on my part since I am just calculating exactly what I have used in the current deployment and prefer to overestimate than underestimate.

$5000 CAD per bin is a quote that my uncle has gotten before. The cables of what is currently available come in at around $300 last time I looked. Honestly, I have not looked too closely at what is on the market since I already knew it was overpriced anyway.

Note: I edited this comment to change the component cost from $276 to $425 because I forgot to include the cost of the wire.

  Are you sure? yes | no

nodemcu12ecanada wrote 08/28/2021 at 17:34 point

10 waterproof DS18B20 for $20 USD. No tax. Free shipping. Parts from China on ebay are so cheap I usually buy more than I need. Long delivery sometimes though. Wireless is the way to go where you can. I program the NodeMCUs wirelessly remotely as well using Arduino IDE. Far more convenient than plugging in. They have to be within WiFi range to do that. Free IFTTT will send an email alert if the temp is too high.

The NodeMCU serves a web page as an HMI locally or it's much easier to use Adafruit MQTT as an HMI from anywhere.

https://www.ebay.com/itm/114956606923?hash=item1ac3f29dcb:g:dawAAOSwaxFhKIpj

  Are you sure? yes | no

Kody Alan Rogers wrote 08/28/2021 at 17:46 point

That is a good price. I normally get everything from Digikey.

This application cannot be completely wireless since it is collecting temperatures from inside a grain bin. Something has to hold the sensors in the middle of the bin (could be a rope if you do not need wire) unless you just drop them in while filling. If you do drop them in while filling I would write them off as disposable since when the bin is emptied they will probably be damaged.

The other problem of transmitting inside the bin is that when the bin is filled there will be grain all around the node and that will act like a very thick wall and will likely block most wireless transmission.

Also, it would have to have a fairly large battery to keep power throughout the winter while in the bin.

  Are you sure? yes | no

Kody Alan Rogers wrote 08/28/2021 at 18:14 point

Here is a website of a place in Saskatoon offering slightly more affordable devices: https://adaptiveagriculture.ca/tempmoisture-cables.html

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates