Motor interface electronics


Kidding aside...
Despite your stated proclivities, you seem to be the one unwilling to learn something new. You apparently don't know microcontrollers _are_ usually what is used to do motor interface electronics these days. And being ignorant entrenched in your misgivings, and apparently unwilling to learn, you can't even hear the answer.
It is erroneous to think microcontrollers are the same as they were in the early 1980's, which seems to be at the root of your misunderstandings. They are as different today as your MiniITX is to a 4.77MHz PC. The early 1980's PC couldn't (meaningfully, usefully, if a at all) run Linux, web servers, MPI, SQL, or V4L, etc. either. It didn't have the memory, and it didn't have the speed, and it didn't have the peripherals. It would be a bad choice for those apps, given modern alternatives. The same is true of motion control, and the microcontrollers of today. Using a PC of any flavor, with any PC oriented OS, for motion control, over a modern micro designed for motion control, is also a bad choice.

So you are ignorant of LAP (locked antipahse) one-line methods as well? Too bad, it's probably one of the more commonly used methods in driving robot motors today. Uses a little more power. But has the advantage of continuous control over the motor, preventing such effects unpowered, or oversped, down-hill roll aways.

Ha! Are you so behind the times! The short answer is:
26
That's hardware, btw. With _no_ on-going processor overhead required. But then that's open loop, and not so interesting.
The extended answer of significance is: 6 axes of current sensed, quadrature decoded, closed-loop, velocity limited, acceleration determined, trapezoidally profiled, PID, and even co-coordinated motion. On one microprocessor. With processing power left over, btw.
Motor interface electronics today, state of the art, _is_ a micro, with level shifters to the drive transistors - straight to the motor, or PWM to an integrated H-bridge. No op-amps, no comparators, no D/As. Just the micro, and a few transistors and resistors, or an H-bridge chip.
Of course, using a micro is the modern professional approach to motor control, instead some amateurish analog kluge tacked on a PC, for at least three reasons. 1) Better reliability. 2) Better control. 3) More cost effective results. In the end, a micro produces vastly better results, while completely unburden any other PC's in the system from having to deal with a job it is very poorly equipped to do. Even with an I/O card, the PC's is still ill-suited unless that I/O card has a micro like this on it, or an FPGA as Alex suggested, that makes up for the PC's shortcomings.
Yes, short comings! And the number one reason PC's have short comings is the processing overhead taken by the OS they run, and the tasks they were designed to do (and do well btw), versus the hardware support requirements necessary for those tasks; all interfere with doing other things they then cannot do well. Motion control being a very obvious one. A PC is a very poor platform for motion control, missing the necessary hardware, and otherwise overloaded with realtime tasks of communications, data transfers, and display. So if you aren't willing to spend the money to buy a motion control card for more than your entire budget http://www.bbdsoft.com/iocard_motion.html ...
The best, most cost effective way to add motion control to a PC is to add a micro which has the hardware to do the control.
--
Randy M. Dumse
www.newmicros.com
  Click to see the full signature.
Add pictures here
✖
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Randy M. Dumse wrote:

I always find it amusing when people have to impugn the person with which they are debating. I always ask myself "Is their point so weak that they have to attempt to discredit the person? If they knew what they were talking about, wouldn't the information suffice?"

And who said they weren't?

Again, *you* have assumed quite a bit of what you think I have said. You are so busy defending microcontrollers that you fail to see that I've always said they are fine in a very well defined task.

Another assumption. A bad one too. Ever use a StrongARM processor?

I'm sure.

ok.
Actually, the PC couldn't run a "real" OS until the 80286 based machines that could go into protected mode (16 bit selector). It wasn't until the 80386 (32 bit flat) that it could do it well. What peripherals were not available?

I'm not sure what this sentence means.

Statement with no supporting facts.

Why? You make a statement, now make a technical argument to support it. You can't because it isn't true.

