Robot Project: PC Based Robot

TEK NINJA

Gawd
Joined
Nov 12, 2000
Messages
827
I am an active C/C++ programmer and I have always had an interest in electronics. I think that getting into robotics might be a very good way to ally both of my passions.

I have been doing a good bit of reading on robotics in the past. The thing that surprises me is that when it comes to building robots, people always seem to make sacrifices on the computer hardware. Most of the hobby robots involve using some rather weak microcontrollers with very limited resources. I had an idea recently: why not use a PC? After all, PCs are getting so cheap now... I have a good amount of spare material lying around... Certainly enough to build an OK computer. This seems like a very good solution to me. For quite cheap, its possible to get a microATX motherboard with onboard video and a decent processor (like a Duron 1.600 or a Thunrdebird 1.333).

With a PC, it becomes possible to hook a cheap camera (like an USB webcam) and interface it very easily... You also get one (or more) serial ports, which allows to interface some basic motors and sensors without using a microcontroller. You also get the biggest benefit of all: enough processing power to actually do something. With a duron 1600, you can take images from the camera and run complex algorithms on them to determine how space is organized. There is also one more quite cool advantage: the possibility of installing a WiFi network card and organizing some TCP/IP based remote control system.

I am thinking it would be possible to build a nice R2D2 sized robot that way. The biggest challenge would probably be to build (or find) a large chassis and install a motorized wheel system. Some of you might be wondering about the power... Thats not even a problem. All that would be needed would be to hook some sealed lead acid batteries in parallel and use a power inverter to power an ATX PSU for the motherboard/PC hardware. Other devices such as the motors/lights could take their power directly from the battery.

What do you guys think about that?
 
I'd grab a Mini-ITX board...

They require very little power, and you can get small "140 watt" power supplies for them that run directly off 12 volts.

Besides, you can't possibly need a whole lot of CPU power for a robot... the last robot I built used a 8-bit PIC running at a scorching 4MHz...
 
I wouldn't use something as powerful as a 1.6ghz for a robot. no way are you gonna make something that complex. I'd say find some 486 SBC. save yourself some money and you won't need to make it as big as a bus for power requirements.
 
I'd grab a Mini-ITX board...

They require very little power, and you can get small "140 watt" power supplies for them that run directly off 12 volts.

Besides, you can't possibly need a whole lot of CPU power for a robot... the last robot I built used a 8-bit PIC running at a scorching 4MHz...

Was that robot able to analyse stereo video feedback very fast?

The mini-ITX sounds like a good idea, but it could make things more expensive. And no, I am not necessarily going to need 1.6 GHz... I just said that because durons 1.6 are really cheap right now, and its better to have too much CPU power than not enough. If I ever decide to realise this, I will just pick what I can
get... The simplest and less expensive.

I wouldn't use something as powerful as a 1.6ghz for a robot. no way are you gonna make something that complex. I'd say find some 486 SBC. save yourself some money and you won't need to make it as big as a bus for power requirements.

You suggest that I get a 486... Well, that doesnt sound like such a good idea. There is no way I can run a modern OS on that... I would have to get a very old linux kernel... And most 486s don't have PCI slots... I would have to look for one that does in order to hook a WiFi card. Also, I doubt a 486 can do some very fast image processing... Having a faster processor could allow the robot to process the full 30 images per second in 640x480 a web camera (or two) can provide and allow some faster movement. Its annoying when robots are extremely slow... Also, you have no idea what complexity level I could make in such a robot. There is no fun if you are limited by your hardware.

As for power requirements, its not that bad. I said 300 watts, but in reality, it will probably be around 140 watts in usage... Just gotta think expandability. If I buy a duron 1600, I might even underclock it to reduce power consumption.
 
Originally posted by phasmatis_nox
If you need some help figuring out the drivetrain stuff, let me know.

I sure could use some help. Never built a chassis, don't know how I could build a direction system... I also don't know exactly how to build a parallel interface (programming wouldnt be a real problem, but building is another thing).
 
It sounds like a good, although somewhat expensive idea. Because of expense, if you were to make a number of these robots, you could have a single, easily swappable control computer with profiles for running different robot types.

