Project tutorial
Rory the Robot Plant

Rory the Robot Plant © GPL3+

A funny looking robot in the form of a plant, that interacts with some sensors inputs, talks, plays music and detects human movement.

  • 5,433 views
  • 2 comments
  • 30 respects

Components and supplies

Apps and online services

About this project

Rory is a funny looking robot in the form of a plant, which interacts with some inputs by sensors, plays music and detects any surrounding human movement. In addition, it can snap photos when you order it to.

It's also caring about a small plant inside the pot, notify me with water level, humidity and temperature vocally in a human voice.

Step 1: Getting Ready With Your WAV Audio Files

For playing sounds from SD Card using Arduino, we need audio files in.wav format because Arduino Board can play an audio file in a specific format that is wav format. To make an Arduino mp3 player, there are a lot of mp3 shields are available which you can use with Arduino. Or else to play mp3 files in Arduino, there are websites which you can be used to convert any audio file on your computer into that specific WAV file.

Arduino SD card module

+5V Vcc

Gnd Gnd

Pin 12 MISO (Master In Slave out)

Pin 11 MOSI (Master Out Slave In)

Pin 13 SCK (Synchronous Clock)

Pin 4 CS (Chip Select)

1. Click on “ Online Wav Converter” to enter into the website.

2. Arduino can play a WAV file in the following format. You can toy around with the settings later, but these settings were the experiment to be the best in quality.

Bit Resolution 8 Bit

Sampling Rate 16000 Hz

Audio Channel Mono

PCM format PCM unsigned 8-bit

3. In the website click on “choose file” and select the file, you want to convert. Then feed in the above settings. Once done it should look something like this in the below image

4. Now, click on “Convert File” and your Audio file will be converted to the WAV file format. It will also be downloaded once the conversion is done.

5. Finally, format your SD card and save your.wav audio file into it. Make sure you format it before you add this file. Also, remember the name of your audio file. Similarly, you can select any of your four audios and save them with names 1, 2, 3 and 4(Names should not be changed). I have converted about 51 voice messages and have saved a sample in the link below:

https://github.com/AhmedAzouz/AdruinoProjects/blob/master/a-hi-thereim-rory-madeby1551946892.wav

6. Sample Code

 #include SimpleSDAudio.h
void setup() {
SdPlay.setSDCSPin(4); // sd card cs pin
if (!SdPlay.init(SSDA_MODE_FULLRATE | SSDA_MODE_MONO | SSDA_MODE_AUTOWORKER))
{ while(1); }
if(!SdPlay.setFile("music.wav")) // music name file
{ 
 while(1);
}
}
void loop(void)
{
SdPlay.play(); // play music
while(!SdPlay.isStopped())
{ ;
}
}

Step 2: Get Ready With Multi Sensors

Moisture sensor:

You’ll use an HL-69 moisture sensor, readily available online for a few dollars. The prongs of the sensor detect the moisture level in the surrounding soil by passing current through the soil and measuring the resistance. Damp soil conducts electricity easily, so it provides lower resistance, while dry soil conducts poorly and has a higher resistance.

The sensor consists of two parts

1. Two pins on the sensor need to connect to the two separate pins on the controller (connecting wires are usually supplied).

2. The other side of the controller has four pins, three of which connect to the Arduino.

·VCC: For power

·A0: Analog output

·D0: Digital output

·GND: Ground

DHT11 Temperature & Humidity:

DHT11 Temperature & Humidity Sensor features a temperature & humidity sensor complex with a calibrated digital signal output. By using the exclusive digital-signal-acquisition technique and temperature & humidity-sensing technology, it ensures high reliability and excellent long-term stability. This sensor includes a resistive-type humidity measurement component and an NTC temperature measurement component, and connects to a high-performance 8-bit microcontroller, offering excellent quality, fast response, anti-interference ability, and cost-effectiveness.

LDR light dependent resistor:

The LDR is a special type of resistor that allows higher voltages to pass through it (low resistance) whenever there is a high intensity of light, and passes a low voltage (high resistance) whenever it is dark. We can take advantage of this LDR property and use it in our DIY Arduino LDR sensor project.

KY-038 Sound Sensor:

