Monday, August 5, 2019

Plantagotchi: PyBadge Plant Monitor

You can build and code your own Plantagotchi -- an adorable virtual plant friend to help you take care of your real potted plants and flowers!

We'll use the PyBadge's analog read capabilities to measure the moisture level of our potted plant's soil. In fact, the dirt will act like one big variable resistor. When soil is dry, it's not very conductive, so its resistance is high. Add water to the minerals in the soil and it will become more conductive, lowering the overall resistance.

We'll provide a 3.3V reference voltage from the PyBadge over one alligator connected to a nail plunged into the soil. Then, another alligator clip will be plugged into analog pin A3 on the PyBadge and connected to a second nail in the soil. By reading the voltage level on pin A3 (from a possible 0 to 1023) we'll be able tell how moist the soil is. When it's dry, the voltage level read will be low, when it's wet, the reading will be high.

Determining light levels is even easier -- we'll simply use the PyBadge's built-in light sensor!

No comments:

Post a Comment