Software > Software

RC car->robot mini project: motor/micro controller?

(1/3) > >>

timstirling:
hi all,

I've recently graduated with my A.I. degree and before starting work/PhD I'm looking to start making my own robots for testing etc. I have robotics experience but the components have all been provided so I haven't had to worry about electronics before.

I've had a look at robot kits, they all seem pretty pricey for what you get. But I don't want to go all out on making kmy own robot as I have little electronics experience and I'm completely broke!

Anyway, I have gathered up some parts, most useful being a few DC motors and some old RC car parts.  This has given me a chasis with a fixed 2 rear-wheel drive system. Not ideal as I would prefer a 2-wheel differential drive system and a holonomic robot. Still, it will add some fun to the navigation software!
Steeering I am having to build myself, luckily the RC car/truck has front wheels which will steer nicely but they will need to be powered. This shouldn't be a problem- I have a small DC motor and I'm hacking something togther from Lego based on rack-and-pinion turning.

The RC car has a small circuit board but unforunately I have no remote so will remove the circuitry from the system. I need a motor controller capable of driving 2 small DC motors. This is the first question. What reccomendations are there? Now although this robot maybe running at around 6v with low powered motors, later on I want a much more robust robot capable of  carrying a laptop/basic ATX  board and CPU (I have several spare PCs and parts).  Would it be best to buy a small cheap motor controller for this project then buy the real deal later or just go for it now?  any help most welcome.     


