A battery-powered Wi-Fi sensor needs more than a microcontroller that knows how to sleep: the circuitry around it needs to stop drawing unnecessary power too. Johan Westlund shared the Homefixer ESP8266 devboard on Hackaday.io to make small, battery-powered prototypes easier to assemble and tuck into a box. Its most interesting detail is a battery monitor designed to wake only long enough to take a reading.
The project began on March 29, 2017, and the supplied logs run through January 15, 2018. They trace a useful progression from hand-soldered boards and a working Wi-Fi thermometer to a second design with charging, easier programming and more deliberate control over idle power.
Measuring the battery without draining it continuously
Battery monitoring creates an awkward little problem here. The ESP module's ADC accepts only 0–1 V, so a battery needs a voltage divider before its voltage can be measured. Leave that divider connected all the time, though, and it keeps drawing current even while the ESP8266 sleeps.
Westlund considered larger resistor values, but worried about noise and the effect of high source impedance on the ADC. His alternative was to switch the divider on only for a measurement.
The January 1, 2018 battery-measurement log explains why the switch sits on the battery side of the divider. Breaking only the ground-side connection could expose the ADC input to battery voltage. A high-side P-channel MOSFET avoids that arrangement, but introduces another challenge: a 3.3 V GPIO cannot directly drive its gate up to the voltage of a fully charged 4.2 V LiPo cell.
Rather than add another transistor for level shifting, Westlund used capacitor-coupled GPIO transitions to briefly enable the P-channel MOSFET. His example drives GPIO15 low, immediately reads A0, then drives GPIO15 high again. The capacitor makes this a transient measurement window, not a divider that remains enabled indefinitely.
That distinction matters. Westlund cited an approximately 2 ms window from a forum discussion, yet reported that adding a 1 ms delay before the ADC read was already too long on his board. He said the immediate-read sequence worked without problems. The practical lesson is to verify the timing on the actual circuit rather than treat the nominal window as guaranteed.
Calibration needs the same attention. His conversion factor of 6.85 came from one unit, and he recommended checking the result against a known supply voltage and adjusting it. It is an example calibration value, not a universal constant for every assembled board.
Keep programming conveniences off the battery
The second version extends the same idea beyond the ADC. It uses a CP2104 USB-to-serial interface powered from USB rather than the battery, retaining convenient programming without deliberately keeping that interface alive during untethered operation. It also adds NodeMCU-style automatic entry into programming mode.
In the June 11, 2017 V2 design log, Westlund described two diodes intended to prevent the battery from powering the USB/CP2104 side and to prevent USB from connecting directly to the battery. The board's charging circuit could be disabled when using non-LiPo batteries. The project overview also lists a TPS61201-based 3.3 V supply with configuration solder jumpers and a smaller footprint that leaves the outer breadboard holes accessible.
Those are concrete design choices, but the supplied logs don't give a measured whole-board sleep current or a battery-runtime comparison. They show where Westlund tried to remove unwanted loads, not how many months a finished sensor would run.
The thermometer exposed more than electrical problems
The first assembly report, dated May 16, 2017, was candid: two of five hand-soldered boards worked. Westlund suspected shorts beneath the QFN package on the others, without reporting a confirmed diagnosis.
One working board became a Wi-Fi thermometer sending readings to ThingSpeak every ten minutes. He reported a week of operation without opening the box, with half a day of missing data when the ADSL modem went down. The trial also revealed that the PCB was 0.1 inch too wide for his breadboard and that the temperature sensor's placement made it respond strongly to sunshine. A functioning data link wasn't enough to make the physical installation a good thermometer.
By January 1, 2018, Westlund reported having 50 boards assembled through Elecrow, split between 25 for his testing and 25 for the shop. That was a move beyond the difficult hand-assembly stage, not evidence of completed endurance testing.
His January 15 DHT11/MQTT example makes the intended operating cycle clear: connect to Wi-Fi, connect to MQTT, read temperature and humidity, publish, then sleep for ten minutes. Failed Wi-Fi, MQTT or sensor steps also lead back to sleep; the Wi-Fi loop gives up after roughly five seconds rather than retrying indefinitely. The example requires soldering the deep-sleep jumper first.
Homefixer's useful lesson is that low-power behavior spans both hardware and firmware. Switching off a divider and isolating a serial interface address background loads; abandoning an unsuccessful connection attempt addresses wasted awake time. The next useful test would measure current across that entire cycle—including failed connections—and check that the brief ADC window still produces repeatable battery readings.
Source: Homefixer ESP8266 devboard