Skip to content

MOSH-Insa-Toulouse/5ISS-2024-2025-CHANFREAU-DIANI-BIENDOU-VASSEUR

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ISS 2024/2025: Gas Sensor AIME

Introduction

This project involves designing and implementing a smart gas sensor. Starting with its fabrication at the AIME laboratory, the project extended to integrating the sensor with an Arduino UNO and LoRa module for wireless communication.

The objective was to create a system capable of detecting gas, processing the data, and transmitting it to a remote dashboard via LoRaWAN. This project helped us gain hands-on experience in electronics, programming, and networking.

Gas Sensor

The gas sensor was fabricated during a training period at AIME. It uses [material, e.g., nanoparticles of WO3], which allows for high sensitivity to specific gases like [e.g., ethanol, ammonia].

The sensor includes:

  • Sensitive layer: Nanoparticles deposited on interdigitated aluminum combs.

  • Heating element: A polysilicon resistor to adjust operating temperature.

  • Calibration zone: An area without nanoparticles for baseline measurements.

Pin Number Description
2, 4 Sensitive layer (with nanoparticles)
3, 6 Heating element
5, 10 Temperature sensor
7, 9 Calibration layer
1, 8 Not used

Wiring

To create a functional system, we wired the following components:

  • Arduino UNO: Central microcontroller for the system.
  • LoRa Module (RN2483): For wireless communication.
  • Gas Sensor: To detect gas concentrations.

The connections were as follows:

  • Gas sensor: Connected to the analog pin A0 on the Arduino.
  • LoRa module: TX and RX connected to pins 10 and 11 on the Arduino.
  • Power: Arduino powered via USB, LoRa module powered through the 3.3V pin.
Image Description Image Description

Arduino Code

The Arduino code consists of two parts:

  1. Initialization: Retrieve and configure the LoRa module with its EUI for registration in the LoRaWAN network (via ChirpStack).
  2. Data Transmission: Read gas sensor values, process the data, and send it via LoRa.

Code Highlights

The setup() function initializes the LoRa module and the gas sensor. The loop() function reads the sensor data, encodes it, and transmits it using the sendBytes() function.

Configuration Parameters:

  • AppEUI: Configured for LoRaWAN registration.
  • AppKey: Security key for LoRaWAN.
  • Sensor Pin: Pin A0 for the gas sensor.
  • LoRa TX/RX: Pins 10 and 11 for communication.

Kicad

Below is a view of the routed PCB on KiCad.

Capture d’écran 2025-01-24 à 17 13 35

Node-Red Overview

The Node-RED flow for this project is designed to receive, process, and display data from a LoRa sensor. The flow involves:

  1. Data Reception: An MQTT node listens for incoming sensor data, typically from a LoRaWAN network like ChirpStack.
  2. Data Extraction: A function node decodes the received Base64-encoded data and extracts the gas level value.
  3. Data Processing: Another function node analyzes the gas level and triggers an alert if the value exceeds a set threshold (e.g., 200).
  4. Visualization: A chart node displays the real-time gas levels in the Node-RED dashboard.

Flow Highlights:

  • MQTT Node: Configured to receive sensor data from a LoRa network.
  • Function Nodes: Process and filter the incoming data (e.g., extract, decode, and analyze gas levels).
  • Chart Node: Displays the data in real-time on a graphical interface.
Image Description

Key Parameters:

  • MQTT broker configuration: Connects to the LoRa network.
  • Threshold value: Set to 200 for triggering the alert.
  • Dashboard: Accessible via http://127.0.0.1:1880/ui.
Image Description

MIT App Inventor

The MIT App Inventor app is designed to connect to the Arduino, allowing users to control the system and view sensor data in real-time.

Features:

  1. Connect to Arduino: The app connects to the Arduino via Bluetooth when the user presses a connect button.
  2. Control LED: Users can turn the LED on or off using buttons in the app.
  3. Gas Level Monitoring: The app continuously receives the current gas level from the sensor and displays it.
  4. Real-time Updates: Gas level data is updated in real-time on the app interface.
Image Description Image Description

Key Components:

  • Connect Button: Establishes communication with the Arduino.
  • LED Control Buttons: Turns the LED on and off.
  • Label: Displays the current gas level.
  • Notifier: Alerts the user if the gas level exceeds a predefined threshold.

This app provides simple, real-time interaction with the Arduino system, enabling both control and monitoring of environmental conditions.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 100.0%