The secondquestion is to do with the microcontroller.  I have read things about the STAMP controller etc, but it doesn't really satisfy my needs. Very underpowered for the algorithms I will be using. + I don't want something to be programmed in BASIC and designed at school kids. What are the more powerful alternatives?  Or maybe I should just start using my laptop/PC parts ASAP and provide a tethered link (since this first robot won't have anywhere near the power to lug  a heavy laptop etc.), thus saving money. But what kind of electronics would be needed to link the laptop to the motor controller and any sensors? 

 
Thanks for any help?

Admin:
Have you considered simulation?

Microcontrollers will never have the processing power you are probably used to with PC's. You will have to make a lot of sacrifices . . . perhaps you can consider a palm pilot instead? I do AI stuff as well, but I like microcontrollers cause they are way smaller . . . A roach doesnt need human level reasoning abilities . . .

To control two small dc motors all you need is a motor driver IC. Just follow the datasheet for wiring instructions. You could instead use $9/each servos, which are even easier to interface with, and also have a built in control system.
http://www.societyofrobots.com/actuators_servos.shtml

To interface between a PC and robot components you would need a microcontroller with a rs232 serial connection. The microcontroller handles things like reading sensors and controlling hardware while your PC does all the upper level stuff.

Nyx:
Maybe you should consider doing it the same way I'll be doing mine (or using a similar approach)...

Make a circular woodeen base with two DC motors (with gears) driving two symmetrically placed wheels under the chassis, and place two free rotating caster wheels at a percpendicular axis to the motor-driven wheels. Then you can add a level for batteries and motor control, and one for your laptop. I found some 12V motors-gearbox sets for $15 which will do the job of driving such a platform around... And I plan on directly interfacing the motors through relays using a USB-parallel port converter (which can drive at least 8 relays). My design for the actual base is very simple, it's basically a stack of wooden circles or squares, joined together with wooden "spacers". I personally prefer a circular design because that way the robot is always able to rotate around its central axis, even if it is very close to a wall.

I will rely on vision to control the guidance of my robot entirely, which eliminates the needs for servos or other accelerometers or rotation sensors in my case. If you need more than that, however, you can use more parallel/USB or serial/USB adapters for additional inputs and outputs.

Cost of the basic thing:

Wood and screws: 0 to $25, depending if you already have some, or can get some for free
Motors: $15 x2 in my case, $30
Wheels: $10 to $20
Battery: 12V SLA 7AH - $20, $30 for a more powerful one (12AH I believe)
Parallel-USB adapter: $10
Relays, wires, transistors, resistors, etc: $15 to $25

Total: between $85  and $125

Which imo isn't so bad. It has the advantage that it can be quite fast and carry alot of weight (my motors are 150 RPM, ~40W each), you can scale it easily by adding additional levels using wooden "spacers", you can make it as large as you want, you can have alot of battery power, and you can easily carry one or more laptops. Laptops also have tons of obvious benefits themselves, like the large amount of CPU power, the possibility of interfacing with several webcams, bundled Wi-Fi "for free", the convenience of a real OS and a real compiler, etc... Not to mention that you may already have a laptop, like me, which is something less to buy for the project!

If the look of wood really scares you, then you can always paint it, or encase the thing in metal or plastic eventually. Wood is also pretty light, which is another bonus.

timstirling:

--- Quote from: Admin on July 31, 2006, 11:43:00 AM ---Have you considered simulation?

Microcontrollers will never have the processing power you are probably used to with PC's. You will have to make a lot of sacrifices . . . perhaps you can consider a palm pilot instead? I do AI stuff as well, but I like microcontrollers cause they are way smaller . . . A roach doesnt need human level reasoning abilities . . .

--- End quote ---


Yeah, my main intention is to use computer vision and run algorithms such as neuro SLAM for naviagtion/mapping etc. and using neuro-controller evolved through genetic algorithms as the control software, and then experimenting with artificial life. This is what my final year thesis was on and so i have all thr algorithms already. the unfortunate problem with my project is the universities robotics lab had some major hardware and software problems with the robots I was going to use so the neuro-controllers have never been fully tested. My aim is to carry on this research taking it to the next stage by doing robot testing.  This maywell form the basis of a PhD.


--- Quote ---To control two small dc motors all you need is a motor driver IC. Just follow the datasheet for wiring instructions. You could instead use $9/each servos, which are even easier to interface with, and also have a built in control system.
http://www.societyofrobots.com/actuators_servos.shtml



--- End quote ---


The advantage of DC motors is I already have a fair few low powered ones. Although I will be making use of servos in the future.  Can you provide any more info/links on the motor driver IC? That would be very helpful.



--- Quote ---
To interface between a PC and robot components you would need a microcontroller with a rs232 serial connection. The microcontroller handles things like reading sensors and controlling hardware while your PC does all the upper level stuff.

--- End quote ---


So, even if I use a laptop/PC I would neeed a microcontroller. Well, this wouldn't be so bad because it means I have the option of making smaller/simpler robots with just the microcontroller, e.g. from the RC car basics I already have. Then when I want to make a larger robot with a laptop as a brain the microcontroller can handle the low level motor commands. I like this idea because it follows the Brooks subsumption hierarchical archtecture.  It would be nice having the laptop to some vision + navigation algorithms, which if they fail, the low level microcontroller could still override he drive control and prevent crashes via whisker detection etc.

timstirling:

--- Quote from: Nyx on July 31, 2006, 12:42:12 PM ---Maybe you should consider doing it the same way I'll be doing mine (or using a similar approach)...


--- End quote ---

Your way was my original aim but as I started adding up parts it got fairly expensive, but the prices you have listed look reasonable, especially without a microcontroller and motor driver IC etc.


--- Quote ---Make a circular woodeen base with two DC motors (with gears) driving two symmetrically placed wheels under the chassis, and place two free rotating caster wheels at a percpendicular axis to the motor-driven wheels. Then you can add a level for batteries and motor control, and one for your laptop. I found some 12V motors-gearbox sets for $15 which will do the job of driving such a platform around...

--- End quote ---

Yep, I'm familiar with idea- here is a project I did last year with the same differential drive scheme: http://www.flickr.com/photos/timstirling/sets/72057594060800204/
(it navigated the maze mapping it, detected balls, oponent, wooden boxes, collected the ball and returned to the start position via the quickest path)


--- Quote ---And I plan on directly interfacing the motors through relays using a USB-parallel port converter (which can drive at least 8 relays). My design for the actual base is very simple, it's basically a stack of wooden circles or squares, joined together with wooden "spacers". I personally prefer a circular design because that way the robot is always able to rotate around its central axis, even if it is very close to a wall.

--- End quote ---

The highlighted part is what I'm interested in. You'll have to excuse my ignorance, but could you spell out how such a system would work and cost.  I've been searching for the last week to find details of this and found very little useful info strangely. ... Holonomic symmetrix robots are always easier!


--- Quote ---I will rely on vision to control the guidance of my robot entirely, which eliminates the needs for servos or other accelerometers or rotation sensors in my case. If you need more than that, however, you can use more parallel/USB or serial/USB adapters for additional inputs and outputs.

Cost of the basic thing:

Wood and screws: 0 to $25, depending if you already have some, or can get some for free
Motors: $15 x2 in my case, $30
Wheels: $10 to $20
Battery: 12V SLA 7AH - $20, $30 for a more powerful one (12AH I believe)
Parallel-USB adapter: $10
Relays, wires, transistors, resistors, etc: $15 to $25

Total: between $85  and $125

Which imo isn't so bad. It has the advantage that it can be quite fast and carry alot of weight (my motors are 150 RPM, ~40W each), you can scale it easily by adding additional levels using wooden "spacers", you can make it as large as you want, you can have alot of battery power, and you can easily carry one or more laptops. Laptops also have tons of obvious benefits themselves, like the large amount of CPU power, the possibility of interfacing with several webcams, bundled Wi-Fi "for free", the convenience of a real OS and a real compiler, etc... Not to mention that you may already have a laptop, like me, which is something less to buy for the project!

If the look of wood really scares you, then you can always paint it, or encase the thing in metal or plastic eventually. Wood is also pretty light, which is another bonus.

--- End quote ---


Thanks for that lot. Yeah, the cost looks great. Any info on linking the parallel port pins to motors... I'm guessing a bit of electronics skills needed. I know the basics upto and including MOSFEts etc but have never actualyl contstucted circuits - although I do have access to a solder iron.

Thanks for the reply. What you're doing is pretty much what I intend to do.

Tim

Navigation

[0] Message Index

[#] Next page

Go to full version