Meet Twinky the Cutest Arduino Robot

11,517

138

63

About: Photonics Engineer

Hi,
In this instructable I'm going to teach you how I made my own "Jibo" but called "Twinky"

I want to clear this up... THIS IS NOT A COPY! I WAS BUILDING TWINKY AND THEN I REALIZED THAT SOMETHING LIKE THIS ALREADY EXIST :c

It has almost the same functions but It doesnt need an internet connection and oviuousley it doesnt need a server. (Of course this make a lot of limitations,comparing with the functions of the Jibo Robot)

IT CAN SPEAK! PLAY MUSIC, SET TIMERS, ALARMS, TURN ON/OFF THE LIGHTS OR OTHER APPLIENCES, IT HAS A CALCULATOR AND A WEATHER STATION! DATE & TIME, BLUETOOTH 4.0, EVERYTHING WITH VOICE COMMANDS!!!! and also with a touch screen, it has one little motor so it can turn arround when one of the two microphones hear you talk or make a noise.

You can record your own commands in any language, I'm in México so everything is in spanish.

The "brain" is an Arduino Mega, where all the code is running, there is a different board for the voice recognition called "SpeakUp Click" from "Mikroelektronika" I'll leave all the links later so you can purchase this different boards.

Step 1: Design & 3D Printing // Documents

I want it to make it "cute" and friendly so I decided to call it Twinky and the best color I found was yellow, also it was the only nice color I have arround.

Everything was made in SolidWorks and then 3D printeded in a Rise N2 Plus.

The body is actually pretty big, arround 32cm tall and 19cm wide.

Here you have all the STL files.

The components are...

-HEAD

-FACE

-BODY

-BASE

-SPEAKER ENCLOSURE

-BREARING ADAPTOR

-GEARS

https://drive.google.com/open?id=1GApWHVjIjuwkE-Vm...

In this link is everything, from the audio notes that you should place inside the SD memory card, an .spk file thet are the voice commands, the music, the STL files, the Arduino Code, everything!

Step 2: Components

For the functions I put it in there are a lot of modules that are inside twinky.

Arduino Mega

SpeakUp Click

RCT

Bluetooth

4 Rellay Module

Audio Amplifier

Speaker

DC Motor

2 Digital Signal Microphones

4.3in ITEAD touch screen

SD Module

RGB LED

Arduino Mega Prototyping shield

And so on ... other components like some resistors, cables and others I wont show every single detail in this instructable, It would make it sooooo long ... but if you have any questions I'll be happy to answer! And explain you every small detail.

https://www.itead.cc/nextion-nx4827t043.html.

https://www.dfrobot.com/product-60.html

https://www.mikroe.com/speakup-click

Step 3: Schematic

This is simple shcematic, everithing is represented by a connector, from de Arduino Mega to every module, with the label you can see which module is.

The bluetooth is connected to de Serial1, the ITEAD Screen in the Serial2, as you can see there are still plenty of unused pins.

The temperature module is connected at pin 13.

The RTC is connected to SDA and SCL (Pin 20,21)

The SD Card reader is define to be connected in Pin, 50, 51, 52 & 53.

SpeakUp board is powered by 3V3 and all the other modules are 5V

I didn't place the L239D motor controller but it is really simple to use DO NOT CONNECT THE MOTOR DIRECTLY TO THE ARDUINO.

Also... the ONLY functional speaker output is at pin 46.

Step 4: Arduino Mega Shield

I put all the components in the place I found better, under the SD module there is a L239D motor controller.

Solder everything together to VCC, GND and the connections with the pins I place in the Arduino program, you can change all the pin deffinitions if you want to, and then make the connections as you want too... you dont even need the shield haha, it will work with cables too but is messier.

You should connect all the components individually, I mean one by one and test it and then in the code you can "put it all together" for example:

If you want to connect the RTC then search on internet how to connect an RTC to Arduino Mega and make the connectios, test it and then go to the next modue.

Again... I'm sorry if I dont expliain all of this in the instructable but that would be too much work, and it will be an infinite instructable.

I made a small 12V and 5V regulator and bought an audio amplifier, reeeealy simple.

