Harry the Discbot

Harry is my current project, and he's a work-in-progress. My first goal was to simply build a nice differential-drive mobile base for my Basic Stamp so that it could drive around on my carpeted floors. Now that that's done, I have to figure out something for him to do :) I may try to use this to attack the Chair Challenge.

Mobility is handled by two low-end standard-size servos, modified for continuous rotation (control boards removed and wires soldered directly onto motor's + and - terminals, and the plastic stop cut out). A third servo is mounted on the upper platform with a bracket to hold the PING))) sonar sensor. The two drive servos are controlled by two H-bridges built on the breadboard (using eight 2N2222 NPN transistors). The power for the three servos comes from four recharcheable AA batteries in the two dual-AA battery holders soldered up in series, mounted on the lower level between the servos. This provides 4 x 1.2v = 4.8v to the servos. The microcontroller, sonar sensor, and sonar servo are powered by the 9V battery on the Basic Stamp's board.

At the moment, I have it programmed to wander around the room at random, taking 3 measurements with the sonar every once in a while, and trying to avoid running into things. As you can see in the video, it doesn't work very well yet (it drives right into the wall), but to its credit, it does eventually get itself out of trouble and continue on its merry way. Definitely needs more coding work though, and maybe some touch sensors to supplement the sonar and let it figure out when it has run into something.

The code is still under regular development, so I won't bother posting it yet.

 

 


Pictures

 

Fabricating the bracket for the sonar sensor was probably the most difficult part of the whole project.

 

Most of the breadboard (and half of the I/O pins) are taken up by the two H-bridges for the drive servos, leaving just a little space on the right for the hookups for the sonar. It's definitely more efficient to use a separate motor controller, and I've got one on order.

 

I didn't want to glue the wheels to the servo horns, because then I'd have no way to screw/unscrew the horn from the servo, so I used this approach instead. This way, I can still slip a small screwdriver through the axle hole in the wheel to unscrew the servo horn.

 

When all you have is a soldering iron, everything looks like a circuit.

 

Rear view. The nice thing about using CDs to build the body is they even provide a convenient hole in the middle for routing wires between levels.

 

Front view. I don't have anything to serve as a tailwheel, so Harry just drags his butt around like a dog. It actually works surprisingly well, even when backing up on carpet, but I want to figure out something better.

 

Changing the batteries requires a bit of disassembly but not too bad.

 

As inspired by Fritsl, a speaker (ripped from an old 486 PC) makes it a lot easier for the robot to tell you what it's doing with beeps and boops. Unfortunately, I can't think of anywhere to mount it, so I just have to carry it behing the robot like a wedding train.

Wander around at random, avoid running into things

  • Actuators / output devices: Two servos modified for continuous rotation
  • CPU: Basic Stamp 2
  • Power source: 4 AA batteries for motors, one 9V battery for MCU and sonar
  • Sensors / input devices: PING))) sonar
  • Target environment: indoor

This is a companion discussion topic for the original entry at https://community.robotshop.com/robots/show/harry-the-discbot

"Unfortunately, I can’t

"Unfortunately, I can’t think of anywhere to mount it (Speaker, Red), so I just have to carry it behing the robot like a wedding train." LOL!!! I love that picture!

Cool bot, so nice to see some other aproaches than Picaxe! And… I personally would say that you have a very good chance of getting through The Chair Challenge II! (I would not know how (hate to try, actually), though, but I would make something like this ro of yours if i was alowed to participate. Just my opinion, :slight_smile:

Wuw, btw; expansive stuff, that BS (lol, never thought of that) - I mean Basic Stamp. Phew!! Is it worth it?

/ Frits

Thanks. Yeah, it seems like

Thanks. Yeah, it seems like it should be able to handle the Chair challenge – maybe if I rig up some sort of encoders on the wheels so it can tell how far it has driven. Right now it doesn’t really have any idea where it is.

"Wuw, btw; expansive stuff, that BS (lol, never thought of that) - I mean Basic Stamp. Phew!! Is it worth it?"

I’d probably say no. I’m still using the same “starter kit” that I bought for $80 at Radio Shack, which included the board you see in the pictures, the servo I’m using for the sonar, a book, a serial cable, a CD with the software, and a bunch of resistors and capacitors and stuff. I bought it because I knew nothing about microcontrollers, and I was intimidated by all the options available online. Now that I’ve learned to program this BS and used it in a few projects,I get the impression that it’s pretty similar in capabilities and limitations to the Picaxe, except that it costs more and its servo control isn’t as good. So basically, next time I need a controller with about this level of capability, I’ll just use a Picaxe instead :slight_smile:

I’ve included that $80 purchase price inthe ‘cost to build’ of both this robot and Herpe, the R/C car-based robot, even though I used the same kit in both rather than buying a second one for this robot. Ifigured that ‘cost to build’ field should be more of a ‘what it would cost for someone to build this from scratch’ rather than ‘how much money did I actually have to spend’.

The servo control is a real problem for me. It sounds like on the Picaxe, you can just say ‘servo 1, 150’ and the MCU will keep sending the stream of pulses to move the servo to that position and keep it there, while your code can continue running. On the BS2, I have to output the servo pulses myself with PULSOUT, so my program can’t continue running until I finish sending servo pulses. And then it’s a question of deciding “how long do I have to send these pulses until the servo has reached the position I want it to reach?” You can’t just send one pulse, or the servo will move a tiny bit and then stop. So with trial and error I found the amount of time that I need to send pulses that usually gets it where I want it, but that means my program has to pause for like 100-300 ms to send pulses each time I want to move the servo.

So no, the BS2 isn’t all that great :slight_smile: It IS easy to program, and it was a great learning experience, but I think I’ll be using Picaxe or Arduino for any future projects.

Hehe, yeah, that’s the other

Hehe, yeah, that’s the other thing that I’d like to be able to detect. My house has a downstairs, and if I want to be able to leave my robot wandering around the house on his own, he’s going to have to be able to tell when he’s about to go tumbling down the stairs :slight_smile: But I know what you mean about not feeling like putting in the extra effort to add more refined sensors etc. It’s definitely more fun to get something working than to work out all the little bugs after that.

I’m actually not sure that my robot COULD handle much more than what it’s doing now. As you see in the pictures, it’s already using over half of its I/O pins, and I’ve already run into the limit for number of variables, and he can’t even do much yet. I could refine things, like use a single global variable to pass arguments to subroutines rather than a separate variable for each subroutine, but it feels like, if I’m already scraping the limit, then it will be hard to fit anything significant in there just by refactoring the existing code.

But my new Arduino gets here tomorrow, so maybe that will provide me the flexibility to build something more complex. Or maybe I’ll find that it is just about as limited. We’ll see, it’ll be fun either way.

I think I talk for many in

I think I talk for many in here, when telling you that we will look forward for Arduino-essays :wink:

Thanks,

/ Frits

Cool robot
Cool robot. You should make him dance to the sound of YDM and rename him "Harry the Discobot" :slight_smile:

Now THAT is a great idea. I

Now THAT is a great idea. I don’t think he’ll ever get to meet YDM, sadly, but he could certainly dance to other things. I wonder if I can put little arms on him so he can dance like Meatwad.

|x

Question

why did you name your robot harry.

why not mike, rover, bob, da vinci, so many names.

 

Good question. I guess he
Good question. I guess he just struck me as a Harry. Of course, when I make him smart enough to talk to me, he can tell me himself what he wants to be called. :slight_smile:

Nice bot
Nice bot, do you have the diagram of the H-bridge you build using 2N2222 NPN transistors?