Introduction: Fleet Management System for Sea Food

Fleet management system for seafood transportation uses an Arduino Nano 33 IoT and a Raspberry Pi 4 as the main microcontrollers. The system provides real-time data monitoring through MQTT, with a NEO-6M GPS module for location tracking and a DHT22 sensor to monitor temperature and humidity, ensuring the seafood stays in optimal conditions. Data is transmitted through MQTT, and a web-based GUI enables easy access and visualization.

Supplies

Hardware Components

  1. Arduino Nano 33 IoT
  2. Raspberry Pi 4
  3. NEO-6M GPS Module
  4. DHT22 Temperature and Humidity Sensor
  5. Breadboard
  6. Jumper wires

Software & Libraries

  1. Arduino IDE
  2. MQTT Broker (e.g., Hive MQTT)
  3. Python (for Raspberry Pi programming)
  4. MQTT Library for Arduino (PubSub Client)
  5. DHT Sensor Library
  6. TinyGPS++

Step 1: Connect DHT 22 With Arduino Nano 33 IoT

Connecting DHT 22 sensor with Arduino nano 33 IoT is an easy thing. Lets get into it real quick:

First of all lets take a look at the wiring:

VCC-5V

GND-GND

OUT-D4

After making these connections a library is to be downloaded in Arduino IDE

which is Adafruit Unified Sensor Library.

Attachments

Step 2: Connecting GPS Sensor With Arduino Nano 33 IoT

For proceeding further you might want to take out your gps module. First lets take a look at the wiring of this sensor with the arduino nano 33 iot

Wiring:

GPS VCC – Connect to the 3.3V pin on the Arduino Nano 33 IoT.

GPS GND – Connect to GND on the Arduino Nano 33 IoT.

GPS RX (Receive) – Connect to D9 on the Arduino Nano 33 IoT.

GPS TX (Transmit) – Connect to D10 on the Arduino Nano 33 IoT.

For this we have to download TinyGPSPlus library.

For starting the gps module firstly, dont connect the RX with the sensor as it takes a time to be available and to catch a satellite's signal when the signal will be available the red light will blink rapidly and once its connected to the satellite the blinking of the light will become slow. It is preferred to use the GPS module outside as it is easier to catch a satellite's signal when its outside.


Step 3: Connecting MQTT

Create an Account on HiveMQ Cloud:

  1. Visit HiveMQ Cloud and create an account.

Create a New MQTT Broker:

  1. After logging into the HiveMQ Cloud dashboard, click on Create New MQTT Broker.
  2. Once the broker is created, you'll be provided with details, including:
  3. Broker URL (e.g., broker.hivemq.com)
  4. Port (usually 1883)
  5. Client ID (can be any unique name for your device)

Install Required Libraries in Arduino IDE

  1. WiFiNINA Library (for Arduino Nano 33 IoT Wi-Fi functionality)
  2. ArduinoMqttClient Library (for MQTT functionality)
  3. DHT22 and TinyGPS++ Libraries (for sensor data reading)



Step 4: Set Up Raspberry Pi

Step 1: Install Paho MQTT Client on Raspberry Pi

Install Paho MQTT Python Client:

pip install paho-mqtt

Step 2: Create a new python script by :

nano mqtt_subscribe.py

Then put your python code in the file and run it by:

python3 mqtt_subscribe.py


Attachments

Step 5: Add GUI

I've added simple yet explanatory GUI in my code and the updated code is provided below l

step 1: Install Tkinter

sudo apt install python3-tk

Add gui logics to the previous file and then run it.

It will give you the real time data monitoring and the values read by the sensors



********This assignment is submitted to the Deakin University, School of IT, Unit SIT210 - Embedded Systems Development.*********