Actually, I am familiar with it and it is a bad design, it wastes power, especilly on high power motors. It is actually an interesting design in that, if done correctly, can use back braking to recharge the batteries, but doing it correcty isn't simple. I opted for analog control which works like a sign-magnitude system and is very simple, hence the D/A requirement.

On very small systems, yes.

The efficiencies are poor on large motors.

That is the job of the motor controller.

How's the vision system with that? How's the navigation? The remote monitoring? The speech synthesis? Oh, that's right, it doesn't do those things.

Open-loop surely you know I can run 12 open loop motors on a PC, and I have enough computing power that it doesn't matter. I can even synthisize speech and do vision processing.
The PC has some interesting extensions to the parallel port that allow greater programability.

That is cool, but not nessisary for my application.

Perhaps in your field. There ae many fields that use motor control.

Why?
Why?
Why?
You've made three technical assertions but made no attempt to validate them.

An unsupported opinion.

This statement makes several assumptions that are not true. (1) The job of the PC in this aplication is to deal with this sort of ting. (2) In he designed used, it is perfectly well equiped to do it.

I have never said microcontrolers are bad when used in a very well defined task, but it is not a good base for generl pupose robot.

Like?
Like play MP3s, videos, and networking. These tasks share no common ground with other I/O?

?
There is no reason to waste CPU cycles on something that engineers have done already and manufacture for less than $10.00. If it has a micro or not makes no differece. I'm not going to waste my time developing PIC or basic code.

Realy?
A PID algorithm is easy. The PS/2 interface is fine for encoder input. A number of strategies can be used to control the motor amplifiers. What's missing (of any material importance?)

Maybe you missed my point. Less than $500 dollars.

That's nonsense. I can buy an I/O card or system (USB, I2C, PP, Serial) and do the rest in the PC, in a device driver if I have to.

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

Yes. I'm impugning your ability to listen, and benefit from it. To wit:

No, your point wasn't missed, and is repeated again here, so you'll know it was heard. "Less than $500 dollars." Response? There's no challenge in it. It's already passé. Use a modern micro for the motion control, the rest is easy.
Supporting argument::
The "$250 robot anyone can build" is already built, and running. Several copies are now being cloned at universities and within clubs.
It does PID control of two differential motors with profiled control. It does Steering, so it goes in a straight line. It does Odometry, so it knows where it is in a grid. It does drive-to-a-point Navigation, so told to go to a point in a grid it gets there. It does sonar ranging. It does IR ranging. It does obstacle avoidance, so if something is in its way, it goes around it. And it can do more.
The universities are doing remote monitoring via cheap RF serial cables. BeerBot uses the serial to a cheap speech synthesis module, btw. Anyway its an unwise bet against a DSP talking, if it needed to. It can also read CMUcam's at 115,200 in the background. Vision, Navigation, Remote Monitoring, already in practice.
("But wait, there's more!" :)
It can do GPS decoding and drive to a designated GPS point, It can do networking via RS-232, CAN, SPI, and reads I2C from Devantech Compass, and SRF-08 rangers. It has left over A/D's, it has left over PWM, it has left over timers. etc. And what's amazing it does this in a high level language, within a real time OS, is interactive, and has left over processing power.
So actual running hardware is sufficient support to suggestons given.
Robot base with micro? proven reality $250. Remaining $250? Buy a Mini-ITX PC-whatever if you must. Money left over? Go splurge. For everything else, there's MasterCharge.
--
Randy M. Dumse
www.newmicros.com
  Click to see the full signature.
Add pictures here
✖
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Randy M. Dumse wrote:

I was waiting for someone to do this joke! (I almost did it myself once or twice.)
-- Gordon
Add pictures here
✖
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Gordon McComb wrote:

