Robot Cat

by 陳亮 in Circuits > Robots

60364 Views, 418 Favorites, 0 Comments

Robot Cat

DSC04011.JPG
Robot Cat Hello World!

This instructables show somethings about building a robot cat.

Supplies

Why Build My Own Robot Cat?

IMG_6351.jpg
DSCN5098.jpg
FOE7B5NJNOVI4BF.jpg
IMG_9514.jpg

I am playing with the well known Strandbeest many years ago and really love the artificial life. And then I tried Trotbot, but sorry about not yet built Wadevag suggested Strider :P

Two years ago, I start saw many robot cats and dogs projects on the web. They works, walk well and can do some pose. The only shortcoming is it does not look like a cat or dog.

So I try to build my own robot cat. The main target are look like a cat, act like a cat.

Ref.:

https://en.wikipedia.org/wiki/Theo_Jansen#The_str...

https://www.strandbeest.com

https://www.instructables.com/id/Design-Robot-Legs...

https://www.instructables.com/id/Lego-Trotbot/

https://www.diywalkers.com/strider-linkage-plans.h...

Bionics

螢幕截圖 2020-09-01 上午7.53.18.png
IMG_4225.jpg
IMG_9451.jpg
IMG_9411.jpg
IMG_9513.jpg
499B1F7B-43EA-4D5B-ABF1-C358382DAEBC.jpeg
493AC181-2CF0-406B-ACD0-D28E04608C11.jpeg
IMG_1836D.jpeg

In order to build a robot look like a cat, we need first study the cat skeleton.

Cat is a digitigrade, that means they stands or walks on its digits, or toes. So cat have noticeable 3 joints for the back legs while human(Plantigrade) only have 2 joints. For the cat front legs, the metacarpals is relatively too short. So it is noticeable 2 joints for the front legs. So the robot cat have 2 joints on the front legs and 3 joints on the back legs, i.e. 10 servos. (most other robot cats and dogs only have 2 joints for the back legs)

Head and neck should have many moving parts, turning, nodding and also ears, eyes and month motions; Tail motion is actual most difficult to imitate, it actually combined by tens of joints and muscles. In first phase, I would like concentrate on the 4 legs movement first. For simplicity, I just use 2 servos for turning and nodding the head and 1 servo to make some simple tail turning. Cat tail normally point to the ground, but I found a long tail pointing up make it look vitality, so it always tail up.

Ref.:

https://en.wikipedia.org/wiki/Bionics

https://en.wikipedia.org/wiki/Cat_anatomy

https://en.wikipedia.org/wiki/Digitigrade

3D Printing

螢幕截圖 2020-09-06 下午5.02.09.png

The robot cat 3D print prototype is already at the third iteration and may be more iteration later on.

Please download and print all the parts at thingiverse: https://www.thingiverse.com/thing:4164643

Servo Driver Board

螢幕截圖 2020-09-06 上午11.44.02.png

The first phase of robot cat reduced many moving parts, but it still requires 13 servos. In my previous experience, direct driver servos with MCU GPIO is not a good choice. The frequency signal may vary while MCU doing another job at the same time and the servo may become unstable or introduce unexpected behavior. Dedicate an individual driver board generate servo signal is much better.

PCA9685 driver board is a common solution, MCU simply use I2C interface communicate with the driver board and it can control 16 servos at the same time continuously.

Robot Brain

螢幕截圖 2020-09-06 上午11.43.48.png

Various MCU able to control a servo robot, here are some preference when I choose among them:

  • built-in vision sensor for future development
  • small enough to fit in the robot cat head
  • wireless connective
  • I2C interface to communicate with servo driver board

I have a M5Stack Camera Module in hand and it can fulfill all the above requirements.

Measure & Adjust DC Regulators

IMG_3727.jpg

Like most dev device, M5Stack Camera Module operate in 5 V.

Most tiny servo operate in 5-6 V and each servo normal operate can draw 200 mA and more, operate 13 servos at the same time are over 2.6 A. In order to avoid the robot brain affected by power shortage, it is better dedicate an individual DC regulator for the brain and servos.

The output voltage of both DC regulators in hand are adjustable, sticky remember adjust the output voltage to 5V and 6 V respectively before using it or the components may be burnt.

Servo Tester

Servo Tester
Servo tester and Robot

In my experience, servo is very easy to damage. It is better buy few more spares in same order. Before using it, you can use a servo tester to check it can works normal: https://www.instructables.com/id/Servo-Tester-2/

FSBrowserPlus

螢幕截圖 2020-09-06 下午6.17.40.png

ESP32 have a bundled example called FSBrowser. It is a simple web server that host the web source files copied to SPIFFS, it have a simple web editor for amend the source over WiFi and also it have a simple API to read the GPIO values.

I have enhanced this example to FSBrowserPlus:

  • Added PCA9685 Servo Board API
  • Added a WebSocket server
  • Added Robot Cat Pose Design web page

https://github.com/moononournation/FSBrowserPlus

Program

Arduino IDE

Download and install Arduino IDE if you are not yet do it:

https://www.arduino.cc/en/main/software

ESP32 Support

Follow the Installation Instructions to add ESP32 support if you are not yet do it:

https://github.com/espressif/arduino-esp32

Arduino ESP32 filesystem uploader

Follow the installation steps to install Arduino ESP32 filesystem uploader if you are not yet do it:

https://github.com/me-no-dev/arduino-esp32fs-plugi...

FSBrowserPlus

Download FSBrowserPlus: (press "Clone or Download" -> "Download ZIP")

https://github.com/moononournation/FSBrowserPlus

ESP Async Web Server Library