http://www.beyondlogic.org/index.htm should help you interface with whichever ports are going to connect to the robot. I have some experience using the parallel port if you need any help with that.
 
I was looking around for robotics information and found this:

sr4-inside.gif


I was originally thinking of going with a 3 wheeler design where there are two wheels for movement and a back wheel to allow direction control... But this robot seems to simplify things quite a bit...

It seems to use two independent motors, one for each wheel, and two small rotating wheels that are just there for stability. That seems like a fairly interesting design, because it allows to fully conceal the wheels inside the robot, and because it allows the robot to rotate around its center axis, without having to first bove back or activate some kind of direction system.
 
I have prepared this simple drawing to illustrate better what I would like to accomplish:

draw23.gif


Basically its a mobile computer robot. Perhaps I could even integrate voice synthesis into it... Would be easy as pie using the microsoft voice API (ms agents), if the PC inside ran windows 2000.
 
yikes. that seems the last thing you want any expensive equipment running. especially if you are accessing hardware directly. Windows 2000 and up have a tendency NOT to let you access hardware, simple things like a parallel port can be a pain to access. not to mention API calls often lead to crashes, and the last thing you want is some 800$ piece of equipment rolling off a cliff.
if you want something good, try a stripped down version of linux.
also, i guess you havn't done much research on SBC's. you can get one with a PCMCIA slot or a PC-104 connector to add any usability you want. they use very little power, and require no active cooling (a big plus). and if you wanted more power, you simply have a server that recieves the data and sends the result.
there are faster passively cooled SBC's (a quick google resulted in: http://deviceforge.com/news/NS7903631036.html )
though the price is over 1000$.
remember, for robots: the bigger it gets, the more expensive it gets, and the more power it needs. essentially you end up building a larger frame just to occomidate the the batteries that are needed for the hardware that is running, which needs a larger motor to move that heavy weight which takes up more power.
 
I wish you luck in your task. You'll have plenty of speed with a faster processor - now you just have to worry about what your actually going to do with all those cam images. Unless you plan to develop a specific course for it to run and you don't mind it literally crawing along your probably better off integrating some kind of ultrasonic range finder and plotting a path that way.

I've done some work with polaroid ultrasonic systems in the past and they worked fairly well. You'll need a lot of power to get a good echo off many surfaces but if you attach the transducer to a rotating system where you can track it's angular position you could probably do some cool stuff :)
 
Sounds like a lot of fun, but I'd highly suggest you plan things out before you start shelling out the big $.

Your idea of using a PC as the brains isn't a bad one by any means, but the wimpy PICs have their place too. For the 140W of power consumption, you could run nearly 1000 PICs. Not to mention the fact that with a PC, you don't have nifty things such as integrated PWM modules, ADC's, and the like.

Also, if you're planning on doing video feedback stuff, I hope you've got some experience with heavy duty image processing. Things that your brain does that we take for granted (like recognizing shadows, for example) are terribly difficult to mechanize. Not to discourage or anything, but it's nice to have realistic expectations at the outset.

All that said, my advice would be to think modular, and think hardware. Windows is indeed a handy tool, but I would even nconsider using it for advanced motor control or high-speed feedback systems. There's just too many layers of abstraction between the processor and the real world for that sort of the thing.

ANyhow, have fun, eh.
 
yikes. that seems the last thing you want any expensive equipment running. especially if you are accessing hardware directly. Windows 2000 and up have a tendency NOT to let you access hardware, simple things like a parallel port can be a pain to access. not to mention API calls often lead to crashes, and the last thing you want is some 800$ piece of equipment rolling off a cliff.

I have considered linux, but windows 2000 pro makes things simpler... And allows me to use that voice synthesis thing easily. I doubt windows 2000 is that bad when it comes to accessing the parallel port... And no worries, it won't be getting anywhere near cliffs. The movement control should be quite simple. Two motors to control, three states for each (on, forward, backward). By making simple combinations, its possible to rotate the robot around itself or make it go forward and backward... Or even rotate while moving, all that without speed control. If a faster speed is really needed, it could be possible to setup some kind of additional forward speed (because it only really needs faster speed when it know it can move ahead a long distance).

