Cheap four-legged insect robot

Similar projects worth following

This is a continuation of the journey started with #Tote to create an affordable walking desktop robot.

What is this?

It's a four-legged walking robot that fits on your desk, can be programmed with an USB cable without installing any special software on your computer, can be built on a budget of less than $30, and that can be easily expanded or modified, to try out new ideas. Those are the basic requirements I have set myself for this. But why?

Why am I doing this?

Because I think that the details about how such robots are able to walk, without crawling or dragging on the floor, are very interesting, and that making a physical robot work is the best possible way of learning about it—fun and rewarding. There is a big hurdle in getting into this—most of the robots you could get are either super-expensive or simple toys with hard-wired gaits. There are now some reasonable kits out there, such as those robots made by Petoi, but I think I can still do better than that in terms of both affordability and removing other barriers.

Why is this hard?

Building a walking quadruped is surprisingly easy—once you know how. You literally just need any microcontroller development board, battery, a bunch of servos, ice cream sticks and hot glue. A few hours of work, and a few weeks of banging your head against a wall while trying to get it all to work, and you are done. That's the easy part.

The challenging part is designing and documenting it all so that it can be repeated or modified and expanded, without wasting time, and with as little frustration as possible, and on a budget. This means I don't only need to get it to work, I need to think about the best ways of getting it to work, and then about the best ways of explaining them.

When will it be finished?

