Motor interface electronics

Gordon McComb wrote:


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.

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

Of course they are small. I generally prefer to use Linux boards for the brain of my robot.
However, because the microprocessor is small, it can handle one task very quickly. For example, the motor driver I'm using uses an AVR microcontroller to handle the PID and so forth. I just sent it serial commands via the RS485 port (or RS232, or I2C, or other means I've forgotten about).
I use others to control one or more sensors.

*Some* Mini-ITX boards are low power. You can get some with a real Pentium 4 on them.
I have both a VIA M10000 that runs around 25-30 watts, and an iBase 890c with a Pentium M that runs at least 60 watts.
And I *still* use microcontrollers to do the nitty-gritty stuff.

I would love to see you make it. I don't think you can do this without microcontrollers controlling the motors and sensors. And I think that you'll need them.
I would love to see a robot base that has all of the basics:
- motors and their controller - a sensor controller (or more than one) - a common bus to hang this all together
All would be (IMHO) controlled via a serial bus (I like RS485), but USB would also be useful. And most major microcontroller manufacturers are producing controllers with USB.

Gack! Frankly I am very disappointed in the low-level Mini-ITX motherboards. I would prefer a base that allows you to put whatever Linux box you want on it.

For some problems it is a good solution. For others, not so much so. -- D. Jay Newman http://enerd.ws/robots /
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
D. Jay Newman wrote:

OK, so we agree.

Nonsense. A 20MHZ CPU (8/16 bit) is not faster than a 2GHZ (32/64) bit CPU.

That is cool, I never said microcontrollers do not have a place, but if you don't need one, why have one?

Ditto
OK, my bad, yes some ITX boards are low power.

ok.
Why do you think that? Why does everyone think controling a motor is any more complicated than playing a video or buring a CD? It isn't, it is simple math applied at fairly regular periods to adjust the output power. If I was *really* concerned about "real time," I'd put the routine in an interrupt handler.

Got that built, working on PID software.

The number and type are to be determined.

That's an interesting requirement, what for? Yes, there will be documented ways to handle the I/O but why make up some sort of bus, screw terminals will work. For switches and such, and USB, parallel port, and maybe I2C.

RS485? No thanks.

What are you basing this statement on? I.e. which version of Linux is known not to run on which mini-ITX board. I have had no problems.

I have yet to see a "problem" for which it is the best solution available. If you need something simple and small, SQLite is better and smaller, if you need a "real" SQL database, PostgreSQL.

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

Hardware vs software. Hardware support is a lot easier to program for.
Also what latency or delay between the cpu and sensor or motor or motor controller ? Going to end up a similar time for both solutions just to get the data and again to get a control value back to the motor or sensor.
Depending on the way the solution is implemented, processing time is almost irrelevant of course the way you would do it on a pic and on a P4 would be different.

<snip>
Because the cd burner or dvd burner have microcontrollers that run them the cpu just sends the data to the device in the correct format and at a rate it can hand via the drivers (its a bit more compilcated than that)
http://www.atmel.com/dyn/products/devices.asp?family_ida9
Even the cpu offloads quite a bit to the peripherals

I think he means bus protocol or bus type like RS485 or can etc D.J , Brian , Randy and others came up with http://www.bdmicro.com/code/robin/ http://www.bdmicro.com/code/robin/src/robin/
A similar sort of one is canopen and micro canopen http://www.esacademy.com/index.htm http://www.canopenmagic.com / http://www.microcanopen.com / http://www.canopenbook.com /
Some people use rs232 or the uarts on the micros or i2c or spi for communications between the sensors (each sensor or group of sensors with a small micro) and main controller.
Also good for keeping wire runs short use hardware to help with error checking of signals.

http://www.atmel.com/seminar/mcu/default.asp?source=home
Alex
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Alex Gibson wrote:

Maybe, depends on how good you are at software.

The question isn't "what is the delay," but can you factor in the delay and mitigate any out of band effects.

