Motor interface electronics

blueeyedpop wrote:


Funny way to look at it.

I'm not sure where you are heading

As a the basis of the device yes.

As I have always said, if you have a well defined task, a microcontroller could be useful.

Exactly. No problem at all, a cheap well defined task.

Obviously.
Yes, we know all this.
[snip]

A good PCI I/O card on a PC will do just as well.

And how much other processing can you do? vision, dead reconning? navigation? Speech recognition, speech synthesis?

Not at all. Each task is its own self contained process. Simple to understand, easy to develop.

The $500 price is a maximum. Anyone should be able to do it with easily available parts. If you add multiple micro-controllers, you have to also expect the end user to program the micro-controller. If everything runs on the PC, then everything can be done with one tool set.
Many people have complained that the learning curve is too high.
Actually, I'm not getting an ulcer, this is fun. I have actally laughed out loud at some of the things asserted.
People assume I don't like micro-controllers, that's wrong. They just need a very well defined task. It would be silly to base the robot on one.

http://www.newmicros.com/cgi-bin/store/order.cgi?form=prod_detail&part=ServoPod-USB
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
<big snip>
Killer App: does everything, including cost very little.
OS: Since $500 is your concern, design goal, go Linux, it is free after all. OS is irrevelant, beccause unless you want to write your own dardware drivers, there is too much in between you and the hardware. In this case, OS is irrevelent, since they will all be technically difficult.
Microcontrollers as basis for device: Depends on the device. A vision based robot, absolutely not. Not enough horsepower there. A basis for a motion control system, absolutely. I couls make the same arguement about microcomputers for embedded applications. A place for everything, and everything in its place.
PCI IO card: Well, this is difficult. Do you really want to task your main processor to do a servo loop for several motors at 2 to 4 kHz each? Add to that A/D and PWM, and quadrature feedback, but you still burden your main processor. Now, put a dedicated microcontroller or FPGA on there, and you have a product. Actually several companies do just that. They unburden the host PC so it is not responsable for latency sensitive operations like data gathering and motion control.
Vision, speech recognition etc: Speech recognition and vision require massive amounts of data. navigation not necessarily so. The point I am making is use the proper tool for the job. The thing to remember is that microcontrollers have a lot of functionality. You sited I2C as a potential communications link. I2c emulation is a bummer, I2C on any Philips chip is near trivial. Why not emulate CANbus in software, why not poll the printer pins at 40 mHz and read quadrature directly. An 80 mHz motorola DSP or a 60 mHz ARM can do an awful lot because they have a wide range of register based things like UART, SPI, A/D, timers, etc.
From what you are saying, it sound like you are trying to build a really BIG BASIC Stamp. Yes a BSII is simple to use, every pin is like a swiss knife. The problem is, like a swiss army knife, nearly every tool has a better stronger analog out there. To carry this analogy further, you can only use one swiss army knife at a time.
Do you really want to start running interrups to poll an I2C bus on the printer port for instance?
$500 is an admirable goal, but I think it is difficult to achieve. Look at whitebox robotics. Made in China, PC based, really cool, evolution robotics software, simple, but $1500 is a closer for something like that.
A friend built a PC based bot with vision as its core, he went cheap, and is in it for well near 1K. Problem is, that is a rolling platform and vision. sure it speaks via win 2K's cool features, sure it has voice recognition, but he still had to use a real motor control for decent performance over varied terrain, and he still has to add sensing etc.
I think for $500, you may be able to make a thing that rolls around under PC control, but that is not a robot.

for
powerful
that
usb
http://www.newmicros.com/cgi-bin/store/order.cgi?form=prod_detail&part=ServoPod-USB
bottom
servos
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
blueeyedpop wrote:

