Let's Make Robots!

Edward

 
Avoid obstacles... look cute... lots of programming to be done.
AttachmentSize
EDWARD11.BAS7.75 KB


update: added code (older version 1.1) as attachment

update: Frontplate is mounted. Turned the IR sensors. Lost the abiity to detect cliffs :( 

 

This is my second robot. The first one was for practicing soldering using a picaxe 08M prototype board. It had two modified servos, a led, an infra-red eye and a switch. I couldn't get the speed control right using the servos so I figured I should use PWM. The other problem I ran into was the program size. The 256 bytes on the picaxe08M is just not enough. 

the board 

I bought a Picaxe 28 starter kit which is great for playing around, but it lacks a few features I wanted. First of all, the picaxe chip supports I2C, but since the I2C pins are fixed as digital inputs on the board. That means no eeprom chips and no I2C display. Also, the PWM pins of the picaxe 28 are also configured like that and I really want speed control.

So I decided to put my newly acquired soldering skills to the test and build a board from scratch. I intended to put the power-stuff on the board together with the motor driver and build it as a I2C slave. When I was done I figured I had enough space left to add two 32K eeprom chips and a few headers (for the sonic rangefinder, infrared and servos)

The 32K eeproms are to store texts, movement sequences and sensor-conditions. I don't know how yet, but I allready tested some primitive menu using the serial cable to fill the eeproms from my laptop. This program uses about 500 bytes so I might be able to leave it there alongside the rest of the programming. we'll see.

Here's the result 

Mainboard

 It takes 7.2V from 6 rechargable NiMH batteries. One jumper can be removed to provide a powerswitch and the second jumper can be removed to disconnect the logic circuit from the motor power, so you can use a separate 5V powersource. I added a diode just in case I put the power connector on the wrong way.

Hidden beneath the wires on the top, there is a third jumper which can be removed in case I want to use this board as a I2C slave. The jumper connects the pull-up resistors for the I2C bus.

 

The body

I am building the body out of expanded-PVC. It is great stuff! Very easy to handle and you cut through it like butter. The ground plate is 5mm thick with a hole sawn out. That takes 5mm of the first battery case, which is mounted under the plate. The other battery case is carried on the back, sort of like a back-pack.

Back-view

 

The front will have a 2 x 8 character display from matrix-orbital (blue-ish letters on white background - looks very cool!) Still need to decide where to place a small button and the reset button, along with a few LEDs.

The main board will be skrewed on and hang from the top plate. Hopefully the serial jack connection will be reachable from the outside that way. On the front (bottom) two IR-rangefinders will be mounted to be used as bumper switches. I hope I can figure out some clever way to mount them at an angle. The wires on those IR thingies are really sticking out. Very hard to mount those things without the wires showing.

Tracks 

I use tracks to enable the robot to drive over stuff. (My first robot could get stuck on a magazine on the floor) Because the motors are pretty thick, I decided to mount two idlers below the ground plate so that the motor is inside the body. That should give me more ground clearance.  The idea is to get a Wall-e look.

The tracks are mounted using 5mm bolts from the local hoby shop. I bought some extra rings and stuff to get the distance right. It was a lot harder than I expected to get those tracks right. Too loose and the motor just spins without moving the tracks and 2mm too tight and the left and right tracks dont run at the same speed.

Bottom 

 

First Moves

OK. The top board is on. I didn't cut the hole for the wires of the head yet, but I really wanted to see this thing moving.

I renamed the robot to Edward (after Edward Scissorhands) because I'm afraid I don't have enough space to add any kind of arms or hands. He'll probably end up with dummies or no arms at all.

The treads are very smooth which is great for turning, but very bad when trying to drive over an obstacle on a wooden floor. 

head attached

Edward has sort of half a head now. I still need to fix a frontplate to cover the sides of the display, finish the head (not a very nice job I did now) and fix the sharp IR rangefinders. That SRF05 is not very good at detecting the floor. I guess the ultrasonic pulse just bounces off the floor and doesn't get detected. 

I was hoping I could get it to look down and "see" the floor or "see" cliffs or table edges. I'm going to have to use the IR rangefinders for that.

 

Done

I'm calling this one finished. I'll spend a few cold winter evenings trying different programs, but this design just isn't very good. Lets look at what I think I've learned.

I tried a separate power supply, but that didn't solve the resetting of the display problem. Which means I'll need to shield the internal wires or something. Maybe the problem is that I use 7.2V through a diode, making it 6.6V and then through a voltregulator. Maybe the 6.6V is too little for the regulator, but I'm afraid those cute little servos will melt down when I give them the full 7.2V. Anyway: my next bot will have 2 powersupplies. 

Another problem is the motor driver. I really don't like the 1.4V voltage drop of the L293D. I'm experimenting with hooking up servo-electronics to different motors to be able to run them without the voltage drop and using 1 output pin for control. Maybe i'll drive the next bot with 9V or 12V and use a switching voltregulator to bring it down to 5V for the servos. I'll start playing around with relays. I want better speed!

Thirdly: the weight is distibuted wrong. I didn't think it would become a problem, but edward falls on his back quite easilly.

And then the sensors. I knew the optimal way to combine IR and US sensors would be to have the SRF05 on the belly and two IR sensors on the head, but I went for looks. The IR's are now mounted at an angle sideways so that they look in front of the treads. They don't look down though. So Edward cannot detect cliffs anymore The head is only usefull for detecting large vertical objects and for cute looks. I'm considering building a Frits!LDR with lenses. Something that is more stable then the IR sensors and less sensitive to surfaces that don't face the sensor directly.

 

edward1_20_0.jpg

This was a nice project and the result is a cute little bot with a display two 32K eeproms that I can program endlessly. On to the next.... 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Fantastic casing, can you say a bit more about the construction? Are the various panels of ex-PVC glued together, or bolted somehow? Is it easily cut/drilled?

Most of the panels are screwed together. I found these tiny screws (2mm diameter, 10mm length). I drill a tiny hole in the PVC  (1mm) and screw.

The base, the front and the back plates are glued. I posted some drawings of those somewhere in the replies in this topic.

You can cut the PVC with a sharp knife, but most of the time I cut the plates with a saw and finish off with a dremel.

 

Ah, I was actually going to ask about this.  Sawing and Dremeling was what I was going t do to cut the PVC, so I'm glad to hear it worked for you.
 
For my next robot I ordered some 3mm PVC, just to make a chassis.  This will be a basic wall-avoider.  The one after that, though, will be my Edward/Wall-E - like robot.  Would you recommend getting 6mm PVC for that?  I'm guessing 3mm wouldn't cut it for that.
 
Any chance you could post some close-up pics of how you drilled the holes and screwed the panels together?  Was it fairly easy to do?  In other words ... could I figure it out for myself, or did it take you some trial an error?

It was mostly trial and error. I chose the 5MM PVC because it was more than sturdy enough for edwards size and because the smallest screws i could find were 1cm long. 3mm will probably be enough for a small bot, but if you use thicker plates you' be able to screw in the side of the board. My 2mm diameter screws are too wide to fit in the side of 3mm PVC; at least with my unsteady hands.

If you got your PVC at solarbotics (http://www.solarbotics.com/construction_materials/)  I'd recommend getting some 6mm board as well. Just to make the baseplate.

I started out with the idea to make a frame of 5mm PVC and then make the covers out of 2mm board. I ended up using mostly 5mm plates because of the option to put screws in the sides.

Anyway: I bought a toy voice recorder that i'll be trying to fit inside edward. I allready put a "wwwwall-eeeeee" sample on it and it runs on 5V so that shoudn't be a problem. I'll take some pictures when I take edward apart. 

 

Thanks for your response, mint. 

Yeah, I got the PVC from SolarBotics.  I think I should have ordered 6mm, even for my smaller bot.  I'll still make it work for the smaller one since I've already purchased it, but yeah I think the 6mm would be much better for my Wall-E bot.

A voice recorder?!  That's awesome.  I really want to do that as well.  Voice-activated would be even cooler.  ;)

Here's a random idea I had for my bot's code: make him able to recognize something that's both moving (alive) and short.  In other words, babies, kids, pets, etc.  Then, have his "mood" change and use the cute sound effect that Wall-E makes in the movies when he's interacting with the cockroach or whatever else.  Think it's possible?  Could end up being more work than it's worth, but my family would get a kick out of it if the bot made cute sounds and looked "entertained" by their babies.  My cousins and extended family have about 5 babies right now.  It's crazy.  Plenty of test subjects.  ;)

The voice recorder is pretty funny. It can hold 1 sample of max 6 seconds and costs 3 euros. I took it apart immediately and found that it runs on 3 button-cells (5V) and the play button just pulls on of the chips pins low. Very easy to hook up to a picaxe board.

I think 3mm boards will do fine for a smaller bot.

I'm thinking about some kind of object recognision program, but with these sensors and the limited processing powers of the picaxe (positive integer math only and just 4KB program memory) I think it will be hard. moving "targets" like pets and babies will even be harder.

As for the babies. My son is 17 months old now and he allready messed up Edward once. I took out the batteries and he was so disappointed that Edward didn;t move anymore that he hit him on the head, breaking the gears of the top servo. If you don't like to do repairs; keep the robots away from the destructive powers of babies! 

Oh no!  I guess I'll either have to baby-proof him or just keep a really close eye on kids.  I know I should keep them away entirely, but I just can't resist seeing a kid's face light up when she interacts with a little robot.  :D

Wow, 3 Euro?  Not bad.  Where did you pick that up?  Is it essentially one of those things they put into talking birthday cards, or is it more sophisticated than that? 

I found the voicerecorder in a tiny shop that sells housekeeping items and a few toys in my neighbourhood. It is a keychain thingy with a LED-light and two other buttons for record and play. 

Sound quality is not very good, but OK. I haven't checked if its a piezo or a regular speaker. I'll post pictures of it when i get the chance 

Wow, definitely cute! I like it.

He's done?!  Well, looks like the project came out great ... something you can be proud of.  Really unique and cute, too.  Congrats on finishing your second robot!

I want my third bot (second "real" bot with a brain) to be similar to this design, too.  Basically because I'm obsessed with Wall-E and I want my own.  ;)