Probably never. That doesn't mean it won't be usable. I hope to get it to a point where it can be built by others as soon as possible. But it's one of those projects that are never completely finished, because the context in which they work keeps changing. New parts become available, such as new microcontrollers, sensors or even servos and batteries. Others become obsolete or otherwise hard to obtain. New fabrication techniques, such as laser-cutting or 3D-printing become feasible for an average hobbyist. There might even be new materials on the horizon! And the fastest changes are in the software tools available—a few years ago the only ways you could program a microcontroller was assembly, or maybe, if you were lucky, some limited version of C. Today we have Python code running on them in real time, with a lot of ready libraries, and new capabilities appear every month. I probably won't be able to incorporate it all in the design, but I fully intend to update it as new possibilities emerge.

  • Another Workshop

    deʃhipu03/15/2023 at 23:18 0 comments

    We barely finished one workshop, and we soon are going to have another one! In less than two weeks at Berlin, during the Hackaday conference, we are going to be building another 10 Fluffbug robots. You can read the announcement and buy the tickets here:

    Unfortunately, there are only 10 kits, because I only have one truckload of servos at hand, and ordering more would take much more time than we have left, plus I still have to bring them all to Berlin somehow, and I can fit only so much in my luggage.

    But worry not, all the design files and all the code are available in the repository, and you can easily build your own at home. Chances are it will be even less expensive than the workshop kit, because you won't have to pay for express shipping of the parts, and the packages probably be below the tax limit.

    In the mean time, I'm soldering up the kits.

  • After the Workshop

    deʃhipu03/05/2023 at 20:25 1 comment

    As I wrote previously, we just had a small workshop at a local art festival for building Fluffbug robots. I think it generally went very well: all the participants left with working robots, and they didn't seem to have regretted spending those four hours there. I call it a win.

    However, there is always some room for improvement, so I'm going to put some notes here.


    Four hours seems to be the perfect length of the workshop. There was one person who came 2 hours late, and while they did finish their robot, they had to hurry and it didn't come out as good as it could have. And that is without the soldering part – I chickened at the last moment and soldered up all the pins for the participants, because the soldering irons we were going to have available weren't that great. With soldering, it would probably take half an hour to one hour longer.

    There are ways in which I could speed it up a little by providing some partially assembled components, but that feels like taking away the fun, so I think I will stick to four hours in the future.

    As an aside, we did have a break planned in the middle, but nobody wanted to take it. They were too engrossed in the building.


    I have to bring good screwdrivers, preferably in two sizes, for the tiny screws and for the servo screws. Many people were frustrated using the sub-premium screwdrivers available at the hackerspace. I see myself in a tool shop in the near future.

    All the other tools, like wire cutters, pliers and scissors were only needed for a moment and were easily shared. We didn't do soldering, so no soldering irons. I might consider bringing some cork coasters, so people can use them when screwing the screws in and not damage the tables.


    I definitely need to add LED signalling to the calibration process, so you can be sure when all the servos have updated. This version of CircuitPython takes some random delay before it resets (a mitigation for a number of bugs), so it was frustrating changing the calibration values and than waiting not being sure if it updated yet or not.

    I was afraid the people would struggle with the process or find it tiresome, but it doesn't seem they did. Not everyone had a computer, but people did the calibration for those without computers on theirs, so there was no problem with that.

    IDC Connectors

    As expected, the IDC connectors were the source of the most problems, and also the most scary part of the whole assembly. It's easy to introduce a short if the cables are not perfectly aligned while crimping the connector, and then the robot just stands there, because the battery protection chip cuts the power. It's better than releasing the magical blue smoke, of course, but here again a LED indicator for the calibration process would help a lot, to at least see if there is power.

    Getting the right lengths of the cables was a problem as well, as people were understandably afraid of cutting them too short. I think I should prepare some kind of a jig, where you insert the servos at one end, and the connectors at the other, which would give you the right lengths of the cables and also keep the cables aligned. I need to think about how to do it, but probably laser-cutting something will work.

    I'm also considering cutting and crimping the cables beforehand, to eliminate this step completely, but I'm not sure I want to do it: it's a lot of work, and it steals some of the experience from the participants – even if it's scary. I will see if a jig makes things easier.

    Spare Parts

    The most important lesson is to always bring spare parts for the kits. People lose screws, break the plastic parts, damage the IDC connectors trying to re-crimp them, and even strip the gears on the servos. I had two boxes of extra screws, a set of extra leg parts, a bag of ten additional connectors, an additional battery and an additional microcontroller board, and we have used all of those, and without them someone's robot wouldn't be working anymore. Unfortunately I didn't have spare servos,...

    Read more »

  • Bits'n'Bolts Robot Workshop

    deʃhipu02/20/2023 at 14:48 0 comments

    I might have mentioned this already, we are preparing a workshop here in Zürich for building a bunch of Fluffbug robots: You have to register, because the number of places is limited, and you also have to pay for the workshop separately from the the main event, but I hope it will be worth it.

    As you saw in the previous log, I'm working on clear assembly instructions, but we also need to prepare the kits. Almost all parts have already arrived, but I'm still waiting for the servos – that is going to be a big box.

  • Assembly Instructions

    deʃhipu01/30/2023 at 22:28 0 comments

    With a workshop quickly approaching, it's time to spend some effort on the documentation. This time I want to make some IKEA-like step-by-step instructions, so I had to figure out a process for generating the images of the robot parts. Of course I already have an OpenSCAD model of the robot, I just had to update it a little and add some detail:

    I parametrized the part positions, so that I can easily "explode" the whole thing, showing individual components. But this kind of image is too busy and looks bad when printed on paper in monochrome, so the next step is turning it into a wireframe. After some searching, I found an STL viewer that can do that, so I generated an STL of the robot from OpenSCAD and fed it to the viewer. I got something like this:

    This is much closer to what I want, but there is still a lot of unnecessary detail cluttering the picture and making it hard to see clearly what comes where. So the next step is some manual cleanup in GIMP:

    This is exactly what I wanted. Next, I quickly generated scad files for the individual steps of the assembly, and repeated the process to get the illustrations. An (almost) finished guide looks like this:

    I still need to make the image for step 4, but I'm not sure I want to use OpenSCAD or something else for it. It has to show the orientation and order of the servo cables in the IDC plugs.

    In the meantime, I also updated the git repository to include version 8.2 of the PCB and the new leg design.

  • Version 8.2 of the PCB

    deʃhipu01/19/2023 at 17:32 0 comments

    Along with migrating to all-SMD components (except for the battery holder), I also migrated with my PCB designs from Fritzing to EasyEDA. It's not as conductive to experimenting and just playing with things, but at least it's not openly hostile to it like KiCad is, and comes with a huge library of footprints.

    Because of that, the latest version of the PCB is published at together with the schematic and the BOM. However, be careful about the female pin headers, you probably want to get some low-profile ones instead of those used in the footprint.

  • Can We Make It Simpler?

    deʃhipu11/18/2022 at 19:09 0 comments

    I'm pretty much happy with the physical design of this robot by now, but I also like to tinker, so I asked myself if it could be simplified any further? I noticed that 90% of the components on the PCB are dedicated to keeping the LiPO battery happy – the protection circuit and the charging circuit. What if we could use some other type of battery that doesn't require as much babysitting? Alkaline batteries are out, since one that could provide enough current for the servos would be way too heavy, but what about NiMH batteries? They can deliver higher currents than the alkalines, right?

    Since I was ordering some PCBs anyways, I quickly made a modified version of the fluffbug PCB that comes with a 3xAAA battery holder on the back, and without all the protection and charging circuits – external chargers for NiMH batteries are common enough. I also took that opportunity to replace the S2 Mini footprint with a Raspberry Pi Pico footprint – just to see how that would work, especially since there is a version with WiFi now. I also ordered the batteries, and when everything came, I started testing.

    It quickly became obvious, that three AAA NiMH batteries are enough to drive a single 9g servo, but not 8 such servos all at once. Even with a beefy capacitor to smooth the spikes in current, there simply was not enough power. So I replaced the battery holder with a 4xAAA one, and tried again. This works, but the robot is now considerably heavier than before, and can't move as fast. I consider the experiment to be failed, we are better off with the LiPO and all the extra components.

    As a side experiment, since the pi pico doesn't have the limit to only 8 PWM outputs, as the esp32-s2 does, I also got to test the speaker with the fet on an actual WAV file with audiopwmio. I don't know if it's the low-pass filter that I added, or the transistor itself, but the results are disappointing – the audio is barely audible. If I keep the speaker in the future, I will probably use a proper amplifier with it.

    I am still tempted to make a version of the PCB with the LiPO and the pi pico, but to be honest I'm not sure it would actually bring anything new right now.  I might do it to try the SMD versions of the headers and the IDC sockets that I found, and that speaker amplifier, but really I should be focusing on programming, so that the robot actually does something more than just walking forward.

  • Asynchronous Face

    deʃhipu10/13/2022 at 19:13 3 comments

    I had some spare energy after work, so I sat down and implemented that asyncio-based display handling I mentioned previously. It seems to be working pretty well.

    I still need to refactor the walking code, to make some parts of it part of the robot's library, and the rest a separate gait class. Slowly but surely it's getting there.

  • OpenSCAD

    deʃhipu10/03/2022 at 22:21 0 comments

    With the robot mechanically pretty much good enough, the next steps are of course programming and documenting. The latter will require some drawings, so I sat down with OpenSCAD to make a simplified model of the robot, so that I can use it for assembly instructions. Here's a simple animation of the "exploded" view:

  • EasyEDA

    deʃhipu10/02/2022 at 14:18 0 comments

    Because some people seem to have some kind of grudge against Fritzing, I decided to re-do the PCB for Fluffbug in EasyEDA, so that it can be easily ordered from JLC. They don't have all the parts (in particular, all 1kΩ resistors seem to be out of stock for some reason), but you can probably get those from somewhere else.

    The project link is here:

  • asyncio

    deʃhipu10/01/2022 at 18:01 0 comments

    I finally had some time for coding today, first time in a long time, so I decided to rewrite the current gait code using asyncio.

    The gait is still pretty much the same (I fine-tuned it a bit and sped up), and the code still has all those explicit waits everywhere, for the servo to get into position before doing anything else. I want to eventually have a function that would estimate how long it will take the servo to move, and do the waiting automatically for me. It could also do tweening, for more interesting movement profiles. But even with the current explicit waits asyncio is an improvement, because I can now easily add handling the display and/or sensors while walking.

    The code follows:

    Read more »