I think a bare-basics robot using a mini-ITX can be done for under $500, and less if you assume you're going to scrounge. It all depends on the "extras," but here are some prices for readily available parts:
Mini-ITX board (VIA ML5000): $135 12v PS for mini-ITX: $40 12v Motorycycle battery (new, JC Whitney, Pep Boys): $60 230 RPM gear motor (Herbach) $36 (pair) 1/4" setscrew aluminum hubs: $10 (pair) 6-7" diameter wheels, Harbor Freight: $15 (pair) 2 1/4" casters (Home Depot): $7 (pair) 40gig IDE 2.5" hard drive: $70 USB wireless 802.11g adapter: $30 Aluminum/plexi framing (Home Depot): $40 Misc hardware (Home Depot): $20
Total: $463
We're assuming a free OS of some type. I intentionally didn't include some things like a mouse for hacked encoders as you can get those for free out of a dumpster, or for very little at Fry's ($3).
To make it cheaper you'll have to scrounge, and you'll need to in order to have money left over for sensors. You can probably get a used/refurbishbed hard drive at the swap meet for $25, a refurbished motorcycle battery for no more than $35, etc. You can build an IRPD for a couple bucks in parts from Radio Shack. A cheap USB Webcam would be a nice addition. I've seen them, new, at Pomona swap for $20. Not bad quality, either.
It *is* possible to *build* (not buy ready-made) a robot for under $500 using commercially-available parts, but none of this is new or unique. It's what you do with this off-the-shelf stuff that makes it special.
-- Gordon
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
On Sat, Apr 09, 2005 at 09:46:42PM -0700, Gordon McComb wrote:

You have motors, but you need motor drivers like h-bridges or similar. I guess relays can work but even those aren't all that cheap. Control would be rather hideous, though.
Also, don't forget his $50 I/O card.
-Brian
--
Brian Dean
BDMICRO - ATmega128 Based MAVRIC Controllers
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Brian Dean wrote:

H-bridges are among the things you can cobble together for very little, or (as I noted in another thread), get for free from semi companies. Outfits like BG Micro sell PNP and NPN power transistors for like a quarter each, so if you're willing you can put an H-bridge together for a buck or two.
I also did not include a couple of quad decoder chips from US Digital at $3.05 each, which I'd prefer to use rather than the PS2 interface. These would be personal choice items.

Actually I disregarded it! (Mike -- blueeuedpop -- will get the reference <g>) I prefer a USB adapter ($25) to one of those mythical $5 microcontrollers! Or if the budget would allow, I'd FAR prefer to shave off some bucks by buying refurbished hard drive, battery, etc., and use what's left over for a MAVRIC II, and subprocess with it. No shortage of I/O there. Randy's PlugaPod, at 90 bucks, also would save some headache in interfacing motors and quadrature feedback, among other things. In any case, this type of hardware is up to individual choice, as would be sensors.
-- Gordon
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Gordon McComb wrote:

Actually $99.

I've not seen $40, seen $65.

Fire alarm/instrument batteries. Deep cycle gell cells. $35.

Kids toy with two motors and steel axil, $65~120

$60G Microcenter $29

Linksys or Belkin wireless router $30 (on-line or microcenter with rebates). EPIA board comes with ethernet jack. The router actually has a secret, you can install a custom Linux on it.

My total: $355

$5.00 or less.

I have almost $150 to play with on my budget. one or USB cameras, one or two ultrasonic sensors, and of course, bump sensors.

Using a PC based development model is very important. The tool chain you use to create applications should be usable for the robot as well.

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Just curious on what language are you using ?
Thinking linux quite a few people would assume c for development.
c , c++ or something else ? asci c or c++ or a subset like embedded c++? standardlibrary or threadsafe ?
Going to have any backup for the hdd ? Or will the code fit on cf or mmc / sd ? or bot be able to be booted from cf etc ?
Are you going to have any or many failsafes ?
Also are you going to make it self hosting ? so you could halt the bot, adjust the code as necessary , recompile then restart ?
Are you going to have a console via bluettooth or rf so you can login and adjust things ?
Seen a few people use python for robotics http://www.pyrorobotics.org / http://cs.brynmawr.edu/BeyondLegos/PyroModules/Introduction / http://cs.brynmawr.edu/BeyondLegos /
Alex
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Alex Gibson wrote:

