Pages

Friday, May 18, 2018

My robot is complete! (for now)


I've had and been making this robot since around October, and now I've finally decided it's complete!

Here's the story of it's creation.

I used to take apart Roombas. You know, the robotic vacume that cleans your floor automatically? Right. I took them apart. Three of them, which I found at my local recycling depot. I would start by pulling out the bits that are meant to be unattached; the dust tray and the sweeper and the other thing. I'm not sure what to call it, it's kind of a rubber carpet whacker connected to the sweeper, probably makes it vacume better or something.

Anyway, I would start by taking all those things out, and then I would unscrew and rip the top off to expose the insides of the vacume. There's a lot inside a Roomba. Lots of sensors, switches and wires, which are nice, but the parts I liked the most were the two wheel units.

Each one is a motor connected to a big, knobbly wheel, all well behaved and self contained in a plastic case, with two wires sticking to control the motor, and four others connected to a rotation sensor. And I had six of them! As soon as I saw them all together it was obvious I would have to make a robot.
This was the first stage of robot construction: Hot glue and popsicle sticks.
Quickly after deciding to build a robot, and after a few false starts (you can see the remains of one in the background), I put that together. I decided to go simple: skid steering (like an excavator), and four wheels. Although conventional steering might have been more efficient, it was out of the question; Much to complicated, and likely to break (well, more like doomed to break. It's my robot, after all). And yes, six wheels would have been cooler, but it would also mean the robot would have to be longer, which would mean the skid steering would be even less efficient, to the point of not working at all.

After building that, I wasn't really sure what to do next. I have an Arduino, which is basically a tiny computer that you can control electronics with. I knew I wanted to use it as the brain of my robot, but I didn't know how. I couldn't connect the motors directly to the Arduino- it doesn't put out nearly enough power, and the motors create spikes in the electricity that could damage my Arduino. So, I did some research.

According to what I found on the internet, in order to control my robot I needed something called an H-bridge. An H-bridge is kind of like a complex electric switch. Two of it's wires are connected to a motor, two to a power supply, and another two are connected to whatever you controlling the motor with (in my case, my Arduino). Putting power through one of the controller wires makes the H-bridge power the motor in either one direction or another. That seemed straightforward enough, so I went to an electronics store to buy a couple.

I came back from the electronics store not with H-bridges, but with an Osep Motor Shield, which is basically a bunch of H-bridges incorporated onto a circuit board which plugs into the top of an Arduino. "Even better!" I thought. Now I just needed to figure out how it worked. That was harder then I thought it would be.
The Osep motor shield

I looked online, but there was literally nothing that explained how to use it. But eventually I figured it out. I thought. It turned out I needed to program it with some commands for a different motor controller. Great! So I tried writing code to make the robot go, but it didn't work. Then I copied someone else's. It's still didn't work. Then I switched a couple of wires around. Guess what... they had been backwards. It ran fine! I strapped it to my robot, and it ran beautifully.

I made this diagram after figuring out how everything works.
 All it could do was repeat a series of movements that I programmed it to do, but that was OK with me. Now I just had to figure out how to power it.

I had previously been using a variable voltage power supply to power it, but that power supply plugs into the wall and I wanted my robot to be free. I tried some small hobby batteries I have, but they weren't strong enough and I had no way to charge them. And ordinary consumer batteries were out of the question. Not only would they run out of power fast, they would be way to expensive.

I put the problem aside for a while and made the body of the robot bigger. More room for a battery, if I ever found one. And then I remembered something. The three Roombas I took apart had batteries! And they were the perfect size, too. I just needed a way to charge them. Luckily, I have an Irobot (the company that makes Roombas) power supply. I could charge the battery with that. I just needed to find out how. Usually the power supply would charge the battery while it was still in the vacume, so I couldn't just plug it in. But I watched a couple of videos about it, and decided to try wiring the battery directly to the charger. It was a bit scary, but it worked! the battery charged. My robot was free!
The Roomba wheels

A Backyard Adventure!


I wasn't sure what to do next. There were several options. I could make it into a true robot by giving it sensors and programing it to use them, which would mean it could theoretically drive around by itself, or I could have made it remote control, so that I could drive it around places without pre-programming all it's movements.
What I really need is a use for it. And I don't have one yet.
So I decided to let it wait, and be finished for now.

I will find something for it to do eventually, but for now you can enjoy this montage of it's adventures outside! Music: Hans Hylkema, Backyard Adventure


No comments:

Post a Comment