Thirsty Flamingo Soil Moisture Detector

33,866

100

21

About: Circuito.io is an automatic web tool that will help you build almost any innovation you have ever dreamed of, by breaking technical barriers and giving you the best package to kickstart your project. Our In...

Moisture sensors are used in a variety of different projects. You can use them to test the moisture levels of different materials and even test the moisture levels in the walls of your home if you suspect they're damp. In the thirsty flamingo project, we're going to use a soil moisture sensor to monitor the humidity levels in our plants' environment. Every beginner gardener knows that it's not enough to water your plants, you also need to monitor the levels of moisture in the soil in order for your plants to stay healthy. The build we're about to show you is based on a soil moisture sensor that alerts you when the soil moisture in your plant dish changes.
https://www.youtube.com/watch?v=TBVYdHl1SKc&feature=youtu.be Note: in the video, you'll see an older version of circuito.io.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Electronics

The Electronics

We used two main components in this build - a soil moisture sensor and a Piezo speaker. The speaker starts playing a tune when the soil moisture levels reach below the pre-set threshold. After testing the circuit, we also made a custom PCB for it so that it would fit nicely into the 3D printed casing we designed.

Main Components:

Arduino Pro Mini 328 - 5V/16MHz9V

Alkaline BatterySparkFun

Soil Moisture Sensor

Piezo Speaker - PC Mount 12mm 2.048kHz


Secondary Components:

Transistor - NPN BC337 DiodeRectifier - 1A 50V

Resistor 1k Ohm 1/6 Watt PTH

Step 2: Wiring the Circuit

Click here for a detailed wiring guide.

Step 3: Code

Code

You can find the code for the project on our Github repo

After downloading the code, upload it to your Arduino using the Arduino IDE. Make sure to set the correct board and the correct port before you upload.

The main logic of the code uses the soilMoisture.read() function. If the soil moisture level reaches below 400 (or whichever value you decide to set), it triggers the piezoSpeaker to start playing a melody, in the case - piezoSpeakerHooray.

Step 4: Casing

We designed a flamingo-shaped casing for the soil moisture sensor circuit. You can go wild and design different shapes and sizes of casings according to your liking. There are two main parts to this design, and you can download and print them from Thingiverse .

Step 5: Putting It Together

After printing, you’ll need to place the circuit into the housing and screw together the using the screw holes in the design. Afterward, place the battery into place - and you're done! Let us know how everything goes. You’re welcome to share your experience with us in the comments below or on our community forum.

For the full tutorial visit our blog.

Enjoy Making!

Be the First to Share

    Recommendations

    • CNC Contest

      CNC Contest
    • Make it Move

      Make it Move
    • Teacher Contest

      Teacher Contest

    21 Discussions

    0
    None
    dhouts

    3 months ago

    Can anyone help me find the libraries? I cannot find the zip files. It says they were archives 5 years ago.

    0
    None
    Hillhomer

    8 months ago

    What code for the notes is used for the chirping sound as in the main video?
    A flamingo making the hooray sound just doesn't seem fit... :-D

    0
    None
    osterac

    11 months ago

    Very cool and surprisingly inexpensive design! In the materials list you call for a diode rectifier- this is not in your circuit diagram and circuito.io does not carry this. Is this a mistake? Is it either or? The schematic in the video seems different.

    0
    None
    AbbyS36

    1 year ago

    I have everything set up, but the code isnt working on my arduino uno. :(

    1 reply
    0
    None
    AdopteUnRoux

    2 years ago

    Great project !
    How long long do you expect the battery life to be ?

    1 reply
    0
    None
    Circuito ioAdopteUnRoux

    Reply 2 years ago

    It really depends on the battery you're using, but generally speaking, it will probably last a few weeks. You can also select a different power source on http://circuito.io :) Good luck!

    0
    None
    Per OleT

    2 years ago

    Hi

    Really nice project you got here, but it seems the piezo speaker functions has changed in the updated version from circuit.io. It means that the above change in the .ino-file not working. Other than that. Cool idea :)

    0
    None
    bluagd

    3 years ago

    Hi,

    i did the circuit as described, but is not working correctly. When I put the sensor on the soil, it starts to sound, even when the soil is totally wet.

    What may be wrong?

    Thanks

    1 reply
    0
    None
    eyakbluagd

    Reply 3 years ago

    Ooops!! You are so right! We have an error in our example, it should read: (A) instead of if(soilMoisture.read() > 400) use if(soilMoisture.read() < 600).
    (B) also: Serial.println("High moisture detected"); should be changed to: Serial.println("Low moisture detected"); We're sorryyy! and will fix the guide accordingly. Thanks for letting us know.

    0
    None
    bluagd

    3 years ago

    Hi,

    i did the circuit as described, but is not working correctly. When I put the sensor on the soil, it starts to sound, even when the soil is totally wet.

    What may be wrong?

    Thanks

    0
    None
    eyakmuhammet resule

    Reply 3 years ago

    The transistor amplifies the signal coming out of the Arduino, to get louder sounds from the speaker.
    The diode is a "fly-back" diode, meant to protect the circuit from reverse currents, but in most cases this diode will not be necessary with piezo speakers, but more important with regular (coil) speakers.

    0
    None
    WoonkyeongChoi

    3 years ago

    And I have one more question.

    Could you let me know why you chose those electronic elements but not others?

    0
    None
    WoonkyeongChoi

    3 years ago

    What is the size of that flamingo case?

    0
    None
    SudiartoHsu

    3 years ago

    this is great project, but i don't have a 3D printer.

    0
    None
    Akin Yildiz

    3 years ago

    great stuff.. building circuits and programming are getting easier each day. circuito.io is a great example of that, thank you for sharing.
    are you familiar with my work. all of our instruments are solder free and ready to program; https://www.instructables.com/id/the-Plant-Doctor-f...
    .
    you should instead use usb rechargable powerbanks.!!

    12246815_900302343379939_2890892495991398398_n.jpg
    0
    None
    payasonegro

    3 years ago

    great x 5 :)

    Could I do it with an UNO or UNO nano?

    (I am new with that)

    0
    None
    ArifSaeDorT2

    Reply 3 years ago

    A great case design, Thumbs up!