Sound sensors can be used for a variety of things, one of them could be turning lights off and on by clapping. Today however we are going to use hook up the sound sensor to an array of LED lights which will beat with music, clapping or knocking.

PIR Sensor:

Passive infrared sensor is an electronic sensor that measures infrared (IR) light radiating from objects in its field of view. They are most often used in PIR-based motion detectors.

All objects with a temperature above absolute zero emit heat energy in the form of radiation. Usually, this radiation isn't visible to the human eye because it radiates at infrared wavelengths, but it can be detected by electronic devices designed for such a purpose.

Step 3: Hacked Webcam

The entire project is controlled by windows application that helps receive messages and notifications, as well as the ability to receive photos through the webcam and store it.

Code

Sample CodeArduino
#include "SD.h"
#define SD_ChipSelectPin 4
#include "TMRpcm.h"
#include "SPI.h"

char mychar;

/***************** PIR SENSOR *****************/
int led = 3;                // the pin that the LED is atteched to
int sensor = 2;              // the pin that the sensor is atteched to

/***************** Sound SENSOR *****************/
int SoundSensor = A0;
int clap = 0;
long detection_range_start = 0;
long detection_range = 0;
boolean status_lights = false;

TMRpcm tmrpcm;

void setup(){
    tmrpcm.speakerPin = 9;
    Serial.begin(9600);
    if (!SD.begin(SD_ChipSelectPin)) {
    Serial.println("SD fail");
    return;
    }

    tmrpcm.setVolume(5);

  ////////////////////////////
    pinMode(led, OUTPUT);      // initalize LED as an output
    pinMode(sensor, INPUT);    // initialize sensor as an input
    pinMode(SoundSensor, INPUT);
  ////////////////////////////

}
void blinke(int x)
    {
      for (int i = 0; i <= x; i++) {
        digitalWrite(led, HIGH);
        delay(120);
        digitalWrite(led, LOW);
        delay(120);
    }
  }
  
void Tone(){
tmrpcm.play("13.wav");
blinke(5); 
}

void loop(){

   if(Serial.available()){   
    mychar = Serial.read();

  if(mychar == 'a'){ 
      tmrpcm.play("1.wav");
      Serial.println("play wav.");
      
    }else if(mychar == 'b'){ 
      tmrpcm.play("2.wav"); 
    }
    else if(mychar == 'c'){ 
      tmrpcm.play("3.wav");
   }
   else if(mychar == 'd'){ 
      tmrpcm.play("4.wav");
blinke(4);
   }

////////////////////////////
int sensorValue = digitalRead(sensor);
  if (sensorValue == 1) {
    //Serial.println("human");
  }
////////////////////////////
int status_sensor = digitalRead(SoundSensor);
if (status_sensor == 0)
{
if (clap == 0)
{
detection_range_start = detection_range = millis();
clap++;
}
else if (clap > 0 && millis()-detection_range >= 50)
{
detection_range = millis();
clap++;
}
}
if (millis()-detection_range_start >= 400)
{
if (clap == 2)
{
if (!status_lights)
{
status_lights = true;
Tone();
}
else if (status_lights)
{
status_lights = false;
Tone2();
}
}
clap = 0;
}
////////////////////////////
}

Schematics

Schema
Rory c bb zrsaoge8ql

Comments

Similar projects you might like

MeArm Robot Arm - Your Robot - V1.0

Project tutorial by Benjamin Gray

  • 21,603 views
  • 4 comments
  • 42 respects

Farmaid: Plant Disease Detection Robot

by Teamato

  • 8,705 views
  • 12 comments
  • 67 respects

Windows 10 IoT Plant Monitoring System

Project tutorial by Team BME-AUT

  • 11,656 views
  • 4 comments
  • 55 respects

Control your Human-Like Robot from Anywhere you Are!

Project showcase by assemblypro

  • 3,476 views
  • 1 comment
  • 16 respects

Arduino Bluetooth Robot for Android Device

Project showcase by aip06

  • 2,601 views
  • 1 comment
  • 11 respects

ECOPlant - Plant Monitoring

Project in progress by PohWL

  • 2,240 views
  • 1 comment
  • 21 respects
Add projectSign up / Login