Skip to main content

← All posts

Build Log

Borealis Goes from Air Quality to Life Safety: Real CO2, CO, and Propane Detection

· 6 min read

Borealis is getting a complete rebuild. New MCU board, four real sensors instead of two estimated ones, and a firmware path that goes from "indoor air comfort" to "could save your life." The code is written. We are waiting on orders to arrive before it goes into the rig. When it does, this becomes the most capable open-source RV air-quality and gas-safety node we know of.

This post is the field log for what is changing and why it matters, written now while the parts ship and the firmware sits on the bench. Borealis was first introduced alongside Peregrine back in March (Two New Modules and a Rename); this is its first major hardware revision since.

What Borealis used to be

The original Borealis was a small ESP32-S3-Zero with two I2C sensors:

  • SHT31-D for temperature and humidity. Solid sensor, narrow scope.
  • SGP30 for TVOC and eCO2. The catch is that the eCO2 was always an estimate, derived from the VOC reading. It was a useful trend line for indoor air comfort, but it could not actually tell you the real CO2 concentration in your sleeping space.

Plus an external CAN transceiver and a single status LED. It worked. It was honest about what it could and could not do. It was not, by any reasonable definition, a safety sensor.

What Borealis becomes

The new design is built around four DFRobot Gravity sensor modules wired through a single 20-pin ribbon cable into a Waveshare ESP32-S3-RS485-CAN board. Each sensor was chosen to address one specific risk that an RV, toy hauler, or sealed cabin actually faces.

1. Real CO2 (NDIR), temperature, and humidity

The Sensirion SCD41 replaces both the SHT31 and the SGP30's eCO2 estimate. It uses photoacoustic NDIR to measure actual CO2 in parts per million, the same technique used in commercial building HVAC sensors. It also reports temperature and humidity from the same package, so we collapse two old sensors into one and replace an estimated value with a measured one.

Why it matters in an RV: a sealed sleeping space with two adults breathing for eight hours can hit 2,500 ppm CO2, well into the range where people wake up groggy and report bad sleep. Until now we were guessing at that number. The SCD41 measures it.

2. VOC trending on a real scale

The Sensirion SGP40 reports a VOC Index from 1 to 500, where 100 is the rolling 24-hour baseline of your specific space. Above 250 is a significant pollution event. Above 400 is severe. We are wiring up Sensirion's official gas index algorithm so the index actually self-calibrates over a 24-hour window, not the placeholder 17-minute estimator we had to ship with the bench build.

Why it matters: VOCs are how you detect cooking smoke before the alarm goes off, off-gassing from a new mattress or floor, or a generator exhaust leak that is too dilute to register on a CO sensor yet.

3. Real carbon monoxide detection

The DFRobot SEN0466 is a factory-calibrated electrochemical CO sensor with a 0 to 1000 ppm range. This is a life-safety class sensor, not an estimate, and it shipped with calibration data already burned into it. We trigger alerts at 70 ppm warning (the OSHA 8-hour exposure limit) and 200 ppm alarm (the level at which the CDC says you start losing motor function within an hour).

Why it matters: generator exhaust drift, a furnace heat exchanger crack, an idling tow vehicle in an attached garage, all of these can put CO into a sleeping space silently and at concentrations that hit dangerous levels in minutes. RVs are required by law to have a CO detector. They are not required to have a smart one that talks to the rest of the rig and your phone. Borealis will.

4. Propane and LPG leak detection

The MQ-6 module on a 5V heater detects propane, LPG, and butane. It outputs a resistance ratio rather than absolute ppm, which is exactly what you want for leak detection. A sharp drop from baseline means gas is present, even before you can smell it.

Why it matters in an RV: propane is heavier than air. It pools at floor level. Mounted low, the MQ-6 sees a propane leak before it reaches the height where a person would notice the odorant. Combined with the rest of the suite, Borealis can tell the difference between "you cooked bacon" (VOC spike, no CO, no LPG) and "your propane line is venting" (LPG drop, no VOC, no CO). That distinction matters when the alert wakes you up at 3am.

The board change

The MCU is also moving up a tier. The old board was a Waveshare ESP32-S3-Zero, fine for a hobby node but minimal. The new one is the Waveshare ESP32-S3-RS485-CAN, the same off-the-shelf board that anchors Bearing, Solstice, Reservoir, and most of the other CAN-bus modules in the platform. The trade-up brings:

  • Built-in isolated CAN transceiver (TJA1051) on dedicated pins, replacing the external SN65HVD230DR. Less wiring, less to go wrong, galvanic isolation between the bus and the MCU rail.
  • Direct 7 to 36V DC input on a barrel jack or screw terminal. Wire it straight into the RV 12V system, no external buck.
  • 8MB PSRAM and 16MB flash, up from 4MB total. Plenty of headroom for the gas index algorithm, larger NVS for sensor calibration data, and OTA updates without partition juggling.
  • USB-C for flashing and serial monitoring without a USB-to-serial adapter.

