Building a robotic spider

Adam Purdie
11 min readApr 7, 2020

--

Start to finish of the physical build.

About Bobbie

Bobbie is the 3rd spider in my plan of building 7 robot models, each robot is based around specific success criteria. Bobbie has some basic success criteria:

  1. Runs ROS2
  2. Can walk on uneven surfaces
  3. Is virtualised for machine learning training
  4. Can implement the model generated in virtualised training
    — bonus criteria —
  5. Can identify an obstacle and avoid/attack it.

With all this in mind, Bobbie doesn’t need to move fast or carry any heavy weights, he’s just a functional spider that is smart. This post will only cover the initial build and install, version 1 if you will.

A future post will cover the machine learning environment, training and model transfer — but that’s going to take me a very long time… Because I have no idea how I’m going to do it.

Motors, servos etc

To build the spiders geometries, I start with the actuators. In this case we’re using robotics servos. The size, weight, current draw, torque and rate of movement will determine everything about the robot’s system.

Bobbie will use Dynamixel servos from my friends at tribotix. These servos use very high speed 3 wire TTL communication.

Geometries

Fast & fiery or slow and steady?

This is a bit of a hard point… to get the robot walking right, it needs to have the right geometries. If the leg segments are too long, the load will be too high and I’ll set fire to the motors, if they are too short the spider won’t move fast enough.

A very scientific graph of the impact of load & length

Thankfully there’s nothing in the success criteria about speed… so I’m just going to aim for low-power and no flames.

It started with a leg

The first stage of the geometry is figuring out what the leg looks like. In my case, the legs have 3 motors each. I want the legs to curve a lot so they can be in a state of no-load when being still. Measurements are based on nothing except a vague confidence that they will be fine.

This spider is based off of the bigger spider, Yorick, so the leg has one rotator attached to the chassis and two that are bumper to bumper for the Lift portion of the leg. The upper motor controls the reach of the leg.

3 motors

With the basic leg setup, I can run a basic trial of how it will look in the spider formation.

heaps of motors

Throwing around a bit of red, I’ve managed to get a nice layout going for the leg.

Cheery red.

The legs will have pressure sensors in the foot, for the meantime I’m allowing for an 18mm round FSR. I will print a TPU ball-shaped tip for the end of the feet, this means that the robot will have a little grip too.

Grippy feet ball things in blue.

Legs that bump

With a basic leg design worked out, next I need to lay them out in a central chassis. The idea behind this is to stop the legs from bumping into each other.

With the middle basically thrown in, I step back into OpenSCAD and code up some layout functions and repeat the legs around a basic shape.

Then I re-create all of the legs in the min/max position +- 30 degrees from center and I get collisions. After a bit of tweaking, I have less collisions.

After much playing, I have the layout for the chassis.

Components

The next thing to look at are the components.

Brain Power

Bobbie will run a Jetson nano using ROS2 to drive it. The jetson nano is like a Raspberry Pi, the main difference is that the Jetson has a very powerful GPU on it, in fact it has about the same amount of processing power as a Nintendo switch!

The GPU in the Jetson isn’t just for bragging rights, it’s quite capable of processing large amounts of imagery, for example I could use it to process 3d data from dual camera.

Servo control

To control the servo’s I’ll be using an OpenCR board. This has a little CPU with a bit of grunt and will run as a slave to the Jetson Nano.

Power, more power..

I’ll be using LIPO batteries as usual but this spider won’t be geared for longevity, it will only have one or 2 active batteries at a time. It will have a hot-swap port though, meaning we can swap batteries while it’s running.

Honourable mentions

Beyond the above we have a few other things:

  1. 100A SSR for controlling the power
  2. 10A bucky for the 5v supply
  3. A teensy 3.6 to do all the sensor impressions imaginable and report back
  4. 8 Force sensitive resistors or FSR for the pressure switch
  5. An 8-DOF accelerometer
  6. Dual 720P cameras

Modular chassis

The middle of the spider is currently just a bunch of cubes sitting where the servos are hulled together.

The chassis really just serves two purposes; everything is bolted to it, and it doesn’t bend much. Over all the chassis also needs to be mechanically very firm so it doesn’t flex too much when the spider is walking.

Parts placement

I have a shopping list of parts that all have specific geometries, bolt holes and specific relationships to each other.

The first thing I do here is put all of the objects together in a “she’ll be right” way, there’s no real rationale beyond they seem to fit well like this and I should be able to get the wiring in.

Once the parts are laid out, I built the bottom layer with stand-offs for the top and I finish off with the same for the top.

