New Project

CONNECT

Talking Robot Artificial Intelligence Based With Arduino

  • Page Views 1401
  • Spread the love
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  

    ‘Make your own robot’ project will do our talking robot with artificial intelligence-based Arduino in this section.Than in our previous project we made our robot we checked into the phone’s voice command.This project that we develop our robot, in the same way again, we’ll send voice answer the phone and give us a voice.This way, your robot will speak to you.You can also educational robot for kids.
    For example, integrated robot that detects whether color can color an educational robot for kids, saying it out loud.

    Materials:

    • The Arduino Mega
    • Hc-06 Bluetooth Module
    • L293b Motor Driver
    • servo-motor
    • HC-SR04 Ultrasonic Sensor
    • speakerphone
    • Wtv-020 MP3 module
    • SD card
    • battery

    You can get our robot kits for part of the chassis or toy robot can use the chassis and engine of the car.In addition to our practice here we will make our voice commands to control the robot project, we add the voice answering feature.For example, we go forward in response to our robot ‘going forward’ he could say the name or the answer we say ‘my name robie to’ could say.You can download the audio file you want to modify that answer.

    Electronic circuit diagram:

     

    Wtv020 SD card reader module supports the mevcut.modül AD4 file format.Before making the file extension .wav audio files then turn the AD4 format.

    Software Part:

    // Arduino Artificial Intelligence Based Talking Robot By Robimek
    //Software developer By Sezgin Gül
    //www.robimek.com
    #include <Servo.h>
    #include <NewPing.h>
    #include <Wtv020sd16p.h>
    int resetPin = 13; 
    int clockPin = 11;
    int dataPin = 12; 
    int busyPin = 10; 
    Wtv020sd16p wtv020sd16p(resetPin,clockPin,dataPin,busyPin);
    String voice;
    //motor pinleri
    #define SolMotorileri 6
    #define SolMotorGeri 5
    #define SagMotorileri 8
    #define SagMotorGeri 9
    #define led 53
    #define ledmavi 51
    #define ledyesil 49
    #define ledkirmizi 45
    #define ledvcc 47
    #define tx 1
    #define rx 0
    //sensör pinleri
    #define USTrigger 3
    #define USEcho 2
    #define Maksimum_uzaklik 100
     
     
    Servo servo; //servo motor tanımlama
    NewPing sonar(USTrigger, USEcho, Maksimum_uzaklik);//ultrasonik sensör tanımlama
    //kullanılacak eleman tanımı
    unsigned int uzaklik;
    unsigned int on_uzaklik;
    unsigned int sol_uzaklik;
    unsigned int sag_uzaklik;
    unsigned int zaman;
    // program ilk çalıştığında sadece bir kez çalışacak programlar
    void setup() 
    {
    Serial.begin(9600); //iletişim ayarı
    //motor çıkışları
     pinMode(SolMotorileri, OUTPUT);
     pinMode(SolMotorGeri, OUTPUT);
     pinMode(SagMotorileri, OUTPUT);
     pinMode(SagMotorGeri, OUTPUT);
     pinMode(led, OUTPUT);
     pinMode(ledkirmizi, OUTPUT);
     pinMode(ledmavi, OUTPUT);
     pinMode(ledyesil, OUTPUT);
     pinMode(ledvcc, OUTPUT);
     
     servo.attach(4); //servo pin tanımı 
     wtv020sd16p.reset();
     wtv020sd16p.playVoice(0);
     wtv020sd16p.playVoice(13);
     delay(10000);
     wtv020sd16p.playVoice(14); 
     
     
    }
    // sonsuz döngü
    void loop() {
     
     while (Serial.available()){ //Okumak için kullanılabilir bayt olup olmadığını kontrol et
     delay(10); //10 milisaniye bekle
     char c = Serial.read(); //Seri okuma
     if (c == '#') {break;} // # tespit edildiğinde döngüden çık
     voice += c; //Ses = ses + c Steno 
     }
     
     if (voice.length() > 0) {
     Serial.println(voice); 
     
     if(voice == "*ileri"||voice == "*ileri git") 
     {wtv020sd16p.playVoice(3);
     ileri();} 
     else if(voice == "*geri"||voice == "*geri gel")
     {wtv020sd16p.playVoice(2);
     geri();}
     else if(voice == "*sağa dön"||voice == "*sağ") 
     {wtv020sd16p.playVoice(7);
     sag();} 
     else if(voice == "*sola dön"||voice == "*sol") 
     {wtv020sd16p.playVoice(1);
     sol();}
     else if(voice == "*dur"||voice == "*arabayı durdur") 
     {dur();
     wtv020sd16p.playVoice(11);}
     else if(voice == "*sol ileri")
     {sol(); 
     delay(100); 
     ileri();}
     else if(voice == "*sağ ileri")
     {sag(); 
     delay(100); 
     ileri();}
     else if(voice == "*sol geri")
     {sol(); 
     delay(100);
     geri();}
     else if(voice == "*sag geri")
     {sag(); 
     delay(100); 
     geri();}
     else if(voice == "*ileri git dur"||voice == "*biraz ileri git") 
     {ileri(); 
     delay(1000); 
     dur();} 
     else if(voice == "*geri gel dur"||voice == "*biraz geri gel") 
     {geri();
     delay(1000); 
     dur();}
     else if(voice == "*sola dön dur"||voice == "*biraz sola dön") 
     {sol(); 
     delay(300);
     dur();}
     else if(voice == "*sağa dön dur"||voice == "*biraz sağa dön") 
     {sag();
     delay(300);
     dur();}
     else if(voice == "*sola bak"||voice == "*soluna bak") 
     {wtv020sd16p.playVoice(8);
     solabak();}
     else if(voice == "*sağa bak"||voice == "*sağına bak"||voice == "*sabah") 
     {wtv020sd16p.playVoice(6);
     sagabak();}
     else if(voice == "*önüne bak"||voice == "*öne bak") 
     {wtv020sd16p.playVoice(5);
     onunebak();}
     else if(voice == "*ışığı aç"||voice == "*ledi yak")
     {wtv020sd16p.playVoice(4);
     ledyak();}
     else if(voice == "*ışığı kapat"||voice == "*ledi söndür") 
     {digitalWrite(51,HIGH);
     digitalWrite(49,HIGH); 
     digitalWrite(45,HIGH); 
     digitalWrite(47,LOW);}
     else if(voice == "*kırmızı") 
     {digitalWrite(45,LOW);
     digitalWrite(49,HIGH);
     digitalWrite(51,HIGH);
     digitalWrite(47,HIGH);}
     else if(voice == "*yeşil") 
     {digitalWrite(49,LOW);
     digitalWrite(45,HIGH);
     digitalWrite(51,HIGH);
     digitalWrite(47,HIGH); }
     else if(voice == "*mavi")
     {wtv020sd16p.playVoice(4);
     digitalWrite(51,LOW);
     digitalWrite(49,HIGH);
     digitalWrite(45,HIGH);
     digitalWrite(47,HIGH);}
     else if(voice == "*mor") 
     {digitalWrite(51,LOW); 
     digitalWrite(49,HIGH); 
     digitalWrite(45,LOW);
     digitalWrite(47,HIGH);}
     else if(voice == "*beyaz") 
     {digitalWrite(51,LOW); 
     digitalWrite(49,LOW); 
     digitalWrite(45,LOW);
     digitalWrite(47,HIGH);}
     else if(voice == "*engel"||voice == "*engel algıla")
     {wtv020sd16p.playVoice(0);
     engel();
     delay(5000);
     dur();}
     else if(voice == "*merhaba")
     { wtv020sd16p.playVoice(9);}
     else if((voice == "*müziği kapat")||(voice == "*kapat"))
     { wtv020sd16p.reset();
     wtv020sd16p.stopVoice();} 
     else if((voice == "*müziği aç")||(voice == "*şarkı söyle")||(voice == "*muzik"))
     { wtv020sd16p.playVoice(12);} 
     voice="";
     }
     }
     
     
    // robotun yön komutları
    void ileri() 
    {
     digitalWrite(SolMotorGeri, LOW);
     digitalWrite(SolMotorileri, HIGH);
     digitalWrite(SagMotorGeri, LOW);
     digitalWrite(SagMotorileri, HIGH);
    }
     
    void geri() 
    {
     digitalWrite(SolMotorileri, LOW);
     digitalWrite(SolMotorGeri, HIGH);
     digitalWrite(SagMotorileri, LOW);
     digitalWrite(SagMotorGeri, HIGH);
    }
     
    void sag() 
    {
     digitalWrite(SolMotorileri, HIGH);
     digitalWrite(SolMotorGeri, LOW);
     digitalWrite(SagMotorGeri, HIGH);
     digitalWrite(SagMotorileri, LOW);
     }
     
    void sol() 
    {
     digitalWrite(SolMotorGeri, HIGH);
     digitalWrite(SolMotorileri, LOW);
     digitalWrite(SagMotorileri, HIGH);
     digitalWrite(SagMotorGeri, LOW);
    }
     
    void dur() 
    {
     digitalWrite(SolMotorGeri, LOW);
     digitalWrite(SolMotorileri, LOW);
     digitalWrite(SagMotorileri, LOW);
     digitalWrite(SagMotorGeri, LOW);
    }
    void sagabak()
    {
     servo.write(0);
     delay(100);
    }
    void solabak()
    {
     servo.write(180);
     delay(100);
    }
    void onunebak()
    {
     servo.write(90);
     delay(100);
    }
    void ledyak()
    {
     digitalWrite(53,HIGH);
     }
    void ledkapat()
    {
     digitalWrite(53,LOW);
     }
    // sensörün mesafe ölçümü
    void sensor_olcum() 
    {
     delay(50); 
     zaman = sonar.ping(); 
     uzaklik = zaman / US_ROUNDTRIP_CM;
    }
    void engel()
    {
     delay(500);
     servo.write(90); 
     sensor_olcum(); 
     on_uzaklik = uzaklik; 
     if(on_uzaklik > 35 || on_uzaklik == 0) 
     {
     ileri(); 
     } 
     else
     {
     dur(); 
     servo.write(180); 
     delay(500); 
     sensor_olcum(); 
     sol_uzaklik = uzaklik; 
     servo.write(0); 
     delay(500); 
     sensor_olcum(); 
     sag_uzaklik = uzaklik;
     servo.write(90);
     delay(500); 
     if(sag_uzaklik < sol_uzaklik) 
     {
     sol(); 
     delay(500);
     ileri(); 
     }
     else if(sol_uzaklik < sag_uzaklik) 
     {
     sag(); 
     delay(500);
     ileri(); 
     }
     else
     {
     geri(); 
     } 
     }
     }

    The names of audio files must be in the form of numbers.The name of each file in the example software are numbered.

    I’ll be posting a video of the project’s work in the coming days.

    Share

    What did they say ?

    2 Comment - "Talking Robot Artificial Intelligence Based With Arduino"

    avatar
    Sort:   The Newests | Ancients | Likes
    Manu George
    Visitor
    Manu George

    Can you please attach the making video of the project TALKING ROBOT ARTIFICIAL INTELLIGENCE BASED WITH ARDUINO to my email id

    wpDiscuz

    BE A FACEBOOK FAN

    Instagram