Motor interface electronics

depends how it was designed and programmed but usually a fuse(or cb or polyswitch) , polarity protection , and fail safes are a essential part

But what about power use ? Can you run a pc from a couple of flashlite cells or a single 9V battery(just the controller part of the bot))

from 2MHz up to 48MHz

But what about IO and power use ? Only a limited number of serial and parallel ports

16f pics have 35 instructions , 18F have around 88 instructions the 18f's are faster

formatting link
has some good tutorials for the 16f series

fastest pic is 48MHz 18F4550

formatting link
dspic (16bit with some dsp instructions) at 30MHz
formatting link

16F pics
formatting link
18F pics
formatting link
atmel avr's run at 16MHz with fastest also at 48MHz (and with usb)
formatting link
arm7 chips (16/32bit) like Philips lpc2xxx run at 60MHz with 8KB to 64KB of ram and up to 512KB of flash
formatting link
formatting link
for some dev boards

other arm7 chips range from 30 - 80MHz

8051's can run at up to 75MHz the new Atmel ones are single cycle AT89C513x has usb as well
formatting link
silabs have 8051's witth up to 1Mbps ADC's running at 100Mips
formatting link
Philips 8051's
formatting link
Dallas Maxim 8051's
formatting link
formatting link
have a range of cheap pic , avr , 8051 and Z8 dev and controller boards

the freescale(mot) 16 bit dsp chips run at around 60MHz the newer ones single cycle and a lot of pwm channels and builtin pid etc

56f80x , dsp56300 ,5dsp
formatting link
56f8323
formatting link
get a starters kit for around US$79 from digikey
formatting link
?vendor=375&mpart=MC56F8300DSK&site=us or go with a board designed for motor controll etc
formatting link
isopod and servo pod usb

They also sell Philips lpc21xx arm7 based boards how to set up eclipse ide with arm gcc

formatting link
The thing is a lot of micros have hardware support for a lot of things like pwm , usart, capture and compare , can , spi , i2c etc

The speed or MHz isn't the main factor, comes down to the features you need in hardware.

A 18 wheeler semi has more potential than a family car but we don't all drive big rigs , why?

Its not just efficent. The key is use the tool for the job.

Lots of micros out from from 4 bit to 64 bit from less than 1 MHz up to 1Ghz Also lot of dsp chips also , 16 , 32 bit up to 2GHz

Can also do everything a micro can do in an fpga.

Alex

Reply to
Alex Gibson
Loading thread data ...

I believe the US army is using some Mavaric boards

formatting link
has students using them at a university

formatting link
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

formatting link
is waiting for me to get the time to attach a sonar module and fix it to my
formatting link

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.
  1. 2nd , most uni students can't solder to save their lives(uni I'm at doesn't teach soldering)
  2. People can injure themselves doing very simple things.
  3. Most people totally ignore safety warnings

Thats just for starters

Alex

Reply to
Alex Gibson

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.

Reply to
mlw

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.

Reply to
Pete Gray

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.

Reply to
mlw

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.

Reply to
Pete Gray

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.

Reply to
mlw

Fusing is also important, but for different reasons. I'll leave that to a different discussion for now.

The "problem" with using a PC with Windows or standard Linux is that neither OS is real time, and there can be delays in not only firing sensors, but especially polling sensors, and then controlling motors. On many PC-based robots I've seen, there are delays of a quarter second, and in worst case scenarios (the OS is busy is doing something with the hard drive, for instance), the delay could be longer. Delays aren't so bad with robots that use non-threaded and non-multitasking OS, like DOS, but the trend these days is to use off-the-shelf Windows and Linux as the OS.

By putting something as simple as a bumper switch on a PIC's interrupt pin you get immediate feedback to a potential runaway robot. The PC doesn't have to poll this switch, and because it's connected directly to the PICs hardware, the delay is limited to the interrupt latency -- about a microsecond even on a slow PIC -- and the mechanical momentum of the robot. (Here, dynamic braking could be used.)

Offloading motor control to microcontrollers then gives you additional freedoms, if you want to take advantage of them. You can drive the motors with PWM, connect quadrature encoder inputs to it, design a PID algorithm into it, and atomitize overall motor control functions. If you're a fan of subsumption you could program behaviors into the chip and abstract those functions from the PC.

In short, it gives you flexibility, and in robot design that's never a bad thing.

-- Gordon

Reply to
Gordon McComb

Sub $500 huh.

There isn't a whole lot of context in this message, but I have been reading up on your other posts.

One pattern I see in your thinking is that you appear to feel that a PC is going to be able to do everything. That there is a cheap OS that will have all the functionality.

You are in effect designing the mythical "killer app".

OS I really do not think that you need to concern yourself with OS. PCs running Linux, QNX, Windows, DOS will all have to have specific hardware to achieve the task of robotics. This can be on the ISA, PCI, USB, Serial or LPT port. You will have to roll your own hardware to do this on the cheap. If you use an internal bus, you will need device drivers deep within the OS to demand service from the CPU on a periodic basis.

I saw that you discount microcontrollers. A microcontroller is a micorcomputer with internal memory and specific register based devices for performing specific tasks. Your mouse attached to your PC likely has a Cypress microcontroller with timers to read the quadrature coming out of your mouse encoders, or to read the SPI or quadrature coming out of it's Agilent mouse chip, which is a very specialized microcontroller in its own right.

The mouse is a very specialized subsystem designed for user input. We do not run the encoder lines from it directly into our PC, we use a sub system.

The printer you have next to you is similar, with stepper motor drivers and one or more microcontrollers to mediate its functionality. It has a buffer of commands, and follows them. It demands time slices when the buffer is empty, but otherwise does not place a demand on the OS.

Your hard drive is an embedded system with h-bridges, motor controls and micro controllers.

Industrial automation is using CANBUS and other serial busses to distribute motor control commands in the form of PVT commands to microcontrollers which mediate the final motion.

Automobiles use microcontrollers with a variety of serial busses including CAN, LIN and K-Line. All working in concert, all working on their own with periodic intervention.

Alex mentioned the IsoPod. This is but one example of a device which is a seriously powerful robotics controller in it's own right. Even if you write a simple shell within FORTH to accept commands from the serial line, and wrap that around a simple PID loop, you will be a lot better off in the end. Add a lot of analog and digital sensors, and you are in really good shape.

As a matter of note, you asked how many motors Randy's micro can control. I have run 12 DC motors in open loop, with 1 wire PWM. You can run 6 motors with quadrature feedback and 2 wire PWM, or 8 motors with analog feedback(16 on a servopod) and 1 wire PWM. You can run ~26 motors in locked anti-phase open loop, or 22 closed loop with 6 on quad feedback, and 8 or 16 on analog. Or you could add an SPI a/d and close more loops.

By trying to over simplify your system, you are making it more complicated.

Take your $1.29 D/A converter and replace it with a cheap micro that does PWM and has a few timers for your hacked mouse feedback. If you plan things, you will have some digital and analog lines left for other things. Then build a good and proper PID controller that accepts serial commands with some sensing as a bonus? Drop the mouse and add 4 reflective sensors and a printed wheel encoder wired to an AVR, PIC, ARM, whatever will save you lots of ulcer medicine compared to trying to close a loop through an HID call in an OS.

don't get me wrong, $500 is an admirable goal, but why not add $40 worth of microcontrollers and save the usenet bandwidth, save yourself the ulcer meds and rogaine to grow back the pulled out hair.

just my $0.02

formatting link
can use c , forth or isomax or asm

of

Reply to
blueeyedpop

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

Reply to
Gordon McComb

Yup.

I pretty much agree with everything you said.

I think that a Honda generator, on its own robot is in order here.

It is funny, but there really is a balance of under and over factoring.

Our O.P., MLW, is an obvious proponent of the under factorer.

The over factorer, the guys with the BSIIs, the swiss army knife of controllers, do the opposite. They start out with one of the whimpiest controllers as far as raw processing power is concerned, and add sub-system on top of sub-system until there is no resource left. there are even serial floating point accessory chips out there of all things to support this methodology.

Clearly there is a correct middle ground, and I believe that it is the professionals among us here that see this balance and divide up a system according to the task at hand. Those of us that earn out daily bread by tackling these problems and solving them appropriately need to educate the others in this group with less real world experience.

Reply to
blueeyedpop

How is the OS a limitation?

Really? How so?

I can use a real time OS if I like.

Again, I ask what is "real time?"

I have never said that I wouldn't use microcontrolers, I've said over and over, that if you have a very well defined task they are OK, but a general purpose PC is a better base.

Probably not under Windows, at least not realiably.

I can't understand why anyone thinks a micro-controller, which is by definition more limited than a PC, is somehow a better choice as the base from which to build.

Reply to
mlw

Even the best realtime system has variations is response times. The best a realtime system can do for you is mitigate the delays and guarentee a maximum delay.

On Windows this is certainly true, especially if you are using DOS emulation for various tasks. That's why Windows just plain sucks.

As for Linux, you can bump your task priority. It isn't a guranteed response time, but on your robot, and Linux, you have control over what the OS is doing.

Windows is bad for so many reasons, and if you want that discussion I am qualified to have it. Linux does not suffer the problems that Windows has and while it is not "real time" it is manageable.

Same thing with a PC's interrupt.

And how is this any different than using an interrupt on a PC?

No doubt, but if you don't have to, why bother?

You can do this with a PC as well.

Like I've always said, microcontrollers have a place. If you have a well defined task, sure. They are just a bad choice for general purpose applications.

Reply to
mlw

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.

formatting link
> can use c , forth or isomax or asm

Reply to
mlw

JGCASEY wrote: [snip]

Basically the issue is interrupt latency -- which can be quite long and unpredictable with a non-rtos. Note that the "Real Time" part of RTOS means that the operating supports a deterministic interrupt latency.

There is actually at least one real-time Linux version (RTLinux). I believe that it basically runs Linux as a seperate task, and your time-critical tasks run as other tasks. I'm not sure to what extent (if any) they actually have the functionality of the Linux part of the OS available.

