Integration of the RAK12039 Sensor into the IoT System for Environmental Monitoring in Hydroponic Cultivation with LoRaWAN
IntroductionThis document outlines the complete process for integrating the RAK12039 sensor (based on the SCD30 sensor from Sensirion, specialized in measuring CO₂, temperature, and humidity) into an existing IoT system based on WisBlock technology and LoRaWAN. This integration expands the system's capabilities by providing critical information about air quality and carbon dioxide balance, which is essential for environmental control in hydroponic cultivation.
Components Used- RAK12039: Environmental sensor for CO₂, temperature, and humidity (based on the SCD30).
- RAK1906: Environmental sensor (temperature, relative humidity, atmospheric pressure, and IAQ).
- RAK11300: Central WisBlock module with RP2040 microcontroller and LoRa connectivity.
- RAK19007-O: WisBlock baseboard that allows modular connection of sensors and modules.
- TTN Platform: Public LoRaWAN network for data management and visualization.
- Connecting the RAK12039:
- Insert the RAK12039 module into one of the available I2C ports (preferably into Slot B if Slot A is already occupied).
- Secure the sensor using the included screws.
- Connecting the RAK1906:
- Insert the RAK1906 into the other available I2C port (Slot A, if available).
- Both sensors can share the I2C bus without conflict, as their addresses are different (0x61 for the RAK12039 and 0x76 for the RAK1906).
- Verification:
- When powering the system, ensure that the LED on the RAK11300 blinks.
- Open the serial monitor in the IDE to verify that both sensors are correctly recognized.
- Prerequisites:
- Install the Arduino IDE.
- Add the RAKWireless package URL:https://downloads.rakwireless.com/RUI/RUI3/Arduino/package_rakwireless_index.json
- Install the following libraries:
- Adafruit BME680
- SparkFun SCD30 Arduino Library
- WisBlock-API
- LoRaWan-RAK11300
- Board and Port Configuration:
- Select the WisBlock RAK11300 board.
- Connect the node via USB Type-C and select the correct port.
The integration of the RAK12039 sensor into the system enables real-time CO₂ level monitoring, complementing the environmental data provided by the RAK1906. This integration is essential for improving environmental control in hydroponic cultivation systems, optimizing photosynthesis and ventilation, and aligning with the Sustainable Development Goals (SDGs 2, 7, 9, and 13). The resulting system is scalable, accurate, and energy self-sufficient—ideal for educational, agricultural, or experimental settings.
Comments