View Full Version : My Robotics Project
Hexchild
15 Aug 2005, 09:37 PM
For a long time I've had a desire to play around with building little robots and using them to try out my own theories on AI programming. This project is long overdue, and I intend to do something about that. But I'm not sure specifically what materials I should use and where I'd get them.
I believe the following sums up what I want:
- Some way of building complex rigid bodies that can easily be broken down into the original parts later on and then reassembled, multiple times if need be.
- The ability to connect said rigid bodies in a way that grants them only a certain amount of freedom to move (ie. joints).
- Various means to cause the movement of rigid bodies in relation to each other, eg. hydraulics, motors etc. (let's call these the "muscles")
- Wheels, legs, conveyor belts, propellers etc.
- Sensors for various types of stimuli, eg. touch, light levels, gravity direction, gyro
- Some easy way to integrate one or more microprocessors in the design such that they can control the "muscles". Each microprocessor should be programmable from a PC compatible computer, and should require as few peripherals as possible in order to function. They should probably have builtin D/A outputs and A/D inputs as well.
- Remote control ability (eg. radio controllers)
- Sensor signals, microprocessor inputs/outputs, "muscle" control signals and remote control signals should all be as compatible as possible (eg. all could be voltage based and within the 5V range).
- The physical parts should all be easy to mount on each other (ie. like Lego Technics or Meccano)
- The price should be as low as possible. I'm not looking for high-quality stuff, but it shouldn't break after a few uses either.
Does anyone have any suggestions?
Xenophon
16 Aug 2005, 06:02 PM
My suggestion would be to start off simple. If you try to do something too complex you will just end up frustrating yourself. In my microprocessors course we did some stuff with a lego robotics kit, and it was a nice sort of intro. The motors are pretty weak, but we able to make a little car that we could drive around using our keyboard with a proximity sensor on the front using a light sensor and little light.
We also made an autonomous rover that could follow a white line through a maze, but this one we hand built it from a bunch of parts picked up from a surplus store. It ended up costing about $350, and it doesn't sound nearly as complex as what you are talking about.
http://www.elliotmr.com/tiki-index.php?page=Robomination
eyebyte_atWork
16 Aug 2005, 06:22 PM
blah, blah, blah ...
Does anyone have any suggestions?
Yeah, I have a couple.
I also got the robot bug a while back and did some research into what I would need to do this... I do have a background that includes electronics and I write software for a living so I figured this would be a cool recreational outlet. I did some checking around and found some progressive books on the subject. They are listed here.
[LI]1893115445 - Robot Building for Beginners
[LI]1590593731 - Intermediate Robot Building
[LI]0071422749 - Build Your Own Humanoid Robots : 6 Amazing and Affordable Projects (TAB Robotics)
Here they are and good luck to you... btw - I gave up after the first book. It was taking time away from my daily sulking :)
eyebyte_atWork
16 Aug 2005, 06:24 PM
Oh yeah - it gets expensive fast.
Hexchild
16 Aug 2005, 06:28 PM
My suggestion would be to start off simple. If you try to do something too complex you will just end up frustrating yourself.
Oh, I intend to build a multitude of both simple and complex things, and for the most part I intend to work on making them autonomous units. But I'll take heed to your advice and hold off the complex stuff until I've mastered the basics.
In my microprocessors course we did some stuff with a lego robotics kit, and it was a nice sort of intro. The motors are pretty weak, but we able to make a little car that we could drive around using our keyboard with a proximity sensor on the front using a light sensor and little light.
Is this (http://mindstorms.lego.com/eng/products/ris/index.asp) what you were using?
In any case, that kit seems to be right up my alley.
Hexchild
16 Aug 2005, 06:44 PM
I do have a background that includes electronics and I write software for a living so I figured this would be a cool recreational outlet.
Same, pretty much. :)
blah blah books blah blah blah...
I gave up after the first book. It was taking time away from my daily sulking :)
Thanks for the book tips. Since I'm more of a practical learner, I probably won't buy any of them until I'm already well into the project, if at all, but it's still appreciated.
In any case, I think I'm motivated enough to keep at it until I've mastered the craft. The one thing that is likely to hold me back is the cost, but that's a temporary thing.
Xenophon
16 Aug 2005, 08:09 PM
Yeah, that looks like we used the components in that kit. We didn't use the microprocessor that comes with the kit however, as we were learning to use a motorola 68k chip on a board that we had in the lab. Anyways, as eyebyte says, the costs will add up really quickly if you try to get the components you need seperately, so a kit like that is probably a good place to start.
Good Luck.
Wrajk
17 Aug 2005, 03:14 PM
Wow, seeing your post piqued my interest once again in this kind of thing. Actually my major(s) in uni are AI and robotics, but we're all about theory, and very little practice (which is fine by me, but not very useful right now)
You should consider using a microcontroller instead of a microprocessor. There's a wide spectrum of them out there, and you should easily find one that satisfies your needs. Most have all the stuff inside the package (oscillator, DC-DC converters, A/D, D/A, various interfaces (I've even seen Ethernet)) so all you need is the chip, and some 5V to feed it. They come in kits too, which are a bit expensive, but come with a full set of hardware (test board, programmer) and software (C compiler and IDE usually, sometimes even a simulator)
Field buses (like CAN) can be of some use to you when connecting control, actuators and sensors. It may be overkill for a small domestic project, but they're well proven, and you can find a lot of info about them on the Net.
Hope this helps
Hexchild
17 Aug 2005, 07:32 PM
You should consider using a microcontroller instead of a microprocessor.
I believe this is what I really meant. We used to work with something like that (albeit on the more primitive end) back at the university. Anyway, thanks for reminding me of them being called "microcontrollers", now I can google for them.
On the same subject, a friend of mine suggested I consider using something like this (http://www.viaembedded.com/product/epia_ml_spec.jsp?motherboardId=301). Perhaps that would be a bit over the top, but it all depends on the pricing.
Field buses (like CAN) can be of some use to you when connecting control, actuators and sensors. It may be overkill for a small domestic project, but they're well proven, and you can find a lot of info about them on the Net.
Thanks for this tip, never heard of CAN before. From what I can tell these are yet another form of serial (possibly parallel) bit transfer, so I'm guessing these would be far more expensive than simple voltage signals, but on the other hand very precise since they are digital.
Wrajk
17 Aug 2005, 10:59 PM
I believe this is what I really meant. We used to work with something like that (albeit on the more primitive end) back at the university. Anyway, thanks for reminding me of them being called "microcontrollers", now I can google for them.
I worked with the PIC series microcontrollers before, take a look at them, they're cheap, widespread and not bad at all. They're manufactured by Microchip (http://www.microchip.com).
Look under "development tools" too, there are starter kits with an USB programmer unit, testbench, C compiler and one baseline PIC16xxx microC of one kind or another bundled together.
On the same subject, a friend of mine suggested I consider using something like this (http://www.viaembedded.com/product/epia_ml_spec.jsp?motherboardId=301). Perhaps that would be a bit over the top, but it all depends on the pricing.
Ohhh yes... I love these babies. I've considered building a set-top DVD-player/Heroes3 unit based on it, but lately decided to just bite the bullet, and start saving up for a PS3 :whistle:
They're fairly cheap (check your local prices), but it's a pain in the ass finding a good compact power supply for them without ordering over the 'Net. (which I'm fairly reluctant to do)
Try checking this site (http://www.mini-itx.com)
But for control, they're only worth it for larger projects (like a model car) which requires tons of money. Definitely not suitable for a small spidey-bot.
Thanks for this tip, never heard of CAN before. From what I can tell these are yet another form of serial (possibly parallel) bit transfer, so I'm guessing these would be far more expensive than simple voltage signals, but on the other hand very precise since they are digital.
Yep.
Oh yeah, there's the I2C bus too. Perhaps a bit more appropriate for what you're doing. And it's older, so there's truckloads of chips supporting it. An example (http://www.semiconductors.philips.com/pip/PCF8591P.html)
kuranes
20 Dec 2005, 01:20 PM
I enjoy seeing the robots fight one another.
You used to be able to see this on the videos of the events put on by Survival Research Laboratories. www.srl.org
afton
20 Dec 2005, 06:38 PM
Make sure that your robot is not too intelligent, as it could rebel
against you and starting the end of the world :)
Blue
20 Dec 2005, 07:34 PM
This is a potential interest of mine also.
The best looking kit I've yet seen is made by radioshack (the AOL of electronics component stores.)
http://www.engadget.com/entry/1234000803037235/
If you go the professional route there is always www.mcmaster.com They've got mechanical components for what ailes you. Expensive though.
I understand PIC programing is the way to go.
+Blue
It sounds like maybe you're more interested in the programming side of things rather than the mechanical side?
Aside from the old favourite Lego Technic, there's the German Fischerteknik. You probably wouldn't call it a toy as it's focused on robotic and industrial control projects. More expensive but the range includes many more complex sensors, pneumatics, and so on... the kits will come with a PC interface as well.
Here's one random site that lists a few kits:
http://www.mrrobot.com/fischertechnik.html
For pricing and availability of these sorts of systems I'd suggest contacting local robotic 'toy' and education product distributors. They'll have a wide range of different brand products.
.
Hexchild
21 Dec 2005, 08:22 AM
It sounds like maybe you're more interested in the programming side of things rather than the mechanical side?
Somewhat, yes. But I still want to custom build these critters.
The best looking kit I've yet seen is made by radioshack (the AOL of electronics component stores.)
http://www.engadget.com/entry/1234000803037235/
If you go the professional route there is always www.mcmaster.com They've got mechanical components for what ailes you. Expensive though.
I understand PIC programing is the way to go.
Aside from the old favourite Lego Technic, there's the German Fischerteknik. You probably wouldn't call it a toy as it's focused on robotic and industrial control projects. More expensive but the range includes many more complex sensors, pneumatics, and so on... the kits will come with a PC interface as well.
Here's one random site that lists a few kits:
http://www.mrrobot.com/fischertechnik.html
For pricing and availability of these sorts of systems I'd suggest contacting local robotic 'toy' and education product distributors. They'll have a wide range of different brand products.
Thanks for the tips, guys. I'll have to look into those kits and see how they (and the ones previously mentioned) differ. Unfortunately I'm currently still low on cash and don't really have enough to actually buy one yet. :mellow:
Hexchild
13 Jan 2007, 11:23 AM
I have finally taken the first step in getting this project underway. I bought a slug (http://www.linksys.com/servlet/Satellite?c=L_Product_C2&childpagename=US%2FLayout&cid=1119460471050&pagename=Linksys%2FCommon%2FVisitorWrapper).
I intend to give the slug the role of central communication and decision system. It should be able to run a Linux system with a minimal amount of software to handle my robotics and allow for in-system development. It has two USB ports and one Ethernet port. The Ethernet port allows me to easily communicate with the device from a PC, while the USB ports allow for communication with peripheral devices. The slug also has a low voltage serial port, but it is internal, so in order to use that I need to keep the case open or possibly poke a hole in it. And I'd probably need some custom circuitry as well.
What's been done so far
Once I received the slug, I proceeded to wipe out its existing firmware by using the Sercomm Firmware Upgrade Utility (http://www.everbesthk.com/8-download/sercomm_download.htm) to upload the OpenSlug 3.10 beta firmware image (http://www.slug-firmware.net/), thus installing OpenSlug (http://www.nslu2-linux.org/wiki/OpenSlug/HomePage) (which is a specialized Linux system) on it, and using a 128MB memory stick in USB slot 2 as the root disk. This leaves one USB port for other peripherals.
After the basic setup I installed a few packages useful for developing software on the NSLU2 (gcc, gcc-symlinks, libc6-dev, g++, g++-symlinks, libstdc++-dev, cpp, cpp-symlinks, binutils-dev, binutils-symlinks, make, linux-libc-headers-dev and nano). I can now edit, compile and run C and C++ programs on the slug with little effort. According to the df command, I have used up about 70% of the available space on the 128MB memory stick.
Semi-plans
The remaining USB port could be expanded using a USB hub. I could then use a number of PIC16C745 and/or PIC18F4550 microcontrollers, both of which support USB and are easily obtainable from ELFA (http://www.elfa.se), which makes payment and shipping easy. The PIC16C745 is very cheap, while the PIC18F4550 supposedly supports full-speed USB2. These microcontrollers both have a set of A/D and D/A (via PWM) pins, which could be connected to various types of sensors, indicators, motors and the like. As far as I can tell they also seem to require a minimum of external circuitry to run. And on top of that I should be able to power the PICs via the USB bus.
The Ethernet port could potentially be connected to a wireless access point, and all power could be provided by batteries. Motors and other heavy duty devices may need a stronger power source, but for the rest of the system I believe four rechargeable AA batteries connected in series should do the trick.
Before the PICs can be used, I'll need to program them. Retail PIC programmers seem to be way expensive, so I'm looking into building my own. I figure I should be able to use perhaps a few GPIO pins on the slug (if I can free them up; they seem to be well used), and perhaps the serial port, to interface with some simple programming circuitry (mostly just to get the voltages and currents right). Unfortunately both of the aforementioned PICs require a high voltage to be present during programming, which may complicate things somewhat.
I need to figure out how to compile kernel modules natively on the slug with limited disk space, so I can write a USB driver for communicating with the PICs. Unless I can find a suitable, precompiled USB driver. In theory all I'd need is a simple byte stream once the negotiation has taken place, so a USB-to-serial driver might be applicable. I should also write a kernel module to allow access to the PIC programming circuitry, but if that's not possible then at least I should be able to write a specialized flash utility using the serial port for all communication.
Once all that is done, I can start writing robotics system software for the slug and the PICs via a network connection from my PC.
Deckard
13 Jan 2007, 11:42 AM
That sounds very cool. Have you decided what you'll use to build the mechanical side of the robots? The Mindstorms NXT looks quite good, though i'm not sure if you could interface it with your control system.
Hexchild
13 Jan 2007, 11:50 AM
That sounds very cool. Have you decided what you'll use to build the mechanical side of the robots? The Mindstorms NXT looks quite good, though i'm not sure if you could interface it with your control system.
Unfortunately, no. In true INTP fashion I don't yet have enough information to decide what to do about that.
I think I should be able to interface the A/D and D/A pins on the PICs to just about any voltage controlled hardware, though.
Xenophon
13 Jan 2007, 05:10 PM
I've been doing some work with a PIC18F458 based controller. I think you are really going to have a hard time trying to create a programmer yourself for the PIC. Even if you are able to make a circuit that will program the PIC, it will be almost impossible to get your code working without a debugging interface. All sorts of problems show up when you start running the code on PIC rather than on a computer.
If you are planning on working with a PIC I would REALLY suggest that you get an ICD2 from microchip. I think they cost about $200, and I don't know what your budget is like, but it will be absolutely invaluable for any work you ever do with a PIC. It comes with a copy of the MPLAB IDE and can be used for programming and debugging the PIC without removing it from the circuit.
The only critical external circuitry you need to get a PIC running is a clock oscillator. If I were you, I would get a slightly more powerful PIC and get really familiar with it. It takes a while to get familiar with a specific chip, but its really nice doing a second project with the same chip, as you can reuse your circuit diagrams and large portions of your code.
I don't know much about having the controller talk to the computer with USB, but if you want any help with designing some circuits or some general programming problems when you get the project started, I would be happy to help.
Hexchild
14 Jan 2007, 12:01 AM
I think you are really going to have a hard time trying to create a programmer yourself for the PIC.
I'm under the impression that it should be fairly simple. Please correct me if I'm wrong, but here's how I currently imagine doing that:
For the required output signals I would use a serial-to-parallel converter connected to the slug's serial port, and trigger a latch from that using some additional signal, perhaps a GPIO pin on the slug. For the input signals I would similarly use a parallel-to-serial converter. Since one of the outputs (Vpp) needs to be a higher voltage I would run that particular latch output though a voltage amplifier. I might also need to isolate the latch from the PIC via other circuitry due to current requirements. The rest would be a matter of programming the slug to do the work for me.
Of course, if I use both PIC types I might need two somewhat different circuits and perhaps even two different programming algorithms, but that's trivial.
Even if you are able to make a circuit that will program the PIC, it will be almost impossible to get your code working without a debugging interface. All sorts of problems show up when you start running the code on PIC rather than on a computer.
Believe me, I'm used to this kind of thing. Although I would be interested in hearing about the particular types of problems I should expect to face on a PIC.
If you are planning on working with a PIC I would REALLY suggest that you get an ICD2 from microchip. I think they cost about $200, and I don't know what your budget is like, but it will be absolutely invaluable for any work you ever do with a PIC. It comes with a copy of the MPLAB IDE and can be used for programming and debugging the PIC without removing it from the circuit.
Call me foolish, weird or hardcore, or whatever you like, but I wasn't planning to run the code on a computer in the first place, and certainly not in that kind of debugger :)
The solution I'm currently looking at is to write a simple assembler capable of producing binaries for those two PIC models, and run mnemonics through that program on the slug to produce the PIC binaries. I would also write a programmer control program capable of programming either PIC type, and have the binaries piped into that. A significant part of my reason for this setup is the ability to do the programming in-system from the slug, and possibly even to automate that in some cases. Another reason is the limitations imposed by the IDE debugger (some I/O pins are used up by the debug interface). While it should be quite possible to connect a retail programmer to the slug (assuming it's RS232 or USB based) it does impose a few additional problems, cost being one of them.
The only critical external circuitry you need to get a PIC running is a clock oscillator. If I were you, I would get a slightly more powerful PIC and get really familiar with it. It takes a while to get familiar with a specific chip, but its really nice doing a second project with the same chip, as you can reuse your circuit diagrams and large portions of your code.
Actually, both of those PICs have internal oscillators.
As for familliarizing myself with a PIC, yes, I was certainly planning to do that, specifically with the PIC16C745 and the PIC18F4550. I've been looking into quite a few microcontrollers, and these two do seem to be just about enough powerful for this project.
I don't know much about having the controller talk to the computer with USB
I wasn't planning to do that (unless by "computer" you mean the NSLU2).
but if you want any help with designing some circuits or some general programming problems when you get the project started, I would be happy to help.
I do tend to want to take on these kinds of projects on my own, but if I happen to run into a problem I have no clue how to solve, I'll probably post it here.
In any case, thanks for the advice.
Hexchild
14 Jan 2007, 01:06 AM
For reference, here's a diagram of the setup I'm considering.
Hexchild
27 Jan 2007, 01:21 PM
I have now bought some more equipment. As soon as that arrived I started experimenting with building a PIC programmer. I ended up using a parallel port rather than a serial to parallel converter, since I figure I should be able to find a decent USB to parallel port interface at some point. This way I can easily use my laptop to program the first PIC, and program others by USB from the slug later.
Here's what this INTP-ish mess currently looks like:
http://hexchild.crypt.cx/pics/robotics/pgmr1.gif
A closer look at the programmer circuitry itself:
http://hexchild.crypt.cx/pics/robotics/pgmr2.gif
And here are the schematics... to whatever extent I didn't miss the connections I actually made. After all, I don't plan and follow schematics like the professionals do when I set up this kind of thing, so I drew this one afterwards for your viewing pleasure:
http://hexchild.crypt.cx/pics/robotics/pgmrs.gif
It is rather crude so far, of course, but it works to the extent that I can send data and instructions to the PIC and even get it to return data in a synchronized fashion. The communicated data itself is still inconsistent, though, so something's still not quite right (might be due to either hardware or software) but I'm certainly getting there.
EDIT: I can now send data words to the PIC and have them repeated back to me. This tells me two things - firstly, I didn't destroy the PIC in the process of setting this stuff up, and secondly, I'm on the right track.
The power source was taken from an old Commodore Amiga 1200 I've been keeping around that no longer works. I cut off the Amiga-style power connector and connected the individual lines directly to the power inputs on the lab board. They deliver 5V (red), 12V (green) and -12V (yellow).
For the moment being, I use a toggle button to enter and exit programming mode. This button is a dual switch, connected such that the Vpp pin on the PIC receives either 0V or 12V, while a LED indicator receives 5V when the Vpp pin has 12V.
I1 through I4 are LEDs (actually part of a dual 7-segment display) that I use to indicate various useful things:
I1 - programming voltage being applied
I2 - +5V power line is active (in case I forget to turn it off)
I3 - current clock bit state (PGC pin on the PIC)
I4 - current data bit (PGD pin on the PIC)
I'm currently using four pins on the laptop's parallel port.
Pin 1 (/C0) is used to clock the PIC (at the PGC pin)
Pin 2 (D0) outputs data to the PIC (at the PGD pin)
Pin 13 (S0) inputs data from the PIC (at the PGD pin)
Pin 25 (GND) is connected to the common ground
I had to add some extra circuitry to make sure the PIC's PGD pin, when used as an output, takes precedence over D0 from the parallel port, and that the voltage levels are reasonable when PGD is used as an input.
The rest is done in software, on the laptop. More on that later.
Wolf
27 Jan 2007, 07:14 PM
Only comment (as I don't want to get too deep, because I know how I am around this stuff): Your work area looks dementedly INTP. It could be the work area of any/every engineer of the type I've ever met.
AKULACLASS
29 Jan 2007, 09:18 PM
What I enjoy is electronics, not robotics. Assembling pre-made models is not my thing; I better like building things from ground up. I really liked my electronics courses in secondary school.
There I first drew circuits on copper coated boards (?) with felt tip markers and then dipped them in acid until only the lines I had drawn with my marker were left. Then I soldered bits and pieces, capacitors, resistors, processors etc. onto that board. In my second course, I worked on a radio but that never really worked. But God, how I loved doing it. It was my art; instead of painting or singing or writing poetry, I created art that moved and "thought". (Reading back over what I wrote, all I can say is: Wow, I must have inhaled more of that lead that I thought!)
Long before that I played around with little motors by created submarines out of silly putty and sticking motors and batteries in them (of course, the subs sank like bricks if they were ever placed in water because silly putty/clay is heavy!). I'm not quite sure what branch of electronics/robotics this would fall under, but I'm interested in taking it up again. I'm sure I would enjoy doing limited Linux programming on some very complex piece of machinery I built from ground up.
Suggestions and advice are welcomed. Private Message me if necessary. Thanks to the guy who started this thread up.
Edit: I recognize that white board! It's a whachamacallit... aghh... can't remember. That's where you do your preliminary circuit testing before I drew out the circuit on those copper-plated boards.
This is sort of what I want to do, even if I haven't understood a word that Hexchild said in the last two pages. I know a local college that has a ten electronics courses offer. Maybe taking something like this will help?
formerly known as
29 Jan 2007, 11:53 PM
It's called a breadboard.
cryokinetic
30 Jan 2007, 12:02 AM
Not having any sort of EE background (aside from limited soldering ability), I'm gonna go out and pickup the Mindstorms NXT kit. If thet holds my attention, I'll move on to bigger and better things.
cryokinetic
30 Jan 2007, 12:03 AM
Not having any sort of EE background (aside from limited soldering ability), I'm gonna go out and pickup the Mindstorms NXT kit. If thet holds my attention, I'll move on to bigger and better things.
Powered by vBulletin™ Version 4.0.7 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.