if you want something good, try a stripped down version of linux. also, i guess you havn't done much research on SBC's. you can get one with a PCMCIA slot or a PC-104 connector to add any usability you want. they use very little power, and require no active cooling (a big plus). and if you wanted more power, you simply have a server that recieves the data and sends the result.

That PC-104 stuff gets very expensive very fast, and I don't know if it has USB... Plus, if it requires an external server, then thats another whole machine to buy, which doubles the price. About passive cooling... A 1600 MHz duron running between 800 and 1200 should be fairly cool.

geez, wonder what the battery life will be on that thing...

I've done some work with polaroid ultrasonic systems in the past and they worked fairly well. You'll need a lot of power to get a good echo off many surfaces but if you attach the transducer to a rotating system where you can track it's angular position you could probably do some cool stuff.

A range finder of some kind is a must. What I like with this base design is that since the robot can rotate without actually displacing, you don't need the head to rotate, it can just do a 360 spin and pick a direction and then move.

Probably 2 hours or so. The biggest power consumption is the PC, at about 140W, the motors can take about 80 watts at max, but they are not always running.

Sounds like a lot of fun, but I'd highly suggest you plan things out before you start shelling out the big $.

Of course, planning is the whole point of this, and if I do create this, I won't start buying and building before the summer.

Your idea of using a PC as the brains isn't a bad one by any means, but the wimpy PICs have their place too. For the 140W of power consumption, you could run nearly 1000 PICs. Not to mention the fact that with a PC, you don't have nifty things such as integrated PWM modules, ADC's, and the like.

I'm sure PICs can be interesting for very small robots, but with a PC you have everything. Multiple parallel ports, serial ports, USB, audio output and input, wireless communication, an actual operating system, large storage devices... Etc.
 
TEK if you need some links on the ultrasonic let me know. I don't see them around as much but they should be easy to dig up. I've also done work with Pulsonics and Hyde Park equipment but the Polaroid development kit is much less $$ from what I remember and it worked pretty well.
 
Originally posted by TEK NINJA
Was that robot able to analyse stereo video feedback very fast?

The mini-ITX sounds like a good idea, but it could make things more expensive. And no, I am not necessarily going to need 1.6 GHz... I just said that because durons 1.6 are really cheap right now, and its better to have too much CPU power than not enough. If I ever decide to realise this, I will just pick what I can get... The simplest and less expensive.
The robot could analyze 'mono' video feedback very quickly actually... using a wireless camera with the reciever plugged into a 1.8 gig P4 ;)

Mini-ITX boards are pretty cheap. You can get an Epia V with a 1Ghz C3 onboard for $160 CDN. Includes USB, serial, LAN, sound, basically everything you'll need.

What's nice is power dissipation... the Epia hardly requires any power compared to a Duron. If you use a 12->120V inverter and a 120V powered computer power supply, you're looking at about 50% power conversion efficiency alone right there, which is why I suggest picking up one of the 12V supplies. And Durons require quite a lot of power which makes things even worse... Not only will this wear down your batteries faster, it'll also dump a bunch of heat into your robot. You'll need a fan or two on your robot's exterior to get rid of that.

Finally, you gotta appreciate the smaller form factor.

Anyhow, it seems like you've already convinced yourself what you want to do, so there's really no need for me to post any more...
 
No need to post invalid arguments no :D

Like I already pointer out, the durons don't generate that much heat... plus heat wouldnt be a problem in such a large robot... And I can underclock the processor to half speed if needed.

About the ultrasound... Sure, post the links, I will check them when I have time :D

Big news flash: Today I was able to light a single LED connected to my parallel port :D
 
Just to add my two cents into the mix... It seems like, as gee said, "it seems like you've already convinced yourself what you want to do," however, do you really know what you are getting yourself into? Please post how you plan to use your "stereoscopic video cameras," do you have ANY clue the amount of work it takes to process an image and identify objects? And what would be the point of using the "stereoscopic video cameras," for autonomous navigation? I'd like to see you code a tracking program first before you start tinkering with the parallel port. I think you need to work on that first before you start buying your boards, PSUs, processors, batteries, and motors. IMHO VERY high hopes with little chance for success, but good luck anyhow though...

