This page describes the realization of an exploration vehicle based on a mechanical structure made ​​of well known plastic bricks, the engines and sensors of the Thymio, all controlled by a Raspberry PI with Linux and Wi-Fi, powered by a solar battery.

The final vehicle has the following shape:

The following sections describe briefly how to implement this vehicle from a mechanical point of view, electronic (connections) and software. Software options may vary, as long as the vehicle has an embedded computer with Linux, but we only show a few possibilities.

Mechanical structure

In order to realize the mechanical base caterpillars, we looked at the first step of the instructions for the vehicle of the following box:

Thus we kept only the caterpillar's supports and the base structure that links the two caterpillars

The base chassis was then modified according to the following points :

enlargement to have more distance between the tracks

creation of a platform to support Thymio II and the Raspberry PI

mechanical support for the Thymio II

link between the wheels of the Thymio II and the caterpillars in order transmit the motion

support for the box of the Raspberry PI (to allow connections)

support for the camera of the Raspberry PI

support for the solar battery

Combined together, these modifications give the following version:

The bottom view offers a better view of the caterpillars and the spacing between them, as well as the base structure:

The front view allows you to see the structure that supports the chains between platform and caterpillars. In order to realize this link, the frontal axis of the caterpillars was replaced in order to lengthen inwards:

The side view allows you to see the upper structure with the supports for Thymio II on the right, the support for the Raspberry PI in the middle and the support for the battery on the back:

Thymio II was mounted on the front of this base through the lateral cross supports

The mechanical connection to activate the caterpillars from Thymio II wheels is made via chains and gears. Different possible diameters can offer a slight reduction between the wheels of Thymio II and caterpillars:

Here is a view of the inside of the chain that goes to the caterpillars, hidden in the previous image:

In order to obtain a more lively system (:-), we have placed two cabins with the drivers on the Thymio II by fixing them on the top face :

The Raspberry PI can be placed on the back of the Thymio II

The vehicle is equipped with a camera linked to the Raspberry PI. No holes for this connection were planned on the box of the Raspberry PI, therefore we have created an opening in the upper part of the box.

The camera has to be fixed somewhere with a rigid link. A support for the camera was made and can be fixed to the chassis and its orientation can be changed

The Raspberry PI is fixed to the chassis

Once the Raspberry PI installed, we can connect to Thymio II through a short USB cable and fix the camera

The camera is facing the front of the robot, between the two cabins. The opening angle is narrow enough so the cabins are not in its field of view.

The Raspberry PI is powered by a solar battery (which is also USB rechargeable):

The battery is placed in the rear of the vehicle on a slope for this purpose:

So at the end we obtain the following vehicle

Raspberry PI wiring

The connection to the battery is done through a short USB cable:

The connection between Thymio II and the Raspberry PI is done through USB. The second USB port is used for the WiFi

Once the SD card is ready, we can start the Raspberry PI. For the configuration, we plugged screen, mouse and keyboard to the Raspberry PI. We used a USB Hub as there are only two USB ports on the Raspberry PI. One suggestion is to connect the hub with keyboard, mouse etc. on one of the USB ports and the Wi-Fi in the other one. For the Wi-Fi we chose Edimax ew-7811un which is compact, cheap and compatible with the Raspberry PI. Some advice for its setup can be found here: http://www.frodebang.com/post/how-to-install-the-edimax-ew-7811un-wifi-adapter-on-the-raspberry-pi

We have mainly edited /etc/network/interfaces in order to have a fixed IP address on the Raspberry PI. Then the file looks like this:

With this configuration, we can have a totally independent robot that connects to an Access Point and we can connect to it using a ssh pi@<FIXED IP ADDRESS> and the password of the Raspberry PI user (by default the password is raspberry)

Control of Thymio II

You can download this package directly from the Raspberry PI or copy this package from your computer with the following command:

scp aseba_1.3.1_armhf.deb pi@<FIXED IP ADRESS>:~/.

For installing:

sudo dpkg -i aseba_1.3.1_armhf.deb

Some packages may be missing, they have to be installed with the following command :

sudo apt-get -f install

Once the various tools for Aseba are installed, Thymio has to be physically connected to the Raspberry PI. The connection is done using USB. If you want to check if Thymio II is connected, you can show the list of USB devices using the following command:

lsusb

There should be a device from the École Polytechnique Fédérale de Lausanne

You can check this connection using the command:

dmesg | tail

and list the new devices that appeared by using:

ls /dev/ttyACM*

At this point you can start Aseba Studio on your Raspberry PI, but this is not the goal for this project. What we want to do is connect to Thymio II and exchange messages with it from any place using wireless connection. As the serial port can be accessed only locally, it is interesting to create a local switch that allows you to connect to Thymio II using this switch from any place. In order to start this switch on the Raspberry PI, you can use the command:

asebaswitch "ser:device=/dev/ttyACM0"

by supposing that your Thymio II is the device /dev/ttyACM0.

When the switch is running on your Raspberry PI, you can start Aseba Studio on your computer and connect through the network (TCP) to the fixed IP address of your Raspberry PI. You should be able to access your Thymio II.

Monitoring proximity sensors

The following code (Here the file that can be downloaded) allows you to control Thymio II using buttons, IR remote control and events. By using the same events we can realize interesting graphics of inner variables, for example the values of the proximity sensors.

Here are some examples of situations when we have visualized the graphs of three different events: accelerometer, light and proxfront. If you want to make graphs using the values sent by an event, select the event and click on the icon graph on top of it. A new tab will appear with the graphic next to the tab of the code

Path on a hill, measure of the accelerometer

The fact that the robot is moving on a hill can be detected by the accelerometers, which measure the orientation of the gravity vector direction.

Here is a picture of the test which was made:

If we plot the three accelerometers' axes, we obtain the following graph:

We can observe a lot of noise due to the motion of the robot. The red axis, horizontal and perpendicular to the direction of the robot keeps the same value, while the values of the two other axes change in function of the slope

Detect light

The ambient light can be measured using the two sensors of the Thymio II that are facing the floor. Here the sensors can measure the diffused light that is reflected by the floor. Using a white floor and lateral sunlight, the measure varies depending on the robot orientation.

Here is a picture of the test which was made:

If we plot one of the light sensors, we obtain the following graph:

A variation of the measure depending on the robot's orientation can be observed.

Front proximity sensors

The front sensors of Thymio II allow to measure the distance from obstacles.

Here is a picture of the test which was made:

If the values of the proximity sensors are plotted while the robot is moving towards the obstacle and stopped when the obstacle is very close, we obtain the following graph:

Three sensors are detecting obstacles in this example.

Wireless camera

The instructions can be used to take a picture or save a video file. But the instruction to create a video stream on MAC are not updated, because the compiled version of the MPlayer mentioned in this page is not working for a MAC Intel ….