Home Blog Videos Music Projects Robots Cars A.I. About

Share/Save/Bookmark

Shortcuts

Downloads



EZ-B Board



Music




Robots



Videos


External Links
Resonanz Korper

DJ Sures on Myspace





Robots: Wall-E
Project Name: Wall-E Autonomous Robot
Birthdate: October 7, 2008
Build Your Own: View PDF
Description: What the Disney toy should have been.

This toy was originally an annoying peice of plastic. It contained a simple repeated animation driven by a single motor and gear mechanism. The arms would move up and down, as well as the head side to side and the body did not move. I removed the standard internals, heavily modified the body and filled the interior with my own servos, microcontroller, and sensors... With 100 Hours of programming and 1,300 Lines of code, this toy is now really alive!
The Goal: Everyone wants to own a Wall-E. A few people have tried creating their own, and that's rewarding. However, nothing compares to a robust plastic shell. My experience with building and designing custom frames for my robots have led to modifying manufactured units. The goal in this expirement was to "hack" an existing toy. The plastic was dremmeled and melted with my soldering iron to fit my components. The programming was done using a microcontroller (18F4685) with code written in C.

Other then having a nice robust shell, an additional goal was personality. In the movie, Wall-e is not remote controlled. Neither is he programmable. Wall-e is an independent autonomous robot. He does his own thing.. Exploring and cruising around, etc. That's what the goal of my Wall-e is... A fun and independent personality that won't get stuck.

CPU: Microchip PIC 18F4685
CPU Speed: 20 MHZ External Resonator
Peripherals: 2 x Modified servos for drivetrain
1 x GWS servos for head
2 x GWS Nano servos for arms
2 x LEDs for eyes
1 x Speaker
1 x Power switch
1 x Sharp GP2D05 Distance Sensor

Power Source: 7.2v 2000mha lithium ion battery pack
Development Enviroment: +1,000 Lines of C Code

Shell: $20 Disney Wall-E Kids Toy


Image Links
  1. Original dissambly pics
  2. Assembly pics and video
  3. Head tilt addition pics and video


Software
Last Updated: 10-08-2008
Description: For many years, my previous robots were simple and performed single tasks. However, my software infrastructure began evolving and becoming far more effecient and reusable. The best feature of this code structure allows for flexability and expandability. The software is split up into modules. Each module is named to encapsulate the function of the commands within it.

Wall-E was built off my K-9's code with modifications and additions for having arms. I wanted Wall-E to be smart like my K-9. It was not an easy task and has required plenty of expiremental time to determine his algorythms and conditional reactions. This is all done in the software, that's the key.
Features: Wall-e's advanced programming structure provides an interface to a map of his surroundings. A 2-D array of information is constantly updated during Scans.c functions. This feature provides the Movements.c functions ability to determine escape paths and understand it's enviromental surroundings.

This is all done with only 1 IR Distance Sensor.
When any of my code asks to scan, the data is put into an array . the array is 2-d and looks like this...

The First column is the array index. The other 14 points from left To right are his vision values, the center values being his head position center. Each column of the array history. I only keep 10 rows of history, and 14 points across becuase his head has 14 positions.

10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 
9,  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 
8,  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 
7,  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 
6,  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 
5,  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 
4,  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 
3,  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 
2,  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 
1,  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 

- Everytime Wall-e moves forward, the array index is increased and the data is moved back one row.
- If Wall-e moves backwards, the array index is decreased and the data is moved forward one row.
- If Wall-e turns either direction, some magic occures and the table transforms.

If Wall-e is beside a wall with something in front of him, it'd look like ths...
10, 38, 36, 33, 0,  0,  0,  0, 0, 0, 0, 0, 0,  0, 0 
9,   0,  0,  0, 0, 23, 22, 22, 0, 0, 0, 0, 0, 11, 0 
8,   0,  0,  0, 0,  0,  0,  0, 0, 0, 0, 0, 0, 12, 0 
7,   0,  0,  0, 0,  0,  0,  0, 0, 0, 0, 0, 0, 12, 0 
6,   0,  0,  0, 0,  0,  0,  0, 0, 0, 0, 0, 0, 14, 0 
5,   0,  0,  0, 0,  0,  0,  0, 0, 0, 0, 0, 0, 17, 0 
4,   0,  0,  0, 0,  0,  0,  0, 0, 0, 0, 0, 0, 14, 0 
3,   0,  0,  0, 0,  0,  0,  0, 0, 0, 0, 0, 0, 15, 0 
2,   0,  0,  0, 0,  0,  0,  0, 0, 0, 0, 0, 0, 16, 0 
1,   0,  0,  0, 0,  0,  0,  0, 0, 0, 0, 0, 0, 14, 0 