I would code using C++, but it would all be shared libraries, so you could probably use any language to build on it.

No, but there is networking. I was thinking that if you didn't like disk drives you could use flash disks or network boot.

It is possible to get a not-so basic Linux system to fit on 512M SD card, especially with a compressed filesystem.

Like? Motor stop, yes, of couse.

It will work like any other computer system.

It will have standard wireless networking. Wireless G.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
snipped-for-privacy@gmail.com wrote:

I haven't seen any.

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
On Fri, Apr 08, 2005 at 04:55:49PM -0400, mlw wrote:

I think you are in over your head. Better toss mlw a lifer saver, er, microcontroller.
Microcontrollers count for plenty. PC motherboards are not some great novel idea ripe for robotics use that everyone in the robotics community just somehow hasn't thought of. The VIA Mini ITX's are interesting, but they sure aren't a complete solution. In fact, the only thing interesting about them is the fairly low price. For actual usefulness in robotics, you'll do better with PC/104 type boards, some of which actually do have hardware facilities suitable for robotics applications; but they are generally $$$. There are a number of problems with motherboards intended for PC's - large power requirements, lack of needed hardware interfaces, stability issues regarding mounting espcially for the PCI cards (robots do move and sometimes hit things), etc, etc.
You don't really think you can do this without microcontrollers do you? Let me rephrase: if your time is worthless to you, you might be able to pinch a few pennies by building all your hardware interfacing from scratch. It will take you many years, lots of proto board, lots of scrapped attempts in the refuse pile, and in the end, you _might_ be where you would have been in a few weeks by simply purchasing a ready-made microcontroller board, reading the datasheet, learning a few development tools, and programming it to do exactly what you need.
You do know that a microcontroller is, don't you? You realize that chip makers go to great pains to include features that are demanded by their customers - people who create and build embedded systems. PC motherboad makers go to great pains to include features that are, well, expected on a typical desktop computer. Which do you think is more suitable for use in robotics?
Microcontroller do what is required, cost effectively. I realize your target is a $500 robot. Are you looking to commercialize this robot? Is $500 your cost or your target price? Or is this an "open source" robot? You know there are already a bazillion of those around, don't you?
I'm betting that you'll spend close to $500 just on the frame, batteries, and heavy duty motors neaded to cart around your Pentium 4, running your MySQL database and Apache web server. Heck, maybe you'll even want a cluster - there are a number of clustering solutions out there - you can run dozens of boards all working on complex gene factoring problems, because you never know when you might want your mobile robot to do some gene analysis on the go.
I'm still waiting to see your mouse encoder. I honestly think its much more cost effective to simply buy a motor with the encoder built in. They add a bit to the cost but look seriously at what you get. You get time. Time to work on the things that are really interesting instead of cutting apart a mouse with a dremel and trying to salvage a few chips and encoder wheels, and then, god forbid, trying to mechanically attach those to your motor / wheel in a way that it won't fall apart if you look at it sideways. I like to just spend an extra $10 for my motor and get one with an encoder - you will get good resolution, pristine signal output and a bomb-proof mechanical connection and housing - no fuss, no muss. Then I save that time to focus on a problem that is more interesting to solve.
Instead of dismissing the advice you are getting, may I suggest that you pick up a few books from your local bookstore on this subject. You'll probably recognize some of the authors on those bookshelves as some of the folks replying to you - some several times over. You are getting some quite expert advice - only a fool would ignore that.
I guess we sometimes need to make our own mistakes for the lessons to sink in.
Good luck!
Cheers, -Brian
--
Brian Dean
BDMICRO - ATmega128 Based MAVRIC Controllers
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
One way to sell a cut of meat that most people don't buy is to sell it with a good recipe or perhaps already marinated.
Your boards are most likely very useful but for me I would like to see a "How to Build Your Own Working Robot" using those boards and sensors.
I assume someone has made a complete working robot with these boards? How about a complete description perhaps in an electronic form?
This would pull all the information together and provide a demo example from which others could develop or just be content to copy.
Cheers, -John
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