Believe it or not, I do have a copy of "Robot Builder's Bonanza." I also have "Build your own working robot" by David Heiserman, as well as over a dozen books on robotics, a number on power circuits, industrial control, and many others on hardware and software design and development. I am not a person without knowledge or background. One thing that I find disturbing about this whole conversation is that you guys take a contrary opinion personally. It is possible to have a contrary opinion and still (a) know what you are talking about and (b) have thought out the design.
The "Bonanza" book is good as a beginners text, a lot of subjects and nothing in great detail. I'm not saying it isn't an excellent book, I've been through the publishing mill a couple times and I hate it. You are certainly to be applauded for the amount of work you did. I hope it pays well.
In the late 70s and early 80s I built a robot. It was based on an RCA 1802 ELF and a Mattel big track. It was cool. It could do a lot of things. Developing for it was very hard. I had to hand code the ROM and toggle in the code.
When I got my first computer, a CP/M box, I got an eprom burner, and burned eproms. It was all painful, but I didn't know better.
In 1984, I started working at Denning Mobile Robotics. We designed robot that was primarily based on a 68000 and a number of Z80s. The Z80s were a pain, buring eproms, using in-circuit emulators to test, etc. The 68000 system was better. It had memory, a real OS, and worked seamlessly with the systems we were using for development. (At least it seemed seamless at the time).
It became clear to me then, and it is still perfectly clear today, that the robot should work like the rest of the systems around it. It should fit in seamlessly.
I don't want the microcontroller disconnect. I want to be able to use my standard tool chain to create software for the robot. I want it to work like the other computers in my lab. I want it to be able to use computing resources external to it. Those are part of my personal goal for the sub $500 robot, and I would think that you could respect this position.
Add pictures here
✖
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
mlw wrote:

This isn't a theoretical debate. You're missing a lot of useful input. Did you catch, for example, that Jay Newman builds robots using Linux and mini-ITX boards, is writing a book about it, and has a blog detailing his experiences? His sig contains a link to his page. The work is taking some time because he has a day job, but he's sharing his knowledge with the rest of us. Jay regularly helps people here working along the same track.
Yet when Jay, like most of us, strongly suggested you might need to offput some processes to a subcontroller, you once again challenged him with why. The why should be obvious by now, and it's been explained enough times by people with more experience, including those who have actually built what you're proposing, and with Linux. These people have been willing to give you their time, so you should respect their position as well.
I think you're ready to go to your shop and just do it. Write up a page, and share your techniques. Let's move on.
-- Gordon
Add pictures here
✖
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Gordon McComb wrote:

Thanks Gordon, but my original day job is history. My new main job is caretaker for my wife. Frankly the original day job (programming instructional software at Penn State) took less time. :(
I'm now a few days from getting Groucho rolling. Right now I'm building connecting cables to make everything work together. I'm down to only a few cables now.
...

I agree. This is an engineering project, and the real test of an engineering project is if it succeeds. -- D. Jay Newman http://enerd.ws/robots /
Add pictures here
✖
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Gordon McComb wrote:

I would consider it engineering debate.

No, I am reading it, but I think you guys have an antipathy toward using a PC type computer and using it to do all the work'. It is hard to take many of the arguments at fce value because they make great leaps of logic.

I didn't see that, I will look.

I usually ignore sigs.

That's cool.

Yes.
It isn't.

"More experiece?" A little presumptuous? I like to never assume anything during an engineering discussion. Experience in doing what? OS driver design? Motor control? Embedded developent? High speed data acquisition and control? Or is it experience writing micro-controller software?
I have a good deal of motor control experience. I have a good deal of high speed data acquisition driver experience. AFAIK, my data acquisition framework for NT may still be in use by keithley instruments on some of their devices.
I have spent many times over my career timing interrupt latency and data throughput on various systems. Regardless of your view, I do know a thing or two about what I am talking about.
No one, once, as said WHY I need micro in addition to an ITX board. Where is the engineering "proof" that the latency will kill me? Where is the "proof" that it will take up too many CPU cycles? All I get is the "we know more than you," "you'll see," or "you're too ignorant" arguments.
My current control loop spends most of it's time sleeping. When running, it creates less than 5% CPU load. Why do I need a microcontroller to control the motors?

I do respect their position, I simply do not agree.

I'm in the process, but I have to run to "You do it" tomorrow to get a power transistor. A slipped scope probe and a short to ground. :-(

Add pictures here
✖
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Randy M. Dumse wrote:

You are the one who makes the ad-hominem attacks.

I'm not talking about a simple line walker or remote control scooter. I'm talking about a fully programable robot with a complete tool set that anyone can build.

Yes, I've seen the "beer bot."

OK.
OK, the design criteria has a few things that may not have been obvious:
"Total cost" is $500, that is OS, hardware, development system, interfacing, charger, everything. "Everything."
The development model is not micro-controllers simply because I want to keep one tool chain. I want people to be able to develop software on their PC and run it on the robot. When you have a micro-controller, you almost always need two, one on which to test, and one to run, unless you only use the one, but that sucks because you have to kill the robot to try something new.
The development model is meant to share code and expertise. A million roll your own microcontroller hackers aren't going to do anyone any good. Using Linux (or a BSD), it is possible to use more normalized API and build on open source.
lastly, while it is funny, I'm a bit curious about everyone so adamant about me using microcontrollers. Everyone is taking it so personally. I have simply said that (1) a PC can do everything the robot needs and I don't need any microcontrollers, and (2) that I wouldn't base my robot on a microcontroller because they are too limited.
Neither one of these statements is technically flawed. The first one is factual and rather hard to dispute unless you put artificial constraints on it like that buying an I/O board invalidates the assertion. The second one is clearly a subjective statement, and there are plenty of facts in support of my position and while my position is not one with which you may agree, it is certainly understandable from the design criteria I have stated.
Yet, you have resorted to insults, said I don't know something, called me ignorant, I think you have a problem.
Add pictures here
✖
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
[snip]

Everyone? That's simply not true. Perhaps people are taking things personally because you're not paying attention to what you're writing. With a little more care, and less sweeping generalizations, I think you'll find you won't piss off quite so many people.
Add pictures here
✖
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Pete Gray wrote:

It is easy to say that I am not paying attention to what people are saying, because I disagree with them. They are not listening to what I am saying either.
This is after all usenet :-)
Add pictures here
✖
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Actually, I said that you're not paying attention to what *you* are saying. The fact that you didn't see this just proves that you're also not paying attention to what others are saying.

