DIY Environment Sensors

our most popular plugin is the weather. and not just those we maintain (1, 2, 3), but the greater community's. if i anticipated this before starting TRMNL i might have Googled "barometric pressure" before 5 minutes ago. but here we are.

as weather plugins have matured, one thing we've noticed is the importance of hyperlocal data. a postal code approximation is not always good enough. neither is one's personal backyard station.

so starting today you can get all these measurements directly from your OG TRMNL by hooking up 1 or more environmental sensors.

requirements

  • TRMNL OG device (get one)
  • sensor + QWIIC connector (AHT20 - $6, BME280 - $17, SCD41 - $43, etc)
  • soldering iron
  • tenacity

a 3D printer is also recommended, as the sensor we're attaching to TRMNL won't fit inside the original enclosure. you could try cutting a hole in your case but we don't recommend it.

understanding our sensors

behind all the magic below is a collection of environmental sensor libraries by our very own Larry Bank, for example:
https://github.com/bitbank2/bb_scd41
https://github.com/bitbank2/bb_temperature

these will be included in our 1.7.9+ firmware release but may be leveraged immediately by checking out the branch and building the binary yourself.

anyway, here's how it works in Larry's words:

When a compatible sensor is attached to your TRMNL OG it is automatically detected, activated, and sample data is gathered during each device wakeup. This ensures the power being used by the sensors doesn't impact the battery life. Not all environmental sensors can work this way (e.g. PM2.5 and some gas sensors need to be on for longer periods of time and use a lot of power). We will keep expanding the list of supported sensors, but the goal is to support low power sensors that can operate during the short wake periods of the TRMNL, then be shut down while the TRMNL sleeps.

what we're building

sensor support relies on test points on the bottom of your OG model's PCB. here was our early proof of concept:

Pimoroni SCD41
Environmental Sensor Data Stream

as you can see, 3 (or more) data types can come through a single I2C bus. which got us thinking... what if we made this available inside TRMNL?

solder time

from Larry:

The ESP32-C3 used on the TRMNL OG has very few available GPIOs. TRMNL doesn't need very many, so there are a few unused ones. Bogdan, the designer of the TRMNL board, had some forethought and exposed the unused GPIOs as test points on the bottom side of the PCB.
TRMNL OG solder points
In the photo above you can see the test points on the bottom of the OG PCB. The ESP32's IO matrix gives the flexibility to use almost any combination for I2C. I chose to use the RX and TX pins (GPIO 20 & 21). In the photo below you can see how I cut a QWIIC cable in half and soldered the leads to the OG PCB:

Black = GND
Red = 3.3V
Blue = SDA (TX = 21)
Yellow = SCL (RX = 20)

TRMNL OG + QWIIC Connector

that's a pretty nice solder job. but have no fear -- if your outcome is closer to what you see below, pat yourself on the back with a firm "it'll hold" in your best Southern accent.

Founders Who Solder

with your PCB rigged up to a sensor, the TRMNL firmware (v1.7.9+) will automatically detect and parse the make, model, etc data coming from each peripheral. you can even daisy chain multiple sensors if that's your thing.

let's put this back together, shall we?

OG assembly remix

as i mentioned earlier, the original enclosure is not going to fit your new sensor. so i printed one of my favorite community mounts, the Minimal stand by CtrlAltPrint.

the design features OG-specific screw holes to attach your PCB, and you only need 1-2 of them to make everything secure.

TRMNL OG, Sensor, Custom Enclosure

now that we're wired up, let's make a plugin.

environment sensor plugin development

log into your TRMNL account (or the open-source Terminus server) and make a new Private Plugin (Extension on Terminus).

inside the Markup Editor > Merge Variables accordion you'll see a new node, Sensor Readings.

inside is a collection of sensor readings, each bundled up and sent to TRMNL whenever your device wakes up for new content. here's an example data set:

{
"device_1": {
"temperature": [{"2026-02-22 13:03:48 UTC": 20.1}, {"2026-02-22 13:08:51 UTC": 20.2}, {{"2026-02-22 13:14:01 UTC": 19.9}],
"humidity": [{"2026-02-22 13:03:48 UTC": 39}, {"2026-02-22 13:08:51 UTC": 42}, {{"2026-02-22 13:14:01 UTC": 41}],
"carbon_dioxide": [], // same as temperature; timestamp => value
"pressure": [], // ""
},
"device_2": {} // each of your TRMNL devices with sensors attached is accessible
}

under the hood we store the Make, Model, Kind (e.g. temperature) Unit (e.g. celsius), and Value for every reading sent by your TRMNL device. these readings may then be visualized inside custom plugins, and even shared on the marketplace for other users to install.

Sensor Reading logs

and there we have it.

TRMNL OG + Sensors

if you rig up an OG to report environment data, send me a pic (ryan@trmnl) for $50 in store credit that never expires. we'd love to see what you build.

Ryan Kulp

Founder