PDA

Click to See Complete Forum and Search --> : Robotics programming


Atheist
Jul 15th, 2008, 06:22 PM
Hey guys.
Im really interested in getting into robotics programming...building a robot and programming it. I understand that there is atleast one (Shaggy Hiker, I believe) on here that does this...
So I'm trying to find information on this but Im having some difficulties with that.. so I've got a bunch of questions i need cleared up ;)
Where does one start? How does one begin building a robot? Where to get the materials needed? The sensors..motors...etc, is there any online webshop for parts like these? What is used as "memory" for the robot? How does one connect the robot to the computer when it comes to actually programming its behaviour?

I have a lot of questions on my mind right now, and i'll be very excited if i can get an answer to atleast one of them..or just some general information on the subject. :thumb:

alex_read
Jul 16th, 2008, 03:54 AM
Well I can offer some small help here. Microsoft has a Microsoft Robotics SDK out which you can find here http://msdn.microsoft.com/en-gb/robotics/default.aspx I haven't used it myself (just saw it on the MSDN download site one day and thought "hmmm what's that"). There might be some tips on how to start beneath the "getting started" link on the right of this page for you.

Atheist
Jul 16th, 2008, 04:16 AM
Hey Alex.
Yeah Ive been looking around there..installed the Robotics thingie for Visual Studio 2008, I have taken a quick look at the "getting started" pages, though i have not read it thoroughly yet. Altough I dont think they give much information as to how the actual robot building is done :(
Thanks.

alex_read
Jul 16th, 2008, 04:34 AM
You're right - bit awkward to find on the net. Found some bits which might be of help to you but note I can't get video here at work so not sure if those links are any good myself:

Shop:
http://www.robotmarketplace.com/store.html

Instructions using ready made robots (LEGO etc):
http://visualrobotics.pbwiki.com/Activity+1

Instructions from scratch/building your own:
http://www.scribd.com/doc/900994/TXR174-Robot-Buggy-Construction-Plans
http://www.societyofrobots.com/step_by_step_robot.shtml
http://www.societyofrobots.com/robot_tutorial.shtml

alex_read
Jul 16th, 2008, 04:46 AM
Ok was trying to find a final answer to the memory bit there. I'm going to guess that you'd need an EPROM or PROM chicp soldered onto the board somewhere for the memory. From Wikipedia the descriptions of these 2 seem to back up my thinking however searching for robotics and eprom didn't show much up so I might be leading you on a wild goose chase there - might be useful to search or might not be relevant to you at all - not sure on that side.

Hopefully one of the above might help you though. I see that shop site had numerous robot starter kit packs for purchase too.

Atheist
Jul 16th, 2008, 05:11 AM
Thats alot of good links :thumb: I'll have some reading to do now!
I'll wait with resolving this thread until the famous mr Shaggy Hiker comes back from his hike. I'd like to see if he can help me aswell.
Thanks alot!

homer13j
Jul 16th, 2008, 09:54 AM
Here's a relatively cheap way to get started:

Lego Mindstorms NXT (http://mindstorms.lego.com/eng/Nashville_dest/Default.aspx)

dclamp
Jul 16th, 2008, 02:53 PM
damn. you took my idea... i was going to post a lego link... I remember having a Lego Mindstorm Kit before they were even sold in US. My Best Friend went to Hong Kong on a business trip and bought it for me.

edit: maybe an Erector set would be of use to you as well.

DirtyHowi
Jul 16th, 2008, 07:12 PM
basic stamp..

google it, they have the prebuilt boards and all, motor controls everything.

and it programs in basic

(they also have a java version if your so inclined)

CVMichael
Jul 16th, 2008, 10:48 PM
I understand that there is atleast one (Shaggy Hiker, I believe) on here that does this...
Make that 2...

I think of all the people that are trying to build a robot, I am the one that took the most costly route...

Until now I've spent at least $2500, and I still don't have a working robot built...

First of all, I had no clue how difficult it is to even get the parts to built something...
I chose the path of PIC microcontrollers, and apparently those are the most expensive, in terms of programming & hardware. But I still think I chose the right path after all...

Well, hopefully you have an idea on what kind of robot you want to build, therefore you have an idea of what parts you need.

Me, personally I hate those KIT robots, or LEGO robots... they prepare everything for you, you just have to assemble it... so, you build a robot in 5 minutes, but have no clue how it actually works, and then what ? you assemble another boring KIT ?

No, not me, I'm not like that... (I guess that explains why I spent 2500 as of yet)

I spent $ on 2 programming for microcontroller books... they are USELESS, at least one of them came with a coupon that let me buy a programmer device for writing programs on the chips with 15% off... but it still came at ~ $200 (don't remember exactly) even with the coupon applied.

Ow... and of course, you need to know electronics, maybe mechanics (depending on what robot you want), and of course programming.

I cannot tell all the options you can have, as even I don't know them, but I can tell you the choices I made.

The books I bought, both of them teach how to write programs for PIC microcontrollers, but both books do that in ASM... and I have no previous experience with ASM whatsoever ! I was expecting to see code in C also, but I was soo wrong !

One of the books came with some software (and that coupon).
The software that it came with, and the most common software that you need (for PIC microcontrollers) is MPLAB (http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en019469&part=SW007002), and it is compatible with a couple of programmers, the one I have is MPLAB ICD 2 (http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en010046) (also probally the most common)

There are many choices that you can make about programming tools for microcontrollers, but only some are worthwhile, so you better investigate A LOT before you make a decision.

So, to continue... I wanted to program in C, but MPLAB does not come with C compilers, therefore, I had to search for one, and found this: http://www.mikroe.com/en/compilers/
It has a compiler for almost any microcontroller, and yes... MikroC is $249 USD (I just bought the full version yesterday, and I'm waiting to get the license key through email)

The electronics part... well I know some basic electronics, but there are things that I have no clue about, that's why I am also a member in this forum:
http://forum.allaboutcircuits.com/index.php

By the way, here is a problem I had with one of the books:
http://forum.allaboutcircuits.com/showthread.php?t=7575

The part that I find MOST DIFFICULT is the mechanical stuff... like right size gears, even simple stuff like making the case/box for the robot.

Latelly I am convinced that if I want to continue to make a robot, I need to make my own parts, that's why, I dropped all the things that I planned to do, and now I want to make my own CNC machine, something simple like these for example:
http://www.youtube.com/watch?v=XXdXRCfnfH0&NR=1
http://www.youtube.com/watch?v=iie9DINnkDc
http://www.youtube.com/watch?v=tdWfc_OS5YU
I want to make it small, something like 2 feet by 1.5 feet, and 3 axis

And of course, anything that moves (like the Robot or CNC I want to build), it needs motors.
There are 3 types of motors: DC motors, Stepper mottors, and Servo motors. (Here's in more detail: http://www.oddparts.com/acsi/motortut.htm)
Here comes the decision on what motors you want to use, and then you know what motor driver you need to use.

I chose Stepper motors (http://en.wikipedia.org/wiki/Stepper_motor), and those are Unipolar or Bipolar. I went for Bipolar because it is stronger (it has more force per size of motor), but those are the most difficult to control, and here is a problem I had with my motor driver recently:
http://forum.allaboutcircuits.com/showthread.php?t=12814

My 2 favourite links:
To get robot parts, I found this site really nice: http://www.robotshop.ca/ (I live in Canada, so it's perfect for me)
And I bought my microcontrollers from here: microchipDIRECT (http://www.microchipdirect.com/NewProductTree.aspx?mid=10&Catalog=BuyMicrochip&Category=8bittree&TreeID=1)
DON'T buy microcontrollers from local stores... they sell the microcontrollers 4-5 times the price you get on microchipDIRECT.
For example, the first microcontroller I got was PIC16F877, I bought it with $20 ($23 with tax) from local store, but on microchipDIRECT I got 4 of them with the same price...

Wow, that's a lot of writing, and I did not even go in detail...

So... after all this... are you SURE you want to get into this ?

Because it's gonna take most of your time, and most of your money... (of course that all depends on you expectations, and how far you want to go...)

si_the_geek
Jul 17th, 2008, 03:25 AM
I understand that there is atleast one (Shaggy Hiker, I believe) on here that does this...Make that 3 - but not me, Wossname has a discussion here (and a separate blog) about his project: Linux Controlled Autonomous Vehicle (codename: "Grumpy Snail")

Atheist
Jul 17th, 2008, 06:22 AM
Thanks for the input. Yeah all the different parts are extremely confusing, I've read through this (http://www.societyofrobots.com/robot_tutorial.shtml) small tutorial on robot building and robot parts. I now know alot more than earlier, but still a lot less to feel confident about building. I think I'm going to try to build the $50 robot (http://www.societyofrobots.com/step_by_step_robot.shtml) from their guide. Of course, it'll get alot more expensive than 50 dollars for me since i have to ship the parts from USA to Sweden...(I'm too lazy to try to translate the names of the components to swedish so that i can search for them in swedish online stores :blush:).
Hopefully it'll give me some practise on the different parts...What confuses me the most though are the thousand different microcontrollers out there. According to the sites ive read, different microcontrollers comes with different compilers that allows for writing in a specific language...I would very much like to write in C just like you Michael.
And all microcontrollers looks so different..some are large with many components on them, some are tiny with almost nothing on them...How do I know what I need?

And just to make sure, I need a serial port on my computer for connecting the robot right? I'll have to buy a usb-to-serialport adapter then :(

homer13j
Jul 17th, 2008, 08:19 AM
The part that I find MOST DIFFICULT is the mechanical stuff... like right size gears, even simple stuff like making the case/box for the robot.

I know a guy who builds 1/2" scale working steam locomotives and gets nearly all of his parts from these guys:

Small Parts Inc. (http://www.smallparts.com/)

CVMichael
Jul 17th, 2008, 09:21 AM
I connect to the microchip using RS232.

You need a chip to translate the signal to TTL (Forgot what TTL stands for), the chip is MAX232:
http://www.rms-digital.homepage.t-online.de/files/max232.jpg

The help file for MikroC has a nice diagram on how to connect the chip to the microcontroller, I looked up on Google, and I did not see any that are good.

By the way... you can Download MikroC: http://www.mikroe.com/en/compilers/mikroc/pic/
and you can use it for free, but it's limited to 2K binary output. The help file is complete though, so you can look through it, and find the diagram on how to connect the microcontroller to the MAX232 chip.

AegisSailor
Jul 17th, 2008, 02:07 PM
TTL is Transistor-Transistor Logic

CVMichael
Jul 25th, 2008, 12:31 PM
So Atheist, how is it going with your robot ? what is your progress ?

Atheist
Jul 25th, 2008, 12:38 PM
Actually, Ive had some troubles ordering the parts.. you see, the guide im following includes a list of parts needed to be purchased..I wanted to buy these here in Sweden, because it would be cheaper..but I dont know the names of the component in swedish and so I had a hard time when looking through the swedish online stores...:blush:
So I had to order from USA, but some stores didnt ship to sweden so ive had to ask some friends over there to buy the components and ship them to me...

Hopefully when im more experienced, I will know more about the components to feel comfortable enough ordering equivallent parts from swedish stores..

So all in all...I havent even started yet :(
But I'm just waiting for: 2 Servos, 1 prototype board, a battery pack holder, 2 photoresistors, a soldering iron, a soldering roll and a multimeter..then im all good to go!

Thanks for showing interest :)

dclamp
Jul 26th, 2008, 12:46 AM
i love my multimeter :) I use it for like everything. Did you get a good one, or a cheap one?

Shaggy Hiker
Jul 27th, 2008, 03:02 PM
I'm back, though I won't put any pictures into CC for a few more hours. The hike almost killed me a couple times, and I'm spending the day sitting on my butt, so let me write a bit here:

I found a book on Intermediate Robot Building by David Cook put out by Apress. I liked his explanations and writing style so much that I sought out his Beginners book, as well. He talks alot about building materials, equipment, and a variety of sensors built from the chip up. However, it is all American, and all of his sources (he lists part numbers for several places for each item) are american, such as Jameco and Digi-Key. Jameco has a robotics store, along with a general electronics store. The general electronics store web site is not all that easy to use, but it is FAR better than Digi-Key. The thing with Digi-Key is that they sell just about anything electronic, which means that their catalog has dozens of pages for resistors alone. When it came to web site design, it appears that they looked at their MASSIVE parts list, and pretty much threw up their hands. If you know the part number, then you are set. Otherwise, you will spend HOURS rooting through spec sheets of various things until you give up. You CAN get it there, and the prices are good, but you can't FIND the darn thing, and even if you do, you might not find the place where you can buy only one rather than 10,000. A great company with an absolutely hideous front-end.

As for my direction in robotics, I started with the assumption that I couldn't put enough power on the bot to run the computer I would need, so right from the start I was looking at solutions that would communicate with my home network somehow. After looking around, I settled on the OOPic board largely because it appeared to handle OO programming in VB. In fact, that is only vaguely true. There are objects, but it isn't OO by any stretch of the imagination, and the language is a VERY stripped down VB. Also, the OOPic board that I have has only 80 bytes of object memory. Since objects take 1-5 bytes each, this is very limitting. However, as a brain board, it is very popular, so when you look at sensors, you often find example code for OOPic (along with BASIC Stamp), which makes things a bit easier.

I see two approaches to building a robot: 1) Get a kit for the chassis, or even for the whole thing. 2) Build everything from scratch. I favor the first approach, because I am more interested in the programming aspects, but in practice, I tried out various chassis, and what I currently have is mostly custom. The chassis I found that I really liked came from this site:

http://www.roboticsconnection.com/

They have a tank tread chassis that is both light and really works. At first I tried a two wheeled chassis, and couldn't get from carpet to floor or back again. I then tried a different tread chassis, and learned how bad they can be. After that I went looking for a GOOD tank tread chassis, and this was the best I found. Alternatively, there is a heavy duty chassis from Lynxmotion, but it is so heavy that you will need bigger motors, and hence bigger batteries, etc., to move it.

The Robotics Connection brain board follows exactly what I wanted to do, and if I was to start over (as I may), I would choose that over the OOPic. For one thing, the interface is .NET, and the company is responsive (they even added some changes after I suggested them, even though I hadn't bought the brain board, and still haven't). They are new, though, and the .NET may not be fully stablized yet. However, their approach is the same one I use, where the hardware platform just powers a variety of sensors, and sends readings out on demand via a variety of possible interfaces.

My current issue has to do with sensors. After looking over specs, I ended up buying about $300 worth of SRF-08 ultrasonic sensors. I'm still trying to figure out what to do with them. In theory, they return the distance to the first 17 echoes. In practice, the echoes beyond about 60cm or so, are nearly meaningless. If there is signal in that noise, I have yet to find it, but I'll be trying again soon. Half of the code I currently have is designed to analyze the returns from those sensors in an attempt to look for a viable signal, but I get the same distances pretty much regardless of where the robot sits. What this means is that the sensors are pretty good for distances less than about 60cm, but meaningless for longer range. This won't suit my needs, so I am looking for a better sensor. IR sensors (David Cook steps you through building your own, but you can buy Sharp IR sensors pretty cheaply) have two flaws: 1) Short range. 2) Outrageous standby power consumption. All six of my SRF08 sensors combined used less power than a single Sharp IR sensor in standby. Since long time between charges was one of my goals, this was unacceptable for a near distance obstacle sensor. As it turns out, the SRF08 is a near distance obstacle sensor, and nothing more, so that is covered.

I have heard from a different company with a different sonar sensor that is a narrow beam sensor (the SRF08 suffers from terrible side lobe detections, which is likely the source of my problems).

I can't even remember where I am going with this, so I'll end with one last point. David Cook takes the approach of building everything from scratch, along with a discussion of making your own printed circuits (may only be on his web site), soldering, etc. If you want to build your own chassis, rather than get a kit chassis, his books are good for that, as he gets into such things as building axles, couplings, and so forth. His site is www.robotroom.com, but the books are better than the site, in my opinion.

By the way, one of the chassis I considered was the X4, which I currently can't find, but it was a UK product, which might be easier for you to look at. The one thing I did find was:

http://www.active-robots.com/products/platforms/

which looks like it has a UK subsidiary, or is a UK company. They sell the Traxter chassis which is the one I like so much from Robotics Connection.

adamj12b
Sep 9th, 2008, 08:12 AM
I just came across this thread and wanted to throw out there what route I took for my robot.

I built a heavy duty chassis our of aluminum angle and some right angle gear motors for drive. 4 large SLA batteries in parallel for 12 Volts and 39 Ah. I use a Roboteq (http://www.roboteq.com) controller for controlling the motors.

So there is a quick summery of the structure. For logic I am using a 1.2Ghz fan-less mini ITX motherboard running a stripped version of Windows XP Pro. I edited the registry key for the shell and replaced it with my program that I wrote in VB.NET. The mobo is connected to an onboard wireless router which I can connect to with my laptop to control the robot.