The relationship between the motor and the encoder, is similar to the wheel on a ship. Depending on the response time of the motor system, the instantaneous motor responses are great for position updates, but are only useful for trend information for the motor control. You will typically not see instantaneous response from the motors unless you have a very precise mechanical system. In a mobile robot, it may take multiple encoder reading to see the effect of a power increase of decrease.

Why?
My system uses a D/A converter to create an analog -5-+5 signal. 0V means stop. +5 is full forward, -5 is full back. The motor amplifier creates a PWM/direction to drive an H-Bridge.
Very low CPU usage.

And that is what a good motor control system does.

Those aren't mini-ITX boards that I can see.

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
How does this compare with your project?
http://oap.sourceforge.net /
- John
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

http://oap.sourceforge.net/prototype.php They have used micros to control the sonar , remote, drive system and have a higher budget.
Should be able to drop the price down quite a lot by not buying off the shelf parts and making your own and scrounging.
Also if you can make/design your own pcbs could save quite a bit on some of the sensors like http://www.acroname.com/robotics/parts/R184-SP03.html the chips aren't that expensive and are fairly simple circuits http://www.winbond-usa.com/ttsdemo/ interactive demo
http://www.winbond.com/e-winbondhtm/partner/b_2_a_5.htm tsop56 can be a pain depending on what method you use to solder them. (depending on the pcb can be better to not heat the pcb in case it flexes)
instead of buying a serial lcd use an opensource project like this with a cheap parallel lcd http://hyper.sunjapan.com.cn/~hz/PIC/mo-lcd/index.html
don't have an lcd touchscreen , unless you can get one dirtcheap or second hand
Alex
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
mlw wrote:

On this one point we agree.

Agreed, but I think that you're taking it out of context.
I use the Linux box for the decision making and image recognition and other high-level stuff.
On the other hand control of motors and PID is a wasteful thing to have my Linux box do.

Because I feel that I need one to control my motors. I can do a closed loop PID control more easily with a microcontroller than I can with a Mini-ITX board.

A bus doesn't have to be on a PC board. When I use RS485 I use screw terminals.

Why not? It is an electrical standard designed to be used in an electrically noisy environment. It is used just as RS232 is used.

You mistook my meaning. I want to be able to put whatever board (hardware) that I choose on the robot.

There are a few problems that fit in the middle. I prefer PostgreSQL myself, but a lot of real work is done with MySQL. -- D. Jay Newman http://enerd.ws/robots /
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
D. Jay Newman wrote:

Why? My PID control loop spends most of its time sleeping. I see no more than about 5% CPU load. It really is a light weight task.

I disagree, but that isn't a big surprise in this discussion.

Depends on the cost and the cost of peripherals.

OK, see that is one of the important aspects of my robot, that it capitlize on consumer electronics.

This is anoher thing we disagree about.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
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.

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

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.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Eljin wrote:

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.

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

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.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Eljin wrote:

Actually, I've heard of it being done, seen an RS-232 to I2C dongle, but I don't have any actual information about it.

Yea, the parallel port is an awesome resource.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Easy to do with a microcontroller.

Indeed, especially to someone who refuses to use microcontrollers!
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Tom Twist wrote:

This is a stupid discussion. My statement about not wanting to use microcontrollers because I think they are too limited and because I don't want to develop microcontroller code is constantly being asserted as meaning that I don't like microcontrollers. Your assumptions about what I said are not what I said.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Eljin wrote: ...

Serial to I2C can be implemented quite simply using our famous $5 microcontroller <cough/>.
Seriously though, a cheap MCU would probably be the easiest way to do this. With something like the AT90S2313 (or ATTINY2313 when supplies are exhausted), you could do the serial side with the built-in UART and then bit-bang the I2C.
I've seen PICs on eBay (Australia) and surplus cheap as cheap (but never AVRs :( ), but don't know if they have the on-chip UARTS. Then again, it should be easy enough to bit-bang a serial port as well as the I2C.
Then with the bargain $10 of components (I'm talking surplus/cannibalised, not RS/Farnell prices [shift decimal point to right]), you have to invest $$$ of your precious time sorting out the bulk of the problem in software ;-)
Cheers
M
--
Matthew Smith
Kadina Business Consultancy, South Australia
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Matthew Smith wrote:
[...]

Just been to the Kadina web site. I see you are interested in privately developing hardware/software solutions for independent living for the elderly and disabled.
This should be a real growth area in our aging population, at least Japan thinks so.
I visited a relative in aged care who is still youngish but suffered a stroke. If only he had a robot he could command to look after his needs, for the understaffed home for the aged cater to their needs first. I couldn't get anyone interested in his plight.
Robots might not have feelings but they could turn out to be the best friend you have.
- John
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
JGCASEY wrote: ...

...
Just to explain myself a little...
The concept that John found on my site goes beyond a single robotic entity that can scoot around after someone and "lend a hand". In fact, a mobile robot is actually an optional (but too fun and interesting to ignore!) part of the project.
The core of the idea is home (or office) automation, but rather than being aimed at people who may be gadget freaks (or just plain lazy), the automation I have in mind is intended to push someone who is not quite capable of independent living, back into a self-sufficient way of life.
Inputs could include: * Client position tracking (what room are they in? have they fallen over in the shower?) - could be achieved with standard security hardware (PIRs, door beams, pressure mats, LAN cameras) * Room temperature * Weather (get HVAC* running BEFORE it gets too cold/hot inside, get washing in if raining, don't bother watering garden, etc) * Sensors on any dangerous equipment (cookers, toasters, heaters [temperature as well as CO for gas-fired equipment]) * Personal alarm - this could be the traditional radio pendant or even microphones in all rooms feeding into speech recognition software; voice control could also be associated with lighting, HVAC, etc. * Monitoring for problems in bath/shower/toilet * Smoke detectors * Soil humidity (for irrigation) * Pump monitoring (if not on mains water; also shower and circulating pumps)
Outputs: * HVAC * Shut-off of dangerous equipment mentioned above * Lighting * Electric door strikes * Bath hoists * Audible/visible alarms * Pumps * Fire-fighting * Irrigation
Network: * DSL connection to monitoring centre via Internet/VPN; dial-up modem as backup * Internet -> SMS messaging to notify family/friends of non-critical alerts
Essential Movies ;-) * Demon Seed * 2001 A Space Odyssey
I've got some of the environmental monitoring working and have other bits under construction. (See weather page on my personal site) Irrigation partly done, pumps about to be put under "intelligent" control. About to put together a light barrier that determines direction of travel - handy for client tracking.
My reason for joining this newsgroup is looking for inspiration/assistance in putting something mobile together, my first mobile project being a wheelbarrow/mobile platform that can assist in fetching firewood from the log pile and move the laundry basket around as one hangs out the washing.
Phase II would be an indoor model (drone or scutter, depending on ones choice of viewing); although I can see various assistance roles that could be performed for disabled/elderly, I have to confess that I just want something that will carry my beer fermenters to/from kitchen and laundry, saving my back and preventing sloshing!
Cheers
M
* HVAC: Heating, Ventilation, Air Conditioning
--
Matthew Smith
Kadina Business Consultancy, South Australia
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Matthew Smith wrote:

This is just way cool.
In fact, a robot in an assisted-care facility makes a lot of sense because the environment is already designed in a way that naturally dovetails with the needs of a typical robot. The floors tend not to have rises, threshholds, or other causes for trips, the floor is smooth tile or low-nap carpet, the aisle-ways are usually wide, with few projections, etc.
Not all the automation needs to be mobile, as you pointed out, but a robot could provide an extra layer of safety and patrol. Not too many people are working on robotics for senior assisted care (part of it is libaility, but that's a subjective risk anyway), but I think this could be a real growth area.
Kudos on your work so far, and best of luck! Please stick around and share how things progress.
-- 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.