Digispark Attiny 85 Moisture Sensor With Neopixel Indicator

by KarcsiS1 in Circuits > Arduino

648 Views, 2 Favorites, 0 Comments

Digispark Attiny 85 Moisture Sensor With Neopixel Indicator

IMG_5899.JPG
IMG_5901.JPG

The project was inspired by other instructables creations and my mom :)

Nobody used Digisparsk USB with Attiny 85 microcontroller.

My goal was to have use small space and simple design.

I dont think that we need to fully describe the capacitive moisture sensor working principes, therefore i will just put the

main informations together.



Supplies

addressable-rgb-led-sequin-5v-ws2812-neopixel-compatible.jpg
Capacitive-Soil-Moisture-Sensor-Module.jpg
434-1_s-l1600--5.jpg
  • 1x Digispark with Attiny 85 (ideal with USB)
  • 1x Capacitive moisture sensor
  • Cables
  • Arduino UNO
  • 1x neopixel by adafruit

Calibrate Your Sensor

IMG_5907.JPG
Képernyőkép – 2021-12-25 13-54-54.png

You need to calibrate your capacitive moisture sensor!

I used an Arduino UNO to obtain the sensor value via serial monitor.

You determine the dry and wet conditions. Ino in the attachment.

Analog pin 0 is used for the sensor

In my case:

dry = 617; // value for dry sensor

wet = 269; // value for wet sensor


Downloads

Build the Digispark Circuit

IMG_5901.JPG
attyny.jpg

The neopixel GND and 5V was soldered onto the moisture sensor GND and 5V input pins to have the optimal position.

The data cable for the moisture sensor is soldered to the P2 pin (analog read capable pin) on the Digispark microcontroller.

The data cable for the neopixel is soldered to the P0 pin (digital pin)

The power cable for the neopix and moisture sensor is soldered on the Digispark GND and 5V pins.

Attention:

  • You can use whenewer pin you want. You need to keep in mind, that P2 pin phisically on the board is analog 0 in the program
  • Serial monitor on Digispark will not work (or work hardly) I didnt used it.

If you are done with the setup, just ping your neopix to check the solder is fine. I attached the program.

Tweak the moisture attiny. ino program to fit your needs. sensorvalue + dry\wet conditions.

Upload, test with water and there you go :)

Some Tweek

  1. You can adjust the brightness by changing the neopix value 150 to 0 to 255  strip.setPixelColor(i, strip.Color(150, 0, 0));
  2. You can set up when you will to turn the green ligt to blinking red and show when you need to water your plant. (percentageHumididy <20); (percentageHumididy >20)




Have Fun :)