Hardware

Above is the wiring diagram. The schematic is at the bottom of this page and makes a little more sense in some ways. Let's look at the pieces of the circuit around the Feather, one piece at a time.

Power

The circuit is powered by a LiPo battery. A 1200mAh model was selected based on size and charge lifetime.

Power is controlled by a TPL5111 breakout which controls the Feather's Enable input. While it can be used as is, with the onboard potentiometer (to set the sleep duration) is hard to get exact. The alternative is to use an external resistor which is what we do. To do this, we need to cut the Trim trace under the TPL5111 breakout. The other (LED) trace can be cut as well to save power and since the "on" LED won't be of much use.

Now let's talk about the startup sequence of the system.  The first thing the code does at the earliest opportunity is set the DONE signal to the TPL5111 low so as to not turn off the power and start the timing sequence. The problem is that the SAMD51 output floats high. That along with the fact that the TPL5111 starts up faster than CircuitPython can configure and set the DONE output low means it will shut down before getting started (because it sees a high DONE signal). To avoid that we need to delay that DONE signal registering as True/high. For that we turn to our friend the capacitor. 

By using a small capacitor between the DONE pin and ground, the pin won't be reach a voltage that registers as True for a short length of time: the amount of time that the capacitor takes to charge. A little trial and error showed that 100nF did the job. It delays DONE long enough for the code to configure the output and set it to False/low. This lets the TPL5111 stay in on mode until the DONE line is explicitly set to True/high by the code.

Measurement

The Si7021 is simple: power, ground and the pair of I2C signals. Nothing unusual about the connection. Actual wiring is a bit more involved. The sensor breakout has to be inside the container (a jar in the target build), preferably in an airtight way since a sealed environment is desired.

Display

The display is connected simply as well: power, ground, the SPI clock and data lines, as well as various control and status lines as shown. Note that we're not using the SD card in this project.

Miscellaneous

The remaining pieces are a push button switch and a piezo. Note that this is a buzzer that is driven by a square wave (via a PWM) and not one that makes sound when power is applied.

This guide was first published on Feb 13, 2019. It was last updated on Feb 13, 2019. This page (Hardware) was last updated on Jul 22, 2019.