Few robots are more recognisable than WALL·E; his cute appearance and distinctive personality make him instantly endearing to anyone who sees him! In this project, I designed a WALL·E replica with the aim to allow each of the robot’s joints to be moveable by hand or using servo motors.

Loosely based on the dimensions and design of ChaosCoreTech’s Wall-E replica, this version was designed from scratch in Solidworks and allows 7 of the joints to be actuated, including the arms, neck, head and eyes. The robot design has the following features:

  • Each eye can be raised and lowered independently with servo motors.
  • There is room in each eye to add a small camera.
  • The head can look left and right using a servo motor.
  • The neck is actuated at two joints, allowing the head to look up/down and to be raised/lowered.
  • Each arm has a motor at the shoulder to move it up/down.
  • The arms consist of pressure fit joints, hands and fingers, which can be manually posed.
  • The tank treads (skid steering) are fully 3D printed and can be powered using two 12V DC geared motors.

This is an ambitious project, aimed at people who want to build a fully animatronic WALL·E robot with servo controlled joints. It took me about 3 months to design and assemble the robot, with more than a month spent on just 3D printing all of the parts. In total, there are 310 parts (although 210 of those are very small and make up the tank treads).


1. List of 3D Printed Parts

The robot comprises of 310 individual parts, so this definitely is not an easy project suitable for people who don’t have much experience with 3D printing! Personally, I spent more than a month printing all the parts, with the printer running almost every day. The largest components (the main body parts) took up to 14 hours of print time each, while the smaller parts took 5-6 hours. If you are interested in making your own robot, I have uploaded the 3D files for all the components on Thingiverse.


2. List of other Components

A variety of other hardware is used to fasten the 3D printed parts together and bring the robot to life. A list of the hardware and electronic parts that I used is shown below. To make WALL·E look more realistic, I took apart some old binoculars and used the lenses as the eyes. I think that the shine and reflections on the glass adds a lot of soul to the robot, and make him look even cuter.

Note: Links are for reference only, and are not where I bought my parts. Please shop around to find the best supplier near you! The DC geared motors can also be bought with additional encoders, allowing you to have better control of the robot’s movement speed. However, if you want to add encoders you will need to modify my Arduino code in order to support them; an intermediate level of programming knowledge is required!

While it is possible to use a Wifi/bluetooth connected Arduino micro-controller to control the robot, I decided to use a Raspberry Pi instead. Since the Raspberry Pi is essentially a small computer, it can be used to play sound effects, stream the video from a USB camera, and host a web interface through which the robot can be controlled.


3. 3D Design and Printing

I designed all the components in Solidworks, using images and other 3D models as reference. The main aim in the design process was to split the robot into small enough pieces so that they would fit into the 3D printer, and also to integrate all the motors and electronic components. I tried to make the robot as small as possible, while still leaving enough room for the motors.


4. Painting

After 3D printing each of the parts, I spent a lot of time sanding the parts to remove all of the print lines and give them a smooth finish. Two coats of filler-primer were then applied, with more sanding done between each of the coats. Using a primer is important, as it helps the paint to stick to the plastic and not rub off as easily. It is also useful as it makes imperfections and bumps on the part more obvious, showing where further sanding needs to be done.

Each of the parts was then individually painted with lacquer spray paints. I only used yellow, white, light grey, dark grey, black, and red spray paints to paint the whole robot. By splattering light layers of black and red paint onto the parts that were painted grey, it was possible to add texture and make them look a lot more like real metal.

Finally, after fully assembling the robot, I used black and brown acrylic paints to weather the robot. This involves applying the paint liberally onto all the surfaces, and roughly wiping away most of it with a towel. The paint that isn’t wiped away stays in the corners and crevices of the parts, making the overall replica look older and more realistic.


5. Assembly

The video below shows how to assemble the robot. Overall, the assembly is not too difficult, but it is important to put the parts together in the right order. While a couple of small parts needs to be glued together, most parts are fastened together using bolts. This makes assembly and disassembly easy if any parts need to be fixed or replaced. The trickiest part was probably the wiring, figuring out how to connect the motors in the eyes of the robot to the controller in the body.

IMPORTANT: Before attaching the servo motors, you need to make sure that the angle of the motor is correct. Since the servos can only rotate 180 degrees, you won’t be able to control the joint correctly if they are attached when positioned at the wrong angle. Diagrams showing the correct angles of each of the servo motors are shown below. To attach the servo, first rotate the output shaft clockwise as far as it will go; this gives you the min/max position of the servo. Then attach the servo horn onto the output shaft at the correct angle, as shown in the diagrams. Minor variances in the positioning of the servo horn will be corrected in the servo calibration step in section 8[c].