-special [k]
 
Adisharr: I see the kit, but it seems fairly old (is that a 5.25" floppy?), does that site accept orders or is it just to promote material?

Specialk: Well, you shouldn't underestimate people like that :D I am quite experienced in C++. I have programmed a 3D engine before and I am in the process of programming a new one. I have also made a few raytracers to test some rendering concepts myself.

The reason stereoscopic vision is needed is to have a correct perspective of 3D space... To allow the robot to navigate without the use of dozens of sensors. My main worry is how to build the machine, how to build the direction system properly to have a robot capable of moving... Processing the video feed is just a matter of programming, which certainly can take time to do, but if I decide to start this project, I will put the time into it and I will succeed.
 
You can also start off with Lego's Robolab set. I used it in my CompE introductory class/lab.
The software is simple GUI but there is third party c++ based app that controls the robot. Might be too simple for you but its atleast something you can start programming right away.
 
Originally posted by TEK NINJA
Specialk: Well, you shouldn't underestimate people like that :D I am quite experienced in C++. I have programmed a 3D engine before and I am in the process of programming a new one. I have also made a few raytracers to test some rendering concepts myself.

Maybe you shouldn't overestimate yourself either? While it's nice that you have experience in C++ programming, it's not going to help you as much as you might like to believe. I know becuase I was a programmer just like you, then got involved in robotics. Robotics is a mix of Electrical Engineering and Mechanical Engineering, with programming as a secondary skillset. You are going to have to rely more on the first two disciplines then the third.

So let me see if I can help clear a few things up:

Making a 3D program, and signal processing an image from a webcam are NOT the same things. While I respect your programming abilities, they are not going to help learn how to anaylze an electrical signal from a webcam, and then be able to use that information to make a robot autonomous. You need to learn digital signal processing, and believe me, that's a big field to learn.

Don't underestimate the heat, especially in a bigger robot. While it might be true that the computer might not generate alot of heat, the motors you use to run the robot will. Also if you are using something like a car battery, be careful. These produce enough current that if you use the wrong sized wires, or improperly connected things, it could have enough resistance to start a fire. I've seen it happen in robots that were about 5 feet tall.

There's a real good reason why micrcontrollers are used instead of pc's, response time. A robot operating in the real world has to be able to respond in real time. The operating systems used in pc's create to much overhead, so no matter how fast the system may run, it'll never be able to respond to new commands as fast as a microcontroller can. Besides why use a pc when you can get a dsp(digital signal processing) chip to do the same job? You want to control it over the internet? Buy an ethernet port and connect it to a microcontroller, it's been done, and it works well.

Here's my recommendation:
The biggest pitful any newcommer has is chosing a beginning project that is too big for the person to handle. The person get's frustrated when he can't get the project to work, then dumps the project and never returns to robotics again. I've seen it happen more times then I care to admit.

What you should do is try to build a simple robot. Get yourself a cheap microcontroller. If you have 50 bucks to spend, I'd recommend getting a BASIC Stamp chip from www.parallax.com. It's a very popular chip, and it's very easy to get started in robotics with. The purpose of a beginning project is not to do something revoulutionary, but to learn the in and out of a trade. Right now what you need to learn is how to interface motors and sensors to a control unit, before you can even think about using a webcam to control a robot. There's nothing embarassing about starting small, it's a matter of being able to learn to walk before you can run. We've all been there.

I'm sorry if I sounded a bit condecending, I just wanted to make sure you got a good start in this field, because it can be very rewarding. Whatever you choose to do, I wish you the best of luck.
 
Occult speaks the truth from my limited knowledge of robotics. I started with a basic stamp. Haven't really gone much further after it though :)
 
(Trying to help though) :rolleyes:

Robotics is very hard to get anything going. A robot that goes forward isnt very hard, But to make a robot that can sort black and white coffee mucks is. (asnexampluh)

a "Basic stamp" is NOT serious business. Its childsplay, however the creator of basic stamp doesnt wanna let you know that.

I im saying: Robotics usually require real Microcontroller responsiveness, and bitcrunching power. SPEEEED :eek:

Try Atmel AVR series for a change. Those slamn a nice 16Mips :eek: at 16MHz,, ok 16 mips look like nothin, but a stamp probaby gets 1 Mips @ 20MHz. Plus Using a proper language ASM/C gives you the development advantage above BASIC.


Oh, im working on a balancing robot myself,, erm ok A basic stamp wouldn't cut it because of the math that it needs to crunch in order to keep the robot uprigt with only 2 wheels and a gyro + acceleration sensors.
 
Ps: if you want to be original,, well it has been done before. Make an analog robot... That would really be much more realistic to nature.. Nature doesnt use mips, it uses analog transistors called braincells and stuff :p
 
Braincells are actually much more complex then a transistor, but let's not go there right now :p

But let's get down to business.
I think Occult said it all, but I feel like adding my two cents anyway...

First of all, robotic vision is probably one of the most difficult areas to work in, and unless you plan on use your robot in a strictly controlled environment, I think you're in way over your head (no offence). Sonars, infrared proximity detectors, bumper switches and shaft encoders will take you a long way.

Second, you want to build as light as possible. The power -will- be a problem, like it or not. If you build a heavy robot, you'll need big batteries and motors. That means added weight, wich will require more power to move, and that again means added weight and so on...

Third, robots with microcontrollers can be as complex as you want them to. If one microcontroller won't cut it for you, how about a network? For example one microcontroller as a "mastermind", one that controls sensors and one for controlling motors.

But as Occult recommended, start with a small, easy robot and work your way up. I learned the hard way that keeping it simple is the best :p Luckily I was too stubborn to give up, and now I have a very interesting hobby :)
 
