Tobi-P, the Robotic Rabbit Companion

by jdelbe in Circuits > Robots

1858 Views, 17 Favorites, 0 Comments

Tobi-P, the Robotic Rabbit Companion

Tobi-P - First contact
App_Screen_Ear.png
SPLIT_VIEW_Cropped.png
Sofa.jpg
Laptop.jpg
WC.jpg
Low-angle_shot.jpg
Back_recharge_square.jpg
GIF_Tobi_By_Night_480p.GIF
Screenshot from 2021-08-26 19-13-53.png

Tobi-P ("Pi-bot" read backwards) is a fully open-source companion, bringing smiles and good mood at home.

The nose is a tilt camera, making it a FPV robot controllable from the dedicated Android app.

The body has been entirely designed with Blender, and requires no screw to assemble.
It is white on the outside, orange on the inside.

Supplies

Check Your Raspberry Pi Revision

IMG_20200702_125744.jpg

The heart of Tobi-P is a Raspberry Pi 1 Model B (512 MB), which is now obsolete. Recent versions of the board should work well as replacements though.

In particular the Raspberry Pi Zero W should be good enough, it even has wireless already. However some of the following steps may need to be adapted, as well as some of the requirements and components (camera cable, Ethernet, board power requirement, footprint in the case...).

Customize Your Future Companion

Cousin.png

Because Tobi-P already exists and is unique, you should change some of its features if you decide to build one. ;)
It could be a different color, or longer ears for instance. Having different relatives is cool! :)

Also don't forget to pick up a name for your new companion!

Prepare the SD Card

Screenshot from 2021-09-13 22-38-07.png
Screenshot from 2021-09-12 09-11-29.png

Let's start with the brain part of our project: the software.

  1. Download and install the latest Raspberry Pi Imager from the official website.

  2. Insert the SD card into your computer, or connect a SD card reader with it inside.

  3. Launch the program, select Raspberry Pi OS (other) -> Raspberry Pi OS Lite (32-bit)

  4. Choose your SD card in the "Storage" tab.

  5. Press Ctrl-Shift-X to open the advanced options.

  6. Set the hostname to tobi.

  7. Enable SSH and choose a password.

  8. Click "Save", then "Write", and wait for the download and copy to finish.

Note:

If using Raspberry Pi Imager on Windows 10 with controlled folder access enabled, you will need to explicitly allow Raspberry Pi Imager permission to write the SD card. If this is not done, the imaging process will fail with a "failed to write" error.

Setup the Raspberry Pi

Screenshot from 2021-09-12 09-45-17.png
aptUpdate.png
  • Insert the SD card in the Pi and connect an Ethernet cable.
  • Power it up. No need to use the power bank yet, a standard USB charger 5V @ 2A is enough.
  • SSH into it.
  • Start the raspi-config utility to change some of the default settings:
sudo raspi-config
1 System Options -> S5 Boot / Auto Login -> B2 Console Autologin
3 Interface Options -> P1 Camera -> Yes
4 Performance Options -> P1 Overclock -> High
                      -> P2 GPU Memory -> 16 MB
5 Localisation Options -> L2 Timezone -> Select yours
                       -> L4 WLAN Country -> Select yours
6 Advanced Options -> A1 Expand Filesystem -> Ok
  • Finish and reboot to apply the changes:
sudo reboot

Optionally, it would be a good time to update the OS:

sudo apt update ; sudo apt full-upgrade
sudo reboot

Install the Software

Screenshot from 2021-09-13 10-11-06.png
Screenshot from 2021-09-13 10-00-08.png

If not already present, install git:

sudo apt install git

Then get the latest version of the robot software stack:

git clone https://gitlab.com/jdelbe/tobi-p.git ~/tobi_catkin_ws/src/tobi-p

Now simply start the installation script which will take care of everything:

cd ~/tobi_catkin_ws/src/tobi-p/tobi_bringup/scripts
./install.bash 


Note: the last step can be VERY long, as it installs ROS and everything from sources!
As long as the spinner keeps spinning though, everything is fine :)
Be patient, or start already with the next step.


Once the installation is successful, run the last to command to shut down the Raspberry Pi:

sudo poweroff

You can now unplug the power (micro-USB) and the LAN cables.

Prepare the Motors

IMG_20210817_102204.jpg
IMG_20210817_113211.jpg
0J10238.1200.jpg

We now start to give Tobi-P its ability to move.

First, solder 2 wires (preferably of different colors), to the brushed motors. Since the motors are identical, we will keep the same +/- convention for both.

This is optional, but I really like using standard 2.54mm Dupont connectors (with crimping pliers) to manage wires.

Once this is done, you can already fit the wheels and tires.

Prepare the Motor Driver

0J4053.1200.jpg
IMG_20191101_181656.jpg

Solder the provided headers, it is way more convenient than soldering cables directly onto the little board.

Both orientations are possible, just keep in mind that you will want to be able to read the labels on the PCB later, when this is full of wires.

Prepare the USB Connector

IMG_20210913_110008.jpg

Carefully follow the pin configuration of a USB Type-A connector and solder the red wire on the Vcc (+5V) pin, the black wire on the Ground pin. This will be responsible for providing power to the previous board.

Once soldered, put the different pieces of the plug kit together. Depending on the one you have, it can be a pain to fit everything into the plastic casing.

Here I have used again 2.54mm connectors for the other end of the red and black cables.

Wire Up the Electronics

Wiring_complete.png

Follow the above diagram to connect :

  1. the motor driver to the Raspberry Pi GPIOs
  2. the motors to the motor driver
  3. the USB connector (from the previous step), between the motor driver and the power bank (2.4A output)
  4. the micro servomotor to the Raspberry Pi GPIOs
  5. the short micro-USB cable to the Raspberry Pi (power input port)

