Skip to main content

Software Developers Experience building a robot Part 1(Legs)

Introduction

This will be part one in a series where I ( A software developer ) share my experiences in an attempt to build a fully wireless robot. This series will be targeted at other software developers wanting to do the same , who can hopefully learn from my mistakes , and electronics engineers who would like a good laugh.

The software:
As this is aimed at software people we will start by talking about the software, before delving into the unknown and getting electrocuted. Before I even started buying parts, I had decided to go with the following "stack":
  • Raspberry Pi with wifi dongle
  • Arduino microcontroller
  • Firmata
  • Johnny-five

As you can tell from the need for johnny-five this is indeed a JavaScript robot. The Idea is to run the JS on the Pi and have it control the Arduino and in turn control the robot.

One thing to note on this is that the Pi's default package manager does not load the latest version of node.js so you are going to have to compile a newer version if you want it. As the hardware isn't as beefy as what you are used to compiling node on , it can come as a lovely 3 hour surprise. If you are going to watch this baby compile you are going to sit for a long time so rather leave it in a safe place and go watch your favourite LOTR movie.



Compiling node on a Raspberry Pi is exactly like this gif posted by +Max Ogden  on nodejsreactions.


Going kit-less 

I started my bot making small purchases of parts I thought would be "roboty". My first robot was merely a breadboard and +Arduino taped to 4 servos , making a knee-less quadruped. The thing took ages to move and with no knees the weight of the USB cable seemed to be the only thing that gave it a sense of direction, slipping as it slowly walked.


It had become quickly apparent that this thing needed some knees, so I obtained 4 more servos and clobbered them together at the horns. I had to upgrade to using a Mega instead of an UNO in order to acquire more PWM pins, I also needed a larger platform. I opted to use just a larger breadboard and still use the built in two sided tape to attach the servos. This iteration of my robot started to show the early signs of my two biggest problems later on:

  1. Weight
  2. Power
With 8 servos running , the project was drawing way too much power for the single USB to handle. A second power source was needed; this was overcome using a 9v power cable during debugging and a 9v battery(also taped to the bottom) during operation, to keep it to only one cable for less restrictive movement.



There was also way to much force on the 2 sided tape joins and legs would often fall off under the weight of the bot. I decided that I needed a proper structure to support the robot.

I settled on a design of layering prototype boards as I thought I would also need to solder on some custom circuitry later on. I bolted on some plastic brackets I picked up from a local hardware store to make it easy to mount the servos and in the end I had pretty much the same thing I had to begin with but on a much sturdier platform.

This new design also provided some modularity. Because I had attached different parts to the different boards , it allowed me to make modifications to a single layer without affecting the the way the whole robot was designed. This became very handy later on and I still use some of the parts from this bot in a completely different design because of that modularity.


Now that the bot wasn't losing legs I decided to tackle the problem of the USB Cable. I wanted my robot to be wireless, and I also wanted it to be smarter than the typical Arduino bot, I wanted my JavaScript running on my robot.

My solution was to mount a Raspberry-Pi on the bot , I also went for a more servo oriented micro-controller to make it as easy as plug n play when attaching servos, It didn't hurt that the spider controller also fits perfectly above the Raspberry-Pi on its copper standoffs.


This was the point when both weight and power haunted me , too much of one and too little of the other. When the bot powered down, it immediately collapsed under its own weight. This also meant that the servos had to keep fighting gravity and that needed power. The Pi was also a power hungry little beast that rebooted every time too many servos moved, even 2 LiPo batteries were no match for this power sucking beast. This iteration was going nowhere, it was time for a radical change.

At the end of the day, I decided that legs use way too many power hungry servos and that I never wanted weight to be a problem again.

It was then that I put my experimentations with limbs to an end and decided on something simple , yet extremely effective... Tank Treads!


Comments

Popular posts from this blog

Setting up Qt Creator for assembly

After fiddling with inline asssembly (not very successfully) ,I recently decided to try writing proper assembly and compiling with NASM in Linux. After writing a hello world using gedit and having a terminal open for compiling,linking and running I had a thought.,there has to be a better way to do this. So I tried Qt Creator ,because I know it's easy to add custom build and run commands,and what do you know? I got it to work. Here's how,my screenshots and assembly code are in Linux but the set up should be the same regardless of the operating system,if you are not using Linux then just use the same commands you use to assemble in your operating system. First off ,create a new console application: I named mine ASM Rename the main.cpp to main.asm and delete all the text inside.then insert some assembly: Now open up the “Project” tab and edit the build settings,remove the current build and clean steps and remove the “-build-desktop” from the en...

Using delegates in Objective-C

Why use delegation? Well when writing Objective-C programs in Xcode we are encouraged to use the MVC(Model View Controller) structure.In MVC a model cannot send messages directly to a specific controller.This can become a problem if data in your model changes independantly and you need to update this information in your view via the controller(The model must never communicate directly with the view).This is where a delegate comes in,it allows messages to be sent from the model to a controller that is not specified in the model but is rather specified by the controller,in other words the controller specifies itself. If you dont really understand what im talking about so far ,don't worry.I didn't understand delegates either until I needed one,but hopefully by the end of this tutorial you will understand not only how to use a delegate ,but the reason you would want to use one. Program breakdown For this tutorial we will write a program that has a model that will change an...

Fix ssh -Y with other Macs OSX 10.8 Mountain Lion

You may have realised that when you try use ssh -Y on another Mac from Mountain Lion you get the following error : Warning: No xauth data; using fake authentication data for X11 forwarding.X11 forwarding request failed on channel 0 Fixing this error only takes some simple configuration. All you have to do is add these lines to the following files on both machines: /etc/sshd_config X11Forwarding yes XauthLocation /opt/X11/bin/xauth XauthLocation /usr/X11R6/bin/xauth /etc/ssh_config XauthLocation /opt/X11/bin/xauth XauthLocation /usr/X11R6/bin/xauth That should be all you need to get rid of the authentication error. Hope this was helpful.