Introduction: Thirsty Flamingo

Picture of Thirsty Flamingo

The Thirsty Flamingo will help you monitor the moisture levels in you plants.

This project was built using our online schematics and code generator circuito.io

Step 1: Planning the Circuit

Picture of Planning the Circuit

Generate the up-to-date schematic & code for the Thirsty Flamingo project using Circuito.io (all relevant parts are predefined).

The electronic components we used for this project:

Input: SparkFun Soil Moisture Sensor

Output: Piezo Speaker - PC Mount 12mm 2.048kHz

Additionals (to output):
Transistor - NPN BC337 Diode

Rectifier - 1A 50V

Resistor 1k Ohm 1/6 Watt PTH

Controller: Arduino Pro Mini 328 - 5V/16MHz
Power Supply: 9V Alkaline Battery

Step 2: Assembling the Circuit

Picture of Assembling the Circuit

Using the schematics generated by our system, you can built the electric circuit.

Generate the up-to-date schematic & code for the Thirsty Flamingo project using Circuito.io (all relevant parts are predefined).

Step 3: Upload and Customize Code

Picture of Upload and Customize Code

Generate the up-to-date schematic & code for the Thirsty Flamingo project using Circuito.io (all relevant parts are predefined).

You can also make adjustments in the code if you want to change the moisture alert levels or the alert tone.

To make it tweet like a flamingo, please replace the code of the .ino file

with that:

#include "Global.h"
void setup() {
  Serial.begin(9600);
  Serial.println("start");
}

void loop() {
  //if the soil moisture level is low play chirps
  if (soilMoisture.read() < 600) {
  }
  Serial.println("low");

  for (int i = 0; i < 5; i++ ) {

    //makes the sound according to: intensity, varies: normally 5. number of times: how many times tweets, rormally 3-6
    highChirp(5, 2);
    delay(100);
    lowChirp(5, 2);
    delay(100);
    tweet(2, 2);

    //delay between the closer tweets delay(400); }

    //general delay after a series of tweets

    delay(random(10000));
  }

}

void highChirp(int intensity, int chirpsNumber) {
  int i; int x;

  for (int veces = 0; veces <= chirpsNumber; veces++) {

    for (i = 100; i > 0; i--) {
      for (x = 0; x < intensity; x++) {
        digitalWrite (PIEZOSPEAKER_PIN_SIG, HIGH);
        delayMicroseconds (i);
        digitalWrite (PIEZOSPEAKER_PIN_SIG, LOW);
        delayMicroseconds (i);
      }
    }
  }
}

void lowChirp(int intensity, int chirpsNumber) {
  int i; int x;

  for (int veces = 0; veces <= chirpsNumber; veces++) {

    for (i = 0; i < 200; i++) {
      digitalWrite (PIEZOSPEAKER_PIN_SIG, HIGH);
      delayMicroseconds(i);
      digitalWrite(PIEZOSPEAKER_PIN_SIG, LOW);
      delayMicroseconds(i);
    }

    for (i = 90; i > 80; i--) {
      for ( x = 0; x < 5; x++) {
        digitalWrite (PIEZOSPEAKER_PIN_SIG, HIGH);
        delayMicroseconds (i);
        digitalWrite (PIEZOSPEAKER_PIN_SIG, LOW);
        delayMicroseconds (i);
      }
    }
  }
}

void tweet(int intensity, int chirpsNumber) {

  int i; int x;

  //normal chirpsNumber 3, normal intensity 5

  for (int veces = 0; veces < chirpsNumber; veces++) {

    for (int i = 80; i > 0; i--) {
      for (int x = 0; x < intensity; x++) {
        digitalWrite (PIEZOSPEAKER_PIN_SIG, HIGH);
        delayMicroseconds (i);
        digitalWrite (PIEZOSPEAKER_PIN_SIG, LOW);
        delayMicroseconds (i);
      }
    }
  }

  delay(1000);

}

Step 4: 3D Printing

Picture of 3D Printing

3D print the Thirsty Flamingo's body using the STL files.

Step 5: Assembly - Putting All the Parts Together

Picture of Assembly - Putting All the Parts Together

Place the battery and the PCB into place, connect the two body parts with screws and you're done!

Put the Flamingo in your plant dish, and it will start beeping when the moisture levels are too low.

Step 6: Have an Idea of Your Own?

Picture of Have an Idea of Your Own?

If you want to create your own cool project, and need help with generating schematics or code, you are welcome to try out our system @ circuito.io

Comments

AdopteUnRoux (author)2017-02-04

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

Circuito io (author)AdopteUnRoux2017-03-05

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!

Per OleT (author)2017-01-23

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 :)

bluagd (author)2016-06-22

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

eyak (author)bluagd2016-06-26

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.

bluagd (author)2016-06-25

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

muhammet resule (author)2016-06-24

Transistor - NPN BC337 Diode

Rectifier - 1A 50V

why did we use these two items in the project.

eyak (author)muhammet resule2016-06-25

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.

WoonkyeongChoi (author)2016-03-29

And I have one more question.

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

WoonkyeongChoi (author)2016-03-28

What is the size of that flamingo case?

SudiartoHsu (author)2016-03-17

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

Akin Yildiz (author)2016-02-22

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.!!

payasonegro (author)2016-02-21

great x 5 :)

Could I do it with an UNO or UNO nano?

(I am new with that)

ThomasK19 (author)2016-02-21

This looks much better than those ugly sensors :-) Especially since you turned the latter into the flamingo's legs!

DorT2 (author)2016-02-21

Heating the printer ;)

ArifSae (author)DorT22016-02-21

A great case design, Thumbs up!

DIY Hacks and How Tos (author)2016-02-21

Fun garden monitor! I love the pink flamingo design.

About This Instructable

26,179views

94favorites

License:

Bio: 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 ... More »
Add instructable to: