Skip to main content

Make a Smart Humanoid Talking Robot- MOFIZA.

This Robot - Mofiza- (weird name) Can SEE, TALK and REACT to her surroundings. Before I proceed watch the video:
Ever since I've seen making talking robots I saw that people actually use other development boards rather than Arduino to make talking robots. But it's completely possible to make a Humanoid robot with Arduino who can talk and add a lot of servos to make it move. So lets begin:

Step 1: Parts You'll Need

  • Arduino Pro mini (5v 16 Mhz) [any board is good but i've used this to make it small)
  • Female header pins for connecting on pcb
  • Male header pins
  • Vero Board to make the circuit
  • Sd card TF module (to make it talk)
  • micro sd card (not more than 2GB)
  • 3x IR proximity sensor
  • 3x servo motor (I've used micro servo sg90)
  • Cardboard to make the body

Step 2: Connecting IR Sensor and the Body

Make a body with anything you want, I've made it by cardboard. It's pretty simple.
I've soldered IR sensors with ribbon cable just like this with a female header on one end and added two in two eyes and one in the chest.
The robot will say the welcome message if it detects anything in the chest sensor and will say "aaaah.. dont touch my eye" if any eyes sensor is high. and the servo in that are will move up.

Step 3: The Circuit

The circuit looks a bit complicated but no its all too easy, you can just power it up by one battery. solder the circuit and all other components in a vero board and add other servo on head and hands.

Step 4: Code

Before the codes:
I had to use two libraries forthis robot.
TMRpcm.h - for playing audio from SD card- talk https://github.com/TMRh20/TMRpcm
ServoTimer2.h - avoid conflict with TMRpcm and run Servo motors using timer2 as TMRpcm uses Timer1 on arduino. https://create.arduino.cc/projecthub/ashraf_minhaj/how-to-use-servotimer2-library-simple-explain-servo-sweep-512fd9?ref=user&ref_id=507819&offset=1
This is the code for saying welcome. You can make your own environment and code. Before you get to code you'll have to add the ServoTimer2 library. Nor the robot wont run.
And then up The code:
/*MOFIZA Humanoid Smart Arduino Robot By Ashraf Minhaj ashraf_minhaj@yahoo.com
https://ashrafminhajfb.blogspot.com
http://youtube.com/c/fusebatti */
#include "ServoTimer2.h" //declare ServoTimer2 library to run servo with TMRpcm
#include"SD.h" //declare SD library for SD cards
#define SD_ChipSelectPin 10 //select sd chip select pin 10
#include"TMRpcm.h" //library to play audio from sd card by arduino
#include"SPI.h" //create Serial peripheral Interface Communication
TMRpcm tmrpcm; //name tmrpcm
ServoTimer2 head; //declare Head servo followed by left right hand servos
ServoTimer2 lhand;
ServoTimer2 rhand;
int in1= 6; //declare Infrared sensor pins
int in2= 7;
int in3= 8;
void setup()
{
head.attach(2); //attach servos to pins
lhand.attach(3);
rhand.attach(4);
tmrpcm.speakerPin=9; //Speaker pin 9,audio out pin is 9
Serial.begin(9600); //initialize Serial communication
if(!SD.begin(SD_ChipSelectPin)) //this runs until SD is connected
{
Serial.println("SD FAIL");
return;
}
}
void loop()
{
if(!(digitalRead(in3))) //Chest sensor is low- Say "Hi there.."
{
tmrpcm.play("welcome.wav"); //Playing audio saved as 'welcome.wav'
lhand.write(2500); //hand up- saying HI
delay(2000);
lhand.write(1200); //hand comes to handshake position
delay(9000);
}
if(!(digitalRead(in1))) //Sensor on eye gets low play audio -"dont touch my eye"
{
tmrpcm.play("dont.wav"); //play file saved as "dont.wav" - dont touch my eye
rhand.write(300); //hand up
head.write(2000);
delay(3000);
}
if(!(digitalRead(in2))) //Sensor on eye gets low play audio -"dont touch my eye"
{
tmrpcm.play("dont.wav");
lhand.write(2000);
head.write(1000);
delay(3000);
}
else //No input detected - keep the robot steady.
{
lhand.write(300);
rhand.write(1700);
head.write(1500);
}
}

Step 5: Finish

Now just power it up and your'e done. A smart robot is done making. [I'll upload other pictures and details soon]

If I could get more pins I'd make the robot walk. but I had just 3 pins remaining (digital). It's less than I need.
However,I'll make a new version of this robot. Till then stay tuned.

Comments

  1. Please tell me how and where to write the welcome message?

    ReplyDelete
    Replies
    1. The welcome message is actually a wav file. audio file converted for the tmrpcm library. Everything Mofiza talks is pre recorded audio file, in 8 bit rate, audio channel mono etc.

      Delete
  2. I want to know where to write the welcome wave

    ReplyDelete
    Replies
    1. I don't understand your question, can you specify?

      Delete
    2. Can you tell me how to pre record the audio in sd card

      Delete
    3. I just used my phone to record and converted them as .wav file (tmrpcm format too) online.

      Delete
  3. Please tell me which voltage regulator you have used?
    And also tell me how to pre record my welcome message in SD card

    ReplyDelete
    Replies
    1. LM7805 voltage regulator IC. And I recorded some Audio using an app (text to speech and save) after that converted them into wav file online via an online mp3 to wav converter.

      Delete
  4. This comment has been removed by a blog administrator.

    ReplyDelete
  5. how can I use ultrasonic sensor instead of IR? is it possible? thanks in advance

    ReplyDelete
  6. Bro i want to make a talking robot if we ask anything to him he can reply like Google assistant

    ReplyDelete
    Replies
    1. You can see and make this basic robot :. https://youtu.be/I46JJYlR0Lg
      then use NLP to make such an assistant robot. I'll soon make a tutorial on how to make one.

      Delete
  7. This comment has been removed by the author.

    ReplyDelete
  8. bro how can install a intelligent taking robot sd card

    ReplyDelete
    Replies
    1. Yes you can. But for rather intelligent robot you should use Raspberry Pi.

      Delete
    2. can I use raspberry pi zero

      Delete
  9. how to install intelligent robot sd card

    ReplyDelete
    Replies
    1. Raspberry pi would be the best choice for that

      Delete
    2. how can i connect arduino pro mini with raspberry pi

      Delete
    3. See this robot, it's based on raspberry pi - https://www.youtube.com/watch?v=YkiTT9sYhhY

      Delete
  10. good evening, very good video but how can I make it function with Arduino uno. because, I tried reproducing the project but mine doesn't talk but only vibrates(the speaker).

    ReplyDelete
    Replies
    1. Hi, yes you can make it using Arduino Uno, in fact any arduino board will do.
      About the vibration, perhaps you need an audio amplifier, the sound can barely be heard from arduino. Thank you.

      Delete
    2. Hi, it’s me again... I’m using an audio amplifier but those vibrations are still there... so I wish to know if you may tell me an appropriate connection for UNO interface please.

      Delete
    3. Audio amplifiers cause vibrations because they might have some problems in them, or if the mic is lower than it's capacity.
      However, did you try with another arduiono? The connection is same. It should work.

      Delete
    4. Yeah I had to change arduino twice surely the problem comes from the audio amplifier

      Delete
    5. Thanks, I'll try bring the change

      Delete
  11. Where can I find the circuit diagram to connect all the parts together. I bought the pc board but can't figure out how to connect it.

    ReplyDelete
    Replies
    1. There is literally an image of circuit diagram above in the blog.

      Delete
  12. I am unable to get any sound from the SD card. I have tried everything as in your instructions. The Serial monitor shows that a wave file is being played, but I get no sound from the speaker.
    Can somebody help with step-by-step instructions?
    TIA.

    ReplyDelete
    Replies
    1. My be it's not as loud as you expected, use an amplifier. Also, check if the speaker is fine.

      Delete
  13. Is there any way to make this without the custom PCB? By just using Arduino, or even multiple Arduinos?

    ReplyDelete
    Replies
    1. Yes you can make it without a pcb. Just one Arduino will do the job.

      Delete
  14. This post is so interactive and informative.keep updating more information...
    Java Certificate
    Java Learning Course

    ReplyDelete
  15. Great blog!!! The information was more useful for us... Thanks for sharing with us...
    Python Training in Chennai
    Python Online Training
    Python Training in Coimbatore

    ReplyDelete
  16. This comment has been removed by the author.

    ReplyDelete
  17. This blog contains lot of information about the topic, thanks for this blog.
    Components of Spreadsheet
    In excel function

    ReplyDelete

Post a Comment

Popular posts from this blog

Make a Smart Phone Controlled Robotic Arm ! Arduino DIY.

Making ROBOT ARMs is very popular and fun among hobbyists, but it's not that easy to control a ROBOT ARM. So today we'll be making a robot arm that can be controlled using just your Android Smartphone or tablet. Good news is, you just need to program the Arduino, the App is already available to download for free. Step 1: Parts You'll Need 2 More Images Servo motor 4x (I'm using micro servo Sg90 but any model or size is okay) you can use upto 5 servo for this robot arm, I've only 4, so I'm using them. sliced piece of Card Board - to make the body. USB OTG (on the go) [pic3 & 4- all the same] And of course a Arduino board (any board) And a few jumpers to make the connection And a 9v battery to power the servo motors. Step 2: Making the Robot Arm (THE BODY) Now in here I'm actua

Make AI Assistant Robot with Arduino and Python

Introduction: We all are familiar with ‘Jarvis’ AI assistant robot from “Iron Man’ movies and Marvel series. It has always been a dream of programmers to make something on their own. I will today show a simple way to make such an assistant using Python programming. Moreover, I will also make a physical avatar of that robot, so that whenever we talk to the robot, it can do some movements. That will be more amazing than just a software robot. Because if it has a body, it is cool. So today we will learn to use both Arduino and Python programming to make an AI robot which can control your computer and have a little chit chat with you. Let’s hop in guys! Why I named the robot ‘Jaundice’? Because I painted it yellow, very very yellow!   Parts: Electronics - Arduino Nano – 1x Micro Servo Sg90 – 3x Ultra Sonic Sensor HCsr04 – 1x Body – PVC sheet (preferably white, better for coloring, I used blue one) Servo wheel (for the stand) Tools -  Cutter knife Scissor Hot glu

Arduino Automated Parking Garage

An Arduino Automated Car Parking System that is too easy and too fun to make. When a car arrives it shows the number of empty slots (if available) and then opens the gate. if there is not any empty slot then the gate does not open.  Amazing thing is that the whole project can just be POWERED using a POWER BANK!! Watch the video for the full tutorial. Note: you can use display instead of my hand made led sign display. Now lets get started. Step 1: Parts Arduino  - any board Infrared proximmity sensor  (pic 2 & 3 - both are functional) 330r resistor some  LED 's Servo motor  - any model or size you wish. Step 2: Making the LED Display To make this  LED display  I have used a piece of bredboard then soldered the LED's and the 330r resistor. Then just added a ribbon cable f

Problems using PIR sensor?? Always HIGH? DELAY? Solution is here.

PIR sensor When I was working on a project "controlling home appliances using just a wave of hand" I had used a PIR sensor and found some issues: PIR doesn't work properly when starts. PIR output value is always 1. It some times doesn't read motions. Now those are three Common and Unavoidable problems of a PIR sensor. So what would we do? I assume you know what a PIR sensor is and I'll just try to give a solution to the problems so that you can use PIR in your project efficiently, also I've added a code below on how to solve that problem. As I have mentioned earlier those are Common and Unavoidable,  keep 3 issues in mind: After powering - PIR sensor needs 1 minute to function For that 1 minute the OUTPUT is always HIGH. When a motion is detected it'll take 5 to 7 seconds to detect motion again. SOLUTION: After powering - PIR sensor needs 1 minute to function:  which means when you'll power a PIR sensor it wi

Control Anything Over Internet / WiFi. IOT Light Switch_ NodeMCU ESP8266 .

Parts: NodeMCU ESP8266  WiFi Development Board LED 330r resistor Android app Download the app from Below , To Upload code to NodeMCU using Arduino.ide Update Arduino.ide (desktop app) start Arduino app goto  Files > Preferences  Then  paste the link  then press  ok.    http://arduino.esp8266.com/stable/package_esp8266com_index.json goto  Tools>Boards> Board Manager  then wait untill it finds ESP8266 properties Scroll down and  click install Then Restart the Arduino App. Now you can upload Code in C / C++ to NodeMCU ESP8266 using Arduino.ide Getting IP Address Code T o get the IP Address (Internet Protocol Address) Upload this Code and open serial monitor. #include <ESP8266WiFi.h> const char* ssid="WIFI name"; const char* password = "WIFI PASSWORD"; int ledPin = 13; void setup() { pinMode(ledPin,OUTPUT); digitalWrite(ledPin,LOW); Serial.begin(115200); Serial.println(); Serial.print("Wifi co

How to use ServoTimer2 Library with Arduino- full tutorial.

Introduction I've been trying to make a humanoid robot  MOFIZA -Arduino Talking Humanoid Robot.  recently- which means dealing with Servo motors. Everything worked just as fine just before I tried to make the robot TALK. When I needed to use the TMRpcm library. But there's some libraries like #TMRpcm .h #VirtualWire .h are libraries that use the Timer1 of Arduino. It appears that you can't use two devices simultaneously where both use the same timer...So, if my robot talks- the servos don't work. Because The Servo.h and the TMRpcm both works on Arduino TImer1. Which is a mess. If you want to make both of them work you have to use another library for servos. Which is ServoTimer2 library? This uses the Timer2 on Arduino...Unfortunately on internet I haven't found any tutorials to understand how this ServoTimer2 library actually works, and how to use it in code. So, I've decided to make a tutorial so that people like me can understand better. We'll be u