microcontrollers under $50?

A couple boards for AVR and one for PIC. These boards are well under $50,
- Arduino: http://www.sparkfun.com/commerce/product_info.php?products_idf6
- ARC Controller: http://maximumrobotics.com/store/index.php?main_page=product_info&cPathG_26&products_id
The second board above fits MarkIII sumo platform from http://www.junun.org/MarkIII/Store.jsp
- The MarkIII also has controller board using 16F877
- Pandit
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

OK, good point. I had in mind the "pure" gcc toolchain, i.e. command-line tools that would work under Linux and OS X. I'm pretty sure such a toolchain exists, but I don't know how to refer to it in such a way as to clearly distinguish it from WinAVR.
Best, - Joe
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
On Wed, 23 May 2007, Joe Strout wrote:

Oh, you must mean avr-libc:
    http://www.nongnu.org/avr-libc /
under a 'BSD license, I believe, and the basis for the Smiley Book, albeit an earlier incarnation (as some of the machine constants have changed name since the book was written) ... coupled with gcc-avr, you have an open source library which can X-compile on linux, FreeBSD or other "good" os, and AFAIK, there is nothing to prevent it from working even on Mac OSX 8-). No soul-selling required.
Rob.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

avr-gcc is the compiler that WinAVR installs.
http://www.avrfreaks.net/wiki/index.php/Documentation:AVR_GCC
It (avr-gcc) is available under several platforms...
I have a programmer for AVR chips that uses USB, available from Digikey for about $40.
Later, Jon
-------------------------------------------------------------- Jon Hylands snipped-for-privacy@huv.com http://www.huv.com/jon
Project: Micro Raptor (Small Biped Velociraptor Robot) http://www.huv.com/blog
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Jon Hylands wrote:

