Here I try not only voice command but also Artificial Intelligence Chat with the Computer using Cleverbot.
Actually the idea came when found kids mix colours in the colouring box when take color from one color to the nearest one. But finally implement for Kitchen because lonely people in kitchen needs a companion while cooking. Here its chat with you and also show the item in the list as per your command. So never mix one item to the near item. Lets Start making.
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Materials Required
1) Arduino Uno
2) HC-05 Bluetooth Module.
3) Servo Motor.
4) Regulater Power Supply Board.
5) 12V DC adaptor.
6) Android Phone With Internet facility.
7) Plain PCB, Male and Female Headers.
8) Round Plastic Box.
9) Small boxes as per your pick up list. I use 3 containers to put spices because i got only big containers.
1) Arduino IDE.
2) Appinventor For Android Application.
3) Cleverbot Website Registration for Chat with Computer.
1) Soldering Ion,
2) Hot Glue Gun.
Step 2: Make Arduino Shield
1) Making a shied is a easy one.
2) Solder Male headers to the Plan PCB as per like Arduino uno Female Header.
3) I Use Digital Pin 5 and 6 to drive servo.
4) Use Digital Pin 2, 3 as software serial.
5) Connect the Blue tooth module Serial pins to the Software Serial Pins and power supply from arduino through Female Connector.
6) Take power supply for servo from external. So use 12 V to 12V, 5V and 3.3V Power supply board.
7) Now fix the shield prepared over the Arduino uno. Connect the Blue tooth module to female headers in the shield.
8) Connect the Servo female header over the shield. Now the circuit completed.
The function planned is Android app connect with Arduino through bluetooth and as per data received from Arduino the servo rotate to the desired angle. Also the we want to talk with the Android and get reply like chatting using the Cleverbot web. First of all lets start with Cleverbot.
Step 3: Create Cleverbot Account
In this project we not only command to pick a item also while working we also chat with the Bot. Cleverbot is a chat with a bot website with Artifical intelligence learns from people, in context, and imitates. The Website offers price as per not of chats between us and Bot.
1) Open the web site Cleverbot.
2) Choose the account type you want to purchase.
3) It go to checkout. In the Check out enter your details and Purchase the account.
4) Then active the account by click the mail send to your mail id.
Step 4: Find Key and API Format
1) After create the account login to the Cleverbot website.
2) After successful login it shows the API Key for your login and Total api calls allowed.
3) Click the how to page to get the details about how to use API.
4) On scroll down you found the format for html requet using the key.
5) Simply type the format in the address bar of the browser with your key and Question. The browser display the answer with the conversation in in encrypted form. When ask the next question send back the encrypted conversation (in CS parameter) this make the bot remain the previous conversation. If started with out CS then it is a fresh conversation.
Use the API in Android application to chat. Lets see how to create the APP using APPINVENTOR.
Step 5: MIT APP Inventor Design and Code
1. Create new project in app Inventor.
2. For Bluetooth Communication see my previous projects.
3) In the first Screen Add
a) A List Button to Pick up the bluetooth.
b) Items Button to go to next screen to set the command names.
c) Set Key Button to Set the API key for the Cleverbot website.
d) On click the Set key Button a textbox and a Set button visible. Enter the API key here and click set button. Text box and set Button gone invisible and Set key Visible.
4) In the second Screen Named as List
a) 8 textbox and 1 Button to set the value.
5) In the main Screen use Mini DB to store the command names and Cleverbot key.
6) Use Speech recognition to convert voice to text. Check the received text with the list if it present in the list and bluetooth is connected then the respective no is send to Arduino through blue tooth.
7) If the text is not Present in the list then string concatenation is done with the key and the text received. And send it to the Cleverbot url.
8) Reply from the URL is splited and find the answer. Use the Text to speech control to reply the answer get.
9) Once the voice is played again, Speech recognition again listen to talk.
Step 6: Android App
If you don't like to create new app. Just download the apk file upload here and copy to your Android mobile and install it there.
Step 7: Run App in Mobile
1) Open the App AI Assistant in the Android Mobile.
2) Switch on the Bluetooth in the Android Mobile.
3) Click the Set key and Type the API Key in the text box and click set.
4) Click the Item button and see the colours listed in the box. If your want change the names.
5) Click the set value in the second screen and retrun to main screen.
6) If the Arduino is ON Click Pick BT and Select HC-05 from the list.
6) Now click any where in the Cinderella image its start listen and replay as per your chat. If you talk what is in the list saved it send the list item no the arduino. As per Received Arduino move servo.
Step 8: Arduino Code
1) Libraries Used are
2) Use Digital pins 2,3 as software serial.
3) Digital pin 5 to drive servo.
4) Receive the Current selection from the Android through bluetooth.
5) Move the servo from previous location to the calculated current location as per the selection.
6) Arduino ino file attached with this.
Step 9: First Testing of the Function
Now the Shield is build, Android app developed and installed in android Mobile, Arduino progam developed and upload to the Arduino. Its time to check the function integrity. Check the video its working fine.
All the basic works completed. Its time to make it as a show case.
Step 10: Container to Smart Container
1) Select round Plastic container where lid is free to rotate and having no thread.
2) Take the lid and put a hole right in the center of the lid using drill bit.
3) Screw the servo Horn in the middle of the lid.
4) To fix the servo on the bottom of the container, we want to select the object correct to its height.
5) I found a chocolate box correct to its size.
6) Hot glue the servo bottom to the Extension box (chocolate box).
7) Screw the Servo with the Lid.
8) Apply Glue in the bottom of the Extension box (chocolate box).
9) Close the lid to the container and press it tight. Remove the screws and open the lid. Now the base stick with the container bottom. Hot glue it fully with the bottom. Now the arrangement completed.
Step 11: Arrange Controller in Container
1) Hot glue the power supply to the bottom of the Arduino. Put more glue so that no terminals in both board connect.
2) Put the whole Arrangement to the Top side of the servo because we use only 50% of the box.
3) Glue it to the box.
4) Put a hole in the bottom side of the box and insert the adapter wire through the hole.
5) Now Screw the Lid with the Servo.
Step 12: Testing Before Partitioning
As per the container availability we partitioning the container. Before partitioning the container i like to check the working of the lid. Mark the movement at each step in the container using marker. Here you see the test video.
1) I plan to put the spices in the separate containers. But the container i got is big so it only fit 3 nos in the area of the servo rotate.
2) So change the Items in the list to 3 nos only 1,4,7. Left all other empty.
3) Hot glue the Spices Container to the wall of the Container.
4) Put a stand for spoon on the top of the container.
5) Cut the Lid up to the size of the spoon to enter.
6) Now all are completed. Filled the Spices container with spices (I plan for 7 Nos of spices but the container i able to got is big so i reduce the nos).
Step 14: Picking and Chatting
Now its time to have fun. Put the mobile on a stand i make my own near the smart container. Connect the Arduino and Android using blue tooth. Now its your time to Pick items or chat with the Cinderella. Chatting is very funny, thanks to cleverbot.
I Use it for Spices. It also use for Colors for kids to paint. so that other colours never missed. At first actually i plan it for Make up items but finally food overtake makeup.
Go through the work. If you make it and Vote for it i feel very happy.
I am very very happy to learn and make new things. Let share yours then Happiness multiply.
Thanks for watching.