Building a hexapod robot – more building and a lot to learn

Howdy all,

here I continue my report about the hexapod robot journey.

more building and a lot to learn

So I had a couple of problems to tackle

  • too many cables
  • randomly moving servos
  • learn python as the language of choice for robotics on a pi
  • build a better prototype leg
  • how the hell does a “step” work for a robot leg?

Too many cables and servo jitter

Moving servos using the GPIO ports and simulate a PWM signal with them is just a lot of work and absolutely unreliable. A bit of research brought me to this little toy: The PCA9685, a I2C driven servo motor controller.

It can run 16 servos per unit and has a external power supply so the servos are not run by the Raspberry PI’s internal power. It is controlled by the I2C bus on the Raspberry Pi, so it really only needs four cables to work. This is the tutorial I used to get started with the controller. If you are planning to buy one, make sure you buy one with pre-installed pins 🙂

Build a better prototype leg

so I started looking for better servos and a good way to build a leg from them. With normal servos like this  it’s really hard to attach something to it. I wanted to avoid using 3D printed parts as I wanted my bot to look self-made and punky. After more searching I found these

servos that have a though-going axis and aluminum brackets delivered with them. Using a couple of 3mm screws I was able to create a leg prototype that looked really nice.

I added a push-button to the end of the leg just for testing if this would make sense. I thought I could use it to find out, if the leg has actually touched the ground.. Did it work? We’ll see in a later chapter.

How does a “step” for a robot work

OK so we have three servos. Basically a hip, a knee and an ankle. The shoulder is turned 90° for forwards/backwards motion.

I was never really good at maths, so I figured that somebody must have done this before. Kudos to Oskar Liang for putting this together.

After a bit of fiddling around, the leg started moving somewhat natural, so I decided that now it’s a good time to put together a hexapod.

…to be continued…

Building a hexapod robot – the beginning

Howdy folks,

in my portfolio it says that I am exploring robotics and I have spent half a year now trying things out, building and rebuilding prototype legs, platforms and learning python. Well: I do have a blog and I thought now it’s a good time to share my experiences so far. Unfortunately my phone broke along the way, so I do not have many pictures of the early stages of the project.

 

The beginning

I started the project in June 2017 without a real plan, what I wanted to do. I knew that I love the raspberry-concept and that I hate, when after-work projects stay inside the computer. I love it, when I have some kind of interaction with the real world. I have already done a few projects with IP Cameras and gphoto2 and I always wanted to do more of interaction and not only consumption.

OK – let’s see if I can move a servo.  So I ordered a set of really cheap servos, a breadboard and a raspberry pi zero W on amazon. I did a bit of Google research and found that you can easily control a single servo using the standard GPIO ports of the PI. I quickly noticed that this is not really feasible.

  • The servo does a lot of unintended movement
  • There is a LOT of cabelling involved and things get complicated and error-prone really quickly
  • as soon as the servos drag too much power, the pi will probably explode

But hey – the servo moved and I got caught in the cobweb of mediocre electronics. So I started to build a simple leg using a bit of plastic, wire and hot glue and was able to more or less control it through the GPIO ports.

Leg Prototype

After a bit of fiddeling around, I was able to move the leg the way I wanted.

OK that really caught me. My brain was boiling with legs, platforms, API’s, AI,… The plan to build an autonomous hexapod robot was born…

….to be continued….