Agricultural Monitoring System Design

Agricultural Monitoring System Design

Based on your requirements, we’ll design a smart agriculture system that uses a combination of technologies to monitor temperature, humidity, and light, control devices, and manage everything remotely. The core features are: smart nodes that monitor environmental data, manual and automatic control modes, data transmission over LoRa and 4G, and remote control from a phone or PC.

1. System Module Overview

The agricultural monitoring system consists of the following main modules:

  1. Smart node (sensors and control unit):

    • Read temperature, humidity, and light sensor data.
    • Start and stop the fan, and display the current fan status.
    • Support switching between manual and automatic mode.
    • Display temperature/humidity, light level, fan status, and mode status.
    • Send data to the 4G node over LoRa.
  2. 4G gateway node:

    • Receive sensor data from the smart nodes.
    • Upload the data to the MOTT server over the 4G network.
    • Display every sensor reading on the screen.
  • MOTT server:

    • Store the data sent from the 4G node.
    • Provide a remote access interface.
  • Application software (PC or mobile):

    • Display temperature/humidity, light level, fan status, manual/automatic mode, and other data.
    • Provide login, manual control, automatic control, and other features.

2. System Function Design

2.1 Smart Node Functions

  1. Sensor data collection:

    • Temperature/humidity sensor: read temperature and humidity data in real time.
    • Light sensor: read light intensity data in real time.
  • Mode switching:

    • Manual mode: the user can start or stop the fan manually with the buttons.
    • Automatic mode: the fan starts and stops automatically once temperature or light level crosses the configured threshold.
  • Fan control:

    • In manual mode, the user toggles the fan with the buttons, and a green LED shows the fan status.
    • In automatic mode, the system controls the fan based on the configured temperature and light thresholds, and uses a green and a red LED for status indication.
  • Data transmission:

    • Use the LoRa wireless module to upload sensor data and fan status to the 4G gateway node.
  • Display:

    • Show the current temperature/humidity, light level, mode status, and fan status.

2.2 4G Gateway Node Functions

  1. Data reception:

    • Receive the sensor data uploaded by the smart nodes over LoRa (temperature, humidity, light level, fan status, manual/automatic mode status).
  • 4G network transmission:

    • Upload the smart node data to the MOTT server over the 4G network.
  • Display output:

    • Show temperature/humidity, light level, mode status, and fan status on the 4G gateway node’s screen.

2.3 MOTT Server Functions

  1. Data storage:

    • Store the temperature/humidity, light level, fan status, and other data coming from the 4G gateway node.
  • Remote management interface:

    • Provide a RESTful API or WebSocket interface for client applications to access.

2.4 Application Software Functions

  1. User login:
    • Provide a login screen where the user signs in by entering a username and password (username: admin, password: admin123).
  • Manual control:

    • After signing in, the user can start and stop the fan manually through the UI; the action triggers a red LED and a buzzer.
  • Automatic control:

    • The user can set temperature and light thresholds; once the smart node enters automatic mode, the system controls the fan based on sensor data and shows the status through the LED indicators.
  • Display:

    • Show temperature, humidity, light level, fan status, and manual/automatic mode status in real time.

3. Prototype Design

3.1 Smart Node Prototype

1
2
3
4
5
6
7
8
9
10
11
+-------------------------+
| Temp/Humidity Sensor |
| |
| Light Sensor |
| |
| Button Panel (5 keys) |
| |
| Display (LCD) |
| |
| Fan Ctrl (LED+Buzzer) |
+-------------------------+

  • Display: shows temperature, humidity, light level, the current mode (manual/automatic), and fan status.
  • Button panel: 5 buttons, including:
    • A mode toggle button (manual/automatic)
    • A control button to start the fan
    • A control button to stop the fan
  • LED: indicates whether the fan is running (green for running, red for stopped).
  • Buzzer: sounds at 1Hz while the fan is running.

3.2 4G Gateway Node Prototype

1
2
3
4
5
6
7
8
9
+-------------------------+
| LoRa Receiver Module |
| (receive data) |
| |
| Display (LCD) |
| |
| 4G Network Module |
| (upload data) |
+-------------------------+
  • Display: shows temperature/humidity, light level, mode status, and fan status.
  • LoRa receiver module: receives the sensor data sent by the smart nodes.
  • 4G network module: uploads the received data to the MOTT server.

3.3 Application Software Prototype (PC or mobile)

1
2
3
4
5
6
7
8
9
10
11
12
+-------------------------------------------------------+
| Login Screen |
| - Username input |
| - Password input |
| - Login button |
+-------------------------------------------------------+
| Main Screen |
| - Live temp/humidity, light, fan, manual/auto mode |
| - Manual fan control buttons (start/stop) |
| - Auto-mode thresholds (temperature, light) |
| - Status: current mode (manual/auto), fan (on/off) |
+-------------------------------------------------------+

4. System Design Steps

4.1 Hardware Design and Development

  • Choose suitable sensors: a temperature/humidity sensor (such as DHT22), a light sensor, a fan control module, LED indicators, and a buzzer.
  • Smart node circuit design: design the power management circuit to make sure all sensors and control components work properly.
  • LoRa module integration: integrate the LoRa module into the smart node to enable wireless data transmission.

4.2 Software Development

  1. Smart node program:

    • Write code to read the sensor data.
    • Control the fan and the LED indicators.
    • Implement switching between manual and automatic mode.
    • Implement LoRa data transmission.
  • 4G gateway node program:
    • Receive LoRa data and upload it to the MOTT server over the 4G network.
  • MOTT server development:
    • Provide data storage and a remote management interface (API).
  • Application software development:
    • Implement user login, manual control, automatic control, data display, and other features.

4.3 System Integration and Testing

  • Hardware integration: connect the sensors, LoRa module, display, and other hardware to the smart node and the 4G gateway node.
  • Functional testing: test manual mode, automatic mode, data transmission, and so on.
  • Performance tuning: make sure the system stays stable during real-time data transmission and control.

4.4 Deployment and Maintenance

  • Deploy the smart node and the 4G gateway: roll the system out into the actual agricultural environment for on-site testing and debugging.
  • Maintenance and updates: inspect the system regularly and apply the necessary feature updates and optimizations.