View all 29 project logs

Enjoy this project?



gewoods3 wrote 04/13/2023 at 00:29 point

Servo cable connectors are available at Pololu.

Pololu also has a nice crimping tool.

I haven't tried them yet. Ordered today. I expect them to work better than ribbon cable connectors.

  Are you sure? yes | no

davedarko wrote 04/07/2023 at 06:59 point

could you add a small BOM list of parts like the screws and battery maybe? 

  Are you sure? yes | no

deʃhipu wrote 04/07/2023 at 10:14 point

It's literally just the screws (which can also be replaced by a piece of wire) and battery. I already have a BOM for the electronic parts, but I don't want to add screws in there to confuse the fab house. And a separate mechanical BOM just for two parts seems excessive. I need to think about it.

  Are you sure? yes | no

davedarko wrote 04/07/2023 at 17:36 point

or write it here what you've bought :D @WooDWorkeR ran away with the fluffbug, so I can't measure them :) 

  Are you sure? yes | no

deʃhipu wrote 04/07/2023 at 22:33 point

I can't find it in my order history anymore, but #SpiderWing says those are M1.2x4 screws. And the battery is 16340 of course. Oh, and I suppose the Lolin S2 Mini is also an external part. That makes three, it might make sense to have a BOM file.

  Are you sure? yes | no

