Project showcase
Automated Mung Bean Sprouts Growing Machine

Automated Mung Bean Sprouts Growing Machine © Apache-2.0

Automated Mung Bean Sprouts growing machine.

  • 1,761 views
  • 1 comment
  • 7 respects

Components and supplies

A000066 iso both
Arduino UNO & Genuino UNO
×1
Relay (generic)
×1
12 VDC Power Supply (generic)
×2
barrel jack (generic)
×2
12002 04
Breadboard (generic)
×1
11026 02
Jumper wires (generic)
×1
12V mini water pump
×1
Tubing (generic)
×1

About this project

How to grow mung bean sprouts

1. Rinse over beans and soak for around a day (24 hours).

2. Place net in pot and spread beans on the net and then cover the pot with something to make inside dark.

3. Watering every 2 hours ==> Automate this step.

Pictures

http://coronasdk.tistory.com/910

http://coronasdk.tistory.com/911

Video

Code

Automated Mung Bean Sprouts Growing Machine CodeC/C++
Sketch Code
 Source Code


/*
* For Automated Mung Bean Sprouts growing machine
*
* Watering every 2 hours
* play music when watering
*
 * Relay pin 12
* speaker pin 8
*
 * created 22 Jan 2017
*
 *by Douglas Changsoo Park
*
 */
 
#include <SimpleTimer.h>
#include "pitches.h"
 
int relay = 12;
 
SimpleTimer timer;
 
int melody[] = {
  NOTE_G4,
  NOTE_G4,
  NOTE_A4,
  NOTE_A4,
  NOTE_G4,
  NOTE_G4,
  NOTE_E4,
  NOTE_G4,
  NOTE_G4,
  NOTE_E4,
  NOTE_E4,
  NOTE_D4,
  0,
  NOTE_G4,
  NOTE_G4,
  NOTE_A4,
  NOTE_A4,
  NOTE_G4,
  NOTE_G4,
  NOTE_E4,
  NOTE_G4,
  NOTE_E4,
  NOTE_D4,
  NOTE_E4,
  NOTE_C4,
  0 };
 
  int noteDurations[] = {
  1,1,1,1,
  1,1,2,
  1,1,1,1,
  3,1,
  1,1,1,1,
  1,1,2,
  1,1,1,1,
  3,1
  };
 
void setup() {
  // put your setup code here, to run once:
  pinMode(relay, OUTPUT);
 digitalWrite(relay, HIGH);
  timer.setInterval(7200000, watering);

}
 
void loop() {
  // put your main code here, to run repeatedly:
  timer.run();
}
 
void watering() {
  digitalWrite(relay, LOW);
  music();

  music();

  digitalWrite(relay, HIGH);
  noTone(8);
}
 
void music() {
  for(int thisNote = 0; thisNote < 26; thisNote++) {
      int noteDuration = 250 * noteDurations[thisNote];
      tone(8, melody[thisNote], noteDuration);
      int pauseBetweenNotes = noteDuration * 1.30;
      delay(pauseBetweenNotes);
      noTone(8);
  }
}
Updated Source CodeC/C++
Source code has been updated
/*
* For Automated Mung Bean Sprouts growing machine
*
* Watering every 2 hours
* play music when watering
*
 * Relay pin 12
* speaker pin 8
*
 * created 22 Jan 2017
 * 
 * updated 24 Jan 2017
 * -Added one more song (Butterfly)
 * -Randomly select a song (Schoolbell or Butterfly)
 * -watering every an hour from every 2 hours.
 * -increase watering time (Schoolbell - play 3 times, Butterfly - play 2 times)
*
 *by Douglas Changsoo Park
*
 */
 
#include <SimpleTimer.h>
#include "pitches.h"
 
int relay = 12;
int melodyPin = 8;
 
SimpleTimer timer;
 
int schoolbell_melody[] = {
  NOTE_G4,  NOTE_G4,  NOTE_A4,  NOTE_A4,  NOTE_G4,  NOTE_G4,  NOTE_E4,  NOTE_G4,  NOTE_G4,  NOTE_E4,  NOTE_E4,  NOTE_D4,  0,
  NOTE_G4,  NOTE_G4,  NOTE_A4,  NOTE_A4,  NOTE_G4,  NOTE_G4,  NOTE_E4,  NOTE_G4,  NOTE_E4,  NOTE_D4,  NOTE_E4,  NOTE_C4,  0 };
 
