Scrapbook

Small projects and design experiments, one detail at a time.

Arduino moisture-sensing pot

Potted plant beside a wired Arduino board with indicator LEDs lit

I built a simple Arduino setup that checks the soil in a plant pot. When the soil gets too dry, an LED lights up to remind me to water the plant.

This example averages five readings so one noisy measurement is less likely to trigger the watering reminder. It assumes lower readings mean drier soil. Set the threshold after comparing readings from wet and dry soil.

const int sampleCount = 5;
long total = 0;

for (int sample = 0; sample < sampleCount; sample++) {
  total += analogRead(moistureSensorPin);
  delay(20);
}

int averageMoisture = total / sampleCount;
bool needsWater = averageMoisture < dryThreshold;

The Arduino uses needsWater to decide when to turn on the LED.

3D-printed LED reading glasses

White 3D-printed glasses frame with yellow LEDs at the front corners and wiring along the top

I wanted a reading light I could wear. The ones I found online were expensive and didn't suit how I wanted to read, so I made one myself.

I 3D printed a glasses frame, made a hole at each front corner, and fitted a yellow LED into each hole. Then I wired the LEDs together, running the wires along the top of the frame.

An open book illuminated by the yellow LEDs in a dark room
The view of the page with the LEDs on.