Spider robot powered by Adafruit Feather boards and MicroPython.

Similar projects worth following

This is the successor of the #Tote robot, and its small family (#Tote Zero, #Tote HaD, #D1 Mini Tote). Tote itself was focused mostly on affordability, ease of assembly and extensibility — and I think that it achieved those goals relatively well. However, it turns out that physically building the robot and programming the first gait is just the tip of the iceberg. We need something a little more powerful than a simple Arduino, and something much easier to program and test. The SpiderWing builds on top of Tote, but focuses more on the ease of programming and reliability. It uses slightly more expensive parts (Adafruit Feather boards, SG92R servos) to be more reliable and easier to reproduce exactly (whereas every Tote is slightly different from all the others). It will also use advanced sensors, such as the time-of-flight distance sensors or the IMU sensors with built-in fusion algorithms, in order to get better and more consistent results.

Of course the ultimate goal remains the same — to bring walking robots into our homes and hopefully crowd-source their development, so that they become reliable and cheap enough to be generally useful.

  • 1 × Adafruit Feather supporting CircuitPython
  • 1 × 3.7V 1S LiPO battery
  • 1 × SPDT switch
  • 12 × SG92R Microservo
  • 24 × M1.2x4 screws

View all 10 components

  • Repository and License

    de∫hipu07/23/2017 at 18:39 0 comments

    I just realized that I never linked the repository with the code and design files in here. I now fixed that mistake — you can find the link on the right, under project's links.

    I also added a license file to the repository, so that people can actually build on top of all this without having to ask me every time. I've chosen Creative Commons license, because it's a physical object, not just software, and the software licenses didn't seem appropriate.

  • Proper Crawl

    de∫hipu07/23/2017 at 18:12 1 comment

    I went over the large SpiderWing and shortened its legs back to what #Tote has. The idea to make coxas much longer sounded great — you get longer steps and thus higher speed, without actually increasing the load on the servos (since coxas only move in the horizontal plane anyways). However, doing that also changes the reachable area of the leg from a shape similar to a pizza slice, to one that looks more like a slice of a pineapple — with the center removed. Do it too much, and you can no longer draw a nice long straight line inside it — meaning the robot's step has to be small.

    So I shortened the coxas, but left the tibias long — that actually increases the load, but the servos can handle it. Once the changes were done, I had to replace a few faulty servos, that were catching for some reason. After that, finding the set of parameters that would let the robot move at a decent speed was much easier:

    Next on the list is smoothing all those movements. Right now they are very jerky, so much so that the legs tend to slip on the floor. Unfortunately, I will probably need to rewrite most of the gait code to do that.

  • Status Update

    de∫hipu07/19/2017 at 10:30 0 comments

    The mini-crab version of the robot is as good as it's going to get -- I'm going to leave it as it is for a while, to have something to show at all the conferences and fairs.

    The bigger spider robot still needs work. I will probably need to shorten its coxas, as this configuration was an experiment and doesn't seem to work that great. I am happy about the longer tibias though. I will probably replace the ESP8266 Feather with a ESP32 one, for more processing power and — hopefully — smoother movement. I'm more or less happy with the PCB, so I don't think there will be more versions of it. I will however need to make some sensor shields to stack on top.

    The main thing that requires work, as usual, is the documentation.

    I also have plans to program the #PewPew FeatherWing board to act as a controller for this robot, but since both are still in development, it may take some time.

  • Smartening Up

    de∫hipu05/15/2017 at 19:47 0 comments

    I got the gait code to work on the small crab robot -- actually it only needed some adjustments for the smaller legs. I'm a bit disappointed about how slow the code runs on the M0 -- I didn't even need to add delays for the servos, the calculations take enough time for them to move into place. Oh well. That means the gait is still jerky (because I couldn't do the continuous servo updates), but it works fine.

    Then I worked a little bit on the robot's "intelligence". Right now it only has only one sensor, the distance sensor in front. So its behavior is as follows:

    • If the distance sensor doesn't detect anything, or the thing detected is too far away, just stand there and scan from left to right and then from right to left. Eye color blue.
    • If something is detected far away, walk towards it. Eye color green.
    • If something is detected close, stop. Eye color purple. Wait for one second, then check if it moved. If it did, wait again. If it didn't, look right and left, see where you have more room, and turn 60° in that direction. Eye color cyan.
    • If something is very close, walk backwards. Eye color red.

    And that's it. I also added exception catching, so when the legs get tangled into an impossible position (that happens sometimes), they are moved into their home positions, and then the program resumes.

    This procedure gives the robot a nice behavior. It will walk towards things to examine them, and follow people, but if the things don't move, it will get bored with them and walk away, looking for other interesting things.

    I'm considering adding one more state, for when it gets bored with scanning -- perhaps it could just shut down and go to sleep then.

  • Sensor and Cable Management

    de∫hipu05/14/2017 at 18:51 0 comments

    I'm slowly porting all my robot code to CircuitPython for the little crab robot, and I got as far as body kinematics before I ran out of memory on the Feather M0, so next step is some optimizations.

    I also decided to put a distance sensor on this little guy, so that it can react to the environment -- since it doesn't have wireless connectivity, I can't make it just a remote controlled drone (and I don't want to).

    So I finally sat down and ported that Arduino driver for the VL53L0X sensor to MicroPython. Well, mostly ported -- there are still some parts that I need to implement, but it already does some readings. The code is at but it's definitely too big to fit on the M0. So I decided to look for another sensor, preferably with I²C interface, and I found the SHARP GP2Y0E03 in my drawers -- the same sensor that #µBob biped robot uses right now. I quickly wrote a simple driver for CircuitPython for it -- the code is at -- and I attached the sensor to the robot:

    You can see I also arranged the cables neatly, and added the rubber socks on the legs.

    Even though I had a ready library for the sensor, getting it to work took some time. You see, the PCA9685 chip that I'm using here for controlling the servos uses two I²C addresses: 0x40 and 0x70 (one for the individual chip, and one for a roll-call for all chips on the bus). But the GP2Y0E03 sensor also uses address 0x40 by default. I could mess with the PCB, solder some wires to the address pins od the PCA9685 and make it use a different address (I think I will in the next version of the PCB), but a quicker route was to change the sensor's address -- you do that by burning e-fuses on it to specify the new address. The procedure is a bit complex, but there is a ready Arduino sketch that does it for you, so I gave it a try. Without much thinking I changed the address to the 0xE0, which was the default in that sketch.

    Wait, aren't I²C addresses only 7-bit? Where did 0xE0 come from? Well, that's the 8-bit notation, including the read/write bit. To get the 7-bit address you need to shift it right by one.

    I tested the sensor with the changed address, and it works beautifully. Now, time to put on the robot and make it do some things. But wait, it stops working on the robot, just returns 0 all the time. Wait a moment, what is 0xE0 shifter right by one bit? Isn't it 0x70, the other address my servo driver uses? Argh!

    Fortunately, I had a second GP2Y0E03 sensor in my stock, so I changed the address in another one (this time paying more attention) and everything works perfectly now.

    Now I only need to rewrite all this code into as few functions as possible, to make it all fit in there.

  • The Good, The Bad and the Adorable

    de∫hipu05/12/2017 at 22:15 0 comments

    I'm slowly moving along with this robot, despite the long silence. A few iterations of the PCBs, a few changes of direction, a hour of coding here and there, a lot of frustration -- but I finally have the first, very shaky and suboptimal, gait.

    You can see in the video that I'm experimenting with different leg proportions -- basically trying to make this robot faster. The SG92R servos seem to be handling the longer legs without problems, even at the standard 50Hz signal. I can always increase the frequency to get some more power from them, since they are underpowered anyways.

    Of course a lot remains to be done there, most importantly I want to update the servo positions all the time, controlling their speed and exact path -- and not just give the end position and wait for them to get there, like I'm doing now. This way it should be much less shaky and also able to respond to any sensors faster.

    However, I realized there is a fatal flaw in my world domination plans. Those robots are much too unreliable to actually enslave the humanity properly, so I need something to give them an edge over puny humans. My original plan of making them wear hats seemed to be a move in the right direction, so I decided to expand on that and make at least some of the robots as cute as possible -- this way the humans should be less likely to fight back, even if they get a chance due to some miscalculation.

    I recently received a pack of new type of servos, SG50. They are not actually new, but I never used them before, so they are new to me. They are in the category of sub-micro servos, smaller than the popular SG90 and other 9g servos. They make nice stubby legs:

    Apart from the childish proportions, I also added a pair of RGB LEDs as "eyes". Of course they will change color according to the status of the robot. I am also using a smaller Feather board here, the M0 Basic, which means it runs on CircuitPython, and not MicroPython.

    The plan is to finish it within a week, so that I can take it with me to PyCon.US and show it off there.

View all 6 project logs

  • 1
    Mechanical Assembly

    For mechanical assembly, follow the instructions at

  • 2

    Solder the headers, the PWM chip and the two resistors onto the PCB. Add the power switch and the battery holder.

  • 3

    Copy the python files from the project's repository onto your feather board.

View all 4 instructions

Enjoy this project?



davedarko wrote 02/19/2017 at 09:11 point

when you find the time, could you talk a bit about the SG92R vs. the normal SG90 or the MG90S?

  Are you sure? yes | no

davedarko wrote 02/19/2017 at 10:18 point

you know what, I should google that first, someone must have blogged about this already :D

  Are you sure? yes | no

ActualDragon wrote 02/19/2017 at 21:41 point

wow, DaveDarko?!?! It's usually me who gets yelled at for that

  Are you sure? yes | no

davedarko wrote 02/19/2017 at 22:12 point

@ActualDragon but, but I noticed it myself, nobody was yelling. Isn't that different? 

  Are you sure? yes | no

ActualDragon wrote 02/19/2017 at 22:43 point

same diff you know what i mean

  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