int schoolbell_noteDurations[] = {  1,1,1,1,  1,1,2,  1,1,1,1,  3,1,  1,1,1,1,  1,1,2,  1,1,1,1,  3,1  };

int butterfly_melody[] = {
  NOTE_G4,NOTE_E4,NOTE_E4,NOTE_F4,NOTE_D4,NOTE_D4,NOTE_C4,NOTE_D4,NOTE_E4,NOTE_F4,NOTE_G4,NOTE_G4,NOTE_G4,
  NOTE_G4,NOTE_E4,NOTE_E4,NOTE_E4,NOTE_F4,NOTE_D4,NOTE_D4,NOTE_C4,NOTE_E4,NOTE_G4,NOTE_G4,NOTE_E4,NOTE_E4,NOTE_E4,0,
  NOTE_D4,NOTE_D4,NOTE_D4,NOTE_D4,NOTE_D4,NOTE_E4,NOTE_F4,NOTE_E4,NOTE_E4,NOTE_E4,NOTE_E4,NOTE_E4,NOTE_F4,NOTE_G4,
  NOTE_G4,NOTE_E4,NOTE_E4,NOTE_F4,NOTE_D4,NOTE_D4,NOTE_C4,NOTE_E4,NOTE_G4,NOTE_G4,NOTE_E4,NOTE_E4,NOTE_E4,0
};

int butterflyNoteDurations[] = {
  1,1,2,1,1,2, 1,1,1,1,1,1,2,  1,1,1,1,1,1,2, 1,1,1,1,1,1,3,1,
  1,1,1,1,1,1,2,1,1,1,1,1,1,2,  1,1,2,1,1,2,1,1,1,1,1,1,3,1
};

void setup() {
  // put your setup code here, to run once:
  pinMode(relay, OUTPUT);
 digitalWrite(relay, HIGH);
  //timer.setInterval(7200000, watering);
  timer.setInterval(3600000, watering);
  //timer.setInterval(25000, watering); // Test Mode
}
 
void loop() {
  // put your main code here, to run repeatedly:
  timer.run();
}
 
void watering() {
  digitalWrite(relay, LOW);
  int song = random(1,3);
  if(song == 1) {
    music_schoolBell();
    music_schoolBell();
    music_schoolBell();
  } else {
    music_butterfly();
    music_butterfly();
  }
  digitalWrite(relay, HIGH);
  noTone(8);
}
 
void music_schoolBell() {
    int size = sizeof(schoolbell_melody) / sizeof(int);
  for(int thisNote = 0; thisNote < size; thisNote++) {
      int noteDuration = 250 * schoolbell_noteDurations[thisNote];
      tone(melodyPin, schoolbell_melody[thisNote], noteDuration);
      int pauseBetweenNotes = noteDuration * 1.30;
      delay(pauseBetweenNotes);
      noTone(melodyPin);
  }
}

void music_butterfly(){
  int size = sizeof(butterfly_melody) / sizeof(int);
  for (int thisNote = 0; thisNote < size; thisNote++) {
      int noteDuration = 250 * butterflyNoteDurations[thisNote];
      tone(melodyPin, butterfly_melody[thisNote], noteDuration);
      int pauseBetweenNotes = noteDuration * 1.30;
      delay(pauseBetweenNotes);
      noTone(melodyPin);
  }
}

Schematics

Circuit diagram
Circuit diagram
Screen shot 2017 01 22 at 12 vyrnksy0nx

Comments

Similar projects you might like

I Keep my Cucumber Growing Conditions Moist

Project showcase by Ingo Lohs

  • 2,916 views
  • 0 comments
  • 21 respects

Automated Plant Watering System

Project in progress by Ammar Shahid

  • 4,426 views
  • 2 comments
  • 23 respects

I Keep my Cucumber Growing Conditions Moist - Part 2

Project tutorial by Ingo Lohs

  • 2,198 views
  • 0 comments
  • 8 respects

Automated Night Light

Project showcase by Yash Nayak

  • 2,481 views
  • 0 comments
  • 13 respects

Bluetooth Control Multitap

Project showcase by 윤원호 and gledel

  • 1,466 views
  • 0 comments
  • 5 respects

The Hooray Machine

Project showcase by Dawn Dupriest and Brie Hen

  • 831 views
  • 1 comment
  • 5 respects
Add projectSign up / Login