I believe the US army is using some Mavaric boards
http://www.mil.ufl.edu/imdl/papers/ has students using them at a university
http://www.bdmicro.com/rover/ one of Brians own bots
Don't have any photos of my couple of mavaric boards in use ones ontop of one of the rover type bases sold by Gordon McComb http://www.budgetrobotics.com/shop/index.php?shop=1&cart 4269&cat6& other is waiting for me to get the time to attach a sonar module and fix it to my http://www.budgetrobotics.com/shop/index.php?shop=1&cat9
Think the problem with having a build a robot with step by step instructions is the amount of help some people would demand. Most people would be fine but a very small number would be incessantly demanding help and not taking no for an answer.
Learned this myself the hard way , currently in my third year of doing tutoring and support for a couple of university subjects (ex Aircraft Maintenance Engineer Avionics, currently doing Applied Physics and Electrical Eng double degree)
1.1st problem is most people don't read the documents. 2. 2nd , most uni students can't solder to save their lives(uni I'm at doesn't teach soldering) 3. People can injure themselves doing very simple things. 4. Most people totally ignore safety warnings
Thats just for starters
Alex
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Alex Gibson wrote:

I learnt basic electronics and programming from books so I had no one to demand an answer from.
When I did a course on program design the lecturer said he could tell I was self taught :)
I have an excellent, but dated with regards to hardware, book called "How to Build your own working Robot Pet" by Frank DaCosta based around sonar and the 8085A. That is the kind of thing I mean.

Sounds like me :) except I have plenty of practice soldering.
I would use a breadboard system which contained the circuits for support such as the power supply, logic probe, led display and so on and thus the beginner could use solderless breadboard sockets to put their projects together.
John
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
wrote in message

I started with an apprenticeship with TAFE course as an Aircraft Maintenance Engineer Avionics sort of a cross between electrical , instrumernt and radio trades, fitter and technican.
Had to do anything from install new systems sat nav and comms, GPS , entertainment systems , to replacing and refilling oxygen , new fuel quantity sensors and harnesses, reconnecting aircraft engines and generators , ignition systems , uploading new system software, replacing light bulbs.
Worked as an AME for ten years.
Currently doing a Physics and Electrical Engineering degree. With a bit of luck should finally finish the Physics degree this semester then probably another two years to finish the Electrical Eng. Its a six year full time degree, which I'm doing sort of part time.

I like Programming robot controllers by Mike Predko uses pic16f627 but is easily used on other 16f pics and easy to get working on 18f pics.

The other fun thing is helping people fault find and fix faults via a online subject forum.
About half the problems can be related to software problems, things like installing mplab with anti-virus softwware running (has a tendancy to stop the debug arrow from being installed) or xilinx webpack diabling all usb ports.
Or installing software in the wrong order.
Then majority of the rest of the problems are caused by bad soldering,

Best way to learn I reckon , build your own circuits on a bread board, also gives a good feeling when you get something working.
Unlike a premade board , using a breadboard you have to learn a bit more about electronics, things like reading chip pin numbering or how to read resistor values and how transistors work and how to actually connect things together.
Alex
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Brian Dean wrote:

Funny.
Microcontrollers are designed and intended to control devices. I have no problem with this. I have done my share of micro-controler development.
The point is that they are SMALL. They do not have the capabilities of a PC.

Who ever said it was? certainly not me.

Again, no one ever said it was.

No, the low price, the size, the power consumption, the computing power, and the ability to run main stream software. That's why they are interesting.

How is a PC104 form factor with expensive I/O any better than a cheaper, faster, MINI-ITX with cheaper PCI I/O card?
The MINI-ITX follows common commercial standards!.

ITX boards are very low power.

One PCI general purpose I/O board and your done.

Like? What stability issues?

Angle bracket.

Like?
No one ever said that, I have a Linksys wireless router in the robot, that has a micro-controller. The robot may have many micro-controllers, bit it will not be based on one.