My main focus is to centralise the weight and to immobilise the servo motors except for their desired axis of motion.

Then there was some iterations on the chassis

After many iterations where I added things I forgot, things I hadn’t thought about at the start and things that made sense after really thinking about it, I ended up with a central chassis that could hold all the parts and was maintainable.

One of the biggest problems with Yorick was that it took an hour and about 100 screws to open up the chassis to do any work, with this in mind I have made the chassis in 3 parts;

  1. the bottom panel houses the chassis controller and the “middle” board
  2. the middle panel holds the bucky transformer and the SSR
  3. The top panel houses the batteries, and the main computer and will be removable with 6 screws

The power switch and cameras

While I was doing the design, in the back of my mind, I thought I’d put the power switch in and do the camera next, truth be told, I finalised the design, without doing so. In the picture above, you can see the camera floating in the air above what would be the front… if it was made obvious that it was the front in the design.

So I designed the frame to hold the cameras at a “looks good to me” height.

I also made a hole in the front for the power switch with precision “shouldn’t get in the way of the OpenCR 1.0” placement.

A bit of colour

Before moving on, I decided on a colour scheme; green and black:

Chassis Assembly

Lower chassis

Starts with the ring-chassis, this is the base part that contains all of the low-level drive components and the power control system. At this point the lower chassis hasn’t been wired up to the servo controller. Because this robot is essentially in two halves; I can come back to the central electronics later without too much trouble.

Upper chassis

The upper chassis holds the camera’s, batteries and the Jetson nano. I attached a row of round neodymium magnets so this could be removed easily, but that also means it picks up all the screws on the table if I’m not careful…

Base servos into chassis

This is where it starts to get interesting.

Legs

Wiring for the legs

Each of the servo’s on the leg have a peak-current of about 2.1A but realistically they won’t be driving anywhere near that current. I managed to get a bunch of JST plugs that are rated at 3A and I’ve decided to run two cables to the legs, one to the base and one to the lift, which will be cabled to the reach servo.

The X-series servos have a very cool through-horne cable design, which after all my pain of cabling the last two robots feels like the best sort of magic.

Getting the ID’s and serial rates right

The Dynamixel servos all start with an ID of 1 and a baud rate of not much..

So with that in mind, one, by one I connected each servo, updated the data rate to 3mbit and gave it an ID — then put a sticker on each with their ID on it.

Leg Assembly

The legs are made up of 3 parts; the shoulder, the lift and the reach — in this robot, the servos for lift and reach are part of the humerus portion of the leg.

Assembled with their to-be colour, the humerus section looks pretty cool!

Oops..

After combining; 16 servos, 16 bits of lime plastic, 128 screws and 128 washers — I realised that the through-horne cabling requires the servos be disassembled and with my (rather effective) assembly, I couldn’t pull the servos apart…

So I took them all apart again and got the through-wiring sorted for the whole leg. I replaced the single wrap around part because it wasn’t very strong.

Then I put all the legs on.

Soft-touch feet

As mentioned previously, I am using rubberised plastic for the feet, specifically TPU, this serves 3 main purposes:

  • Progressive load transferred to the foot-sensors (when installed)
  • Acting as a small shock absorber to protect the servo gearboxes
  • Providing a little grip

About all that wiring

I left the wiring of the core till last because you never know how much length will be required right until the end. I have connected the servo’s directly to the sub-board and the OpenCR to the sub-board.

I have included a teensy 3.6 board on the sub board which will serve as the low-level controller eventually. It will handle battery state, charge control and handle high-speed reporting of the touch sensors state for dynamic walking.

Built!

In all his glory, this is Bobbie V1.

Todo’s

As I mentioned, this is V1 and there’s no software yet. The spider will run on ROS2 though.

For a controller, I plan to build a ROS2 based system that drives this robot from a GameHat and shows a live-stream with a HUD on the GameHat screen.

Waveshare GameHAT

Advanced walking — eventually I’ll put the sensors in his feet and figure out how to build and train adaptive walking profiles.

Eventually I’d like to something with the cameras, potentially t̶̶̶a̶̶̶r̶̶̶g̶̶̶e̶̶̶t̶̶̶ ̶̶̶a̶̶̶q̶̶̶u̶̶̶i̶̶̶s̶̶̶i̶̶̶t̶̶̶i̶̶̶o̶̶̶n finding friends.

Thanks!

If you’ve read this far, thanks! hold on for the next instalment, this stuff takes ages to design and make!

--

--

Adam Purdie
Adam Purdie

Written by Adam Purdie

I just love to make stuff and share a good story about it — so here are some of my personal stories.

Responses (4)