It is in theory fairly simple, but it is easy to make mistakes as well. The wiring of the motor driver in particular can get a bit tricky. The DRV8835 product page has all the details and further explanations, should you want them.

For the Raspberry Pi, the pinout website is also a good reference.

Connect the Remaining Components

Elec_parts.jpg
  1. If your Raspberry Pi has no native wireless capability, plug the USB Wi-Fi adapter.
  2. Insert the ribbon cable for the camera into the Raspberry Pi camera module, then correctly connect the other end of the ribbon cable to the Raspberry Pi.
  3. Finally plug the remaining end of the short micro-USB cable to the power bank (2.1A output)

With the last step, the Pi should power up.

Download and Install the Android App

Screenshot from 2021-09-13 07-30-11.png
Screenshot_20210913-175924_Package_installer.png

We want to to test if everything is functioning, especially after the last 2 steps.

For this we need an Android device and the control application: the latest release version is available for download from the dedicated project repository, for convenience.

Note:

You should never install a program if you don't trust its origin!!
Feel free to build the apk directly from the sources, that is the beauty of open source!

Then simply install the application.

Connect to the Access Point and Start the App

Screenshot_20210913-175954_Package_installer.png
  1. Turn on the Wi-Fi on your Android device.
  2. Display the list of available Wi-Fi networks.
  3. Select Tobi-AP, our Access Point.
  4. Type the password, the default is "Tobi-Pass-42".

Once connected to the robot network, launch the ROS Control app for the first time. Allow it to access media, location and camera.

Configure the App for Your Robot

Screenshot_20210913-180000_ROS_Control.png
Screenshot_20210913-080106_ROS_Control.png
Screenshot_20210913-073622_ROS_Control.png

Follow the instructions on the screen to add a new robot:

  • Give it a name
  • set the Master URI to: http://192.168.1.1:11311

The signal icon should turn black if the robot is detected. Click on it to connect, the application should now switch to the main window.

Check That Everything Is Working

Motor control test

From the main screen, try now to move the slider up and down. It should rotate the servo.

Move the joystick in all directions, and check that the orientation of both wheels is the one expected.

Try moving the camera a bit, to make sure that the image is not frozen.

Note:

When the app is started for the first time, it can take take several seconds before everything works normally. This is specially true for the camera.

Congratulations, the core of your new robot is working!

You can unplug the power bank as well as most of the components. The next time we connect them will be for the complete assembly.

Download the 3D Files

Screenshot from 2021-09-13 13-27-15.png

It is now time to give our new companion its body.

Go to the dedicated project page and download all the files. The page also has all the information and detailed settings for 3D printing.

Adapt the Parts to Your Case

Screenshot from 2021-09-13 14-23-04.png
Blender_bot_SMALL.jpg
Blender_side_wire.png

As mentioned in the first step, some adjustments may be needed if you are using a different Raspberry Pi than mine. This concerns particularly the Raspi_Plateau, which is tailored for my revision (screw holes, connector orientation...).

It is anyway a good idea to check all the parts with your favorite CAD software before taking the next steps.

Slice the Parts for Your 3D Printer

Screenshot from 2021-09-13 07-18-48.png
Screenshot from 2021-09-13 19-07-45.png
Screenshot from 2021-09-13 19-07-31.png

In my case I'm using the latest version of PrusaSlicer (2.3.3 at the time of writing).

Be sure to refer to the details on the project page in the previous step, for instance regarding the non-manifold meshes.

As a rule of thumb, I have used a resolution of 0.20mm most of the time, except for the parts with smooth edges on the external cover.

Turning on the variable layer height feature is also advised, as it really optimize the quality/time ratio.

3D Print the Case

Slicing & 3D printing.mp4
IMG_20210316_111514.jpg
IMG_20210712_085737.jpg

Start with the orange parts (inner structure), since they will not be visible in the end.

This way you still have means to edit the next pieces and correct the printing settings, should anything from the 2 previous steps not go as planed.

When printing the white parts (outside case), start from the back pieces for the same reason.

The panels for instance only need to have a nice and flat surface, the rest is hidden. But this is the first layer, so make your printer is correctly tuned for that.

Make the Fluffy Parts

GOPR9446.JPG

The big pom pom for the tail can easily be made by hand, whereas a smaller one can be created with a fork.

The ears are made of different fabric stitched together. The white one is made of 2 layers, creating an opening for an optional iron wire. The iron wire gives some stiffness to the ears and allow them to bend nicely to your will.

Ready the Face Accessories

GOPR9496.JPG

We are getting closer to our goal, our companion is slowly gaining its personality!

  1. Run some very important functional tests on the googly eyes.
  2. Check that the camera is fitting nicely into the nose hole.
  3. Make sure the muzzle looks awesome when put on the face.
  4. Cut a few pieces of iron wire (about 2 cm long) for the whiskers.

Prepare the Assembly

All_parts_crop.jpg

First verify that the 3D printed parts all fit correctly together: here is a video for the orange parts, and here one for the white parts.

Gather and line up all the pieces for the big next step, as well as a few tools: a screwdriver, pliers, and maybe some glue.

Assemble Everything

Tobi-P - Full assembly

Follow the video for the complete assembly!

Take your time, pause or slow down the video for the sections where you need it.
It is a quite long process, but the result is definitely worth it!

Power Up Your Robot, and Enjoy!

Birth_Certificate_HD.jpg
App_Screen_Carrot+Feet+Screenshot.png
App_Screenshot.png

Congratulations !

You have finished creating your new companion, and it is now ready to be guided from your pocket device.
I hope it will bring you joy and entertainment, as much as Tobi-P does in our home!

Also don't hesitate to share your creations on the website! :)