IoT Part C: Essay (25%)
Topic: IoT Architecture Applied to Smart Farming
"Design and explain a complete IoT architecture for a Smart Farming system. Include all four layers, justify sensors/actuators, explain Edge/Fog/Cloud, describe protocols, and discuss why this architecture suits precision agriculture." [25 marks]
1. Introduction to Smart Farming (2 marks)
Smart Farming (Precision Agriculture) uses IoT to improve crop production, reduce costs, and minimize environmental impact. Traditional farming uses manual monitoring and fixed schedules, leading to water wastage and unpredictable yields.
An IoT-enabled smart farm uses:
- Real-time monitoring of soil, weather, and crop health
- Data-driven decisions for irrigation, fertilization, pest control
- Automation to reduce labor and error
- Sustainability through optimized resource usage
Goals: Maximize yield; minimize water/fertilizer waste; enable remote monitoring; predict and prevent diseases.
2. Layer 1: Perception Layer (5 marks)
Interacts with the physical world: collects data with sensors and executes actions with actuators.
Sensors
| Sensor | Purpose |
|---|---|
| Soil moisture | Irrigation decisions; prevent over/under-watering |
| DHT22 (temp/humidity) | Disease risk (e.g. fungal); digital output |
| LDR | Sunlight; photosynthesis; ventilation |
| pH / NPK | Soil chemistry; fertilizer type and amount |
| Rain sensor | Stop irrigation when raining |
| Camera | AI disease/pest detection |
Actuators
| Actuator | Purpose |
|---|---|
| Water pump / solenoid | Irrigation; ON when soil moisture < 30% |
| Ventilation fan | Greenhouse temperature; PWM speed |
| Fertilizer dispenser | Nutrient delivery based on NPK |
| LED grow lights | Supplemental light; PWM dimming |
Justification: cost-effective, wireless for large farms, long battery life (solar+battery), weather-resistant (e.g. IP65).
3. Layer 2: Transport Layer (4 marks)
Connects devices to the network; transmits data from sensors to gateways and cloud.
| Technology | Use case |
|---|---|
| LoRaWAN | Long range (5–15 km), low power, 10-year battery; rural areas |
| Wi-Fi | Greenhouse; cameras; high bandwidth |
| Zigbee / BLE mesh | Short range, low power, mesh |
| 4G/5G | Backup; critical alerts |
MQTT (primary): Lightweight, pub/sub, QoS, works over LoRa/WiFi/cellular. Topics e.g. Farm/Greenhouse1/Sensor/SoilMoisture; dashboard subscribes to Farm/+/Sensor/#.
[Sensors] --LoRa--> [Gateway] --WiFi/4G--> [Edge]
|--MQTT--> [Cloud]
|--Local--> [Fog]4. Layer 3: Processing Layer (5 marks)
Edge, Fog, and Cloud divide the work.
- Edge (on device, e.g. ESP32): Filter data (e.g. 5-min average); local rules (if moisture < 30% → pump on); anomaly detection. Saves bandwidth, fast response, works offline.
- Fog (gateway / on-site server): Aggregate sensors; rules engine (e.g. humidity > 85% + temp > 30°C → alert); OTA updates; lightweight AI (e.g. disease from camera). Low latency, privacy, works if internet fails.
- Cloud: Long-term storage (time-series, SQL); big data analytics; ML training (yield, disease models); multi-farm analytics. Scalable storage and compute.
| Task | Edge | Fog | Cloud |
|---|---|---|---|
| Emergency pump off | ✓ | ||
| Daily irrigation schedule | ✓ | ||
| Yield prediction / train AI | ✓ |
5. Layer 4: Application Layer (4 marks)
Dashboard (web + mobile): real-time graphs, map, camera; manual pump override; irrigation schedule; alerts (critical → SMS+push+email; warning → app). AI: predictive maintenance, yield forecast, recommendations (planting date, fertilizer reduction).
6. Why This Architecture Fits Smart Farming (3 marks)
- Scalability: 10 → 1,000 sensors; cloud scales with data.
- Cost: Edge reduces data transfer; low-power sensors; open-source (MQTT, InfluxDB).
- Reliability: Edge works offline; fog backup; mesh self-healing.
- Real-time: Edge activates pump in < 5 s; cloud-only would be 30–60 s.
- Energy: LoRa 10-year battery; solar gateway; pump only when needed.
- Sustainability: Precision irrigation and fertilization reduce waste and runoff.
7. Conclusion (2 marks)
The 4-layer architecture integrates Perception (sensors/actuators), Transport (LoRa/WiFi/MQTT), Processing (Edge/Fog/Cloud), and Application (dashboards, AI). It addresses large spread (LoRa), limited power (edge + solar), immediate action (local control), and long-term planning (cloud). Result: scalable, cost-effective, sustainable solution that increases yield and reduces resource use.
Essay structure: Intro 2 · Perception 5 · Transport 4 · Processing 5 · Application 4 · Justification 3 · Conclusion 2 = 25 marks.