Arduino Quadruped Robot

12/13/2012 Update: Code is now available for download at http://engineer-this.com/QuadrupedVer2.txt Its saved as a .txt file because I can't host a .ino. Just rename the extension or copy and paste the code into the Arduino IDE.

Hey guys, I wanted to show off my first robot. He's a quadruped walking robot that I built from scratch. All parts were designed in SolidWorks and then cut out using my CNC router. Each of the four legs are controlled by 3 cheap hobbyking servos. I have an Arduino Nano controlling the 12 servos using the standard servo library but plan on upgrading to an Arduino Mega so I can have some more expansion options.

I struggled with the programming for awhile but finally got my inverse kinematics algorithms working. So far he can only walk forward and do a couple other very basic movements. I've developed a creep gait that works well, but plan on trying other gaits in the future. This is definitely a work in progress but unfortunately I am finding that I have less and less free time these days. Hopefully in the next few weeks I'll find some time to develop a turn gait and add some sensors!

I have many more pictures and information on my website at engineer-this.com/Quadruped. I just started working on the website last week so bare with me while I finish it up.

 

Walks

  • Actuators / output devices: 12 standard servos
  • Control method: Remotely controlled currently, autonomous planned
  • CPU: Arduino Nano with atmega328
  • Power source: 4 AA NiMH batteries
  • Programming language: Arduino
  • Sensors / input devices: None yet - Thermal camera and distance sensor in the near future
  • Target environment: indoor

This is a companion discussion topic for the original entry at https://community.robotshop.com/robots/show/arduino-quadruped-robot-1

Nice looking Quad.

Gives me some inspiration to finish the code for my bot. I like the color scheme you have there. Nice job on the design. Looking forward to seeing more info on this project. Keep up the good work and welcome to LMR.

Can you please email me the
Can you please email me the C++ code
[email protected]

P.S. AWSOME ROBOT!!!

** Beautiful one !**

 Beautiful one !

Thank you! I’ve been lurking

Thank you! I’ve been lurking here for years but finally had something to contribute. Plan to see many more robots from me in the near future…

You know, as it stands no

You know, as it stands no one would be able to follow the code but me (no comments and seriously just messy, I’m definitely no programmer). Give me a few days and I’ll clean it up the best I can and I’ll post it here and my website. 

Love it!

I’d like to second the comment on great colour scheme, the orange servos go nicely with the black body and leg parts. Your website looks good too, I look forward to seeing more of your work.

Ok thanks! :smiley:
Ok thanks! :smiley:

Cool spider. I was going to

Cool spider. I was going to ask how you devised the walking, but decided to read ip instead. Really interesting website. You could slow and smooth your gait by using a “variable speed” servo libray perhaps? I definately prefer the shorter legs too :smiley:

great work!

great work!

C++
Please may I have the C++ code just as it is
[email protected]

Code hosting?

What site do you guys recommend for hosting code? 

AWSOME QUAD!!

please may i have the code because i am 13 and i made a small quadruped robot all i need now is the code because i realy want to show my family at christmas. i am learning the C++ code but i will not learn the code fully for a few weeks but i wont take credit for the code i just want to make it work :slight_smile:

Code now

Code now available! http://engineer-this.com/QuadrupedVer2.txt Its going to be a pain for anyone to understand but I got quite a few requests for the code so here it is.

Code now up

The codes available on my website and linked in the description. Good luck on your quad, programming it was the hardest part for me but I did it all from scratch. There are some utilities out there that can greatly ease the process but wheres the fun in that? 

Thank you so much for the
Thank you so much for the code but if you have time please can you make a wiring diagram for arduino UNO
Thanks!

Not too difficult…

Honestly its not worth making a wiring diagram. All there are are 12 servos. You just need to connect one pin to ground, one to 5-7v, and one to a digital pin for each servo. If youre not comfortable doing that I’d recommend something like this http://emartee.com/product/41798/Arduino-Sensor-Shield-V4.0

It will take you less than a minute to wire up all your servos if you use that shield. I’m planning on using the Mega version in my next upgrade.

Ok cool, I think I finally

Ok cool, I think I finally have all the servos reversed as neccesary, all the functions appear correct, I think I may need to alter the walking gate to suit the geometry of my quad though, as it is still not walking as nice as your quad yet. Again thankyou for sharing the code, made life alot easier for beginers like me.

.

Glad to hear you got it working. I hope to get some time to work on the code again over Christmas/New Years, but we will see.