Temperature & Humidity Monitor

The goal for this project was to keep track of ambient conditions when I was mixing laminating epoxy for the rocket motors at CTI. I was getting unreliable surface finish quality throughout the year which was due to changing ambient and humidity. This tool helped determine what organic solvent dilution percentage should be used based on the readings.
I could have opted to buy a cheap monitor from somewhere, but where’s the fun in that? Instead, I decided to build it from components I had on hand including the Adafruit Itsybitsy I got from my second-year measurement in mechatronics class! Although the build quality was not the best, I still had fun making it. To operate it, the battery level indicator button on the power bank was pressed, which ran a powerful enough signal to power the Itsybitsy, the BME 280, and the 128x64 OLED display. The current stayed on for approximately 10 seconds before shutting off.
DevelopementI started off by placing all the needed components on my breadboard and wired the right connections. The power output from the power bank was connected to the Itsybitsy via micro-USB. Below is a video showing how to operate the monitor.

The next step was to place all the components on a spare piece of perfboard. I’ll admit, it wasn’t my proudest soldering job, and I unfortunately don’t have a photo of the mess of wires… Regardless, this is what it looks like assembled without the enclosure. The battery pack rests in the half-pipe-looking feature of the holder and the perfboard is bolted on the wall.

Below is the code. I managed to create a custom bitmap of the Cesaroni logo that gets flashed before the temperature and humidity are displayed using an LCD image converter.
// Include libraries
#include <Wire.h>
#include <SPI.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_BME280.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#include <Adafruit_DotStar.h>
#define BME_CS 10
Adafruit_BME280 bme(BME_CS); // hardware SPI
#define SCREEN_WIDTH 128 // OLED display width, in pixels
#define SCREEN_HEIGHT 64 // OLED display height, in pixels
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, -1);
static const unsigned char PROGMEM image_data_array[]= {
0x00, 0x00, 0x11, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x63, 0xce, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xc7, 0x9e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x11, 0x8f, 0x39, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x63, 0x1e, 0x73, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xc6, 0x3c, 0xe7, 0x9c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x01, 0x8c, 0x79, 0xcf, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x03, 0x18, 0xf3, 0x9e, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x06, 0x31, 0xe7, 0x3c, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x0c, 0x63, 0xce, 0x79, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x08, 0xc7, 0x9c, 0xf3, 0xe0, 0x00, 0x03, 0xef, 0x9e, 0x19, 0xf1, 0xe6, 0x2c, 0x00, 0x00, 0x00,
0x11, 0x8f, 0x39, 0xe7, 0xc0, 0x00, 0x06, 0x2c, 0x33, 0x39, 0x0b, 0x16, 0x2c, 0x00, 0x00, 0x00,
0x03, 0x1e, 0x73, 0xcf, 0x80, 0x00, 0x04, 0x0c, 0x30, 0x29, 0x0a, 0x17, 0x2c, 0x00, 0x00, 0x00,
0x06, 0x3c, 0xe7, 0x9f, 0x00, 0x00, 0x04, 0x0f, 0x9e, 0x29, 0xfa, 0x14, 0xac, 0x00, 0x00, 0x00,
0x0c, 0x79, 0xcf, 0x3e, 0x00, 0x00, 0x04, 0x0c, 0x07, 0x7d, 0x22, 0x14, 0xac, 0x00, 0x00, 0x00,
0x18, 0xf3, 0x9e, 0x38, 0x00, 0x00, 0x06, 0x2c, 0x31, 0x5d, 0x12, 0x14, 0x6c, 0x00, 0x00, 0x00,
0x31, 0xe7, 0x20, 0x10, 0x00, 0x00, 0x03, 0xef, 0x9e, 0x83, 0x09, 0xe4, 0x2c, 0x00, 0x00, 0x00,
0x63, 0xce, 0xc0, 0x00, 0x00, 0x00, 0x01, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xc7, 0x9d, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x8f, 0x3b, 0x00, 0x00, 0x00, 0x00, 0x07, 0xcf, 0x0c, 0x00, 0x00, 0xc0, 0x06, 0x04, 0x42, 0x00,
0x1e, 0x77, 0x00, 0x00, 0x00, 0x00, 0x07, 0xff, 0x3e, 0xc5, 0x89, 0xe4, 0x1f, 0x1f, 0x62, 0x00,
0x3c, 0xef, 0x00, 0x00, 0x00, 0x00, 0x01, 0x18, 0x42, 0xc5, 0x8b, 0x14, 0x10, 0x91, 0x26, 0x00,
0x79, 0xdf, 0x00, 0x01, 0xff, 0xfc, 0x01, 0x18, 0x40, 0xc5, 0xca, 0x14, 0x30, 0xe0, 0x34, 0x00,
0xf3, 0xbe, 0x00, 0x03, 0xff, 0xfc, 0x01, 0x1f, 0x40, 0xfd, 0x6a, 0x14, 0x30, 0xe7, 0x18, 0x00,
0xe7, 0x7c, 0x00, 0x03, 0xff, 0xfc, 0x01, 0x18, 0x40, 0xc5, 0x2a, 0x14, 0x30, 0xe1, 0x88, 0x00,
0xce, 0xf9, 0x00, 0x03, 0xff, 0xfc, 0x01, 0x18, 0x27, 0xc5, 0x3b, 0x14, 0x10, 0x91, 0x98, 0x00,
0x1d, 0xf3, 0x80, 0x07, 0xff, 0xf8, 0x01, 0x1f, 0x1e, 0x85, 0x09, 0xe3, 0xdf, 0x1f, 0x10, 0x00,
0x3b, 0xe7, 0x80, 0x0f, 0xff, 0xf8, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x04, 0x00, 0x00,
0x77, 0xcf, 0x60, 0x1f, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x6f, 0x9e, 0xff, 0xbf, 0xff, 0xf8, 0x06, 0x84, 0x61, 0xc7, 0xcf, 0x0e, 0x3c, 0x03, 0xef, 0xbc,
0x1f, 0x3d, 0xff, 0xff, 0xff, 0xf0, 0x06, 0xc5, 0x93, 0x26, 0x68, 0x9b, 0x62, 0x30, 0x88, 0x22,
0x3e, 0x7b, 0xff, 0xff, 0xff, 0xf0, 0x06, 0xe5, 0x16, 0x14, 0x68, 0xb1, 0x63, 0x70, 0x88, 0x21,
0x1c, 0xf7, 0xff, 0xff, 0xff, 0xe0, 0x06, 0xa5, 0x04, 0x17, 0xc8, 0xa1, 0x7e, 0x48, 0x8f, 0xa1,
0x19, 0xef, 0xff, 0xff, 0xff, 0xe0, 0x06, 0xb5, 0x04, 0x17, 0x8f, 0xa1, 0x7c, 0x48, 0x8f, 0xa1,
0x03, 0xdf, 0xff, 0xff, 0xff, 0xc0, 0x06, 0x9d, 0x1e, 0x14, 0xc8, 0x31, 0x66, 0xfc, 0x88, 0x21,
0x07, 0xbf, 0xff, 0xff, 0xff, 0x80, 0x06, 0x8d, 0x92, 0x24, 0x48, 0x13, 0x62, 0x84, 0x88, 0x23,
0x07, 0x7f, 0xff, 0xff, 0xff, 0x80, 0x06, 0x8c, 0xe1, 0xe4, 0x28, 0x0e, 0x61, 0x86, 0x8f, 0xbe,
0x02, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x7f, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x1f, 0xff, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x07, 0xff, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x01, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x3f, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
Adafruit_DotStar dot = Adafruit_DotStar(1, 41, 40, DOTSTAR_BGR);
void setup() {
bme.begin();
dot.begin();
dot.show();
Serial.begin(115200);
if(!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) {
Serial.println(F("SSD1306 allocation failed"));
for(;;);
}
display.display();
delay(2000);
display.clearDisplay();
// Draw bitmap on the screen
display.drawBitmap(0, 9, image_data_array, 128, 45, 1);
display.display();
delay(2000);
display.clearDisplay();
}
void loop() {
displayValues();
}
void displayValues(void) {
display.clearDisplay();
display.setTextColor(SSD1306_WHITE);
display.setTextSize(1.75);
display.setCursor(0,0);
display.println(F("Temperature: "));
display.setTextSize(2);
display.print(bme.readTemperature());
display.print(F(" C"));
display.setTextSize(1.75);
display.setCursor(0,30);
display.println(F("Humidity: "));
display.setTextSize(2);
display.print(bme.readHumidity());
display.print(F(" %"));
display.display();
delay(1000);
}
The last step of this project was to package it nicely in a 3D-printed enclosure. I made this enclosure when I was still a beginner with 3D printing when I had an Ender 3. The idea was to bolt the holder to the bottom of the enclosure and secure the lid with four screws. A hole in the lid is for the long push rod to activate the battery level button. Cutouts were made on the side for the OLED display and to check the battery level LEDs. I don’t have a photo of the real version so here is a render.

I can go on about how much I hated the user experience of this thing lol. Firstly, the push rod constantly slipped off the button on the battery pack. Then if the battery pack ran out of power, you had to take it out of the enclosure to charge it. I forgot to include a cutout in the enclosure for battery recharging. -_-
I also printed the enclosure without infill to save time, which caused the outer and inner to contact each other when you pressed on the wall. I also should’ve invested in some brass heated threaded inserts for screws. Self-tapping screws into PLA will only get me so far. As I mentioned previously, the overall build quality was subpar.
With that said, if I get the chance to visit the place where I interned, I will definitely take it back and decommission the parts and maybe build a V2, that’s if it still exists.