In the 3D printed design of the robot, I have left a gap where Wall-E’s “Solar Charge Panel” indicator should go. I purposefully left the gap so that I could add some lights or a screen there later which would show the actual battery level of the robot. To provisionally fill the space (as seen in my images of the robot), I printed out a picture of the panel on some gloss photo paper and taped it into the space. Here is a PDF of the panel I used; it is already at the correct size, just make sure when sending it to the printer to turn off scaling (print at “actual size”):


6. Wiring and Electronics

The wiring diagram is shown below, illustrating how each of the electronic components were connected in the robot. The USB port of the Arduino Uno was then connected to the USB port of the Raspberry Pi. If the 12v to 5v DC buck converter is capable of delivering up to 5 amps, then the Raspberry Pi can be directly powered from the converter. Otherwise, it should be connected to a separate 5v battery.


7. Programming

The programming of the robot can be split into two main parts; the code for the Arduino micro-controller, and the web-server on the Raspberry Pi. I’ve uploaded all my code onto GitHub; the link is shown below.

The Arduino controls all of the motors within the robot, determining how they should move. In the code I added a velocity controller, so that the servo motors don’t suddenly jump into life at full speed, but instead start and stop gently.

The Raspberry Pi is connected to the Arduino via a USB cable, and can send user commands to the Arduino to make the robot move in a specific way. The Pi is also connected to a USB webcam and a speaker, and can play sound effects. The code is written in Python, and uses ‘Flask’ to generate a webserver. Any computer on the same local network can then access the page and remote control the robot.


8. Arduino Installation Guide

[a] Basic Installation

  1. Ensure that the wiring of the electronics matches the circuit diagram.
  2. Download/clone the folder “wall-e” from the GitHub repository.
  3. Open wall-e.ino in the Arduino IDE; the files MotorController.hpp and Queue.hpp should automatically open on separate tabs of the IDE as well.
  4. Install the Adafruit_PWMServoDriver.h library
    1. Go to Sketch -> Include Library -> Manage Libraries…
    2. Search for Adafruit Servo.
    3. Install version 1.0.2 of the library; the newest version has a bug and does not work properly.
  5. Connect to the computer to the micro-controller with a USB cable. Ensure that the correct Board and Port are selected in the Tools menu.
  6. Upload the sketch to the micro-controller.

[b] Testing the Main Program

  1. Once the sketch has been uploaded to the Arduino, power on the 12V battery while the micro-controller is still connected to the computer.
  2. Open the Serial Monitor (button in top-right of Arduino IDE). Set the baud rate to 115200.
  3. To control the movement of the robot, send the characters ‘w’, ‘a’, ‘s’ or ‘d’ to move forward, left, back or right respectively. Send ‘q’ to stop all movement.
  4. To move the head, send the characters ‘j’, ‘l’, ‘i’ or ‘k’ to tilt the head left or right and the eyes upwards or downwards. At this stage, the servos may try to move further than they should and may look uncoordinated. This will be solved by performing the servo motor calibration steps below.

[c] Servo Motor Calibration

  1. Download/clone the folder “wall-e_calibration” from the GitHub repository.
  2. Open wall-e_calibration.ino in the Arduino IDE.
  3. Upload the sketch to the micro-controller, and open the serial monitor and set the baud rate to 115200.
  4. The sketch is used to calibrate the maximum and minimum PWM pulse lengths required to move each servo motor across its desired range of motion. The standard LOW and HIGH positions of each of the servos is shown in the images below.
  5. When starting the sketch and opening the serial monitor, a message should appear after 2-3 seconds, saying that it is ready to calibrate the LOW position of the first servo motor (the head rotation).
  6. Send the character ‘a’ and ‘d’ to move the motor backwards and forwards by -10 and +10. For finer control, use the characters ‘z’ and ‘c’ to move the motor by -1 and +1.
  7. Once the motor is position in the correct position (as shown in the images below), send the character ‘n’ to proceed to the calibration step. It will move on to the HIGH position of the same servo, after which the process will repeat for each of the 7 servos in the robot.
  8. When all joints are calibrated, the sketch will output an array containing the calibration values to the serial monitor.
  9. Copy the array, and paste it into lines 108 to 114 of the program wall-e.ino. The array should look similar to this:
    int preset[][2] =  {{398, 112},  // head rotation
                        {565, 188},  // neck top
                        {470, 100},  // neck bottom
                        {475, 230},  // eye right
                        {270, 440},  // eye left
                        {350, 185},  // arm left
                        {188, 360}}; // arm right

[d] Battery Level Detection (optional)

When using batteries to power the robot, it is important to keep track of how much power is left. Some batteries may break if they are over-discharged, and the SD card of the Raspberry Pi may become corrupted if not enough power is delivered.

  1. To use the battery level detection feature on the Arduino, connect the following resistors and wiring as shown in the image below. The resistors (potential divider) reduce the 12V voltage down to a value below 5V, which is safe for the Arduino to measure using its analogue pins. The recommended resistor values are R1 = 100kΩ and R2 = 47kΩ.
  2. Uncomment line 50 in the main Arduino sketch wall-e.ino.
  3. If you are using different resistor values, change the value of the potential divider gain factor on line 54 of the sketch, according to the formula: POT_DIV = R2 / (R1 + R2).
  4. The program should now automatically check the battery level every 10 seconds, and this level will be shown on the Raspberry Pi web-interface in the “Status” section.
Diagram of the battery level detection circuitry

9. Raspberry Pi Web Server

[a] Basic Installation

  1. Setup the Raspberry Pi to run the latest version of Raspbian/NOOBS. The setup instructions can be found on the Raspberry Pi website.
  2. Open the command line terminal on the Raspberry Pi.
  3. Ensure that the package list has been updated (this may take some time): sudo apt-get update
  4. Install Flask – this is a Python framework used to create webservers:
    1. Ensure that pip is installed: sudo apt-get install python-pip
    2. Install Flask and its dependencies: sudo pip install flask
  5. Clone repository into the home directory of the Raspberry Pi:
    cd ~
    git clone https://github.com/chillibasket/walle-replica.git 
  6. Set the web server password:
    1. Open app.py: nano ~/walle-replica/web_interface/app.py
    2. On line 20 of app.py where is says put_password_here, insert the password you want to use for the web interface.
  7. (Optional) Change the default audio directory and location of the script used to start/stop the video stream.
    1. If you followed the steps above exactly, there is no need to do this. However, if you want to move the web-interface files to a different directory on the Raspberry Pi, you will need to change the location where the program will look for the audio files.
    2. On line 23 of app.py, type the directory where the audio files are located. Ensure that the directory location ends with a forward slash: /.
    3. On line 22 of app.py, the location of the script used to start and stop the video camera stream can be modified.
  8. Connect to the Arduino/micro-controller:
    1. Plug the Arduino/micro-controller into the USB port of the Raspberry Pi.
    2. If you would like the serial port used by the Arduino to be selected by default in the web-interface, you can set a preferred serial port device in the code. Go to line 21 of app.py and replace the text ARDUINO with the name of your device. The name must match the one which appears in the drop-down menu in the “Settings” tab of the web-interface.
    3. Press CTRL + O to save and CTRL + X to exit the nano editor.

[b] Using the Web Server

  1. To determine the current IP address of the Raspberry Pi on your network, type the command: hostname -I
  2. To start the server: python3 ~/walle-replica/web_interface/app.py
  3. To access the web interface, open a browser on any computer/device on the same network and type in the IP address of the Raspberry Pi, follow by :5000. For example 192.168.1.10:5000
  4. To stop the server press: CTRL + C
  5. To start controlling the robot, you first need to start serial communication with the Arduino. To do this, go to the Settings tab of the web-interface, select the correct serial port from the drop-down list and press on the Reconnect button.

[c] Adding a Camera Stream (optional)

  1. Install mjpg-streamer – this is used to stream the video to the webserver. A good description of the installation procedure is described here. Complete the Install & Setup steps, as well as creating the Auto Start Manager Script. Stop when you reach the Start on Boot section.
  2. Make sure that the manager script you created has the correct name and is in the correct directory: /home/pi/mjpg-streamer.sh. If you want the save the script in a different location, you need to update line 22 of app.py.

[d] Automatically start Server on Boot (optional, but recommended)

  1. Create a .service file which is used to start the web interface: nano ~/walle.service
  2. Paste the following text into the file:
    [Unit]
    Description=Start Wall-E Web Interface
    After=network.target
    
    [Service]
    WorkingDirectory=/home/pi/walle-replica/web_interface
    ExecStart=/usr/bin/python3 app.py
    Restart=always
    StandardOutput=syslog
    StandardError=syslog
    SyslogIdentifier=walle
    User=pi
    
    [Install]
    WantedBy=multi-user.target
  3. Press CTRL + O to save and CTRL + X to exit the nano editor.
  4. Copy this file into the startup directory using the command: sudo cp ~/walle.service /etc/systemd/system/walle.service
  5. To enable auto-start, use the following command: sudo systemctl enable walle.service
  6. The web interface should now automatically start when the Raspberry Pi is turned on. You can also manually start and stop the service using the commands: sudo systemctl start walle.service and sudo systemctl stop walle.service

