What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.
The simplest ATtiny85 soil-moisture project is best understood as a battery-powered “water me” alarm, not a calibrated moisture meter. A resistive probe feeds a comparator module, the ATtiny85 checks the module periodically, and an LED flashes when the soil crosses a user-set dryness threshold. The controller then sleeps between readings to conserve energy.
This design is inexpensive and effective for an indoor plant, but its reading is binary: soil is either above or below your chosen threshold. If you need a repeatable relative value or long-term installation, use the ATtiny85’s ADC with an analog or capacitive sensor and calibrate it for the specific soil and pot.
What the project actually measures
There are three different things people call a soil-moisture meter:
- Threshold alarm: tells you that the soil is drier than a chosen set point.
- Relative meter: reports a repeatable sensor value, often converted to an arbitrary 0–100 scale.
- Calibrated instrument: estimates volumetric water content using soil-specific calibration.
The original ATtiny85 design performs the first task. Its sensor module’s potentiometer sets the trip point, while the module’s digital output tells the microcontroller whether that point has been crossed. It does not measure or display a universal moisture percentage.
#1 Best Overall
- Accurate Soil Moisture Detection: The XLUX Soil Moisture Meter can tell you if the soil deep inside your pot or garden is dry, moist or wet; whereas your eyes and fingers can only determine the moisture level of the soil surface. The probe is 5.5 inches (14 cm) longer than regular styles, allowing it to measure the soil moisture at the bottom of larger and deeper flower pots.
- Easy-to-Read Large Dial: The large dial is easy to read and includes three zones with ten scales, making it very straightforward to understand.
- Immediate Moisture Reading: Insert the probe into the soil, and without waiting, the dial will immediately display the moisture level. You can then decide whether your plant needs watering based on the measurement. Do not leave this moisture meter in the soil for more than 5 minutes, as the metal tip will gradually corrode.
- Less Damage: A single probe causes less damage to plant roots compared to double or multiple probes, and when you remove the probe after testing, it won't bring out much soil.
- Usage Precautions: Do not use it to test very hard soil. Do not test water or other liquids. After testing, please wipe the probe clean.
The reference project is documented by Pollux Labs on Hackster. The circuit uses a 3 V coin cell, a soil-moisture module, an ATtiny85, and an LED. The device measures approximately every 30 minutes, flashes when the plant is judged too dry, and sleeps between measurements.
Parts and tools
Original parts
- ATtiny85
- 3.3 V coin-cell holder
- CR2032-style 3 V battery
- Resistive soil-moisture probe and comparator module
- LED
- 100 Ω LED resistor
- Jumper wires and a mini breadboard
- Arduino IDE
- Arduino Uno or equivalent AVR programmer
Recommended additions
- 100 nF decoupling capacitor close to the ATtiny85’s VCC and GND pins
- Socket or perfboard instead of a permanently stressed breadboard
- Power switch or removable battery holder
- Weather-resistant enclosure for anything outside
- Transistor or load-switch circuit if the sensor draws more current than a GPIO can safely provide
- A sensor whose electronics can be completely disconnected while the ATtiny85 sleeps
The ATtiny85 is an 8-bit AVR microcontroller with 8 KB of flash, 512 bytes of SRAM, 512 bytes of EEPROM, an ADC, low-power sleep modes, and a watchdog timer that can wake it from power-down sleep. Its documented supply range is approximately 1.8–5.5 V under the relevant operating conditions; confirm the exact device, clock speed, and fuse configuration before relying on a coin cell. See the ATtiny25/45/85 datasheet.
Wiring: separate physical pins from code pins
The most common build error is confusing the ATtiny85 package’s physical leg numbers with Arduino-style or AVR port-bit names. They are not interchangeable.
The published project describes these physical connections:
| ATtiny85 physical pin | Project function |
|---|---|
| 1 | VCC |
| 2 | Soil sensor digital-output connection |
| 3 | LED through the 100 Ω resistor |
| 4 | GND |
| 6 | Calibration input or jumper connection |
| 7 | Sensor VCC switched by the ATtiny85 |
| 8 | Battery positive |
Those labels should be checked against the exact schematic and the ATtiny core selected in the Arduino IDE. In the project code, names such as calibrationPin 1, sensorPin 2, sensorValuePin 3, and ledPin 4 refer to software pin identifiers associated with AVR port bits. They do not automatically mean physical legs 1, 2, 3, and 4.
Before applying power, identify the chip’s notch or dot, confirm VCC and GND from the datasheet, and make a two-column wiring list: one column for physical package pins and one for the Arduino-core pin names used by the sketch.
How the sensor module works
The inexpensive resistive module normally contains a conductive probe, a comparator, an adjustable potentiometer, and four connections: VCC, GND, AO, and DO.
- AO is an analog signal related to the probe’s measured resistance.
- DO is the comparator’s high/low output.
- The potentiometer sets the point at which the comparator changes state.
The original circuit uses DO because it only needs a yes/no decision. That keeps the firmware and wiring simple, but it also hides all information between “wet enough” and “too dry.” Two modules may not agree, and the reading can change with fertilizer, dissolved salts, temperature, probe placement, soil compaction, and corrosion.
Resistive probes are acceptable for a quick indoor prototype, but continuously energizing metal electrodes in damp soil accelerates electrochemical corrosion. The onboard comparator and indicator LED also consume power. A capacitive sensor generally suits permanent insertion better because it reduces the direct-electrode corrosion problem, although its coating, PCB, cable, and calibration can still fail.
Rank #2
- 【4 in 1 function】This is a 4-in-1 multifunctional soil tester.Our soil tester fastly to measure soil moisture, pH, temperature and sunlight to help you take better care of flowers and plants.You can know when you need to water your soil by measuring moisture and pH & Temperature value of the soil and sunlight level of plants with it.
- 【Large Screen & Backlight LCD Display】The Soil Tester uses a large LCD screen and white backlight to conveniently display and read digital parameter in day or dark.Use AAA1.5V * 4 batteries (not included),it will alert when the battery is low.
- 【Quick Accurate measurement】The latest probe detection technology in 2026 can quickly and accurately measure the pH, moisture and temperature in the soil,with the light intensity of the light sensor analysis on the instrument, it can allow you to know when to water, to control the pH and temperature acidity, and determine whether the plants have enough light to better cultivate the plants more scientifically.
- 【Easy to use】Just simply plug the probe into the soil about 4 inches(10cm) , wait 10 seconds to read intuitive data,and you will get an accurate and precise reading immediately.(This soil tester cannot be used directly to test any liquid. When measuring the soil, if the soil is too dry, do not insert it into dry and hard soil. Before testing, please water the soil test area and wait for 10 minutes, otherwise the testing machine will be damaged.)When testing soil pH and moisture, you need to read data from at least 5 locations in the soil. The average value of all the data will be the final soil pH and moisture.
- 【More convenient to read】The screen content adopts visual content design, which helps you read the data through specific values and easy to understand graphics, so that even novice growers can easily understand your soil conditions. The 45° rotating head design allows you to bend your head 0°-45°, allowing you to easily view the screen content without bending over.
Power switching and measurement cycle
The central battery-saving technique is to power the sensor only while taking a reading. Conceptually, the firmware does this:
digitalWrite(SENSOR_POWER, HIGH);
delay(100);
// Read the sensor output
digitalWrite(SENSOR_POWER, LOW);
The approximately 100 ms settling delay belongs to the original design; it is not a universal value. Some modules stabilize faster, while others need longer. Test the output after power-up and adjust the delay if necessary.
Recommended Free Tools
A GPIO can power a very low-current module only when the total current remains within the ATtiny85’s electrical limits. A transistor or dedicated load switch is safer for modules with a significant startup surge. Also make sure a sensor output cannot remain high while its VCC is off. Otherwise, current may flow backward through the ATtiny85’s input-protection diode and partially power the sensor. A series resistor, proper load switch, or defined isolation arrangement may be needed.
Watchdog sleep and the approximate 30-minute interval
The ATtiny85 can spend most of its time in power-down sleep. The watchdog timer wakes it periodically, allowing the firmware to measure the plant, update the LED, and return to sleep.
A typical sequence is:
- Configure the watchdog interval.
- Disable unused peripherals and turn off the LED.
- Remove power from the sensor.
- Enter power-down sleep.
- Wake on the watchdog interrupt.
- Power the sensor, wait for it to settle, and read the output.
- Handle the alarm and repeat.
The original sketch includes <avr/sleep.h> and <avr/wdt.h> and combines approximately 8-second watchdog periods to reach roughly 30 minutes. The watchdog oscillator is not a precision time source: its timing changes with voltage and temperature. Treat the interval as approximate, not as an exact schedule. The ATtiny85 datasheet documents watchdog wake-up from power-down mode and also describes ADC noise-reduction sleep for designs that need to keep the ADC active.
Firmware behavior
The alarm firmware should distinguish three jobs:
- Measurement: briefly power the sensor and read its output.
- Decision: determine whether the dry threshold has been crossed.
- Notification: flash the LED without wasting energy continuously.
The original behavior flashes repeatedly while the soil is judged too dry, turns the LED off when the soil is sufficiently moist, and uses short watchdog sleeps while the alarm is active. This is easy to understand, but a continuous flashing alarm can consume more energy than expected.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problemsA more battery-friendly alert is one short flash every few minutes, or a single flash after each scheduled measurement. A high-efficiency LED and a larger resistor can reduce current further, provided the indicator remains visible. A push button can provide an on-demand reading without keeping the LED active.
Calibrating the threshold
Calibration is plant-specific. The correct setting is not the same for every species, pot, potting mix, or watering routine.
- Insert the probe at the depth and location it will use normally.
- Keep the probe away from the pot wall and ensure the soil is in contact with the sensing area.
- Allow the soil around the probe to equilibrate; do not calibrate immediately after watering.
- Decide how dry the plant should be before watering.
- Adjust the module’s potentiometer until the LED changes at that condition.
- Remove the calibration jumper if the circuit uses one.
- Water the plant and confirm that the alarm stops.
- Allow the soil to dry and confirm that the alarm returns.
Repeat the procedure after changing the pot, soil, fertilizer, probe, or probe depth. The sensor measures its local environment, which may not represent the moisture around all of the plant’s roots.
Rank #3
- Kindly NOTE: This soil tester can not be applied to test pH value of any other liquid. If the soil is too dry the indicator will not move, and water it before testing.
- 3 METERS IN ONE: Soil moisture level, Soil pH value and Sunlight level could be tested easily according to your need by switching the function button of this soil meter.
- NO BATTERY NEEDED: Simply insert the meter into soil, wait few minutes, accurate test results will be displayed on the readout panel. No battery is needed.
- STURDY AND SCIENTIFIC DESIGN: Reliable materials and upgraded technology used for this soil meter make it advanced and high-quality for long-term use.
- MULTIPURPOSE SOIL TEST KIT: Portable and compact design enables you to use this soil meter for house garden, farm, lawn and any other soil & plant analysis. Ideal for indoor and outdoor use.
Preventing threshold chatter
Near the trip point, small changes can make the comparator alternate rapidly between states. Improve stability by requiring several consecutive dry readings, adding a short delay before changing alarm state, or implementing hysteresis:
- Use one threshold to enter the dry state.
- Use a separate, wetter threshold to leave the dry state.
With a digital module, hysteresis may need to be implemented in software through repeated readings and state confirmation because the module itself may provide only one adjustable trip point.
Programming the ATtiny85
An Arduino Uno can commonly be used as an ISP programmer, or you can use a dedicated USB AVR programmer. Select the correct ATtiny85 board definition and clock setting in the Arduino IDE, then set the fuses only after confirming the selected clock and supply voltage.
For a first test, program a minimal LED blink sketch before attaching the sensor. If the LED test fails, troubleshoot the programmer, chip orientation, VCC, GND, reset configuration, and clock selection before adding low-power code.
Common programming failures include:
- Using physical package numbers where the selected Arduino core expects PB-numbered pins.
- Choosing a clock setting that does not match the programmed fuses.
- Reversing the chip in the socket or breadboard.
- Leaving the programmer connected and accidentally measuring its quiescent current.
- Setting a brown-out threshold that is too high for the battery voltage under load.
Battery-life engineering
Do not promise a fixed runtime without measuring the finished circuit. Sleep current, sensor current, LED current, module leakage, battery chemistry, temperature, and the measurement interval all matter.
Free tools Windows power users keep installed
One-click scans. No signup required.
Use this estimate:
Average current =
(active current × active time + sleep current × sleep time)
÷ total cycle time
Battery life in hours ≈ usable battery capacity in mAh
÷ average current in mA
This is only an estimate. A CR2032 is compact, but its effective capacity falls when the load demands high pulses. An LED that flashes brightly, a sensor module with an indicator lamp, or a sensor that is not actually disconnected during sleep can dominate consumption.
Measure the current in both states with an appropriate meter or current-measurement setup:
- Measure the sleeping ATtiny85 with the sensor and LED off.
- Measure the active measurement burst.
- Measure the LED flash current and duration.
- Check for current through sensor output pins while sensor power is off.
- Remove the programmer and compare the finished circuit with the programmed prototype.
Analog upgrade: use AO and the ATtiny85 ADC
If you want trends or a relative moisture value, connect the sensor module’s AO output to an ATtiny85 ADC input instead of relying only on DO. A practical routine powers the sensor briefly, waits for settling, takes multiple samples, averages them, and then turns the sensor off:
uint16_t readMoisture() {
digitalWrite(SENSOR_POWER, HIGH);
delay(100);
uint32_t total = 0;
for (byte i = 0; i < 8; i++) {
total += analogRead(SENSOR_ANALOG);
delay(2);
}
digitalWrite(SENSOR_POWER, LOW);
return total / 8;
}
Multiple readings reduce random variation, but averaging does not create an accurate universal moisture percentage. Soil texture, compaction, salt content, temperature, supply voltage, probe placement, and sensor-to-sensor variation all affect the result.
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchPC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Rank #4
- Accurate Soil Moisture Detection: The XLUX Soil Moisture Meter can tell you if the soil deep inside your pot or garden is dry, moist or wet; whereas your eyes and fingers can only determine the moisture level of the soil surface. The probe is 5.5 inches (14 cm) longer than regular styles, allowing it to measure the soil moisture at the bottom of larger and deeper flower pots.
- Easy-to-Read Large Dial: The large dial is easy to read and includes three zones with ten scales, making it very straightforward to understand.
- Immediate Moisture Reading: Insert the probe into the soil, and without waiting, the dial will immediately display the moisture level. You can then decide whether your plant needs watering based on the measurement. Do not leave this moisture meter in the soil for more than 5 minutes, as the metal tip will gradually corrode.
- Less Damage: A single probe causes less damage to plant roots compared to double or multiple probes, and when you remove the probe after testing, it won't bring out much soil.
- Usage Precautions: Do not use it to test very hard soil. Do not test water or other liquids. After testing, please wipe the probe clean.
For a useful relative scale, record readings from the actual sensor in the actual soil at two or more known watering conditions. Keep the probe depth fixed, and label the resulting values as a local scale rather than claiming that they represent volumetric water content. Recent research on inexpensive capacitive sensors found different calibration relationships for different sensors in loamy sand, with reported coefficients of determination of approximately 0.85–0.92. That variation is a reason to calibrate the individual sensor and soil rather than apply a generic ADC-to-percentage formula. See the 2026 Sensors study.
Troubleshooting
The LED never lights
Check LED polarity, the resistor connection, the physical pin number, the selected Arduino pin mapping, battery polarity, and the ATtiny85’s VCC and GND. Test the LED with a simple blink program before testing the sensor.
The alarm is always active
Check whether the comparator output is active-low rather than active-high, whether the potentiometer is adjusted correctly, whether the probe is fully inserted, and whether the sensor is settling before the reading. Confirm that the sensor receives power during the measurement.
The reading changes unpredictably
Look for air gaps around the probe, inconsistent insertion depth, fertilizer or salt buildup, contact with the pot wall, a floating input, inadequate decoupling, or insufficient sensor warm-up. Add repeated readings and software hysteresis.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Clear out junk files and repair common Windows errorsFree Scan →The battery drains quickly
Measure sleep current. Check for an always-on module LED, sensor back-powering, excessive LED current, a programmer left attached, floating inputs, breadboard leakage, or a watchdog routine that never actually reaches power-down sleep.
The watchdog timing is wrong
This is normal to some extent. The watchdog oscillator is not a real-time clock. If accurate scheduling matters, use a low-power RTC or a microcontroller with a more suitable timing peripheral.
Indoor prototype versus outdoor installation
A mini breadboard beside a houseplant is suitable for demonstration and calibration. It is not a weatherproof garden sensor. Outdoor deployment needs a protected enclosure, sealed cable entry, strain relief, condensation protection, replaceable battery access, and a sensor designed for continuous insertion.
Use perfboard or a PCB for the final circuit. Keep the decoupling capacitor close to the ATtiny85, protect exposed connections, and avoid placing the electronics where irrigation water can collect. A resistive probe is a poor long-term outdoor choice because corrosion and changing soil conductivity can move the threshold over time.
Which design should you choose?
| Choice | Best for | Main limitation |
|---|---|---|
| Resistive probe with DO | Quick indoor water/don’t-water alarm | Corrosion, binary output, recalibration |
| Analog capacitive sensor | Permanent insertion and relative trends | Still needs soil- and sensor-specific calibration |
| ESP32 or LoRa node | Remote alerts, logging, and multiple sensors | Higher complexity and peak-current demands |
| Commercial Bluetooth meter | Phone readings and an enclosed product | App, battery, availability, and ecosystem dependence |
| Professional irrigation sensor | Managed landscapes and multi-parameter monitoring | Excessive cost and complexity for one houseplant |
An ESP32-based design makes sense when you need wireless notifications or cloud logging, but it requires more power-management and enclosure work. A Bluetooth product is more convenient if you want phone-based readings rather than open firmware. Professional systems such as Rain Bird’s Integrated Sensor System belong to a different class of managed-landscape equipment.
Final verdict
The ATtiny85 is an excellent controller for a small, low-power plant-watering reminder. The original resistive, digital-output circuit is cheap, understandable, and adequate for a single indoor plant when calibrated carefully. Its limitations are equally important: it is a threshold alarm, not a universal moisture meter; watchdog timing is approximate; coin-cell life must be calculated and measured; and a breadboard is not an outdoor enclosure.
For a longer-lived or more informative build, switch the sensor only during measurements, use an analog output, average several readings, add software hysteresis, and calibrate the individual sensor in the actual soil and pot. That preserves the ATtiny85’s low-power simplicity while making the result more useful and more honest.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →


Leave a Reply