Amazing, this thread is still alive.

"Basic stamp" is NOT serious business. Its childsplay, however the creator of basic stamp doesnt wanna let you know that.

I agree, and if I am to build a robot, I will definitely do it with a PC. Basic stamp is rather expensive, if you consider the performance it provides. I don't wish to use any microcontroller, its just more pain.

While I respect your programming abilities, they are not going to help learn how to anaylze an electrical signal from a webcam

I have no intentions of analyzing the electric signal. I have the intention of plugging webcams in an USB port and analyzing the images they provide...

Don't underestimate the heat, especially in a bigger robot. While it might be true that the computer might not generate alot of heat, the motors you use to run the robot will.

That heavily depends on the motors. Two 20 watt motors wont generate more heat than a PC processor... Plus they won't be on all the time.

Also if you are using something like a car battery, be careful. These produce enough current that if you use the wrong sized wires, or improperly connected things, it could have enough resistance to start a fire. I've seen it happen in robots that were about 5 feet tall.

Dude what the hell are you talking about? The current the battery provides depends on the voltage (which is always 12 volts here) and the resistance (which depends on the circuits used). Unless the battery is shorted, or a very heavy load is put on tiny wires, there is absolutely no risk. Not to mention that I won't use a car battery, but most likely something like a 35 Ah sealed lead acid battery.

There is no point in posting things like that. Speculating about risks that won't present themselves... The need for a large battery shouldn't be a problem in such a project. Just have to do things properly.

The biggest pitful any newcommer has is chosing a beginning project that is too big for the person to handle. The person get's frustrated when he can't get the project to work, then dumps the project and never returns to robotics again. I've seen it happen more times then I care to admit.

You are underestimating me again. If I choose to work on this, I will work on it for real. If I don't, then I won't. The project is actually rather simple, in the description I originally provided. The circuitry that needs to be built is fairly basic (power control, motor control). The two difficult parts are to be able to create a good chassis, which I would need to spend a good amount of time designing, and the programming of the stereo video analysis. The main deterring factor is the initial cost of the material (a few hundred dollars).

I was thinking of going with something like neural networks, which require an intense computer power (and alot of ram) if you intend to go with more than a few neuron. The idea of networking a microcontroller with an external PC and having the PC process the data is actually MUCH more complicated.
 
TEK while I'm very interested in what you'll end up with I doubt you'll be able to do much with the webcam images. You can throw all the neural networks at it you want but if the smartest people in the world are having a tough time doing anything usable at all with video it can't be that easy. Consider that Cognex corporation - one of the world leaders in image processing - would have a difficult time analyzing parts on a conveyor with one of its vision systems if the lighting wasn't controlled to a certain extent and the target distance to the camera wasn't constant.

