Menu Close

Month / February 2017

A Versatile ATtiny Programming Adapter

As mentioned in my article about designing a cheap plant watering sensor, I built a small adapter which can be used to pre-program the ATtiny13A. This is necessary, because once soldered on the board, I only have a debugWire interface, which has to be enabled first.


The adapter has a small 50mil JTAG header, where the Atmel ICE can be connected with the board. There is also room for a USB mini jack, which is used to power the MCU while programming. A small on-off switch is used to power the MCU and a LED is placed as indicator to see if the MCU has power. The assembled board looks like this:


One of the DIL/ZIF adapters is mounted on top of the female headers. Most of the adapters for SO-8, SO-14 and SO-16 will work with this board. Continue Reading

Plant Watering Sensor – Precise Current Measurement

As I wrote in the first part of my article, how to design a cheap plant watering sensor, I had troubles to get exact measurements of the current, using my Testo multimeter. I searched for a solution and found the µCurrent Gold device, from David L. Jones known for the EEVblog. Later a little bit more about the device, first the measurements.


I could do the measurements using the oscilloscope and not only measure the static current consumption, but the current consumption over time. The graph shown in the diagram, is the reading of if the sensor does one single measurement and flashes the LED. Continue Reading

SMD LEDs Tests

Today I tested a number of SMD LEDs for the plant watering sensor project. I soldered all 13 LEDs I shortlisted onto a small board and connected it to an Arduino Zero Pro. So I could try the different flashing styles I planed to use more or less automatically. That way I could focus on the LED flashing itself, without being distracted by switching cables.


This is the board I made. Very simple but functional. I used red and blue male header to mark the anode and cathode of the LEDs. There is a sticker on the bottom with the LED numbers on it.


I mounted everything on a very small breadboard and did all connections to the Arduino.

Continue Reading

How to Design a Cheap Plant Watering Sensor (Part 2)

This is the second part of the meta-tutorial, where I talk about designing a cheap plant watering sensor. If you did not already read the first part, please do it now. It contains a lot information about constraints and decisions made which lead to this point.

The first part ended with step 11, building a working prototype with the selected key components. So let us start with the next steps in this journey.

Step 12: Analyse and Measure the Prototype

Never forget why you actually built a prototype. It is your tool to verify all assumptions you made in the design phase. To do this you need the right measuring instruments.

The Power Usage

I start measuring the current of the circuit. This will show if my assumptions about the battery life will be true. For this test I use a multimeter which has a good resolution measuring in the µA range. The multimeter I use is the Testo 760-3 which is not a very well known brand. Multimeters are usually really poor at measuring low currents on low voltages, so let us see if this will work.

I also use a Fluke 114, but this one has no current measurement. It is sometimes very handy to have two multimeters, one to measure the voltage and a second one to measure the current.

For the first test I program the MCU to do all the tests in a loop and connect the power directly to the second part of the circuit. Now the power is always on and I can measure the current used by the MCU while doing the measurement.


Just running, doing the measurement of the oscillator, the second part of the circuit uses at maximum ~1.2mA. This measurement phase should be as short as possible. Later we will analyse the timing. Continue Reading

The Fan Controller Wrapped Up

Yesterday I found some time to put the fan controller in a casing. I used a very cheap no-name case with the dimensions 130 × 68 × 44 mm. First I drilled some 2.5mm holes into the lid, and fastened the Arduino board on it using M2.5 spacers. You see the bottom of the case in the […]

How to Design a Cheap Plant Watering Sensor (Part 1)

In this article I will talk about how I designed a cheap plant watering sensor. My goal is some kind of meta tutorial, where you can see the steps involved from the initial idea to the final sensor. If you ever planed to create a own device, I hope this article give you some inspiration to start your own project soon.

Why a Plant Watering Sensor?

I have a couple of plants in flowerpots and this plants not only like some light, they also need water from time to time. Watering this plants is something I often forget, with sad results. There are ready made solutions for this, but I have some objections with all of them. To be clear: There are really smart products out there – it is absolutely nothing wrong with them. It is just as I like to build my own fan controller, I like to build my own plant watering sensor in my very own fashion.

Here a list of already existing projects and devices I own or checked out:

Step 1: Define the Expectations and Goals

After deciding to create a own plant watering sensor, I spend some days to think about my expectations and goals for this sensor.

For my personal case, I like to put a small sensor in each flowerpot. There will be five and more pots, therefore that number of sensors are required. A single sensor should be really cheap, so I can distribute as many of them as I like. Battery life should be at least one year, better two years. I collected all this thoughts into the following list:

  • Cheap: Ideally less than €5 including the PCB.
  • Visual Signal: A flashing LED, simple to notice but easy to ignore.
  • Simple: Easy and simple to build with few components.
  • Beautiful: It should ideally look like a decoration.
  • Long Battery Life: The battery should last at least 1 year or longer.
  • Small: The sensor should be almost invisible from far away.
  • Reliable: The measurement should be reliable and the sensor must not corrode or degrade over years.
  • Safe: The sensor must be safe for the plant and environment.
  • Low Battery Indicator: The sensor should detect if the battery is at end of life and signal this.

Continue Reading