Maker.io main logo

CO2 Monitoring with Renesas EK-RA4M2, RRH47000 CO2 Sensor & BleuIO

2024-10-22 | By Sheikh Shuhad

License: General Public License Air Quality Bluetooth / BLE

Introduction
This project demonstrates how to integrate the Renesas EK-RA4M2 development board with the Renesas CO2 Sensor (RRH47000) and the new BleuIO Pro Dongle (SSD025) by Smart Sensor Devices, built on the Renesas Bluetooth Low Energy SoC DA14695. In this setup, the dongle advertises sensor data from the CO2 sensor, including CO2 concentration, humidity, and temperature.

The sensor data is displayed using the RTT Viewer.

Requirements

Setup

  1. Connect a Micro USB device cable (Type-A male to Micro-B male) between J10 (Debug1) on the EK-RA4M2 and a computer’s USB port.

  2. Plug in the BleuIO Dongle using a USB OTG Cable (Type-A female to Micro-B male) and connect it to J11 (USB Full Speed).

  3. Ensure that Jumper J12 is placed on pins 1-2.

  4. Remove Jumper J15 pins.

Setting up PMOD1
The RRH47000 sensor connects via PMOD1. Since the sensor requires 5V, and PMOD by default provides 3.3V, some modifications are necessary:

  • For 5V the PMOD1 Config trace cut jumper E17 must be Short and E16 be Open.
    I2C SCL E18 needs to be Short and E14 needs to be Open.
    I2C SDA E19 needs to be Short and E15 needs to be Open.

  • The PMOD1 config can be found on the back of the RA4M2:

Importing the Project

  • Open e² studio IDE

  • Choose a workspace and click ‘Launch’

  • Download or clone the example project. Place the folder ‘bleuio_ra4m2_co2_monitor_example’ in workspace.

  • Choose Import Project

  • Select ‘Existing Projects into Workspace’ under the ‘General’ tab:

  • Click the ‘Browse…’ button and open the folder where the ‘bleuio_ra4m2_co2_monitor_example’ project folder is located:

  • Finally select the project and click ‘Finish’. You have now imported the the project!

Running the Example

Build the project by clicking the building icon:

Use Debug to download and run the project. The first time you need to configure the debug settings. Click the down arrow to the right of the Debug icon and select ‘Debug Configurations…’


Under ‘Renesas GDB Hardware Debugging’ select ‘bleuio_ra4m2_co2_monitor_example.elf’ and click ‘Debug’.


The debug is now configured, and the ‘Debug’ icon can be used next time to run the project.

Open RTTViewer. Connect and use these settings:

Connection to J-Link: USB

Specify Target Device: R7FA4M2AD

Target Interface & Speed: SWD 4000kHz

RTT Control Block: Address 0x200009ac

On the debugger screen in e² studio click the ‘Resume’ icon twice to run the project.

  • The application is now running. When starting up, you should notice all LEDs lighting up for one second, and then only the red LED will be on. It will turn off as soon as the BleuIO is configured, and the green LED will turn on when advertising starts.

  • You should now see the output on the RTTViewer. 

Scanning the Dongle
To view the advertised data, use an app like nRF Connect.

Decoding the Advertising Message
The advertising data format is as follows:

  • 020106: Default advertising flag for connectable devices.

  • 09FF3600026E173E1D27: Manufacturer-specific data.

    • 09: Message size.

    • FF: Manufacturer Specific Data flag.

    • 3600: Renesas Manufacturer ID (little-endian).

    • 026E: CO2 value in hex (622 in decimal).

    • 173E: Temperature value, split into two bytes (23.62°C).

    • 1D27: Humidity value, split into two bytes (29.39%).

This example serves as a foundational guide for integrating the Renesas EK-RA4M2 development board with a CO2 sensor and the BleuIO Pro Dongle for real-time monitoring. With its flexible setup, you can extend this project to suit your specific applications, such as real-time air quality monitoring, smart building systems, or other IoT-based environmental solutions. By leveraging the capabilities of the BleuIO Pro and Renesas platform, you can create robust, scalable solutions for your next Bluetooth Low Energy (BLE) project.

制造商零件编号 RTK7EKA4M2S00001BE
EK-RA4M2 EVAL KIT FOR RA4M2
Renesas Electronics Corporation
制造商零件编号 SSD005/4-V2B
BLUETOOTH 5 LOW ENERGY USB DONGL
Smart Sensor Devices
制造商零件编号 RRH47000-A1V
NDIR CO2 SENSOR MODULE
Renesas Electronics Corporation
制造商零件编号 SSD005/4-V2W
BLUETOOTH 5 LOW ENERGY USB DONGL
Smart Sensor Devices
制造商零件编号 SSD025/2W
BLUETOOTH USB DONGLE WHITE CASIN
Smart Sensor Devices
制造商零件编号 SSD025/2B
BLUETOOTH USB DONGLE BLUE CASING
Smart Sensor Devices
制造商零件编号 UUSBOTGRA
5" ANGLED MICRO USB OTG CABLE
StarTech.com
Add all DigiKey Parts to Cart
TechForum

Have questions or comments? Continue the conversation on TechForum, DigiKey's online community and technical resource.

Visit TechForum