IMHO I would concentrate on developing a way to navigate through an unknown space. How are you going to find your current location? GPS is too innaccurate. Sure you can try starting at a known point and going from there but you'll still need to track your vectors and there is no easy way to even do that. You could try using multiple sensors that each look for a unique buoy signal and work off triangulation. You could try using encoders on your wheels and work it out that way but you'll still have slip which will throw you off after a while.

I'm interested in what you think. I'm not trying to be insulting and hopefully it won't come off that way.
 
I doubt you'll be able to do much with the webcam images. You can throw all the neural networks at it you want but if the smartest people in the world are having a tough time doing anything usable at all with video it can't be that easy.

I think that way of thinking keeps the world from progressing. Who do you think are the smartest people in the world? What makes them so smart, apart from large funding? Do you really think everything has been tried? Its not like I'm planning to make a weapon, or anything that could harm people. I'm talking about innovative methods of evaluating the geometry of space from stereoscopic images, by using neural networks.

I believe that before starting the robot, I will try this in simulation... By using raytracing, I could generate stereoscopic images (I could even make them noisy by using path tracing) and try to extrapolate space data via a neural network. If this can work in simulation, then it could also work with a well tweaked camera system (known FOV, known binocular distance, appropriate lighting).

The raytracing could even be simplified in order to improve speed. I could simply have small sized images (to fit my neural net, say two 64x64 or 128x128 images). The images could also be generated in 32 bit greyscale, internally using a single float for the color value, which can be directly fed to the neural network. Using a layered neural network with two 128x128 images, you only need 32768 input neurons... 8192 for two 64x64 images.

Assuming a 40000 neuron multi-layer network where each neuron has 10000 connections, each neuron takes about 80 KB of memory, therefore, the whole network needs about 3.2GB of ram. 40000 neurons might not seem like much (compared to our 100 billion), but an ant only has 10000.
 
The people at the MIT robotics labs tend to be above average. I don't intend to stifle any line of thinking. I doubt my opinion would stop you from doing what your going to do regardless. In fact, I hope you succeed :)

If you can get it to work you'll be rich. Ants do have a few million years of evolution on you ;) I've used neural nets in some OCR processing and while it works pretty good it still get confused fairly easily.
 
the ideas you have a really amazing. The programming to impliment them will be equally amazing. If you really think you can do it, I'd start this as opensource and throw it on sourceforge. My guess is you'll need some help and other people's ideas on this.

THe rest of the people on this thread have good reason to be skeptical, but the way I figure it, anything is possible.

Good luck to you man, and I hope you solve the puzzles
 
If you're planning on just using serial ports and parallel ports for all I/O, I think you're going to be a bit disappointed. You can find a motor controller which connects to the serial port, and other peripherals which do too, but how many serial ports do you have? What you'll find you need is a way to interface with one or more microcontrollers. There is a reason everyone uses microcontrollers with robotics projects.

I2C / SMBBUS is probably your best bet. Some of the Via EPIA boards come with an I2C connector. For the boards that don't, you can connect to the SMBUS off of your SDRAM, but you'd better have good soldering skills...

Acroname.com has a number of I2C based robotics peripherals. You might check those out for an idea of price, and as inspiration for additional things to add to your bot. Most of those peripherals can be easily built for a fraction of the price.

Microcontrollers aren't just about simple I/O. They include things like counters (which can generate an interrupt when an even has occured on a pin a certain number of times), A/D converters, etc. And, they're cheap and don't use too much power. Cheap is good whenever you're talking about wiring stuff up which could damage things.

Microcontrollers you should check out include PICs, Atmel AVRs, 8051s, and 68HC11s. C compilers are available for all of them. PICs support I2C in hardware, while the Atmels and 68HC11s don't (they use SPI).

Another option would be to put a PCI FPGA I/O card on your motherboard. That would give you lots of I/O pins, and you can program whatever hardware you need into the FPGA... VHDL and Verilog aren't too hard to learn.
 
Back
Top