rguard is a do it yourself project with the aim to develop an opensource instruction for building your own CO2 Sensor. All instructions are here available including some CAD and STL files of a housing for 3d printing.
- Standard Installation of OS.
SCD30 | Raspberry Pi |
---|---|
VDD | 3V3 Power |
GND | Ground |
TX/SCL | GPIO 3 BCM 3 (SCL) |
RX/SDA | GPIO 2 BCM 2 (SDA) |
SEL | Ground |
- Clone project on the raspberry pi
git clone https://github.com/rehrler/rguard.git --recursive
- Install all dependencies and install the python packages
cd rguard && sudo apt-get update && sudo apt-get upgrade
sudo apt-get install -ylibgtk-3-dev build-essential gcc g++ pkg-config make hostapd python3-pip
pip3 install -r requirements.txt
- Compile the rpi-i2c-timings
cd 3rdparty/rpi-i2c-timings && make
- Setup the rpi-i2c-timings as a service at boot
sudo cp rpi-i2c /usr/bin/ && sudo cp rpi-i2c-timeout.service /etc/systemd/system/
sudo systemctl enable rpi-i2c-timeout.service
- Setup the local access point and adjust the
/etc/create_ap.conf
with a SSID as your wifi name and a reasonable passphrase
cd ../linux-wifi-hotspot && make install-cli-only
sudo systemctl enable create_ap.service
- Adjust paths and user in src/services/rguard_sensor.service and src/services/rguard_server.service.
WorkingDirectory=<path to rguard directory>
User=<your user>
ExecStart=<path to python exec> <path to capture_data.py/start_server.py>
- Add rguard services to systemctl
cd ../../src/services/
sudo cp rguard_server.service /etc/systemd/system/ && sudo systemctl enable rguard_server.service
sudo cp rguard_sensor.service /etc/systemd/system/ && sudo systemctl enable rguard_sensor.service
- Reboot the raspberry pi, connect to the wifi with the given name and visit 10.0.0.1:5000 and there you go!
- top plate cad/rguard_topplate.stl
- base plate cad/rguard_plate.stl
- Raspberry Pi 4 8gb raspberrypi.org
- Sensirion SCD30 sensirion.com