Beginner needs help choosing microcontroller platform & software

I'd appreciate any advice you could send my way. I want to avoid the
probability of me getting bored or frustrated and leaving hundreds of
dollars of equipment collecting dust on my workbench.
There are two ways I can run out of steam:
1) It becomes too difficult. I can learn almost anything, but if I'm
following a guide that skips over something vital (like what they heck
is a booloader?) I'll decide the frustration isn't worth it. I'd like
something (a book, a guide) that walks me through the entire process.
2) If it becomes apparent the platform/programming language I've chosen
is too limited to accomplish what I want (ultimate goal is a multi-axis
motion control camera capable of learning moves and replaying them
exactly, maybe even outputing the data to a CF card to be used in
3D-animation software for match-moves)
Since I have more time than money, and not much of either, I need to go
cheap. That pretty much rules out the Basic Stamp, which excels in #1.
Proton Basic seems like a good alternative, but it isn't cheap either.
It seems to be the best way to avoid burn-out while avoiding the
limited capability and high cost you get with the Stamp, Ooopic, Atom,
BAsicX, etc. If Proton Basic offered a kit like BAsic STamp offers
with books, a programmer, and all the hardware you need to run through
some experiments I'd jump at it in a second, if it was priced
reasonably.
AVR and BASCOM'S free version looks promising, but I don't see anything
that walks me through the whole process beginning to end.
GCC-AVR is probably the perfect combination to accomplish #2 (unless it
is lacking built-in functions like stepper-motor control, LCD driving,
etc.). It is free, but lacks an IDE. I'm also not all that familiar
with C, but it sure beats Assembly!
The AVR seems to be the better platform, too, technically and Atmel
offers some real nice, and cheap, programmers and development boards.
Mindstorms doesn't seem to be supported by Lego much anymore, so I'll
avoid that.
Thanks for your help!
Reply to
MrMJPEG
Loading thread data ...
I have to disagree with that. LEGO is supporting Mindstorms just fine, and in fact there are fairly well-founded rumors in the LEGO community that they're working on a new & improved RCX brick... but if I know LEGO (and I think I do), your investment in existing Mindstorms equipment would not be wasted.
Best, - Joe
,------------------------------------------------------------------. | Joseph J. Strout Check out the Mac Web Directory: | | snipped-for-privacy@strout.net
formatting link
| `------------------------------------------------------------------'
Reply to
Joe Strout
Different people will approach this from different directions !
This kind of problem I'd tackle by starting with the mechanical side of things - estimating weights, speeds, accuracy, repeatibility and so on. This gets you to a point where you can specify the type of motors to use, and thus finally to the requirements for a controller to drive everything. Finally, I'd put the lot under (loose) control of a PC so as to be able to do fancy gui interfaces !
If you need quality real time positioning, then the mechanics are very important and will tend to be challenging and possibly quite expensive if the loads are significant. For this kind of application, closed loop dc servos are often used, and the controllers tend to be quite sophisticated.
On the other hand, if operating speed is not a factor, then life can be somewhat simpler, and a system based on stepping motors with a substantial reduction gearbox will probably suffice.
Almost any processor can be used as a simple controller for a single axis stepping motor, but when you start to operate several axes simultaneously in real time, then you really need something designed for the job - for example, something from the IsoPod family [Tinipod etc]. These devices are typically programmed in Forth, which is fairly well standardised and has some good reference books. On the other hand, if you think Basic is a good idea, then Forth will probably come as a bit of a shock ... Devices like this cost a little more than the Basic toys, but the gain in performance is staggering.
So, the message about controllers is 'decide what it has to do first - don't just pick one and hope that it will be adequate'.
This could easily be a big project, and you need to plan your stages carefully. For example, you could build a purely mechanical 'arm' for positioning, which would then be useable for posed shots, then add encoder readout to make re-positioning simpler. Now add a motor drive to one axis, and then another and so on. At each stage you have something that works and can be improved on. Projects that only come together at the end in one 'Big Bang' can be very frustrating ..
good luck !
Dave
Reply to
Dave
That's exactly the approach I was considering. I'd start out with a platform that would simply be a motorized pan.
Unfortunately, the Isopod is MUCH more of an investment than I'm willing to make. It looks like you can end up with a real money hole when you're done buying everything you need. Remember, I'm considering $5 microcontrollers being programmed with a free C compiler and $40 (or so) programmer and tested using standard breadboard.
Thanks for the advice, though. I realize going AVR or PIC may result in not enough horsepower, or maybe I need to network microcontrollers.
Reply to
MrMJPEG
I doubt you'll ever find a single piece of hardware that's perfect for everything, and it's not uncommon to use a variety of tools to accomplish a variety of tasks. Your xDOF camera crane is a major piece of work if you need to throttle a heavy piece of equipment acround a stage with any accuracy. I doubt a single microcontroller, with the possible exception of something DSP-based, will work, and maybe even then one MC per axis or two.
So...the thing is not to worry about it. Find a platform that's flexible enough to move to the next level, without having to relearn everything. I'd probably go with the AVR Butterly as a starter tool. It's cheap, supports GCC (and Bascom, if you want it), and is designed to be a development introduction to the AVR core. I mean, how can you go wrong for $20, and it even comes with an LCD! You don't use a separate programmer with it; just a cable and included software. For $100 you could buy five Butterflys, one for each axis of a 5DOF motion control crane.
Since Bascom is a variant of QBasic, if you're already familiar with that, it won't be a steep learning curve, and even if you decide to go to C later on, it's more of a matter of learning some different syntax. With any language you need to understand how the hardware does its thang -- how the registers work, the limits of input capture pins, how to work the hardware timers and interrupts, etc.
AVR Freaks
formatting link
is where you want to go for anything AVR-related. They have tutorials, links to tutorials and books, and a very popular forum. Nice bunch of people. Don't expect a book like the ones for the Basic Stamp. Parallax has done an amaxing job of providing great documentation on their product, but from the sounds of it, the Stamp won't have the horsepower you need down the road.
-- Gordon
MrMJPEG wrote:
Reply to
Gordon McComb
This looks interesting; thanks for pointing it out.
One thing that's still not clear to me: what sort of cable are you talking about, and will the included software run on my Mac OS X machine? If not, is the whole thing useless, or can I download other software for it somewhere else?
Thanks, - Joe
,------------------------------------------------------------------. | Joseph J. Strout Check out the Mac Web Directory: | | snipped-for-privacy@strout.net
formatting link
| `------------------------------------------------------------------'
Reply to
Joe Strout
For your moco project, you are going to need timers. At least one timer pin per axis, and up 4 per axis, depending on the architecture you intend to use. (unless you bit bang, but that can be exceedingly unpleasant)
a minimal timer pin usage would be 1 timer pin and 1 GPIO pin to do decent step/direction control. THe unfortunate thing is that S/D control is evil. There is no feedback, and the step line often becomes a noise antenna... This assumes an external step/direction amplifier.
Two timer lines can allow an external amplifier to be driven with complimentary pin PWM. this is also enough to get a stepper motor going if you drive an amp directly.
Three timer pins, if of the correct flavors, would allow you to do quadrature feedback on two of them, and locked ani-phase motor control on the 3rd
Four timer pins of the appropriate flavor will allow you to do quadrature feedback on two of them, and complimentary PWM on the other two.
A 2 axis mo co system, on the cheap, is non trivial, but you can start messing with smaller micro controllers.
A Pluga A Pod at $100, is not a bad way to go. You can close a servo loop, drive a servo motor, and take commands via CAN, SPI, or serial.
The CF interface will be one of the areas that is tough. It is a parallel device, and thus eats up a lot of pins. The SD memory is serial at least.
I suggest playing, but there will come a point where you should stop building on a lesser micro, and redirect your efforts towards what you really need. The biggest, most frequent mistake I see, is people overloading their microcontrollers, when they should be redirecting.
Reply to
blueeyedpop
More work for Mac users, but (supposidly) it can be done. You will need a USB-to-serial converter, as the Butterfly is programmed serially -- common on newer MCUs with a built-in bootloader. You will need to snag the AVR-GCC tookset for the Mac. Check out AVRFreaks; they may have some pointers. AFAIK, Atmel's toolsets are all PC based.
While we're on the subject, all you really need is an old PC with a Pentium III and 256M or so of RAM. You can probably find these at Goodwill for talking about, and will the included software run on my Mac OS X
Reply to
Gordon McComb
I'll second that. I found a used Dell for around $75 including 17" monitor. Its much easier because it runs most of the software thats out there and it also has two DB9 serial ports -- which almost all MCU dev boards require.
Reply to
Mark Haase
I rarely throw away old PC's, but I do cannibalize them. SO I have a PII/300 & Athlon 866 collecting dust in my basement.
I like the AVR/Butterfly suggestion. AVR vs. PIC reminds me of the old Amiga vs. PC argument of 15 years ago. One is clearly superior but the other is in wider use. Although this time I don't see the AVR disappearing.
The motion control discussion by blueeyedpop is WAY over my head at this point. But thanks! I just mentioned it to show where I want to end up. That's YEARS away. I know there are all sorts of considerations I didn't mention like counterweights, regidity, encoding (do you need encoders to find a home position with geared stepper motors?) along with memory and joystick interfacing.
Here's roughly how I'd like to progress -Blinking LED / Thermometer / LCD driver -Servo control -Stepper control -Single Geared stepper controling a platform upon which a camera will be mounted. Program determines movement. Verify accuracy of multiple runs. -Potentiometer control added. -Add ability to save data to internal memory (if possible) and repeat recorded moves.
I expect just the above to last a year or so. Then there'd be recording to external memory. After that, adding muliple axis. Maybe networking.
Thanks for all the help! It is comforting knowing there are knowledgable people out there to help. But, I'd REALLY like to know, what the heck IS a bootloader?
Reply to
MrMJPEG
Thanks. I have a serial adapter already; sounds like I should be in good shape.
Yes, but then I'd have to actually *use* Windows, which I find find unpleasant -- and what's the point of a hobby if it's unpleasant?
I may break down and do that someday, but I'll put it off as long as possible.
Thanks, - Joe
,------------------------------------------------------------------. | Joseph J. Strout Check out the Mac Web Directory: | | snipped-for-privacy@strout.net
formatting link
| `------------------------------------------------------------------'
Reply to
Joe Strout
We're not going to tell you! Seriously, spend some time around AVRFreaks or read one of the many tutorials on programming the PIC or AVR, and you'll learn this and much more -- because there is MUCH more to learn!
Suffice it to say, consider that every time a PC starts (boots) it has to reload its software into its blank memory. It uses a firmware BIOS for this. The same with a microcontroller that uses a standard serial port for loading softweare into it. At the very least the MCU has to have basic software resident in it to tell it to listen on this port for new instructions. AVRs don't have a firmware BIOS, but they can be made to reserve a portion of its Flash memory for this wake-up-and-take-my-new-program code.
I'm sure the explanation on AVRFreaks is much better and more concise. It's what you get for asking questions here!
-- Gordon
Reply to
Gordon McComb
I am also looking for a good micro-controller development platform for a "show-bot" that I presently have tethered to an old PC running DOS.
I was looking through the Digicom Catalogue and saw what appears to be a complete Z8 development kit, including MCU and Board for just $50 CAN (I guess about $40 USD). That appears to be much cheaper than the PIC or AVR kits.
Also are there any comments on the use of 8051 or H8 series?
Are not the 8051s an industry standard and the H8 used in the Lego Mindstorms?
Reply to
UFO Joe
Not really -- the AVR Butterfly looks like a great starter kit for $20 USD.
Best, - Joe
,------------------------------------------------------------------. | Joseph J. Strout Check out the Mac Web Directory: | | snipped-for-privacy@strout.net
formatting link
| `------------------------------------------------------------------'
Reply to
Joe Strout
Sigh! Why do beginners ask for help, when they don't want to listen to any? Oh well...
That mythical $5 microcontroller strikes again, the bane of all small budget control projects, preventing sales for vendors, and success for beginners, alike. I've commented at length on this phantom before.
formatting link
So here's what my 25+ years of experience tell me, if you care to listen.
AVR's and PICs in general fail your Test 1 (doesn't become to difficult) (particularly for someone who doesn't know what a boot loader is) and fail your Test 2 (too limited to accomplish what you want) if the axes of motion exceed ~approximately one, and then only if programmed in assembly language using advanced interrupt techniques to have processor enough left over to allow the networking to happen. (Basic is out of the question, C is marginally possible, maybe, given the computing ability of these processors.)
You'll have to do one very hard development, one of five, for control on each axis, with an equally difficult communications module built-in; and another difficult development for a separate micro for gathering, managing and coordinating the communications with the 5 slaves. (BTW: Usually bugs in these type of protocols aren't exorcised without thousands of dollars of test equipment, scopes, logic analyzers, in circuit emulators and the like.)
By your numbers: free C, 6 processors $5 ea., $40 programmer, not including breadboard, crystal, resistors and caps, regulators, etc., which are ignored. For $70 (less ingored parts which are probably double that) you will have something that only might work if you were a professional, experienced and very diligent programmer, using a suite of expensive development tools.
Or for $99 you could have a finished IsoPod(TM) system that was designed for 6 axes of motion, has a multitasking operating system, and (a couple) high level language to get it done.
So when you consider you could have professional quality motion control on 5 axes of motion, and still having processor speed left over, doing a better job than half a dozen (mythical) $5 micros could hope do... perhaps the IsoPod(TM) isn't MUCH more of an investment than than is essentially necessary. Otherwise, it looks like you can end up with a real time sink and money hole when you're done and it still doesn't work reliably.
Oh, as for references, Panavision uses IsoPodX(TM) based system on their Super Techno Crane in their new BackPanPlus tracking system to monitor five axes of motion (pan, tilt, swing, boom and telescope) and control two (pan and tilt). It also does closed loops on the outputs, a pot-load of real time f.p. trig. for position computation, out-of-range monitoring, and also interception, modification, and retransmission of a complex communications protocol. And the processor still isn't tapped out. Just to mention some users you might have heard of, Oprah has one of these crane permanently built into her new TV set, Spielberg in his some of his latest movies.
Reply to
Randy M. Dumse
My first motion control project, and first real microcontroller project was a 2 axis system. H Bridges, motors, A/D converters, gears, the works.
It can't hurt to plunge in as deep as you care to. For the record , the second was a single axis, then I went on to a three axis, four axis, and five axis, and a bunch of multi-axis wierdos. For the record, FORTH was in all but two of them.
The easiest of them had the bigger micros in them. There is nothing more fustrating than coding in assembly to get the speed you need. There is nothing more painful than cutting functionality to save room.
The big mistakes beginners make is not recognizing what is simple and what is complex. A big scary 16 bit micro may look bigger and scarier than a Pic or an 8 bit AVR, but personally I would rather do what I need with a 16 or 32 bit micro that is seemingly more difficult, than have to operate in a tiny little 8 bit box...
The most important thing is having a roadmap to follow. If you can start in with good examples, you are nearly guaranteed success.
Sure, starting in on an 8 bit micro can't hurt, but never be afraid to throw everything out and start over, it is often the fastest path.
Reply to
blueeyedpop
cost of a starter dev kit for AVR is the cost of one AVR uC. Let me explain: - C compiler: free, AVR-GCC - Programmer software: free, avrdude (for example) - hardware programming interface: free, (everybody has a parallel port cable lying around, right ?) no additional components necessary.
:-)
bruno
Reply to
bschwand
You can do hard real-time motion control of any number of axis using one timer only for all axis.
Think interpolation of motion between axis, not independent square wave generation...
bruno
Reply to
bschwand
Huh? You mean you plug the "chip" directly onto the end of a parallel cable?
Or, do you mean that it programs via 8 data lines that you can fairly easily hard-wire to the end of a modified printer cable.
Or, is the AVR a mini-board with chip mounted?
Thanks for the quick response!
Reply to
UFO Joe
pretty much, yes. You can make a programmer that needs no external components. My programming cable is just that, a cable. The AVR can be serially programmed in-circuit (useful to upgrade firmware without removing the chip from the board). There is software that will bit-bang the serial stream on the parallel port. This is what I use:
You can parallel program the chip also, but in that case you need some 12V supply I believe. the new AVRs also support self-programming by a boot-loader, so once a boot loader is installed on the chip you can program it through the standard serial port. I have not tried that though, but I am sure there are some open source bootloader and clients out there.
bruno
Reply to
bschwand

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.