[e] Adding new Sounds (optional)

  1. By default the Raspberry should automatically select whether to output audio to the HDMI port or the headphone jack. However, you can ensure that it always uses the headphone jack with the following command: amixer cset numid=3 1
  2. Make sure that all the sound files you want to use are of type *.ogg. Most music/sound editors should be able to convert the sound file to this format.
  3. Change the file name so that it has the following format: [group name]_[file name]_[length in milliseconds].ogg. For example: voice_eva_1200.ogg. In the web-interface, the audio files will be grouped using the “group name” and sorted alphabetically.
  4. Upload the sound file to Raspberry Pi in the following folder: ~/walle-replica/web_interface/static/sounds/
  5. All the files should appear in the web interface when you reload the page. If the files do not appear, you may need to change the privileges required to access the folder: sudo chmod -R 755 ~/walle-replica/web_interface/static/sounds

[f] Set up Raspberry Pi as a WiFi Hotspot (optional)

If you would like to control the robot outdoors or at conventions, there may not be any safe WiFi networks you can connect to. To overcome this issue and eliminate the need for any external networking equipment, the Raspberry Pi can broadcast its own WiFi network. You can then connect the computer/phone/tablet you are using to control the robot directly to this network.

The instructions for setting up such a WiFi hotspot can be found on the official Raspberry Pi website.

If you have any questions or comments, please leave a reply below:

204
Leave a Reply

avatar
newest oldest most voted
Juan Prat
Guest
Juan Prat

So i can confirm it’s not a power issue, I can get the dc motors to work if I use a different simple sketch.

I am using you’re exact same hardware. I ran a different sketch and was able to get wall-es wheels moving pretty good, I just can’t seem to get them to work in your walle.ino. It doesn’t sound like the motors even power up.

Sorry for posting a new message, I get an error when I try to reply.

Alex
Guest
Alex

Also, do you have a link to the speaker you used? I am only finding stuff that won’t fit or doesn’t have an integrated amplifier…

Alex
Guest
Alex

Hi, this is amazing, thanks for designing it (not to mention all of these very helpful and detailed instructions)
I am wondering, what I need the 5V power supply for, It says it is in the optional section (With the Raspberry Pi) on the parts list, and you already have us using the 12V battery with the converter to power all the motors and servos, and the Audrino Uno… is the 5V specifically for the Pi? but if that were the case, then why are you not powering it off of the 12V battery?

Juan Prat
Guest
Juan Prat

Why would the servo motors on the arms, eyes, neck etc. work, but the motors for the wheels not work?

This is where I’m stuck now, I can’t get the dc motors on the wheels to work. Is it a power issue?

Any help is much appreciated

andy
Guest
andy

Thanks for all the work you put in to wall-e. I ran into a a problem. When i uploaded the sketch the motors worked and the servos didn’t. Went and did the servo calibration wont work. It let me do the head with problems but none of the other ones. i did read the post with the other guy that had the same problems. Mine is a adafruit PCA9685 pwm servo driver. Mine has a transistor in it where you said to jump. i’m guessing the newer ones have it i looked at adafruits site https://www.adafruit.com/product/815. You said the pie… Read more »

Gusi
Guest
Gusi

Hola de nuevo Simon!
Podrías decirme cómo agregar 2 botones más a la app?
Gracias

Hello again Simon!
Could you tell me how to add 2 more buttons to the app?
Thank you

Matthias Werner
Guest
Matthias Werner

I have found some add-on’s from other people, maybe i will give them a try: Cooler box: https://www.thingiverse.com/thing:4141026 Integrated holder for box: https://www.thingiverse.com/thing:4148244 Eyebrows: https://www.thingiverse.com/thing:3955562 For the camera, i used original raspberry cam with ribbon cable. You have to use 50cm or longer cable. I have drilled a 10mm hole in the back of head. You will find there a small hole for servo cable, but i didn’t use this. I drilled the hole in the upper space. On the raspberry pi (i used the raspberry 4 with 2gb) i used the “Raspbian Buster Lite” Version. For the webserver i… Read more »

Juan Prat
Guest
Juan Prat

So what I’ve been able to do so far: move the servos in calibration. I haven’t been able to get any movement yet out of the wheels. When I go to web interface, I can connect to the Arduino now, but none of the sliders move the servos. Do you think this is a USB connection issue?

Maciej Murzyński
Guest
Maciej Murzyński

Hi, I have a problem with L and R engines. I connected the motor shield HW-130 to the set. I understand that there should be some modifications to this in the code. Please help because the engines do not want to start. And how can you test them when connecting to a PC

Jeremy Williams
Guest
Jeremy Williams

Hi great project and design
nearly completed what did you use for the power symbol design in the oblong opening in the front panel as I can not see any reference to it in the write up

Thanks