Breadboard
docs
Example project · Builds & projects

Plant monitor (Nano)

A houseplant dashboard built around the Arduino Nano’s special trick: A6 and A7, two analog-only pins the Uno doesn’t have. The soil probe lives on A6 and a photoresistor light divider on A7, so every digital pin stays free for the 8-LED moisture bar on D2–D9 — all eight series resistors packed into one DIP-16 resistor-array. Real compiled Arduino firmware narrates soil, light and temperature (TMP36 on A0) twice a second. Select the soil sensor and drag its moisture slider — the bar and the plant’s mood follow.

The Plant monitor (Nano) circuit as rendered by the simulator

What's on the bench

  • 8× LED
  • Arduino Nano
  • Battery
  • Photoresistor
  • Resistor
  • Resistor array ×8
  • Soil Moisture
  • Temp (TMP36)

How it's wired

  • hole B+13hole j23
  • hole B-13hole a23
  • hole a4hole B+6
  • hole a6hole B-5
  • hole c5hole j31
  • hole a9hole B+9
  • hole a10hole B-10
  • hole c11hole j25
  • hole h23hole f50
  • hole i52hole g24
  • hole i55hole B-43
  • hole a24hole a40
  • hole g40LED · a
  • LED · khole B-14
  • hole a25hole a41
  • hole g41LED · a

…and 19 more connections — open it in the simulator to see every wire.

The code

This Arduino C++ sketch lives in the Code tab; sign in and press Compile & upload to build real firmware for the emulated board.

// ============================================================
// PLANT MONITOR — an Arduino Nano houseplant dashboard.
//
// This bench exists because of the Nano's two EXTRA analog pins:
// A6 and A7 are ADC-only pads on the Nano's TQFP-32 package — they
// have no digital function at all (no pinMode, no digitalRead, no
// pull-up), so they are the perfect home for analog sensors, and
// using them keeps EVERY digital pin free for the display:
//
//   soil-moisture probe   A6  (the sensor prints ~2.5 V bone-dry,
//                              ~0.2 V waterlogged)
//   photoresistor divider A7  (LDR from 5 V, 10 k to ground —
//                              bright light pulls the node high)
//   TMP36 thermometer     A0  (0.5 V + 10 mV/°C)
//   8-LED moisture bar    D2–D9, all eight series resistors in ONE
//                              DIP-16 resistor-array package
//
// Twice a second it narrates the plant's world over serial and
// redraws the bar: each LED is ~12.5% soil moisture. Click the soil
// sensor or the photoresistor in the Inspector and drag their
// sliders — the narration and the bar follow.
// ============================================================

const uint8_t BAR_PINS[8] = {2, 3, 4, 5, 6, 7, 8, 9};

void setup() {
  Serial.begin(9600);
  for (uint8_t i = 0; i < 8; i++) {
    pinMode(BAR_PINS[i], OUTPUT);
    digitalWrite(BAR_PINS[i], LOW);
  }
  Serial.println(F("Plant monitor online (Nano A6/A7 on sensor duty)"));
}

void loop() {
  // A6 — soil probe: 2.5 V dry .. 0.2 V soaked, mapped to 0..100%.
  float soilV = analogRead(A6) * 5.0 / 1023.0;
  int soilPct = (int)((2.5 - soilV) * 100.0 / 2.3);
  soilPct = constrain(soilPct, 0, 100);

  // A7 — light divider: percent of full scale is plenty for a plant.
  int lightPct = (int)(analogRead(A7) * 100L / 1023L);

  // A0 — TMP36: 500 mV offset, 10 mV per degree C.
  float tempC = (analogRead(A0) * 5.0 / 1023.0 - 0.5) * 100.0;

  // Moisture bar: one LED per 12.5%, through the 8-element array.
  int lit = (soilPct * 8) / 100;
  for (uint8_t i = 0; i < 8; i++) {
    digitalWrite(BAR_PINS[i], i < (uint8_t)lit ? HIGH : LOW);
  }

  const char *mood = soilPct < 25 ? "THIRSTY" : soilPct > 75 ? "SOAKED" : "HAPPY";

  Serial.print(F("Soil "));
  Serial.print(soilPct);
  Serial.print(F("% ("));
  Serial.print(mood);
  Serial.print(F(") | Light "));
  Serial.print(lightPct);
  Serial.print(F("% | Temp "));
  Serial.print(tempC, 1);
  Serial.print(F(" C | ["));
  for (uint8_t i = 0; i < 8; i++) Serial.print(i < (uint8_t)lit ? '#' : '.');
  Serial.println(F("]"));

  delay(500);
}

Related projects