Download latest ESPAsyncWebServer libraries: (press "Clone or Download" -> "Download ZIP")

https://github.com/me-no-dev/ESPAsyncWebServer.git

Import libraries in Arduino IDE. (Arduino IDE "Sketch" Menu -> "Include Library" -> "Add .ZIP Library" -> select downloaded ZIP file)

Compile & Upload

  1. Connect the M5Stack Camera Module with USB cable
  2. Open Arduino IDE
  3. Open FSBrowserPlus
  4. Edit the ssid and password to your own WiFi AP credential
  5. Press Arduino IDE "Upload" button
  6. Select "Tools" menu -> ESP32 Sketch Data Upload

Install Power Circuit

IMG_3678.jpg
IMG_3679.jpg
IMG_3680.jpg

Here are the power connect summary:

Lipo Battery plug
+ve pin -> 5V DC regulator INPUT +ve pin
           6V DC regulator INPUT +ve pin
-ve pin -> 5V DC regulator INPUT -ve pin
           6V DC regulator INPUT -ve pin

PCA9685 Servo Driver Board
GND pin -> 5V DC regulator OUTPUT -ve pin
           6V DC regulator OUTPUT -ve pin
           Grove cable black pin
SCL pin -> Grove cable yellow pin
SDA pin -> Grove cable white pin
VCC pin -> 5V DC regulator OUTPUT +ve pin
           Grove cable red pin
V+  pin -> 6V DC regulator OUTPUT +ve pin

Use M2 screws and double adhesive tape to fix all boards under the robot cat body.

Servo Position & Connection

The FSBrowserPlus program have a servo initial process, it will set all the servos to the middle position of the turning range. Before install the servos, it is better connect the servos to the driver board, connect the grove connector to the M5Stack Camera Module and plug in the battery to reset all the servo position to the middle.

Here are the servo connection list:

Port  0: Left Front Leg Joint 1
Port  1: Left Front Leg Joint 2
Port  2: Left Back Leg Joint 1
Port  3: Left Back Leg Joint 2
Port  4: Left Back Leg Joint 3
Port  5: Head Turn
Port  6: Head Nod
Port  7: Not connected
Port  8: Not connected
Port  9: Not connected
Port 10: Tail
Port 11: Right Back Leg Joint 3
Port 12: Right Back Leg Joint 2
Port 13: Right Back Leg Joint 1
Port 14: Right Front Leg Joint 2
Port 15: Right Front Leg Joint 1

Paw Friction & Protection

IMG_3740.jpg

3D printed paws are easy to worn out and not enough friction to the ground. Simply add some rubber band on it can fix these problems.

Install Joint

IMG_3682.jpg
IMG_3683.jpg

Use a 6 mm M3 screw to connect the joint. Insert a nylon or PET ring in the middle can reduce the friction.

Install Servo

IMG_3742.jpg
IMG_3685.jpg
IMG_3687.jpg
IMG_3688.jpg
IMG_3689.jpg
IMG_3690.jpg
IMG_3691.jpg

There are few type of nylon arm included in the servo package. Insert the shortest nylon arm to the servo, except head turn require a cross arm.

  1. insert the servo into the joint start from the arm side
  2. push the other side in carefully
  3. plug in the battery to ensure the servo position is in the middle of the turning range
  4. unplug the battery
  5. screw up 2 screws on both side
  6. screw up the black screw together with the joint

Repeat Install Joint and servo steps for all 10 leg joints.

Install Head & Tail

IMG_3695.jpg
IMG_3693.jpg
IMG_3739.jpg
IMG_3733.jpg
IMG_3734.jpg
IMG_3697.jpg
IMG_3735.jpg

The head turn servo can install from the upper side or lower side depends on you would like to have a longer or shorter neck.

The head nod servo install method is the same as the leg joint.

Then you can install the M5Stack Camera Module with two 12 mm M4 screws

The tail servo must install from the lower side and then you can use a 8 mm M2 screw to fix the tail.

Fix Battery

IMG_3736.jpg
IMG_3738.jpg

Fix the Battery on the Robot Cat back with some double adhesive tape.

Tidy Up Wires

IMG_3698.jpg
IMG_3732.jpg

There are a hole near the head, the battery, Grove and head nod servo wires can pass though this hole to the power or servo board.

There are reserved some rooms between front legs and the servo board, all wires can tidy up to this area.

Robot Cat Pose Design

Robot Cat Hello World!
DSC04009.JPG
  1. plug in the battery to power on the robot cat
  2. browse to http://fsbrowserplus.local/pose.htm
  3. adjust the slider for each joint
  4. robot cat will have real time response
  5. servos continuous draw the power for keeping the pose, you may press the Rest button to let the robot cat take a rest

Gallery

DSC04017.jpg
DSC04018.jpg
DSC04019.jpg
DSC04020.jpg
DSC04016.jpg

What's Next?

DSC04014.jpg

This project is started over 2 years, but it still at the beginning. Much more I want to do...

The first phase of hardware just start to work, it's time to work with software part:

Simply edit the HTML and Javscript:

  • add a pose sequence design web page, combine a number of pose in sequence to make some motion

And more for modifying the Arduino program:

  • store motion sequence data to flash
  • vision sensor, add some AI factor to make environment interaction
  • web remote control interface with camera image stream

Hardware part:

  • reduce weight
  • better weight balance design especially when only 2 legs touch the ground
  • add foot touch sensor to ensure touched the ground
  • add balance sensor to avoid unexpected falling (cat should have good balance)
  • add microphone for listening and even response from speech recognition
  • more head and tail joints for more motions
  • add speaker for MEOW!

Follow my twitter for the latest news: https://twitter.com/moononournation