deʃhipu wrote 04/07/2023 at 22:37 point

On the other hand, #Tote HaD says both M1.5x3 and M1x4, so...

I measured them, and they seem to be M1x4.

  Are you sure? yes | no

deʃhipu wrote 04/07/2023 at 22:38 point

But as you have proven yourself, any screw will fit if you try hard enough.

  Are you sure? yes | no

davedarko wrote 04/08/2023 at 10:57 point

lol yeah I was challenged with those

  Are you sure? yes | no

rodolfoacostacastro wrote 03/27/2023 at 04:49 point

thank you very much for the workshop. The bug rocks!

  Are you sure? yes | no

James Newton wrote 09/28/2021 at 22:56 point

Where is the source code, PCB files, laser cut, etc...?

  Are you sure? yes | no

deʃhipu wrote 09/29/2021 at 09:58 point

Everything that I made so far I described in the project logs. I'm still working on a version that will be easy to build and properly documented. But for your convenience, I created a repository with the work so far here:

  Are you sure? yes | no

Nopcode00 wrote 09/13/2021 at 20:12 point

Nice job. Do you have any videos of it in motion?

  Are you sure? yes | no

deʃhipu wrote 09/13/2021 at 21:17 point

Thank you. Sadly, I still need to program a gait for it, for now I only have the inverse kinematics. There is, however, a video of its predecessor, Tote:

  Are you sure? yes | no

Nopcode00 wrote 09/13/2021 at 21:44 point

I’ll check it out - thanks. 

  Are you sure? yes | no

Makerfabs wrote 09/06/2021 at 07:35 point

hi @deʃhipu ...lucky day~

  Are you sure? yes | no

deʃhipu wrote 09/06/2021 at 09:06 point

What do you mean? Did I miss something?

  Are you sure? yes | no

Dejan Ristic wrote 07/31/2021 at 20:57 point

Nice! I'm all on board with the affordable desktop robot concept.
Color scheme makes me think of the camel spider. But this one seems much less terrifying luckily.

  Are you sure? yes | no

deʃhipu wrote 07/31/2021 at 21:39 point

Thank you. To be honest, I haven't thought about the looks too much yet — most of the design is dictated by the mechanical requirements right now. There is some room for expression here — shape of the legs, shape of the PCB, etc. I imagine that it could also be made quite terrifying depending on how it moves — if you can reproduce the movement profile of spiders, for example, I bet people would get goosebumps just looking at it walk. The color scheme is probably not final — I had some choice here, so I went with yellow/orange, but the final version will probably be blue, because blue servos are the cheapest.

  Are you sure? yes | no

Dejan Ristic wrote 07/31/2021 at 22:16 point

Well as long as it doesn't bite :D
I also like the minimalism with 4 servos making up the thorax of the spider.
And the forward facing pcb. I'm guessing you can put on a shield with a distance sensor then?

  Are you sure? yes | no

deʃhipu wrote 07/31/2021 at 22:39 point

Yes, the initial plan was to put one of those time-of-flight sensors on it, but of course you could also use that huge ultrasonic sensor if you want your robot to look more steampunk. In fact, I'm even considering an adapter-shield for an #OpenMV 

  Are you sure? yes | no

danjovic wrote 06/12/2021 at 13:56 point

Awesome, specially in yellow!

Have you considered to make the legs out of PCBs?

  Are you sure? yes | no

deʃhipu wrote 06/12/2021 at 14:08 point

Thank you. I have, and in fact the previous versions all had the legs made out of PCBs, however, since the fabs nowaday charge extra for multiple projects in one order, and the leg parts look like multiple projects, this is no longer economically feasible. On the other hand, cheap laser-cutting services mean that you can get enough legs for three robots for less than the PCB, and it gets even cheaper in bulk.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates