Introduction: Mobile Earth Rover One - 3.5G Exploration

If you can’t explore the Moon or Mars … you can always explore your neighborhood!

The main goal of this project is to alter a remote controlled vehicle and control it via
Internet Telerobotics using the Mobile Telephone Network (WWAN - Wireless Wide
Area Network) 3.5G or 4G (Long Term Evolution) and as an alternative you can always
use WiFi networks.

For this challenge it is necessary to make some modifications to a remote-control
car, adapting and equipping it with the necessary software and hardware in order to
achieve the objectives stated above.

Step 1: Earth Exploration Videos

This first video shows th 3D Sketch of the Mobile Earth Rover.


Now form 3D to the real word, this second video shows some parts of the building
stage and some initial test runs using the 3.5G network. The vehicle is equipped
with a boom camera arm that allows 1st and 3rd person viewing, the camera also
preforms pan and tilt movements.    
                           

This last video shows a test run in various places, where the maximum distance
from the control room to the vehicle exceeds 1 Kilometer :

                          

The vehicle has the capability of driving for 5 continues hours and In theory you can drive
all over the place, as long as you have 3.5G coverage, the maximum i dared to go was
about 1 km from base without supervision.

Step 2: The Idea

The main goal is to be able to remotely control an RC vehicle using the mobile phone
Network (3.5G or 4G) controlled  via Internet Telerobotics in order to explore your
neighborhood, or let other people in remote locations do the exploring!
This goal is possible by equipping an RC Truck with an on-board computer capable of
connecting itself to the 3.5G/4G Network, thus making it ready to be controlled by any
one with a computer with an Internet connection.

Note:
  - In the image above, the hexagons correspond to the mobile phone network coverage
    area.
  - The RC's Truck Transmitter is used as an USB plug and play device, to control the RC.

Step 3: List of Components

All materials listed above can easily be acquired by on-line shopping, keep in mind
that the 3.5G/4G USB modem has to have a active unlimited data plan.

Suppliers:
   - Asus EeePc , Web camera -               Staples
   - Traxxas E-Maxx, Batteries, Springs - http://www.modelsport.co.uk
   - Arduinos, Micro Servo Controller-      http://www.coolcomponents.co.uk
   - All kinds of Servo Motors -                   http://www.servoshop.co.uk
   - LED's and fixing supports -                 http://www.ultraleds.co.uk
   - Metalic Barrings -                                  RS Amidata

Project Costs:
   - Around 1500$USD Total cost (in 2009)

Step 4: The Mobile Earth Rover Design (2D and 3D Models)

The Mobile Earth Rover's design consists on the remodeling of the electric radio
controlled truck called "Traxxas E-Maxx" and equipping it with an on-board computer
and a "boom camera" that allows for 1st and 3rd person viewing.

Download the 2D design here: http://dl.dropbox.com/u/4302919/chassis_v15.cdr.
The 3D sketch can be found below.

Step 5: The 1st Goal

1 - The first goal is to make the following connections (follow the above picture):
    Instructions:
    1.1 - Connect the EeePc to ZTE 3.5G Modem via USB cable
    1.2 - Connect the EeePc to Logitech WebCam via USB cable
    1.3 - Connect the EeePC to Arduino via USB cable
    1.4 - Connect the Arduino to Micro Servo Controller:
        1.4.1 - Signal via Arduino port PIN 13 to micro controller serial signal pin (yellow)
        1.4.2 - Ground via Arduino  ground to micro controller ground pin (black) 
        1.4.3 - Power via Arduino 5V to micro controller power pin (red)
    1.5 - Connect the Micro Servo controller to the Servo Motors via Servo cables
        1.5.1 - Micro Servo controller Signal to Servo Signal
        1.5.2 - Micro Servo controller Ground to Ground and 6V battery Ground
        1.5.3 - Micro Servo controller Power to 6V battery
    1.6 - Connect the Micro Servo controller to the Electronic Switch Controller (ESC)
        1.6.1 - Micro Servo controller Signal to Servo Signal
        1.6.2 - Micro Servo controller Ground to Ground
        1.6.3 - Micro Servo controller Power power cable is not connected to the ESC

2 - The 38 LED System:
    Instructions:
    2.1 - The LED's are attached to the aluminum structure inside 8mm holes
    2.2 - Make 5 groups of LED's
          2.2.1 - Group 1 composed by 12 Blue LED's that illuminate the top of the EeePC
          2.2.2 - Group 2 composed by 6 Blue LED's that illuminate the floor
          2.2.3 - Group 3 composed by 4 White LED's that illuminate at the front (front lights)
          2.2.4 - Group 4 composed by 2 Red LED's that illuminate the rear (tail lights)
          2.2.5 - Group 5 composed by 2 White LED's that illuminate the boom camera arm
    2.3 - Insert RGB LED´s inside the wheals and make a single group (Group 6)
          2.3.1 - Each  RGB LED system contains 3 LED's
    2.4 - Connect the grouped LED´s to the Arduino board (See LED schematics )
    2.5 - Use 2N2222 Transistors and 3k3 resistors according to the schematics
    2.6 - Spread the leads around the chassis

You will now be able to control all grouped LED's via software :)
         
3 - Power supplies:
    Instructions:
    3.1 - The on-board computer is powered by its own lithium battery.
    3.2 - The Traxxas E-Maxx is equipped with 2 x 7.4V batteries (to power the 2 DC
             motors and the Electronic Switch Controller ESC).
    3.3 - The micro servo controller is connected to an external battery with 6V that feeds
             all the servos including the directional servos from the Traxxas E-Maxx.
    3.4 - The LED's are powered by a 3.V battery

This setup allows for a typical battery autonomy of around 4 to 5 hours, that in my opinion is
more than enough to do some remote exploration. keep in mind that the laptops screen is
turned off and the rovers speed is limited by software thus increasing the autonomy of the
batteries.

Step 6: The 1st Goal: the Extreme Traxxas E-Maxx Modification

Now for the mechanical work on the extreme remodeling of the Traxxas E-Maxx:

0. Necessary tools and materials:
      - Laser CNC router or Plasma CNC router
      - Aluminum plate - size 1200x600x3mm (Form main chassis base and for the beams)
      - Aluminum plate - size 400x400x1mm (For servo casing, Arudino casing, LED support, etc)
      - Bolts - 100 units of 3mm (3M)
      - Nuts - 200 units of 3mm (3M) (2 nuts per bolt  for extra holding force)
      - Several different sized screw drivers
      - Several different sized pliers
      - Metallic file (to trim the aluminum borders)
      - Some sandpaper (for aluminum finishing)
      - Paper face mask ( to avoid inhaling aluminum dust (highly toxic) )
      - Some transparent aluminum varnish spray (for painting the aluminum to avoid
         aluminum oxidation)

1. Cut out all the necessary aluminum parts form the aluminum plate (see photo of
     all aluminum parts):

   Instructions:
       1.1 - Parts for holding/fixing the Arduino on board (see photos for more detail)
       1.2 - Parts for holding/fixing the EeePC (see photos for more detail)
       1.3 - Parts for holding/fixing the Pololu Micro servo Controller (see photos for more detail)
       1.4 - Parts for holding/fixing the LED's (see photos for more detail)
       1.5 - Parts for holding/fixing the 3.5G/4G Modem (see photos for more detail)
       1.6 - Parts for holding/fixing the 2 micro servos and 1 boom camera servo
       1.7 - Parts for holding /fixing the Aluminum beams (see photos for more detail)

2. The aluminum base plate:
   Instructions:
       2.1 - Download the 2D design here: http://dl.dropbox.com/u/4302919/chassis_v15.cdr.
       2.2 - Cut the aluminum plate using a laser CNC router.
       2.3 - The design needs to be laser cut or Plasma CNC router or Laser CNC router.
       2.3 - All small holes have 3mm diameter for allowing the bolts to fit.
       2.4 - The center square hole in the middle of the plate is made in order to allow for the
                motors to fit in between and lower the center of mass.
       2.5 - The 4 small rectangular holes are for allowing cables to pass from one side of
                the plate to the other.

3. The 4 aluminum beams:
   Instructions:
       3.1 - The aluminum beams allow for the protection of the electronic equipment
                on-board the vehicle .
       3.2 - The aluminum beams fit perpendicularity to the aluminum plate.
       3.3 - The beams fit on the front and back of aluminum base  (see photos)

4. The 2 "boom camera" aluminum beams:
   Instructions:
       4.1 - The 2 beams are screwed together spaced with 2.5cm apart (to create a
                steady structure and to avoid propagation of vibration to the web camera)
       4.2 - The camera is mounted on the end of the beams
       4.3 - The boom camera beam is mounted on the rotary motor extension
       4.4 - Because it is a moving part the beam has 2 docking stations, one in the
                front and one in the back of the aluminum plate to allow the arm to rest

5. The pan tilt system:
   Instructions:
       5.1 - The pan tilt system is composed by 2 servo motors (see photo)
       5.2 - The servos are mounted one on top of each other using small aluminum
                cases (see photo)

6. Mounting the base aluminum plate to the aluminum beams:
   Instructions:
       6.1 - Mount the aluminum plate on board the vehicle.
       6.2 - Isolate the center square hole with rubber to avoid the motor discharging on
                the aluminum
       6.3 - Tighten with bolts all the necessary aluminum parts in order to hold the
                on-board Arduino.
       6.4 - Mount the Arduino board on-board the vehicle.
       6.5 - Tighten with bolts all the necessary aluminum parts in order to hold the
                on-board computer (EeePc 901).
       6.7 - Mount the on-board (EeePc 901) computer on the vehicle.
       6.8 - Tighten with bolts the 4 protective aluminum beams

7. The boom camera motor system (this is the most complex mechanical aspect of the
     mechanical work, see photos for more detail)
   Instructions:
       7.1 - Mount the boom camera motor inside a aluminum case and attach a cylindrical
                extension inside 2 aligned bearings
       7.2 - Attach the aluminum beams to the center of the cylindrical motor extension

After all the motors are attached inside of the aluminum casings make all the wire
connections mentioned in the previous step.

Step 7: The 2nd Goal

The second goal is to make the flowing connections (see image) and create a USB
peripheral (using the remote controller from the RC vehicle). The idea is to control
the rover using the USB plug-and-play remodeled transmitter.

The schematic shown above has the following description:
   1 - Is the potentiometer that will control the Tilt Movement of the camera (1 of the
         new potentiometers)
   2 - Is the potentiometer that will control the Pan Movement of the camera (1 of the
         new potentiometers)
   3 - Is the potentiometer to control the Menu Scroll (1 of the new potentiometers)
   4 - Is the potentiometer to set Menu item On/Off (1 of the new potentiometers)
   5 - Is the RC transmitters Directional potentiometer (existing potentiometer on the
         transmitter)
   6 - Is the RC transmitter acceleration potentiometer (existing potentiometer on the
         transmitter)

Step 8: The 2nd Goal: RC Transmitter Hack

In order to transform the rc's transmitter into a USB device we will need:

0 - Tools:
   - Arduino - 1 unit
   - Potentiometers with buttons - 4 units + 4 buttons
   - Screw driver
   - Electric drill
   - Solder iron
   - Aluminum plate  - size 300x150x2mm
   - Bolts 12 units 2mm (2M12)
   - Nuts 24 units 2mm (2M)

1 -The RC transmitter hack:
   Instructions:
      1.1 - Open your RC transmitter and make 4 holes on the back lid using a drill (10mm)
      1.2 - Connect the 4 new potentiometers to the back lid, and attach the buttons.
   
2 - The connections:
   Instructions:
      2.1 - Connect all the potentiometers including the directional and acceleration to the
               analog port in the Arduino Board.
      2.2 - Each potentiometer has 3 wires (ground 5V and signal). Follow the schematics
               in order to implement the wiring.

3 - The plug and play device:
   Instructions:
      3.1 - Make an aluminum box for the transmitter and the Arduino using the aluminum plate
      3.2 - Attach the Arduino and the RC Transmitter inside the aluminum case

Now with all the potentiometers connected to the Arduino you are able to sense the signals
via the Arduino and send them to the computer.

Step 9: The Software (Real Time Linux)

The Operating System on the on-board computer and on the client side is Debian Linux
with Adeos patch and Xenomai API  for a "real time computing environment" in order
to control and predict local latency.

Building a Xenomai patched Linux kernel package on the server side and on the client
side can be done by following the instructions in the Xenomai web site:
http://www.xenomai.org/index.php/Building_Debian_packages

INSTRUCTIONS ON HOW TO BUILD A XENOMAI PATCHED KERNEL
========================================
DEBIAN kernel with adeos + Xenomai 2.4.x
========================================

========================================
#1 : Install the following pakadges
========================================

apt-get install gcc
apt-get install g++
apt-get install kernel-package

========================================
#2 : Download a xenomai compatible
        kernel from kernel.org

========================================

cd /usr/src

tar -jvxf <path>/linux-2.6.23.12.tar.bz2
or
tar -xvzf <path>/linux-2.6.23.12.tar.gz

mv linux-2.6.23.12 linux-2.6.23.12-adeos

========================================
#2 : Alternative step as before to get kernel
========================================
add this link in /etc/apt/sources.list

deb http://ftp.de.debian.org/debian sid main

than run:

apt-get install linux-image-2.6.23.12

========================================
#3  : Downloading Xenomai
========================================

copy a xenomai from http://download.gna.org/xenomai/
(compatible with your kernel version)

to local dir /usr/src:

ls /usr/src

kernel-2.6.23.12-adeos/linux-image-2.6.23.12-adeos-686.deb
kernel-2.6.23.12-adeos/linux-headers-2.6.23.12-adeos-686.deb
xenomai-2.4.2.tar.bz2

Caution: Some PCs can NOT boot a
kernel with ACPI (advanced configuration
and power interface) support.
In such cases the kernel image and
headers without ACPI support must be
installed:

kernel-2.6.23.12-adeos-no-acpi-support/linux-image-2.6.23.12-adeos-686-no_acpi.deb
kernel-2.6.23.12-adeos-no-acpi-support/linux-headers-2.6.23.12-adeos-686-no_acpi.deb

========================================
#4 :  Install kernel with patch adeos
========================================

cd /usr/src
dpkg –i linux-image-2.6.23.12-adeos-686.deb
dpkg –i linux-headers-2.6.23.12-adeos-686.deb

(or:
dpkg –i linux-image-2.6.23.12-adeos-686-no_acpi.deb
dpkg –i linux-headers-2.6.23.12-adeos-686-no_acpi.deb
)

ln -s /usr/src/linux-headers-2.6.23.12-adeos  /lib/modules/2.6.23.12-adeos/build

reboot

now you will reboot into the adeos kernel

========================================
#5 : Install Xenomai
========================================

cd /usr/src
tar xjvf xenomai-2.4.2.tar.bz2
cd /usr/src/xenomai-2.4.2
scripts/prepare-kernel.sh --linux=/usr/src/linux-headers-2.6.23.12-adeos
./configure --enable-x86-sep
make
make install

now edit file /etc/ld.so.conf e ads a line at the end:
/usr/xenomai/lib

and execute:

ldconfig

========================================
#6  : Xenomai Configuration
========================================

edit /etc/profile e add the following lines at the end pf the file:

#Xenomai
export PATH=$PATH:/usr/xenomai/bin
export MANPATH=$MANPATH:/usr/xenomai/share/man/

Xenomai path, and manpages will be available after next login
(or su - username)

reboot

========================================
#7 : Xenomai Test (the most Important step :) )
========================================

xeno-info
man xeno-load

/usr/xenomai/share/xenomai/testsuite/latency/run
ctrl-C to stop

Also a stress test can be issued.
However this is not necessary to determine if Xenomai installation is ok.
Just to measure system performance in heavy load conditions.
Computer responds very slowly to user commands when this test is running,
especially on a virtual machine like vmware:

xeno-test
ctrl-C to stop

When script xeno-test is interrupted it leaves an active process that uses a lot of CPU:

ps aux
[…]
root 27152 43.8 0.2 2004 556 pts/1 R 10:21 0:31 dd if /dev/zero of /dev/null
[…]

Process PID==27152 is using 43,8 % of CPU

however it does nothing usefull, just copies bytes from somewhere to nowhere

dd if /dev/zero of /dev/null

In fact it copies endlessly null charcaters (ASCII==0x00), from /dev/zero to the
null device (ie. nowhere): /dev/null
This is a stress tess: xeno-test perform some system tests why this heavy
load process is running, to measure
system performance in heavy load conditions.

========================================
#8 : Xenomai API Documentation (local copy)
========================================
xenomai source code
/usr/src/xenomai-2.4.2/doc/generated/html/index.html

Examples:
/usr/src/xenomai-2.4.2/example
========================================
YES ... YOU NOW HAVE REAL TIME LINUX :)
========================================

0 - The required Debian Linux computer software on-bord the rover:
      0.1 - Webcam driver called v4l -       http://packages.debian.org/sid/v4l-conf
      0.2 - USB Modeswitch application- http://www.draisberghof.de/usb_modeswitch/
      0.3 - 3.5G Modem driver comgt -     http://comgt.com/gt/ 
      0.4 - 3.5G Application wvdial -          http://linux.about.com/library/cmd/blcmdl1_wvdial.htm

The developed software involved in the project implies a server side application, an
Arduino code on-board the Mobile Rover, a client side application and a Arduino
Code on the clients side (see image for more detail).

1 - Download the On-board Arduino Source Code:
      http://dl.dropbox.com/u/4302919/Arduino_Emaxx_Server.rar
     
      Instructions:
            1.1 - Unzip the file
            1.2 - Upload the code to the on-board Arduino using the Arduino software: 
                     http://arduino.cc/en/Main/Software

2 - Download the Server Side Soource Code:
      http://dl.dropbox.com/u/4302919/EEEMAXXX_SERVER0.rar
      Instructions:
            2.1 - Unzip the file
            2.2 - To recompile the code type: "make" in the command line terminal
            2.3 - Connect the OnBoard Arduino to the onboard computer using a USB
                     cable
            2.4 - To start the server type: "./servidor" in the command line terminal

3 - Download the Client side Source Code:
      http://dl.dropbox.com/u/4302919/EEEMAXXX_CLIENT0.rar
      Instructions:
            3.1 - Unzip the file
            3.2 - To recompile the code type: "make" in the command line terminal
            3.3 - Connect the RC Transmitter Arduino to the client computer using a USB
                     cable
            3.4 - To start the client application type: "./cliente" in the command line terminal

4 - Download the Transmitter Arduino Source Code:
      http://dl.dropbox.com/u/4302919/Arduino_Emaxx_Comando.rar
      Instructions:
            4.1 - Unzip the file
            4.2 - Upload the code to the on-board Arduino using the Arduino software:
                     http://arduino.cc/en/Main/Software

5 - The software for Video Streaming on the server is called Motion:
http://www.lavrsen.dk/foswiki/bin/view/Motion/WebHome

6 - The software for Audio Streaming on the server is called Murmur:
http://mumble.sourceforge.net/Running_Murmur

7 - The software for watching the Video Stream on the client side is any web browser
(URL- server_ip:port).

8 - The software for tuning in the Audio Stream on the client side is called Mumble:
http://mumble.sourceforge.net/Installing_Mumble

9 - Update IP addresses at dynamic DNS services. Update your dynamic IP address
at DynDNS.com
by creating an account:
http://dyn.com/dns/

10- Install and configure a ddclient client in the Mobile Earth Rover on board Computer:
http://www.debianadmin.com/ddclient-update-ip-addresses-at-dynamic-dns-service.html

Thats it, you are good to go, or let other people go explore!

/***************************************************************************************************************/
                             For any Questions Please send me an Email to:
                                            mobilearthrover@gmail.com        
                                                 

                                Have Fun Building and Happy Exploring!!!                  
                                  
                                 Check out the Mobile Earth Rover TWO:

          https://www.instructables.com/id/Mobile-Earth-Rover-Two-35G-Exploration/

/***************************************************************************************************************/

Step 10: The Thesis for Masters in Electronics and Telecommunication Engineering

For the more curious, here is the original document by Aldric Negrier containing his Thesis for Masters in Electronics and Telecommunication Engineering.

It is written in Portuguese :(