microcontrollers under $50?

I'm working on a comparison table for low-cost robot controllers,
defined as under USD$50.
So far I've found a number of items from Futurlec, Pololu's Baby
Orangutan (mega48 and mega168 versions), Coridium's ARMmite and
ARMexpress LITE, and the Parallax BASIC Stamp 2.
Anybody know of any others I should consider?
Many thanks,
- Joe
Reply to
Joe Strout
Loading thread data ...
Joe:
What is your definition of a Robot Controller? Most of the PIC's and AVR's have more capability than a BS2. For example, a PIC16F88 comes in a DIP-18 package, has 16 pins of digital I/O and 7 of those pins can do A/D as well. There is very little that a BS2 can do that an 'F88 can't do as well. Of course the 'F88 costs less. So it all hinges on your definition.
-Wayne
Reply to
Wayne C. Gramlich
I'm not *so* concerned about buying a programmer, though it is a bit onerous to have to do so. I have a decent job now, but a few months ago an extra $60 was a fairly large obstacle, and I still sympathize with would-be robot hobbyists who are in the same boat.
But a bigger problem for me is all the support stuff these chips seem to require -- capacitors, resistors, etc. An internal oscillator does reduce the part count somewhat, but not to zero, right? How's a poor software guy like me supposed to know what these parts are and where they go?
I know, I know: read the datasheet. I've tried that. At least from what I couldn't find, Atmel chips don't have a data sheet; they have a data *book*, filled with hundreds of pages of dense technical jargon. For PIC chips, I think the situation is better; you can actually buy friendly books on PIC development for beginners. But I've never found such a thing for the AVR chips. But a well-designed board takes care of most of that nonsense for me (and in much more reliable and compact way than I could do myself).
Then there are the ARM chips, but I don't even know if those are available in through-hole package. They seem to offer substantially more power though. For a main controller, I think that's important, though I certainly see a use for secondary controllers that don't need a lot of speed or memory.
Best, - Joe
Reply to
Joe Strout
In a similar situation, I got the Smiley book, and an AVR Butterfly, WinAVR, and the gnu tools which go along with, and for under $20 a copy (while they last), a butterfly has an LCD, a couple of ports, enough flash for a project, a joystick, piezo speaker, and free tools (see the previous posting on Atmel 169).
Agreed. As a sw guy, it is quite easy to blow up hw, and given the incantations for just calibrating a clock speed (see above), there are ridiculous levels of detail to write to the bare iron, but then again, that's what you have to do to host an OS ...
Smiley book, and the accompanying tools and library were a big help, and C code examples to bit-bang, write to flash, etc etc. etc.
Run, don't walk, and look at the Digikey deal for the NGW100 AVR32 network gateway $69 will get you; ... 2 ethernet, 1 usb, 1 serial, #@$#@ load of ram/flash, and on board linux/u-boot to boot, with a nice wiki to offer assistance, and even a flashy lighty thingy or two (LED?). This is overkill for your basic robotics controller, but if you want to play, and learn about embedded programming, I don't think you'll find a better bang for the buck ...
oh, and Digikey is also offering an STK-500/ATMEL ICE2/jtag bundle for about $180 bux. The 500 works with the Atmega's, and the jtag/ICE will work with either the atmega and the avr32 if i read this correctly (just waiting on one of those, so I can x develop uboot/Linux for the AVR32).
Reply to
spam
This is why I like the Atmel line: most of the chips have an internal oscillator that runs accurately enough for most tasks. At most you just need a stable 5V supply, and for the really lazy there are single-component regulators that don't need any/many external components. Total component count two: regulator (which may be optional) and microcontroller. If you want to get cheap use a 5.1v zener and a resistor.
For programming an AVR all you need is a cable with some resistors or diodes soldered in. You can do it in a solderless breadboard, or in-circuit of your robot. You can buy it ready made, or lots of people have circuit designs for it.
I personally went with a real development board that has buttons, LEDs, LCDs and other crap on it because, well, I'm a sucker for convenience. I'd rather pay a few dollars to have something I can just pull out of the closet and use whenever I need it. For the AVR I have the 200, 300, and 500 boards, plus the AVR Easy-3 board from MikroElektronika. If you're interested in these types of boards I highly recommend
formatting link
Customer service is supurb.
Keep looking. There's one by Smiley on the AVR Butterfly, which BTW at $20 (Digikey, others), and is a perfectly good robotics controller. His book costs more than the chip. It's on how to use the gcc toolchain to program the AVR in C. It's written for the beginner.
Since you're a Basic guy, check out Mark Alberts' Bascom AVR, available at
formatting link
The manual is pretty good, the examples are plentiful, their forum is well attended, and the demo version is free. It's good for programs up to 2K -- big enough for most jobs. I do recommend springing for the product, however, as it's worth the investment.
Now, why aren't there more books on the AVR? Most of the PIC books were released before the bottom dropped out of the technical book market. Electronics books are poor sellers these days. Everyone is getting their info from the Internet.
-- Gordon
Reply to
Gordon McComb
Take a look at the PICAXE range
formatting link