Now when ever his next decision is randomly generated by his personality module. that's a whole new topic. But when the decision is made, it may or may not actually do anything. becuase that decision might not have enough room to complete the action. So now we move onto the movements.c file. Which references the Scans.C 2-D array. Whenever a movement is requested by his personality, the movement examines the array and determines if it can be done. Maybe only partially be done. Or maybe entirely done. That's up to the data in the array. Wall-e now knows how far he can turn in either direction. How to navigate through table legs and chair legs. He also now knows how to far to backup if he wants to go against a wall. You can see that demonstrated in the last video. Now on top of all that. Becuase i have this array. I can also reference it to determine if something magically appeared or disappeared. If that is the case, then guess what? it must be human! If it moves, interact with it! So he will turn towards the change, and do some animations (random of course). And now he's somewhat life like.





neko.c This is the program file that contains the main() entry point. Initialization occures here (Init head, init arms, Init movement servo timers)
neko.h Contains microcontroller fuse parameters, program #defines, and communication stream definition. The #defines are declared in this file so they may be easily modified in one location.
MoveServos.c Timer1 is used in conjunction with CCP1 and CCP2 to control the pulses to the movement servos. Servos are controlled individually with Speed and Direction as parameters
DjServos.c This module contains the functions to move the head and arm servos. They use my own pwm control function. The reason for this is that it lets the user specify how many degrees from center to move the servo. Then the number of pulses to move the servo from it's current location to the new location are sent. The current location is always stored for future reference.
DJTones.c A simple function that contains a tone generator with a optional oscillation parameter. A #define list notes are specified for musical score. The oscillation parameter gives the futuristic effect to the sound you hear.
Sounds.c A collection of functions that play different melodies and sound effects.
AudioControl.c Provides an interface to trigger samples from the toy's original sample board.
actions.c This file holds all the functions to control the emotion actions (Eyes, tilting head, arms, etc)
scans.c A list of functions that provide scanning capabilities. They include getMaxRight, getMaxLeft, isLeftClear, isRightClear, getDirectionOfDifference, etc..
movements.c Movements are small re-usable macros that are used by Modes. The movements assist in getting out of jams, or avoiding objects by using Scans.c functions.
modes.c This file contains the list of modes. A mode is a macro of movements, scans, actions and sounds. Examples of a movement are nodAtNearestObject, goToClosestObject or goAutonomous. Modes are infinitely choosen by the personality generator function in the main() entry point.
adc.c Contains my ADC library which performs redunancy and false positive checking.
util.c Common utilities that are used often. Mostly which are functions to calculate differences with medians and servo degree position differences.


Project Videos
Final Video?

Am I finally done with this guy?
.....
Maybe... So just in case, here is a video of him cruising around demonstrating his 2D mapping ability, and other features. I hope you enjoy watching as much as I enjoy having him! :)
Head Tilt

This is a video of his head tilting. A servo attached to his neck moves his head. I use a thin steel rod from the servo to the head.
Personality Video

I made this video to demonstrate his personality. I let him drive around the floor of the living room for a while. Let him explore and fill up his 2D array map of the room. Kinda fun when he got around the chairs and stuff.
Original Video

I made this video the day that i finished Wall-E. He took 7 hours to modify, assemble and program. I was a little exhausted so don't blame me if it's boring lol


Updates
2008-10-09 He's definetly come to life. His head tilting was a great addition. I'm exciting to see him in a public environment. I have completed his personality (i think). I will have to watch him interact with people first. Kids are good to see robots with, but adults are even better. Adults have expectations, where children have a 2 minute attention span and merely want to hear noises. So entertaining kids is the least of my concern, they'd be just as happy with a stick and a peice of string. ;)
2008-10-08 Lots of programming. I've taken K-9's original code and modified a great deal of it. Wall-e now has a 2D enviromental map. I have to start assigning actions and movements to make him lifelike.
2008-10-07 I assembled and put him together today.
2008-10-06 I purchased the toy today. Disassembled and mapped out the parts needed to animate this guy.



Copyright © 1995-2009 DJ Sures