IF SOMETHING IS NOT WORKING THEN WRITE ME A COMMENT AND I'LL BE HAPPY TO ANSWER! C:

Step 5: Put It Together

Twinkys brain will be inside him, with the audio amplifier and the SpeakUp click.

In the third picture you can se the microphones in the head

The motor, reallys, RGB LED and the speaker are in the base and connected with the brain trough the hole in the body

With the motor the body can turn if any sound activate one of the microphones, the rellays can be activate to control your appliences and the RGB LED shows the status of the program:

If there is an alarm running it will be pink, if you say "twinky" and detects you, it will be blue, and so on with the different commands.

Step 6: Face & Menu

For the face I'm usign a Resistive touch screen form ITEAD, it is really simple to use, it can be controlled with serial communication! So it only takes 2 pins of the arduino!

You can send the value of any variabele in the screen, or when you press any button the ID is sent to the Arduino.

To make the face program ITEAD has an edditor

https://www.itead.cc/display/nextion.html

Is really simple to use but if you use a screen like me, the HMI program and the .tft will be on the Google Drive Link

The .tft is the documment you place in the SD card so you can charge the program to the screen.

There are a lot of videos on youtube that explain how to use the software.

Step 7: Videos

A Small demostration of the functions, there are still more, but with this you can see what is capable of!

