Back in 2008, I wrote some software for fun to generate various optimized walking mechanisms. And when I also picked up some electronics and wood working skills in more recent years, I was able to turn one of these mechanisms into an actual wireless walking wooden coffee table: the Carpentopod. This post briefly covers this project from start to end.
Designing a new linkage
The Carpentopod leg linkage itself was generated by some software I wrote that evolved thousands of virtual generations of leg variations by having them compete against each other. To select which ones were best, each variation got assigned a ‘fitness’ score based on its walking speed, clearance and material use. I also rewarded extra points to variants that had leg tips which moved more horizontally and more smoothly during the lowest third of their cycle to make it favor solutions in which a group of three legs would work together to minimize bobbing and foot slip.
Each leg variation’s fitness score was then compared, and only the best ones got a chance to mix their genes (i.e. leg parameters) to create the next generation of thousands of variants over and over again, leading to better and better solutions over time. Additionally, next to genes just mixing through ‘natural’ selection, genetic mutations were regularly introduced to help discover new solutions and keep variation going until it was time to converge. Having written everything including the kinematics solver in C++, this simulation was able to evolve dozens of generations per second, making it easy to see how bad initial designs turned into highly optimized ones.
The video above shows this process for 20 seconds of evolution. Each frame shows a different individual out of 5000 ‘alive’ variations. It also superimposes the trajectory of the leg tip of all 5000 individuals at the same time, creating this red and green ‘blob’ that converges to a single solution over time. The leg linkage that I eventually selected for the Carpentopod itself was simply picked by running a larger and longer version of this simulation. And, like picking an official animal name, I choose its name by combining old Latin and Greek words: carpentum (being a carriage), and pod (for feet or legged).
Anyone who’s ever seen one of Theo Jansen’s inspiring Strandbeest sculptures will probably see the similarity between his leg linkage and the Carpentopod linkage. The Carpentopod linkage, however, has a very different set of component ratios, as well as an extra joint point and an evolved rounded toe diameter. These extra parameters allowed the evolution process to find a solution that is more compact and causes less foot slide.
Foot slide is caused by having different toes on the ground that don’t perfectly match in speed, which will therefore cause the legs to try to slow each other down in practice. (Still, Strandbeest legs often seem to be built with some sort of flexible/rolling toe instead of a rigid one to probably help compensate for this effect somewhat). See the video below to compare the two different designs, including their effect on size, center of gravity, and foot sliding/skating.
Designing a walking table
For many years, the above was simply the interesting end result of a hobby project. But as I also picked up an interest in making physical things in more recent years, this allowed me to actually use this linkage for something more tangible. The first thing I tried making was a tiny model of an earlier version of the evolved linkage (being less optimized for compactness and therefore less suitable for what ended up being the Carpentopod table). Just to test my newly developed skills and try out my new CNC before attempting something bigger…
Next, I decided to make a walking wooden coffee table. Mostly because I thought that could be something both (relatively) practical and esthetically pleasing to have. As each individual leg in the Carpentopod linkage is only a third of the walk cycle on the ground, the table itself therefore would require twelve legs to be stable at all times. To walk smoothly, the leg components also needed to be made with sub-millimeter precision and stay that way. This is why I designed them to be CNC-ed out of sheets of laminated bamboo, which is a particularly strong, natural, durable and stable material, and would nicely fit the style of mixing the robotic with the organic.
I designed all of the table’s components using Autodesk Fusion 360, which allowed me to model, test, render and do all CNC preparations in one package. And being able to actually see it fully assembled in software from any perspective at any phase in its walk cycle made it much easier to tweak the esthetics and make sure all the clearances were just right.
Between the six legs on one end and the six on the other, I also left room for a hollow central ‘belly’ to contain the electronics, motors and battery. To make this not look all angular, I designed the frame and belly to be curved, like an upside down treasure chest. This probably contributed to some people commenting that it looks likes The Luggage from Terry Pratchett’s Discworld novels. (But I promise this similarity is purely coincidental and that a Carpentopod table is far less dangerous.)
The central belly also causes all legs to have at least some distance from the center, which allows them to all participate more effectively in doing turns. Each group of six legs is designed to be connected to its own crank shaft, driven by a single motor. That way, I only needed two separately controlled motors to ‘drive’ and turn the table like a tank.
The build
To turn the 3D design into an physical table, I preferred to CNC as much as possible. For precision reasons, but also because it makes it a lot easier to churn out twelve identical wooden parts, for example. And this being just a hobby for fun and not a production line, I decided to make everything myself using my cheap 3-axis CNC router.
A 3-axis CNC can only remove material from the top. But as many parts would also need material to be removed from the bottom and/or only the sides to make more intricate shapes and concavities, I designed most leg parts to be made out of three sheets of laminated bamboo that I could CNC separately, and then glue together.
And of course, even a single part can require many passes with differently sized and shaped cutting tools, and/or may have to be precisely remounted upside down to do both sides. But that’s just the reality of CNC-ing if you don’t want to pay for a much more expensive 5-axis CNC with automated tool changer, and you don’t want to make 3D prints from plastic either…
Besides the 100+ bamboo parts I CNC-ed, sanded, lacquered and assembled using even more ball bearings and steel shafts, the design also required two crankshafts. I ended up making these by effectively hammering together D-shaped shafts and rotated offsets with D-shaped holes, which I very carefully CNC-ed out of plain aluminum rods and sheets, respectively.
The table’s curved belly ‘doors’ were made by finely ‘kerfing’ the same laminated bamboo, steaming it to make it even more pliable and then letting it dry in a curved jig to give it its new shape. This was then glued on top of two invisible hinged ribs with embedded magnets, making the doors easy to open and close. Lastly, I welded together a piece of TV furniture of the same height, and turned a single piece of mango timber into tops for both pieces of furniture, effectively turning them into a set.
Making it move
Both six-legged sections should be driven by their own motor. But it’s each section’s single crankshaft that coordinates the relative leg movement. This can be seen in the next video in which I simply push a motor-less section forward, making the section effectively behave like a wheel.
It also contains (upside down) footage showing how the toes would gently touch the ground (that is represented by the black line), but don’t try to push through it. This means that the table won’t ‘bob’ much when walking around. Of course, minimizing bobbing was one of the original evolutionary fitness requirements when the linkage was being evolved in the computer, but it’s always good to test things in reality as well…
To actually make it move by itself, I ordered two cheap geared 24V brushless motors that are normally meant for automated curtain products, outputting max 1.5 Nm @ 130 RPM. Their built-in electronics also allowed direct speed control using an extra PWM signal wire. Sadly, signaling them to go at low speed almost instantly got them into some automatic multi-second (thermal) shutdown mode even under just a fraction of its maximum load. Luckily, leaving the PWM signals at 100% and directly changing the voltage worked a lot better as can be seen in the following experiment, where I directly connected a tweakable lab power supply to the motor on one of the two 6-legged sections.
To be able to control the motor voltages automatically, though, I bought two cheap Step Up/Down Converter modules to convert basically any battery’s voltage to anywhere between 0 and 24V. Then I hacked them so that their output voltage could directly be set using a fast PWM signal from a repurposed Arduino Nano micro-processer board. The voltage converter modules also offered a tweakable max current setting, which gave me per-motor control over the max stall torque (and therefore the safety of my fingers).
Next, I fed the exposed Hall-effect motor sensor signals into the Arduino board, and wrote some software in C to create my own closed-loop motor controls. This meant that the motors could now independently and accurately target any achievable speed and position, independent of load.
As a last step, I connected a Bluetooth module to the Arduino and wrote some C code that allows it to connect and understand joystick data coming from the wireless repurposed Nunchuck that I also made. And after also installing a 14.8V LiPo battery into its belly, I now had a wireless table that could walk anywhere in my living room using a tiny remote. Is it honestly very useful? Maybe not. But is it fun to make it bring me a drink? Very much so.
Making the linkage public
UPDATE: Since this post has gone public, many people have asked me if they could get one as well. I’m currently not making these on demand. However, I’ve decided to release the Carpentopod linkage itself as public domain. So if you have the skills, feel free to use the details below to build your own set of legs! (Tips: If done correctly, the crank should end up at about ‘1000.0’ above the ground at this drawing’s scale. Also, don’t expect the legs to work well by themselves or in pairs. Three is the magic number, here!)