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":
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.
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:
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!
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:
- Weight
- 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
Post a Comment