Skip to content
International Shipping
Wish Lists Cart
0 items

#25 Smart Greenhouse IoT Project With PicoBricks

24 Oct 2023
#25 Smart Greenhouse IoT Project With PicoBricks

In this project, we will prepare a simple glass smarthouse with IOT technology and PicoBricks. We will use PicoBricks with the ESP8266 wifi module in this greenhouse. In this way, we will turn the plant-house into an object that we can track over the Internet.

Table of Contents

    Hello Maker! We will make a Smart greenhouse project today! You can check every detail here! Please get contact us when you make your own!

    The rapid changes in climate due to the effect of global warming cause a decrease in productivity in agricultural activities. In the 1500s, Daniel Barbaro built the first known greenhouse in history. Plant-houses are suitable environments for growing plants that can provide controllable air, water, heat and light conditions.

    In greenhouses, heaters are used to balance the heat, electric water motors for irrigation, fans are used to regulate humidity and to provide pollination. With the development of technology, the producer can follow the status of the greenhouse with his phone from anywhere and can do the work that needs to be done. The general name of this technology is Internet of Things (IOT)

    Special sensors are used to measure temperature, humidity and oxygen content in plant-house. In addition, special sensors measuring soil moisture are used to decide on irrigation. Electronically controlled drip irrigation systems are used to increase irrigation efficiency.

    Details and Algorithm

    The glasshouse model you will prepare will include a soil moisture sensor, and a DHT11 temperature and humidity sensor hanging from the top. A submersible pump will be placed in the water tank outside the model, and the hose coming out of the end of the pump will go to the ground in the greenhouse. Picoboard will be placed in a suitable place outside the greenhouse model.

    When Picobricks starts, it starts to broadcast wifi thanks to the ESP8266 wifi module. When we enter the IP address of Esp8266 from the smart phone connected to the same network, we encounter the web page where we will control the Greenhouse. Here we can see the temperature and humidity values. If we wish, we can start the irrigation process by giving the irrigation command.

    Components for Smart Greenhouse Project

    1X Pump
    1X Soil Humidity Sensor
    1X ESP8266 Wifi Module
    PicoBricks Smart Greenhouse Kit
    Jumper Cables
    Easy Connection Cables

    Wiring Diagram

    You can code and run Picobricks’ modules without wiring. If you are going to use the modules by separating them from the board, you should make the module connections with grove cables.

    Step by Step of the Project

    1-Detach the floor of the model from the SR-2 coded part in the Greenhouse kit.

    2- Attach the pieces in the middle of the SR-3 piece to the floor of the glasshouse.

    3- Remove the inner walls of the greenhouse from the SR-4 part and attach it to the ground.

    4- Remove the arches in SR-1 and SR-3 and place them on the plant-house floor.

    5-Cover the rectangular area where soil will be placed with cling film. After irrigation, you will protect the model parts. Pour the plant soil into the greenhouse. Fill so that there is no empty space.

    6- Insert the parts of the SR-4 into the notches on the greenhouse.

    7-Thread the remaining two thin flat pieces of SR-4 through the holes on both sides of the greenhouse from the underside. This process makes the area more robust.

    Wiring Diagram

    You can code and run Picobricks’ modules without wiring. If you are going to use the modules by separating them from the board, you should make the module connections with grove cables.

    MicroBlocks Codes of the PicoBricks


    Microblocks Run Tab

    MicroPython Codes of the PicoBricks

    
    import utime
    import uos
    import machine
    from machine import Pin, ADC
    from picobricks import DHT11
    from utime import sleep
    
    dht_sensor = DHT11(Pin(11))
    smo_sensor = ADC(27)
    m1 = Pin(22, Pin.OUT)
    m1.low()
    print("Machine: \t" + uos.uname()[4])
    print("MicroPython: \t" + uos.uname()[3])
    
    uart0 = machine.UART(0, baudrate=115200)
    print(uart0)
    
    def Connect_WiFi(cmd, uart=uart0, timeout=5000):
        print("CMD: " + cmd)
        uart.write(cmd)
        utime.sleep(7.0)
        Wait_ESP_Rsp(uart, timeout)
        print()
    
    # ... [rest of the functions]
    
    while True:
        res = ""
        res = Rx_ESP_Data()
        utime.sleep(2.0)
        if '+IPD' in res:
            # ... [rest of the conditions]
    
        utime.sleep(4.0)
        Send_AT_Cmd('AT+CIPCLOSE=' + connection_id + '\r\n')
        utime.sleep(3.0)
        recv_buf = "" 
        print('Waiting For connection...')
    </code>

    Arduino C Codes of the PicoBricks

    
    #include
    #define RX0
    #define TX1
    
    #define LIMIT_TEMPERATURE 30
    #define DHTPIN 11
    #define DHTTYPE DHT11
    #define smo_sensor 27
    #define motor 22
    #define DEBUG true
    DHT dht(DHTPIN,DHTTYPE);
    int connectionId;
    
    void setup(){
      Serial1.begin(115200);
      dht.begin();
      pinMode(smo_sensor,INPUT);
      pinMode(motor,OUTPUT);
      sendData("AT+RST\r\n",2000,DEBUG); 
      // ... [rest of the setup]
    
    }
    
    void loop(){
      if(Serial1.find("+IPD,")){
        delay(300);
        connectionId = Serial1.read()-48;
        String serialIncoming = Serial1.readStringUntil('\r');
        // ... [rest of the loop]
    
      }
    }
    
    String sendData(String command, const int timeout, boolean debug){
      String response ="";
      Serial1.print(command);
      long int time = millis();
      while((time + timeout) > millis()){
        while(Serial1.available()){
          char c = Serial1.read();
          response += c;
        }
      }
      if(debug){
        Serial.print(response);
      }
      return response;
    }
    
    Project GITHUB Page
    Prev Post
    Next Post

    Thanks for subscribing!

    This email has been registered!

    Shop the look
    Choose Options

    Edit Option

    Have Questions?

    Back In Stock Notification

    Compare

    Product SKUDescription Collection Availability Product Type Other Details

    Terms & Conditions

    What is Lorem Ipsum? Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. Why do we use it? It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).
    this is just a warning
    Login
    Shopping Cart
    0 items