Skip to content

franc0r/francor_co2

Repository files navigation

FRANCOR CO2 Sensor

This package contains the interface software for the CO2 or "breath" detecting sensor of FRANCOR e.V.

The top layer contains the ROS2 package to communicate with the sensor board.

In the folder 'fw' is the STM32CubeIDE project which contains the firmware for the BluePill Board. The sensor is a BME680 environmental sensor from BOSCH.

Sensorboard

Hardware

IDE

PINOUT

The connection between BluePill and the breakout board is shown in the table below

BluePill-Pin BME680 Module Pin Function
3.3V I2C-VCC Power supply
GND I2C-GND Ground
B6 I2C-SCL I2C clock line
B7 I2C-SDA I2C data line

The breakout board support two interface types: I2C and SPI. Because I2C needs only two data lines we choose I2C over SPI bus.

Wiring

Firmware

To build the firmware you have to import the project in the firmware directory into the STM32CubeIDE. You have to use the code generator of CubeMX to generate the driver files, because thei are not checked into this git repository.

Please make sure you have pulled the submodules with:

git submodule update --init --recursive

This is necessary, because the BME680 sensors needs Drivers which are imported as submodule from the official Bosch Sensortec repository.

UDEV Rule Virtual Com Port

A problem with man VCP devices is that linux will only increment the path /dev/ttyACM0, /dev/ttyACM1, ... If you have many VCP devices you dont know which device belongs to which board. To be able to distinguish between the serial devices a UDEV-rule is added to this repository. To install it you have to copy the rule into the udev rules folder of you linux distribution:

// Copy udev rules
sudo cp udev/99-francor-co2.rules /etc/udev/rules.d/

// Update udev rules
sudo udevadm control --reload

After installing the udev rule you will find the CO2 sensor always at the path

/dev/ttyCO2Sensor

About

co2 arduino firmware + launchfiles

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published