It also brings consistency. Most of the platform's modules now run the same board, the same TWAI driver, the same CAN protocol layer, the same OTA mechanism, and the same discovery flow. Maintenance and field debugging get easier when nine modules look the same on the inside. The same architecture also means Borealis benefits automatically from the recent Headwaters cloud-bridge optimizations: alarm and air-quality data go up over the same change-detected, tiered MQTT path that just got the trailer's monthly cellular use down to about 430 MB.

Firmware that is already done

The most important thing about this rebuild: the firmware is complete and builds clean on the bench. We are not waiting on code, we are waiting on parts.

Some of what is already in place and committed:

  • Drivers for all four sensors, written from the datasheets, with proper I2C error handling and CRC validation.
  • An MQ-6 R0 calibration routine that runs after a 24 to 48 hour clean-air burn-in, then stores R0 in NVS so it persists across reboots.
  • A 64-sample oversampled, 4-each-end trimmed-mean ADC reader on the MQ-6 channel. Trimming the highest and lowest samples makes the reading robust to WiFi TX bursts, ESD, and supply transients that could otherwise push a single bad sample over the alarm threshold and trigger a false LPG alarm. For a safety sensor, that robustness is non-negotiable.
  • Per-chip ADC calibration via eFuse curve fitting, with a graceful linear fallback for chips whose calibration data was not burned in.
  • Two CAN frames at 1 Hz: 0x1F for environmental data (temperature, humidity, real CO2, VOC index) and 0x20 for safety data (CO ppm, LPG ratio, alarm bitmask).
  • A seven-bit alarm bitmask covering CO warning, CO alarm, LPG warning, LPG alarm, CO2 warning, CO2 alarm, and VOC alarm, all wired into the Headwaters notification path.
  • The standard TrailCurrent CAN-bus module behaviors: WiFi credentials over CAN, mDNS discovery for Headwaters, OTA via HTTP POST after CAN trigger, and firmware version reporting.

What "waiting on orders" means in practice

The firmware, the wiring diagram, the ribbon cable pinout, and a parts-arrival checklist are all done and committed. There is no custom PCB on this revision. The Waveshare ESP32-S3-RS485-CAN board does the heavy lifting and the four sensors plug in over a single 20-pin ribbon. The enclosure is the one piece that cannot be designed yet. Real-world dimensions for the assembled board, the ribbon, and the four DFRobot Gravity modules need to be measured before the case CAD can be drawn, and that work waits on the parts landing on the bench.

When the boxes from DFRobot and Waveshare arrive, the work that remains is physical and time-based, not engineering:

  • Solder the 10k and 15k voltage divider on the MQ-6 ADC line, plus a 100nF noise filter cap.
  • Run the 24 to 48 hour MQ-6 burn-in in clean air, then trigger the R0 calibration.
  • Verify each sensor attaches at boot (SCD41 at 0x62, SGP40 at 0x59, SEN0466 at 0x74, MQ-6 on ADC channel 2) and that all four show plausible readings.
  • Drop in Sensirion's gas index algorithm to replace the placeholder VOC estimator.
  • Validate each alarm threshold fires correctly into Headwaters, including the bitmask reaching the phone.
  • Measure the assembled module stack and design the printable enclosure around it. The case will follow the same pattern as the rest of the platform: ASA exterior or ABS interior, MakerWorld-published, with mounts sized for the chosen install location.
  • Mount everything in the rig: SCD41 at sleeping-zone height, SGP40 in the same airflow as the SCD41, SEN0466 at mid-height away from the cooktop, MQ-6 low to the floor where propane pools.

The full checklist is in the repository at DOCS/arrival-todos.md. Anyone building one alongside us can work the same list.

Why we are taking it this far

The honest answer is that an RV is a small, sealed, well-insulated room with a propane appliance, a fuel-burning generator option, lithium chemistry, and a sleeping human inside it. The three things that genuinely hurt people in that environment are propane leaks, carbon monoxide, and oxygen displacement from CO2 buildup. Every commercial RV ships with a single CO detector wired to a piezo buzzer. That is the whole safety stack on most rigs.

We can do better. The same node that tells you the cabin smells like cooking is wired to tell you the propane line is venting and to broadcast that to your phone before the smell ever reaches your nose. That is the version of "smart" that justifies the word.

Where to find it

The full source, including the sensor drivers, the MQ-6 oversampling and trimmed-mean code, the CAN protocol, the wiring diagram, and the parts-arrival checklist, lives in the TrailCurrentBorealis repository. The README has the bill of materials and the full pin map. The next post on Borealis will be the field validation once the parts land.

Patience for now. Real safety coverage soon.