The BenjyMometer Second Generation Receiver |
The Benjymometer (a portmanteau from "Benjy" --That's me-- and "thermometer") is a DIY wireless thermometer designed to have extended range as compared with brick and mortar wireless thermometers. The original system used Arduino Pro Minis and 315 MHz Amplitude-Shift Keying (ASK) radios and supported both large seven-segment displays and 16x2 LCD displays. The system has been in use since 2017.
When I saw the Adafruit ESP32-S2 Reverse TFT Feather, I decided I could enhance the BenjyMometer receivers. The original Benjymometer could display high, low, and current temperature on the web using an optional Beagle Bone Black; however, this arrangement was unwieldy. But the Adafruit board has built-in WiFi, making web access easy. The board also has three user buttons, a small TFT display, and a LiPo battery charger/monitor.
![]() |
![]() |
I ran into two problems building the receiver: one hardware, one software.
My first experiments with the ESP-32 and ASK receiver failed. No packets were received. To understand the problem, consider the hardware configuration: an ESP-32, an ASK receiver requiring 5V, and a boost converter board to convert the 3.3 battery voltage to 5V. Under normal operating conditions, the ESP-32 is powered from a USB power module, so 5V is available; however, during a power failure, only the 3.3V battery power is available. The boost converter is used at all times to avoid switching between the power options.
In an effort to debug the problem, I used the boost converter to power a 16x2 LCD display board, and the ESP-32 started receiving packets. The boost converter board uses a TPS61023 boost converter IC. In situations where the load is low, the IC switches from PWM (Pulse Width Modulation) mode to PFM (Pulse Frequency Modulation) mode which can produce subharmonics. So adding the LCD display changed the boost converter operation mode and reduced subharmoics near the 315MHz receiver frequency. In the production version of the unit, I use a resistor to add load to the boost converter. (See the TPS61023 Datasheet.)
The Arduino ProMini-based transmitters and receivers use the Virtual Wire library. I decided to use its replacement, the RadioHead library because it was compatible with the ESP-32 Arduino toolchain. (It appears I could have used the FreeRTOS toolchain which I am familiar with, but I missed that option.) I assumed these two versions of the ASK (Amplitude Shift Keying) library could interoperate, but I found there is a catch. The Radiohead library prepends a header for source and destination which the VirtualWire library doesn't use. So I modified the radiohead library with a new function, setCompat(int version). Called with an argument of 1, it disables the extra header in RadioHead. (This page explains the extra header: https://forums.raspberrypi.com/viewtopic.php?t=230446.)
The hardware consists of the following:
The schematic follows:
During setup, the hardware is initialized. Then the system logs in to WiFi and sets its clock.
Because the software was written for a single core ESP32, there is one main loop. The loop executes the following actions:
ASK is susceptible to interference and multipath. House materials also attenuate the signals. Because of multipath interference, placement of receivers in the house is critical. The ProMini receivers appear to have a lower error rate than the ESP32 version. My assumption is that the ESP32 and boost converter generate RF that can interfere with the ASK signal. I tried to minimize this with the PCB layout. The error rate for the ESP32 receiver and the outside sensor unit averages about 3% (about 22 lost packets out of 720 in a day). I find this to be an acceptable error rate.