Ultra-Low Power Soil Moisture Sensor

Electricity can be a pretty handy tool when it stays within the bounds of its wiring. It’s largely responsible for our modern world and its applications are endless. When it’s not running in wires or electronics though, things can get much more complicated even for things that seem simple on the surface. For example, measuring moisture in soil seems straightforward, but corrosion presents immediate problems. To combat the problems with measuring things in the natural world with electricity, [David] built this capacitive soil moisture sensor which also has the benefit of using an extremely small amount of energy to operate.

The sensor is based on an STM32 microcontroller, in this case one specifically optimized for low-power applications. The other low-power key to this build is the small seven-segment e-ink display. The segments are oriented as horizontal lines, making this a great indicator for measuring a varying gradient of any type. The microcontroller only wakes up every 15 minutes, takes a measurement, and then updates the display before going back to sleep.

To solve the problem resistive moisture sensors have where they’re directly in contact with damp conditions and rapidly corrode, [David] is using a capacitive sensor instead which measures a changing capacitance as moisture changes. This allows the contacts to be much more isolated from the environment. The sensor has been up and running for a few months now with the coin cell driving the system still going strong and the house plants still alive and properly watered. Of course if you’re looking to take your houseplant game to the next level you could always build a hydroponics system which automates not only the watering of plants but everything else as well.

Turning Down The Noise On SMPS

On paper, electricity behaves in easy-to-understand, predictable ways. That’s mostly because the wires on the page have zero resistance and the switching times are actually zero, whereas in real life neither of these things are true. That’s what makes things like switch-mode power supplies (SMPS) difficult to build and troubleshoot. Switching inductors and capacitors tens or hundreds of thousands of times a second (or more) causes some these difficulties to arise when these devices are built in the real world. [FesZ Electronis] takes a deep dive into some of the reasons these difficulties come up in this video.

The first piece of electronics that can generate noise in an SMPS are the rectifier diodes. These have a certain amount of non-ideal capacitance as well as which causes a phenomenon called reverse current, but this can be managed by proper component choice to somewhat to limit noise.

The other major piece of silicon in power supplies like this that drives noise are the switching transistors. Since the noise is generally caused by the switching itself, there is a lot that can be done here to help limit it. One thing is to slow down the amount of time it takes to transition between states, limiting the transients that form as a result of making and breaking connections rapidly. The other, similar to selecting diodes, is to select transistors that have properties (specifically relating to inherent capacitances) that will limit noise generation in applications like this.

Of course there is a lot more information as well as charts and graphs in [FesZ]’s video. He’s become well-known for deep dives into practical electrical engineering topics like these for a while now. We especially like his videos about impedance matching as well as a more recent video where he models a photovoltaic solar panel in SPICE.

Continue reading “Turning Down The Noise On SMPS”