I’m always looking for another project to build. My most recent project was initialized by my son, who had an idea to build a robotic tortoise. Sounds fun! Though with no solid idea yet how I’d get a four legged creature to walk, I jumped in.
Step 1: Leg design
Fundamental to a walking turtle will be its legs. Since all four legs could essentially be of the same design, I began with the design of a single leg. I decided to constrain the legs to two-axis of movement, requiring just two servos. This would essentially allow the leg to lift up/down and rotate forward/backward. Also driving the design would be the materials and tools I planned to use, which include a 40w CO2 laser cutter and 1/8″ sheets of Baltic birch.
I already had a CAD model of the servos I planned to use, so I was able to design around those. It didn’t take long to come up with a first-pass leg prototype that I could cut-out and play with.
Hooking this up to my Arduino Uno, I ran some basic code just to get the servos moving in a walking-like manner. I did not like the “arc” path that the “foot” of the leg would be doing. Granted, with some extra programing that could be somewhat alleviated, but it wasn’t ideal geometry. I felt I could do better.
Back to SolidWorks, I began on the next revision, which would end up being what I used.
This time, the “foot” would be able to travel basically parallel to the ground. I also designed the servos to be able to more easily attach/detach from the servo horn and wooden components. On the first iteration, I simply glued the servo horn to the wood, but it was obvious that wouldn’t be sustainable if I needed to try additional designs without loosing servo horns.
In this new design, I made several other improvements, including adding a support plate to attached the Arduino to using Velcro. I placed “feet” that would help with visual orientation since this “tortoise” isn’t looking very life-like yet.
Once I had the parts figured out, it was time to cut and assemble.
Above, you can see the tortoise full assembled. I put together a simple Arduino shield that would allow me to easily hook-up all 8 servos, plus allow me to connect an external regulated 5v power source. I even included an on/off switch and LED for power indication.
Step 2: Programming
While the electromechanical portion of this project was fairly straight-forward, programming would not be. I knew getting the sequence of the leg movements would be one of the challenges of this project, as well as getting it to do other things, like turn left/right and do it all in reverse. My first step here was to research quadrupeds, which led me to discover a term I wasn’t familiar with, which was gait. A gait is basically a pattern of leg movement. In my case, I needed to better understand the walking gait of a quadruped.
The sequence can be described based on the footfall order (order the feet land on the ground):
Left rear -> Left front -> Right rear -> Right front
Experimentally, you can also get down on the ground on all fours and try it yourself. 😀
Armed with that bit of info, and knowing that I’d only want one leg in the air at a time, I could then develop the walking pattern. With one leg in the air and three on the ground, I determined the legs on the ground would need to move at 33% of the speed of the airborne leg. One way to visualize this, is to draw a circle and split it into four quadrants. Each quarter arc represents the time each leg is in the air. Once you begin to play with that, it’ll become evident why each landed leg must move at 1/3rd of the speed. In my case, the math worked out so that each leg would begin lifting and travel from aft to fore in 500ms, while each ground leg would move from fore to aft over a period of 1500ms. This is what you’ll see in the video below.
I was able to further develop other walking functions, including turning left/right and walking backwards. To turn, I kept the travel times the same, but decreased the travel distance for the inboard legs. This effectively reduces the travel radius for the inside legs, causing the tortoise to turn.
Future plans are to increase the scale of this design and add some sensors and battery pack to allow for a fully autonomous tortoise. More to come!