However, even with an RTOS running on a mobo, you're either short on I/O ports altogether (at least the kind useful for robotics) or are stuck using stupid hacks to get what you need -- and you're still limited. Moreover, we haven't even begun discussing power consumption issues, which may or may not be a factor in a particular application.

A MUCH easier approach is to use microcontrollers or DSPs for the low level stuff and let them talk to your motherboard, which can handle the stuff that requires more horsepower, or which will interface with peripherals that would otherwise be difficult or impossible to talk to.

This is what most of us have been trying to get through to mlw without much success. There's no real dichotomy here -- if you need vision processing, if you want to run a web server on your robot or do anything computationally intensive, a pc mobo is ENTIRELY appropriate. It's just a poor choice for the lower-level workaday tasks that most general-purpose robots are likely to need to do. For the record, both of my larger platforms are designed to support (and one does, on occasion) small form-factor pc-type boards.

Cheers -- tAfkaks

Reply to
the Artist Formerly Known as K

Everyone uses "real time" as some magical statement. "Real time" is very subjective. I would argue it is largely not needed on a general purpose mobile robot.

It works something like that, yes.

I'm not sure what you mean.

One I/O card and you are good to go, what's the big deal?

Probably minimal compared with motor power requirements.

Yea, that is a standard approach. Most things that connect to a PC are some form of controller. That isn't this debate.

Not at all. I have said, over and over, that microcontrollers have their place in well defined tasks but that I would not base a robot on one because they are too limited. This has been taken to mean that I would never used one anywhere. Its not true.

I have done my share of micro development and it doesn't interest me. In this project, the sub $500, robot, it will not use any because they cost too much.

Reply to
mlw

Curiosity question...

I found a schematic at the open automaton project that implements an I2c port on the parallel port. I'd like to see the schematic of one off the serial port and some associated code. Where do I go? It seems to me that sacrificing a serial port for this would be more cost effective electronically than losing part of my LPT port.

Reply to
Eljin

Me personally, I'm working with an almost nonexistent budget, but a really big brain. This is not the 80's. I'm not about to go dumping huge sums of money on a project just to see it run. It's more interesting to spend the extra time figuring out how to do it on the cheap so to speak.

No actually. I don't know about MLW, but so far my frame hasn't gone above $20 US. I salvaged my motors from a couple of those ride on toys that were sitting on the side of the road and my batteries were being thrown out from some old UPS systems. A cheap hand me down ups is serving to power the main board and associated electronics, with some additional batteries from other ups systems wired up in parallel.

You guys who have the extra money to spend are getting spoiled and lazy in my opinion. It's too easy just buy the stuff from mail order and you end up with a clone of someone elses robot.

Gordon McComb is my hero man.

Reply to
Eljin

VERY. You're writing assembly code for the BIOS? Or do you plan on revising system kernels to immediately branch off your OS tasking to respond to a hardware interrupt? Why do either when a piece of $5 hardware does it, is machine portable, is OS-agnostic, and allows nearly unlimited expansion?

You seem to be confused as to what many of us are suggesting with microcontrollers. True, there are some robots that only use microcontrollers, but there are many others that are based on a PC -- running an OS of some type -- but also use microcontrollers for subsystems. The latter is what we're talking about. Use whatever PC and OS you want, but don't think you'll get the same performance and flexibility using a single board over offloading tasks to one or more microcontrollers.

In any case, many of us have specifically mentioned using microcontrollers WITH a PC, so it's hard to imagine how you have missed these discussions. Several of the people who've responded to have designed PC-based robots that use microcontrollers for specific tasks (me, Kap'n Salty, others), so WE GET IT. However, I am having doubts that you're reading what we're saying.

-- Gordon

Reply to
Gordon McComb

I think Brian was being facetious about the mySQL and Apache reference on a P4! And while you can always spend $200 just for a single wheelchair motor, the combat robot craze has died down enough that you can once again find good deals on heavy duty gear motors. For a while there everyone wanted $50+ for even a crappy little motor. Just for the sake of sane prices I'm glad the combat days are mostly over.

There are always ways to save money, so even $500 is beatable, when it comes down to it. It all comes down to how hard you're willing to look. I found an ATX P3 PC at Goodwill the other day for $10. I *am* too lasy to build a power supply for it, so I bought one for $49 (delivers 200W of power, and runs off 12VDC). The 12 volt battery is a reconditioned motorcycle battery I bought at the local bike shop for $25; I like them better than lead-acid cells because they can take a deep recharge, and if they start drying out you can add more water. Agree that frames don't have to be expensive, even out of aluminum (cheaper if you use shelving standards, but a little heavier). And with summer coming up, there are more garage sales, and more chances to snag that kid's riding toy.

My other favorite way to save money is to ask for free samples from the semiconductor companies. And, don't overlook building buddies. It's good to join a local robot builder's group, as we clean out our closets from time to time. What one person isn't using any more can be put to good use on another person's robot.

:-))

-- Gordon

Reply to
Gordon McComb

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.