Yes, it is. When used correctly, it can be a very good learning platform. The following command helps (with apologies to anyone who's ever used DCL) ...
set mode/comms=(full_duplex, sequence=[read,think,write],verbose=off,clarity=true,ego=none,mind=open)
Add pictures here
✖
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

<snip>
Out of five computers , only 1 computer here has a ps2 port , only two have serial and parallel ports , three have a serial port and the other two here are usb only with no pci slots.
From pc98 onwards microsoft has stipulated that new pcs should not have parallel ports and more recently no serial ports.
Luckily for us , there are still manufacturers who produce pcs with serial and parallel ports but these are steadily decreasing.
Looks like even the new Via ITX boards are have dropped parallel ports.
Other problem is a lot of the pci parallel port cards are 3.3V not 5V and quite a few are "windows" ports and not full hardware so won't work for all parallel port uses.
usb -> parallel are fine for printers but not much else.
For one of my bots for vision I've used a cmu cam http://www-2.cs.cmu.edu/~cmucam/ which is run by a scenix pic clone, looking at transfering it to use a analog devices blackfin BF-533 EZkit or Blackfin stamp to give it a bit more power. Similar chip to whats in a lot of tablet pcs to off load the handwriting and speech recognition to.
I'm going with a distributed approach as it lets me add features without having to rewire and lets me keep size down. My problem is lack of storage and work space.
A blackfin stamp board(can run uclinux) http://blackfin.uclinux.org / http://www.analog.com/processors/communities/bflinux.html http://www.analog.com/UploadedFiles/Technical_Articles/418382427uClinuxWhiteWP_WEB.pdf http://www.analog.com/en/epHSProd/0,,BF533-STAMP,00.html http://www.analog.com/en/epHSProd/0,,BF533-STAMP,00.html get them from digikey
Alex
Add pictures here
✖
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
TI has some 8 pin DIP D/A converters that have SERIAL input, and a few months back you could get free samples.
Rich
Add pictures here
✖
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
mlw wrote:

Yes.
The last computer I bought did not have a either a parallel port or serial port, only USB ports. I'm sure that there are some mini-ITX boards out there that have both parallel and serial ports, but I have real doubts about how long these ports will remain in production -- 1 year (probably), 3 years (maybe), 5 years (I kind of doubt it.) I'm not a big fan of USB (actually I *detest* USB) but it seems to be winning in the market place. Do you want to design your platform such that it requires features that are being progressively designed out of motherboards?

Yup. USB is a real pain in the rear for us hobbyest types. Lot's of people are using FTDI chips to get USB to serial these days. Pololu sells a converter <http://www.pololu.com/products/pololu/0391/ , although I've never used it that particular product.
I'd recommend getting real used to USB for talking to mass produced motherboards.

I2C has its pros and cons. I'd recommend reading the spec. very carefully. Pay particular attention to the recommended bus lengths.

No.
Most of us use a dedicated microcontroller hooked up to an H-bridge to drive our motors. You are welcome to try different solutions, but microcontrollers are probably cheaper than anything you have proposed so far.
My $.02,
-Wayne
P.S. To contact me directly, send mail to Wayne .at. Gramlich @dot@ Net.
Add pictures here
✖
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
mlw wrote:

This $500 price tag does that include the motor/gears?
To buy a kids run about toy using the two motors that you have used would cost me about $500 alone.

It might be worth cross posting electronic questions to electronic newsgroups?

I found some old parallel port cards ($5 each) so I had 3 ports to give myself plenty of i/o to play with.
The modern parallel ports are faster I think.
I also used the games port.
If you pump stuff in/out a serial port don't they need more hardware to convert it to the parallel form?
As another poster pointed out the future appears to be with the USB port so maybe you do need a USB solution.
Regards,
John
Add pictures here
✖
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
JGCASEY wrote:

I noticed a google add pop up as a result of this USB topic,
http://www.hobbyengineering.com/SectionIN.html
It is a matter I guess of finding a solution, within the price range, that has a Linux driver?
Add pictures here
✖
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
JGCASEY wrote:

Yup.
No, I found a kids toy for $65.

Yea, I've been looking at those.

The PCI based parallel ports may be false.

The game port hardware is bad. It is very CPU intensive.

The serial ports accept a parallel write, but send it out serially by UART.

USB is fairly expensive.
Add pictures here
✖
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
mlw wrote:

Not really. FTDI sells USB<->RS232/FIFO modules in the $25 range. One module can control a number of external hardware, and they do have Linux drivers. I know of several robots that use these modules.
Wayne is right that parallel and serial will not be with us for very much longer. We will all have to do down the USB road sooner or later.
http://www.ftdichip.com /
-- Gordon
Add pictures here
✖
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Also the similarily priced silabs cp2102 (needs less external parts)
as used on this GPS to pc pcb from sparkfun http://www.sparkfun.com/datasheets/GPS/Lassen-IQ-EVK-Schematic.pdf
wireless usb is the next one on the way , similar to zigbee but up to 480Mbps supposedly. Intel is one of the main ones pushing it.
The ftdi chips www.ftdichip.com http://www.dontronics.com/cat_hard_ftdi.html
For the usb modules
http://www.futurlec.com/USB.shtml around the cheapest I've seen.
http://www.dontronics.com/dlp.html I've used a couple of the 232 modules
http://www.dontronics.com/giga.html http://www.dontronics.com/u401.html
I've also see a usb to can bus adaptor http://www.saelig.com/CAN-USB.htm also a design that won in a recent circuit cellar comp.
Alex
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.