The target is less than $500, and it is doable.

That's nonsense.

Yes, I do. I've done lots of emebeded development. I've been doing the software thing for over 20 years.

Absolutely. Micro controllers are cool, in their very limited and inflexible way.

No, that depends on the motherboard. Some target the desktop, some target the server marget, some are more general purpose.

Which is indeed? Think about it. A PC can have gigs of memory, lots of processing power, boot off rom, network, or storage, run thousands of programs, runs your choice of operating systems that support networking, development, and perhaps hundreds of thousands of programs, OR you use a micro-controller, write everything yourself, re-invent wheels that have been standardized for decades.
I'll go with the PC, thanks. It better fits my needs.

Nonsense. Without declaring what is "required" this statement is meaningless.

Don't know. It may be a book, a product, or just a website with a paypal button.

End user build cost.

Not sure I know what you mean.

There are lots of everything, so?

Frame $20 in angle aluminum.

$35 battery 12V 33AH.

$65 for dual motor children's toy. $15 for parts to build motor amplifiers.

$150 for Mini-ITA motherboard and 12V power supply.

I wouldn't touch MySQL.

Yup, wireless networking is great. You could have a robot with massively parallel vision processing.

And I've contributed code to a couple of them.

Yup, general purpose robotics.

Working on the protocol right now. Trying to choose between setting a sample rate or using data requests.

Really? $5.00 for a mouse gives you two encoders and a nice serial interface. I don't see how that isn't cost effective.

OK.
The trick is interstanding that there is no stress on the mounting. The rest is easy. Aluminum is great, very rigid, light weight, and easy to work with.

What problems are those? How to network your micro-controller?

Why does everyone think that, because someone does not agree with them, that they are uninformed? I have a ton of books on robotics. I built my first robot in the late 1970s. I worked at Denning Mobile Robotics. I have an idea what I'm doing.

Any only a fool would venture to assume something about a person they do not know.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
[snip]

Size is not directly proportional to functionality. Microcontrollers are physically small for good reason. They don't have the capabilities of a PC because they're not designed to perform the same function as a PC. Likewise, a PC doesn't have the built-in functionality of a microcontroller.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Pete Gray wrote:

True.
Exactly.
Ahh, and there is your trap. The *only* advantage that a common micro-controller has is "built in" I/O peripherals. If you can dispense with this as a requirement, and I have, a micro-controller's functionality doesn't matter.
For about $50 I can get a PCI I/O card that will more than compensate for any assumed short comings of a PC.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
[snip]

That's nice. But a microcontroller, costing *much* less than $50, already has the desired functionality built-in. Having built-in I/O peripherals certainly isn't the only advantage of a modern microcontroller.
Many factors come into play. Sometimes it's desirable, convenient, or practical to use one rather than the other. Overall cost, desired functionality, physical size, target environment, etc. (it's a long list) - typically - determine the appropriate choice.
Sweeping generalizations, re: PC versus Microcontroller, are pretty meaningless.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Pete Gray wrote:

And how much can a micro-controller do? Does $200 worth of micro-controller hardware have more I/O and computer power than $200 worth of mini-ITX computer and PCI I/O card?

A micro-controller is useful in a very well defined application, and I have done this type of developent. They are not, however, very good general purpose platforms.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
mlw wrote:

Both are limited by the OS, which becomes the lowest common denominator in this architecture. Because all your systems go through the OS, you are inherently limiting your choices down the road. Hardware is not you main enemy here, it's a preemptive multi-tasking non-realtime OS.
To grow your design, you will either need to use a real time operating system, or offload core time-sensitive functionality to independent subsystems. Nowadays this is commonly done with microcontrollers, though other techniques are also possible. There is no single solution.
I'm sure there are real-world examples of single-CPU robots that run under Windows or Linux, so I'm not saying it's impossible. But you have SO much more flexibility by not tying everything through your OS, and the cost for a basic controller is practically non-existent. You should really consider it.
-- Gordon
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here. All logos and trade names are the property of their respective owners.