I am getting ready to buy a USB AVR programmer. Since I value *my* time, I am willing to pay a premium for a USB AVR programmer to avoid having to hassle with Windows. (I'm sure people can be productive under Windows, but not *me*.) I only have a laptop, so a parallel port is not an option.
I assume the AVR programmer you are talking about is the ATAVRISP2. Has anybody cooked up a way of using it from MacOS and/or Linux? My Google search did not turn up anything interesting.
Reversing the question, how do people running MacOS and/or Linux program AVR microcontrollers?
-Wayne
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Wayne C. Gramlich wrote:

Several people have done it, but I don't think there are many (any?) commercial products that makes it a slam-dunk. I've seen some pages here and there (just checked and they seem to be current; try the pre-builts from Matt Wright's Web page here for starters: http://ccrma.stanford.edu/courses/250a/toots/avr-osx.html ).
I am not AT ALL interested in an OS flame war, but being someone who has used both Macs and PCs for years -- I was one of the founding contributing editors for MacUser, and my first 5-6 books were on the Mac -- I find it much, much easier to just have a spare junk PC with Windows 98 on it laying around. For some things Mac-related Resistance is Futile. I prefer manual KVM switches, as the automatic ones don't seem to like switching between older PCs and Macs, but the ancient PII I use for my controller dev work is ONLY used for programming microcontrollers. It sits under my desk. I hate Win98 but it's just the OS; I boot the machine, start my program IDE, start the programmer, and switch between them. The OS is a total non-issue.
I really don't understand why people go to so much length when folks practically beg to give away their old computers, often with copies of Windows already on it. Bill Gates get no extra money for these. I use an old Pentium I with Win95 to run my CNC. It is not a "Windows" machine to me, it's a CNC controller machine.
-- Gordon
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Gordon McComb wrote:

Gordon:
For me, it is about productivity. In my current Linux environment, I use the Kits R Us K149 programmer to program my PIC's. The protocol is published, so somebody wrote up a quick command line interface to drive the K149 in C. The vendor provides a Windows only pain in the rear GUI interface. I have written a short script called "burn" which takes the name of the source file, runs the compiler, looks up the processor (e.g. PIC16F688, etc.), erases the chip, and programs the chip. I read newsgroups like comp.robotics.misc while the computer does all the work. I can find a bug, fix it, and have the chip reprogrammed in ~2 minutes.
In my privious environment, I used the Warp-13 which was plug compatabile with the the PICStart+. In order reprogram a chip, I had to: 1) compile the program, 2) copy the .hex file over to the windows box, 3) fire up MPLab, 4) select the chip in the GUI, 5) erase the chip in the GUI, 6) using a file chooser, go find the .hex file, and 7) program the chip. I would automate step 1 and 2 with a script, for step 3) and 4) I would leave MPLab up and running, steps 5) 6) and 7) were always manual, since I *had* to use the GUI. The bottom line is that it was taking closer to 5-8 minutes to turn a chip around.
I understand all about KVM switches and all of that, but having Windows in the loop just slows me down by a lot. Thus, I am willing to pay a premium to get Windows out of my development loop. I'm not willing to stand on my head and pay $1000's to do it, but paying double or triple for the programmer, if it it lets me skip another stupid Windows GUI program is a bargain in my book. In fact, the K149 cost less than the Warp-13, so I actually saved money when I was forced off the Warp-13.
For me, it is not about OS religion (I'll pass on that discussion, too), it is about getting thd job done efficiently and *fast*.
My $.02,
-Wayne
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Wayne C. Gramlich wrote:

Isn't this less of a Windows issue than a what-someone-else-has-solved issue? It's just really too simple to write command-line scripts in Windows, and it can be in your favorite programming language: Perl, PHP, C, C#, whatever. Not to tout Microsoft, but they even give away for free stand-alone versions of the .Net languages, and all of them can create command-line programs. Naturally they are much faster.
Seems to me this isn't Windows, but the fact someone wrote a command-line program for the box you happen to be using, and if someone wrote a command-line program for Windows it would have the same speed benefit.
I recently met a person who never used the OS/X GUI, and did everything in terminal mode. He's MUCH faster that way for the things he does (mostly Mac network integration), but in doing it that way, there's nothing taken away from the OS/X GUI. It's still there and he just doesn't use it. It's for other people.
By the same token, you could boot up Windows XP, go into Cmd mode, and work with it all day as a command-line operating system.
So I really don't buy this notion that it's the OS, as even Linux has X-Windows and a slew of GUIs to pick from, but rather what you choose to use. The command-line is always there in all the major OS'es. It just comes down to whether someone has written a command-line program you like, or if you want to bother writing one yourself.
-- Gordon
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Gordon McComb wrote:

Gordon:
You are correct, it has nothing to do with the OS. It has everything to do with the vendor providing something useful.
I'll take a just little umbridge at the "or if you want to bother writing one yourself". The implication is that, I could not be bothered to write one myself; I assure you, that I would be delighted to write a CLI interface for my programmers if a CLI does not exist. The prerequisite is that the protocol specification for the programmer be documented. Alas, almost all commercially produced programmers seem to skip the "document the protocol" part.
For example, in the PIC environment, the gold standard of programmers is the PICStart+. I would love to use the PICStart+, but it only comes with a Windows GUI (MPLAB). The protocol specification is not published by Microchip. Many people have politely asked for the protocol spec. and Microchip has just as politely declined to provide one. When we invite Microchip to come out and give a talk at the club, someone always asks "when are you going to port MPLab to Linux or release the PICStart+ specs." the response is always 'that is the most commonly asked question that everybody asks' followed by a response of 'we do not know'. I assure you, that if Microchip would publish the PICStart+ specification, either I or somebody else will bang out a CLI for it in no time flat. Until then, I'll send my money to vendors that *do* publish their protocols specifications (e.g. the Kits R Us K149.)
In short, it is not the OS per se, it is whether the vendor provides the enough documentation to work around the inefficient GUI interface.
Anyhow thanks for the AVR mini pointer. I'll ask one of my AVR proponents if they have CLI for the ATAVRISP2 yet.
Thanks,
-Wayne
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
On Wed, 23 May 2007 15:13:28 -0700, "Wayne C. Gramlich"

Look up avrdude... (compliments of my brother Dave)
Later, Jon
-------------------------------------------------------------- Jon Hylands snipped-for-privacy@huv.com http://www.huv.com/jon
Project: Micro Raptor (Small Biped Velociraptor Robot) http://www.huv.com/blog
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
On Wed, 23 May 2007 15:13:28 -0700, "Wayne C. Gramlich"

With more detail:
He said he had to create a udev entry for it, and he uses this command line:
avrdude -P usb -c avrispmkII -p atmega168 -U flash:w:flasher.hex:a
The udev entry is in the 51-avrisp.rules file that's in http://websvn.hylands.org/ Click on projects, Click on avr.
Later, Jon
-------------------------------------------------------------- Jon Hylands snipped-for-privacy@huv.com http://www.huv.com/jon
Project: Micro Raptor (Small Biped Velociraptor Robot) http://www.huv.com/blog
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Joe Strout wrote:

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

Really? I didn't know that. But in a board like this:
http://www.futurlec.com/ATMEGA_Controller.shtml
...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
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Joe Strout wrote:

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

Take a look at the PICAXE range www.picaxe.co.uk
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
--

www.minisumo.org.uk

(Remove the "No Spam" to reply by email!)
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

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

If you want a Linux-based microcontroller programming system designed for use without prior programming experience, see "Wiring"
http://www.wiring.org.co /
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    
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Joe Strout wrote:

Looking at the 18X are you mistaking 256 bytes of RAM with the 600 lines of code that's possible? Looking at the release info on the new 28X1 ( http://www.rev-ed.co.uk/docs/X1_overview.pdf ) there's room for 1000 lines of code.
One or two on their form have a few tips for squeezing the most out of these for speed or code size.
Personally I've never pushed them that far but enjoyed the price, ease of use and software features that rivial many more expensive options.

As they aimed at the schools market (tho' I know of commercial applications) they held with the windows base here in the UK. That held me to windows on my laptop but that's been changing recently.
From the forum Technical said:-
"Linux compilers are almost complete and once our final X1/14M development/documentation is complete will be beta-tested and released. We have delayed release as we wanted to support *all* the new parts on Linux."
best regards, colin
--

www.minisumo.org.uk

(Remove the "No Spam" to reply by email!)
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Joe Strout wrote:

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:
<http://gramlich.net/projects/rb2/controller28/rev_d/index.html
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):
<http://gramlich.net/projects/rb2/modules.html
Pictures of the modules can be found here:
<http://gramlich.net/projects/rb2/photos.html
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:
<http://gramlich.net/projects/rb2/custom_pcbs.html
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
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Hi Joe,

This one is interesting: <http://www.luminarymicro.com/products/ekk - lm3s811_evaluation_kit.html> Available from Mouser for $49.
-- Dave Hylands Vancouver, BC, Canada http://www.DaveHylands.com /
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.