(He doesn't like to be touch in his eyes :b) but in his top right corner you can open the menu.

And with more coding you can do almost anything! There are still a lot of unused pins. You can add wifi... use the bluetooth to control other stuff or something like that.

I hope you like my instructable!

Feel free to comment or ask me any questions!

Share

    Recommendations

    • Make it Glow Contest 2018

      Make it Glow Contest 2018
    • Big and Small Contest

      Big and Small Contest
    • First Time Author

      First Time Author

    63 Discussions

    1
    None
    GuidoMonstrey

    2 months ago

    This is a wonderful project!........wow.........i like to make this 'beautiful 'Twinky'.....but before i start, i have some qsuestions. Can i ask them please?...sorry for the long post-comment.

    I have a list with most of the parts/modules but i am not shure they are ok:

    1. Arduino MEGA 2560 (is ok)

    2.Speakup Click type 932-MIKROE-1534 (is this ok?)

    3.RCT type DS1307 i2c rtc (is this ok?)

    4.Arduino bluetooth HC06 (is this ok?)

    5.4 relay module-120A type MAR0004CR (is this ok?)

    6.Audio Amplifier LM386 DC5-12v mono (is this ok?)

    7.Speaker 4ohm 3watt diameter 4cm (is this ok?)

    8.Motor: type 12v/6v DC Motor 120RPM/60RPM lenght=67.50mm/round=25mm(is ok?)

    9.Arduino 2 digital signal microphones (is ok? and how to connect to Speakup Click please=parallel?)

    10.touch screen type 4.3in ITEADtouch screen Nextion-nx4827T043 (is ok?)

    11. SD-card type SPI (is ok)

    12.RGB-led module Arduino (is ok)

    13.Mega Prototyping shield ( is ok)

    On this shield, i can see two elco's and a resistant...can you draw or take a picture how it is all connected on the shield please?

    14.DHT type DHT11-sensor (is ok?)

    15. The 12volt and 5volt regulator: can you draw a little scheme please, so i can make the same of you.....and make no mistakes....?...

    Are there more modules or components used?

    I know.....this is a lot of questions but before i start it is better...don't you think so ?....

    Sorry for the lenght of this comment.......forgive me......

    19 replies
    0
    None
    Lindermann95GuidoMonstrey

    Reply 2 months ago

    ohh no no, dont worry I'm happy to answer all of your questions and helping you to make a twinkys brother/sister(?)

    1. Yes Arduino Mega 256

    2. Yes, SpeakUp Click 1534

    3. Yes, RTC DS1307

    4. Yes, Bluetooth HC06

    5. My relay module is 10A but pretty much anny realy will work fine, as long as it activates with 5V

    6. Yes, Audio amplifier, the module says that is 5 to 12v but the amplifier specs says is 5 to 30V or something... but will need a bigger disipator

    7. Speaker ok, make sure that the speakers seals with the enclosure this improves a lot the sound quality

    8. Motor ok

    9. Yes, digital microphones

    10. Yes, Nextion-nx4827T043

    11. Yes

    12. Yes, or you can use 3 LEDs instead, I'm not using analog write for them so the 3 colors ar connected to digital outputs, you can improve this using the PWM outputs of the arduino Mega and make a lot of different colors, this is optional.

    13. Yes an Arduino mega shield, the Capacitors are just connected between 5V and GND there is not much reason to use them, I wasn't planing to make my own power supply but with the ones of the PW supply should be enough. The resistor (I think it was 470ohm) is connected between the output signal of the DTH and VCC but I ended up disconnecting it because it gave me problems to read the signal, in my protoboard worked fine but once soldered the arduino sended an DTH error message sometimes. Try it with the resistor first.

    14. DTH11

    15. I'll attach an image

    Dont forget about the L239D motor controller, the current of the arduino output is not enugh to move the whole body, it is really easy to connect, since is just one motor you only need to connect one side.

    I didn't add a pictire but you need a 12V transformer or any other 12AC source mine is 12V 1.5A

    The SpeakUp click has Tx and Rx pins also SPI comm but I couldnt find information about it, so the easiest way to do it is with parallel from IO1 to IO6

    fuente.PNGMotor.png
    0
    None
    GuidoMonstreyLindermann95

    Reply 2 months ago

    Thank you...with all your answers , i can now understand more and more...thank you for that.....but can i ask a few more questions please?(if you do have the time for answering... (..at number 5 there i made a mistake: it must be 10A and not 120A(mistyped)......)

    1.The two digital microphones, i do have still problems with the connection: VCC-GND-OUT.Can you tell me where to connect the "OUT"pins please? (pins?)

    2.The speakup click, i have studyed alot, but still questions...lol...i have 7 pins :

    nr3 on 48(mega) / nr4 on 46(mega) / nr5 on 45(mega) / nr6 on 42(mega) / nr7 on 40(mega) / nr8 on 38(mega) / nr9 on 36 (mega) . But what do i use for the numbers (on schematic= 3 4 5 6 7 8 9 ) on the 'speakup click'-module? or can i find this in the arduino-sketches maybe?( i did not look yet into the sketches)

    Can it be that the pin for the speaker on the schematic is 44(mega) instead of 46(mega) ?

    The pictures that you added are super for helping me (the 12v and 5v) and the connection for the L239D also.

    I did order all the parts now and i started with printing out the STL-3D's.

    (i did open the Twinky_2-sketch: is M1 the first microphone? ('out-pin' at pin A5 mega) and M2 is the second microphone, ('out-pin' at pin A4 mega) or am i totally wrong?)

    0
    None
    Lindermann95GuidoMonstrey

    Reply 2 months ago

    1. Right! I totaly forgot the microphones pins on the schematic! Sorry, they are connected to A0 and A1.

    2. I added some comments to the Arduino Sketch, you should be able to download it now with the updates, there you can see the declarations of the SpeakUp input pins(The good ones... haha)

    You are right...My mistake! haha again... the schematic is wrong, I will change it

    The M1 and M2 variables are for the motor only. you can change this pins if suited you, all depends of where you place all the modules on the shield, just dont forget to change it in the sketch

    Sorry for the mistakes and thank you for the questions, you are helping me me to improve the instructable.

    0
    None
    GuidoMonstreyLindermann95

    Reply 2 months ago

    Thank you sir !

    Can i just ask one more question please?

    Where do you place the "speakup click-module" in twinky?

    There is a kind of a grill on the "Cara_1.stl ", just under the rectangle-hole for the screen. Is this maybe the place for the microphone of the speakup click?

    I do have already 4 printout-tyles (black ones)....lol......(so, it goes well)

    In the sketch "Twinky_with_Comments" at line 63, there is : int //Meable = 13 .

    I do a 'verify' with this value, and i get an error: two or more data types in declaration of 'Angulo'

    If i take away the two slashes (// ) ( int Menable = 13 ) then it is oke....Is this important?

    Can it be that you mistype and the two slashes are not needed?

    (what does that command do?....just asking for learning more)

    I am a newbee in this.....this sketch is 'wow' and i did learn again from you....

    Did you make this sketch?...yes?....wel...then, i am very impressed....you must be a kind of engineer or higher.....this language ( i think it is C...yes?) is very difficult.....

    0
    None
    Lindermann95GuidoMonstrey

    Reply 2 months ago

    Hi, Actually... I didn't design a place for the speakUp, it was ment to be at bottom with the arduino and an external microphone would be at the bottom of the screen but that didn't work very well because of the eco, as you can see int the videos I ended up making a small hole on the face and puting the microphone out of twinky like an horn or something haha

    The two slashes ment to be before the int, like this:

    //int Menable = 13;

    This line is not necessary though...You can just erase it or leave it without the //

    It was for turning off the L293D but I didnt use it at the end.

    And yes! I made that sketch from scratch, It could look a bit complicated but is just a lot of separated functions, when the sketch is running inside the arduino it makes like a Zig-Zag among all the different functons as needed,

    Thank you! I'm a student of photonics engineering, the study of light but I still have a long way to go

    0
    None
    GuidoMonstreyLindermann95

    Reply 8 weeks ago

    I am printing "ensamblaje21-case-2_cabeza.stl" and
    "ensamblaje21-case-2_base-1.stl ".

    For 'case-2base-1' i use pla 1.75mm 0.4mm extruder-nozzle and layerheight 0.2mm and 'support-type' touching buildplate. This takes 72 houres. (is this correct please? this is long)

    For case-2 cabeza , do you use 'support" ? (takes without support 22 houres)

    0
    None
    Lindermann95GuidoMonstrey

    Reply 8 weeks ago

    Hi there!
    The base took a really long time but not that much, maybe you can change the infill rate to 5% or so, I made a test and with ABS 1.75mm, 0.2mm layerheight and 5% infill would take about 36 hours.
    The head (Cabeza) doesn't need any support.

    Captura.PNG
    0
    None
    GuidoMonstreyLindermann95

    Reply 7 weeks ago

    I did make them....lol.....in 3 parts.....the base is in two pieces (i did have a malfunction in the middle of printing and made the secondhalf with lowering the module). The cabeza is in one piece (pla1.75mm; layerheight 2.5mm ; no support; nozzle 0.4mm). I did upload the software (cambio.tft) not with the micro-sd-card(i did have problems= no fat32 and so) but with connecting the screen with a "usb to ttl" shield to my pc. Then it was uploading. It works..... :-) . Now i am waiting for the other modules........i am enjoying myself....lol.....

    IMG_1284.JPGIMG_1285.JPG
    0
    None
    Lindermann95GuidoMonstrey

    Reply 7 weeks ago

    NICE!! I'm really happy!
    I had a trouble with the printing of the body too, almost at the beginning, but I was able to restar the printing at the same point, and also have trouble with the SD card but it is mostly because it is not compatible with all brands, I used a diferent one and then it worked,
    Thank you again for making a Twinky, keep me up with the advances!

    0
    None
    GuidoMonstreyLindermann95

    Reply 4 days ago

    Hi, here i am again.....and i hope you are not angry... ;-)
    So, it will not be the sketch....ok.....thanks....
    I will put some pictures in this message from my installation.
    I did only connect (without anything else) the motor-system. But i better connect more : the RTC....the bluetooth, the DHT11, and so on.....
    If i use the serial monitor, i read :

    recvRetCommandFinished ok
    recvRetCommandFinished ok
    Setup done
    SD FAIL

    i did not put a sd-card into the sd-reader yet.....so, i will try it with the sd-card(and the data on it)
    But i will check all again....and let you know......
    Thanks again that you take the time for me to help me.....and this is a super-project from you....and i hope mine will work soon.....i will not give up yet...lol....

    20181210_162632.jpg20181210_162652.jpg20181210_162701.jpg20181210_162713.jpg20181210_163632.jpg
    0
    None
    Lindermann95GuidoMonstrey

    Reply 4 days ago

    Wow! You are doing a great job! And no, haha I'm not mad at all (I already saw your other comment) Great! Yes, Escuchando means listening, if you dont hear anthing it might be the audio files on the SD card, but if you format it as FAT and then upload them again it should work, also check that the output signal is at Pin 46 and also... you might need a bigger amplifier, it will work but a 12 or 24V amplifier works much better.

    0
    None
    GuidoMonstreyLindermann95

    Reply 27 days ago

    Hi Lindemann65, everything is oke with me and Twinky: i am still waiting for some parts (from ali express and banggood and gearbest...it takes alot of time for receiving them).
    In the meantime i did place the 'motor' with a little bit of difficulties but now it turns good without blocking. (i needed some adjustments for placing the motor correct so it did not block. Maybe the motor is not the same as yours: 120 RPM 12 V DC motor high torque gear box motor motorreduct DC 6 V 60 RPM or 12 V 120 RPM- type 25 GA DC 12V 120RP
    Now i am making the 'shield' : so far so good......i did have to do first other things, and now, in parts, i am constructing your twinky....soon i wil take some pictures and show you.....thanks for your message......

    0
    None
    Lindermann95GuidoMonstrey

    Reply 27 days ago

    Great! I know... the waiting can be really long with those suppliers, waiting is the price to pay for lower prices haha
    Yes maybe is not the same motor but I'm glad it worked, have you tried to add some grease to the Base? I did that to help the motor and reduce the current consumption
    I'll be aware of your messages,
    regards!

    0
    None
    GuidoMonstreyLindermann95

    Reply 23 days ago

    Hi , here i am again...lol.....
    I do have the sd-module, but it is another one then yours.
    I have 8 pins: in order: firstpinleft gnd-miso-sck-mosi-cs-5v-3v3-gnd .
    Yours is 6pins : miso-sck-ss-mosi-gnd-5v .
    I connect : miso to 52/sck to 50/mosi to 51/cs(is same as ss??)to 53/5v to 5v/3v3 to nc/gnd to gnd
    Is this correct please?
    The resistance 470 ohm is on the schema between gnd and data. Should it be between Vcc and data ?

    0
    None
    Lindermann95GuidoMonstrey

    Reply 23 days ago

    The way to connect the SD should be:
    MISO - 50
    MOSI - 51
    SCK - 52
    CS/SS - 53
    And I belive that you can connect it only to 5V and the PCB has a voltage regulator, the SD cards work with 3V3
    Aaaand you are totally right, the resistance should go between Data and VCC, to increase the signal, but this worked only when I had the circuit on a protoboard, when I made the shield I toke it away

    0
    None
    GuidoMonstreyLindermann95

    Reply 15 days ago

    Hi, here i am again......pin A0 and A1 or pin 10 and pin 11 : this is for the motor and L293D.
    On the schema there is A0 and A1 (Motor is written under), but in another schema with the arduino uno you use pin 10 and pin 11. What must i use, please.?
    i have started with the motor and the microphones and the L293D, but it does not turn..... :-(
    The sketch is loaded up correctly. i checked all my wires twice....i do something wrong but i do not know what...lol.......maybe i set the motor and the MEGA with the L293D up on a test-board....
    Or can you show another complete scheme please? (with all on it, wires etc...)
    Sorry for my questions.....


    0
    None
    Lindermann95GuidoMonstrey

    Reply 15 days ago

    Hi there, ok yes, I use the Arduino UNO schema only to show how to connect the L293D, the outpus signals from the mega are A0 and A1, so... connect everuthing like the UNO schema (Vcc,Gnd and Motor Outputs) but the signals from the Mega to the motor to A0 and A1 instead of 10 and 11. I hope I've being clear...
    Anyway I think that the problem will be at the L293D, be sure to connect it like this, with al Vcc's and Gnd's

    L293D_2.jpg
    0
    None
    Lindermann95Lindermann95

    Reply 15 days ago

    Also... dont forget to use an external 5V supply, the 5V output from the arduino wont be enough to move the motor