It might be a little to simple to call it a PIC that can be programmed in Basic with little more than there software, a serial cable and a couple of resistors.
The pricing is excellent and even quite young kids can get their head round programming through the flowchart programming features.
Best regards, colin
Reply to
Colin Durrans
Only if you have a machine with a parallel port, no? I haven't had one of those since... well, ever. Serial ports are easy, parallel ports not so much.
I've had one for about a year now. Haven't yet managed to program it. Compare this to the Coridium ARMmite, which despite various Windows installation/driver hassles, I successfully programmed within weeks of getting my hands on it.
But I agree the AVR Butterfly should count as a robot controller. Just an onerously difficult one to use (but probably no more so than other many others -- this stuff is far harder than it should be).
I'll check out the book, though; that may be a big help.
That's a Windows app, isn't it? For my purposes, I'd rather give myself a nice paper cut and pour lemon juice on it than choose something that requires Windows. I recognize that opinions on this may differ, of course.
Yes, I can see that. There's probably also a factor of more books appearing the longer something has been around.
Thanks, - Joe
Reply to
Joe Strout
This may be one of the reasons you're having so much trouble. Do yourself the favor of finding an old used Windows 95/98 Pentium II box, which most people will just give to you. If you have to buy it don't spend more than $25. Use it just for programming your microcontrollers. There are FAR more solutions for Windows, and many will work in the older versions of Windows. You'll get a parallel port, too.
It'll hardly be considered a Dance with the Devil for just that, and you'll have some progress rather than frustration. Though I use both PCs and Macs, I dedicate an old PIII Compaq just for microcontroller work. A KBM switch makes it easy to have several machines on the desk at once.
-- Gordon
Reply to
Gordon McComb
Well, actually, there are no other parts, just supply 5 volts.
The biggest problem with microcontrollers is their initialization, but once you have one example of a program that works, it can usually be modified forward to keep it working and doing useful things for you. Getting that first program working can be a real bear tho'.
Actually, a well designed board does not really help get the first program working. What helps is that the board comes with a demo program that somebody else has already figured out.
---------------------------------------
The real problem you are facing is a documentation problem. There is tons of stuff out there that makes a fine and dandy robot controller for a low end robot, but the amount of stuff out there with adequate documentation is much harder to come by. The spec. sheets for PIC's and AVR's are complete but hardly easy reading.
-Wayne
Reply to
Wayne C. Gramlich
Thanks. But ow, 256 bytes of RAM on even the highest-end one... that seems really tight! I can imagine projects where it's plenty, but I can also imagine bumping into that limit pretty easily.
Still, it's a good one to consider. It's a shame the software only runs under Windows, though. :(
Best, - Joe
Reply to
Joe Strout
Joe:
Now that I have a better feel for what you are looking for, I think I can reasonably put my Controller28 board from my RoboBricks2 modules collection up for consideration. Here's the URL:

Basically, it is 1.25 inches by 2.50 inches with 4 holes across the top and bottom that can be snapped onto the top of Lego/Mega Blocks/Rokenbok plastic bricks. It has a 28-pin .3" DIP socket that can accept 28-pin microcontrollers from either Microchip or Atmel (e.g. PIC16F876A, PIC16F767, PIC18xxx, ATMega48, ATMega88, ATmega168, etc.) There is a 16MHz ceramic resonator. It has the 1x6 header for the Microchip ICD2 (In Circuit Debugger 2 -- aka the hockey puck) and it has the standard 2x3 header for Atmel AVR in-circuit programmers. In addition, most of the Atmel and Microchip microcontrollers can be preprogrammed with a boot loader so that programs can simply be downloaded from a host development environment without requiring a programmer. It has an on board 5V@1A power fused power supply with on/off switch and LED. Lastly, it has a 2x5 shrouded RoboBricks2 connector that allows it to interoperate with a growing family of modules using CAN bus physical layer (like RS-485 but just little bit better):

Pictures of the modules can be found here:

The Controller28 board is completely open source in that the schematics, gerber files, and firmware are all published and downloadable. Indeed, if you want more than one module, the following page:

will create a custom .zip file that contains a set of panalized modules in one integrated set of Gerber/Excellon files. (We recommend that you join the RoboBricks2 Yahoo group before doing so.)
A typical cost for the Controller28 is ~$14 in parts plus a board cost for ~$5 for a total of ~$19. Not bad for a robot controller that you don't have to throw away when you get bored watching it follow lines or bounce off walls.
Anyhow, that is my contribution to your quest.
Enjoy,
-Wayne
Reply to
Wayne C. Gramlich
I agree but for avr's you don't need a parallel port.
You can use the atmel equipment(isp , stk500) with windows in parallels or vmware on a mac. Haven't tried the jtag ice yet. Atmel isp mark2 works for avr and avr32.
You have to use windows and linux for embedded systems work unfortunately at the moment there is no alternative.
For some chips there is only windows software. But the second you need commerical compiler support you have to use windows.
microchip pic - windows (microchip software) - hitech make their compilers for mac , windows and linux atmel avr/avr32 - mac osx, linux , windows arm chips - windows , linux and mac osx - note depends on the chips you ae using 8051 - linux and windows - I'm not aware of any mac based compilers zilog - ?? rabbit - windows only
Fpga - free software versions xilinx - windows or linux altera - windows lattice - windows
Alex
Reply to
Alex Gibson
Really? I didn't know that. But in a board like this:
formatting link
...all those extra parts really aren't adding any value beyond breaking the surface-mount chip out to header pins? I see a voltage regulator, and you did mention that; but I also see about a dozen capacitors, five or so resistors, another IC, and a little oval-shaped thingy that I don't know what it is (the crystal maybe?). One of the resistors is serving the on-board power light, and so counts as part of the power supply. But what's the rest of that stuff for?
Too true.
Well, it does help with all that other stuff which you say isn't needed but which I can't help feeling must be doing some good, since all the controller boards have them. :)
That depends on the board. With the ARMexpress, the compiler is onboard. The complete steps to get going are pretty much
1. Connect a serial cable to the ARMexpress serial input 2. Fire up a terminal program and connect to that port 3. Type PRINT "Hello world!" RUN
Getting started with the AVR Butterfly, for example, is a LOT more involved despite the serial bootloader. (Or so I gather, though I couldn't find anyone or anywhere that could actually explain how to do it.)
Yes, that's true. There's also a difference in convenience. You said yourself (IIRC) that you like to put your PIC or AVR on a carrier board that gives you buttons, lights, and other conveniences (which I would guess includes header pins, mounting holes, a power supply, etc.).
I think this depends partly on what you're doing -- if you're working on a prototyping breadboard, or designing your own PCB, then a bare chip (or a DIP board, like the Stamp form factor) is quite convenient, and a big board with header pins is actually more of a PITA. But if you're trying to avoid extensive breadboarding and just bolt a reliable controller onto a bot, then a bare chip or Stamp board is a PITA and a board with headers is more convenient.
What got me excited this week about the Futurlec mini-boards is that they've picked a couple of standard connectors, and made a lot of small boards that (it appears) you could just cable together to make a wide variety of complete packages. Start with a controller, add a switching regulator if it lacks one, throw in a sound (or even MP3) board, an SD card reader, a motor driver or two, and pretty soon you have a bot.
But in the meantime, I find myself doing a lot of breadboarding, and preferring the Stamp form factor. I'd be happy with a chip too if I could just connect a serial cable and talk to the dang thing from my Mac. It sounds like with the right tools, I can almost do that with the Atmel chips, but as you say the docs are lacking.
Hmph. Maybe I'll buckle down and figure out the AVR toolchain. But next month -- this month, I have a bot to build...
Thanks, - Joe
Reply to
Joe Strout
No need; I already have Windows XP running quite nicely in a virtual machine under Parallels. This has a lot of advantages over running Windows on its own real hardware, but it's still Windows.
So it's not that I don't have Windows; it's that I don't want to use it.
I don't want to use it because (a) it's flakey, (b) it's harder to use than a computer should be, and (c) Microsoft is evil and I don't want to support them, or companies which support only them. Oh yes, and (d) I like to think that the stuff I'll make may be widely distributed someday, and a lot of home users have Macs (just ask LEGO).
Well yes, it's true that I don't get that in Parallels. But again, I'll just take my money elsewhere. :)
I can respect this position as logical and pragmatic. But, I'm still in the shopping-around phase, and while I will gather and consider information on Windows-only MCUs, I probably won't buy one.
Thanks, - Joe
Reply to
Joe Strout
The oval thing with the two orange capacitors on top is the crystal oscillator (not strictly needed.) The round black thing to the left is the reset button. The blue trim pot is the contrast adjustor for the LCD daughter board. The black chip in the upper left is the Max232 level converter along with the requisite 4 charge pump capacitors. The rest is power supply, on LED and of course an ATmega128, which is a really, really sweet microcontroller that is only available in surface mount.
[snip initialization]
You missed my point. If I give you a well designed board complete with schematic, you will probably struggle for quite a while before you get the first program running on it. There are a lot of icky picky details that must be right before you get your first blinking LED.
This is my point. The AVR butterfly is a wonderful board for the money. But it is just an overpriced paper weight if you don't know how to cram programs down into it.
I posted my controller28 board in a separate post. In short, power supply (yes), programmer connections (yes), interconnect bus (yes), place to connect a reset button (yes), everything else (no).
It depends upon the robot. If you need an H-bridge or two, and your controller doesn't have that H-bridge, you are in for some real pain. If all you want to do is run a few servos, a pretty bare bone microcontroller might work out.
They are on the right track, but not all of the board use the same connector. More importantly, you have to figure out the sub-program for each and every interface board. In addition, you have to figure out how to get one microcontroller to juggle it all *at the same time*! Some are easy (push buttons), some are much harder (3-axis accel.)
An Atmel chip, plus Max232 (+4 1uF capacitors), plus boot loader will do the job. I'm sure if you visit AVRFreaks, they will tell you all about how to do it.
Good idea -- build a little, learn a little; build a little more, learn a little more, repeat.
Later,
-Wayne
Reply to
Wayne C. Gramlich
Sorry to come back to this, but I knew I'd heard of this before... and in fact I downloaded the first two chapters of Smiley's book (which are available for free from his web site) back when I was trying to get my Butterfly to work. But it didn't seem to say anything about the gcc toolchain; it's written around using WinAVR and AVRStudio.
Does it get into the gcc toolchain later in the book? (I don't see anything on smileymicros.com about it.)
Thanks, - Joe
Reply to
Joe Strout
If you want a Linux-based microcontroller programming system designed for use without prior programming experience, see "Wiring"
formatting link
This is a cute little system developed at MIT to allow artists to program microcontrollers. There's a board that goes with this, but it's actually possible to use any reasonable ATMega128 board if you or somebody builds a pin definition file for that board.
The software runs on MacOS X, Windows, or Linux. And all you need is their one big download to get their development environment and compiler. (Underneath, "gcc" is doing the real work, but they hide that.)
I haven't actually tried this, but it's a cute concept.
John Nagle
Reply to
John Nagle
Hi Joe,
This one is interesting:
Available from Mouser for $49.
-- Dave Hylands Vancouver, BC, Canada
formatting link
Reply to
dhylands
There is no such thing as a "Windows-only MCU," just Windows-only IDEs. You could program an MCU with toggle switches, but would you want to? An MCU just takes hex data; what differs is the toolset you use to create that hex data.
I have to say that in the amount of time we've had this discussion you could have started with a no-frills cheap/demo copy of a popular IDE for the PIC or AVR (yes, it runs on Windows, and might use the parallel port) and programmed your first chip! You'd be well on your way to the next step. No one's telling you that you have to keep that system, but it will teach you a lot.
Experience is never lost, but time certainly is.
-- Gordon
Reply to
Gordon McComb
WinAVR uses gcc as the compiler. You need to read the fine print, though it *is* in the first paragraph of the project page!
formatting link
I don't recall that book discussing AVR Studio, though it might. AVCR Studio is Atmel's IDE. You'd use one or the other.
-- 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.