microcontrollers under $50?

May 22, 2007 43 Replies

A couple boards for AVR and one for PIC. These boards are well under $50,

- Arduino:

formatting link
- ARC Controller:
formatting link
The second board above fits MarkIII sumo platform from
formatting link
- The MarkIII also has controller board using 16F877

- Pandit

A couple boards for AVR and one for PIC. These boards are well under $50,

- Arduino:

formatting link
- ARC Controller:
formatting link
The second board above fits MarkIII sumo platform from
formatting link
- The MarkIII also has controller board using 16F877

- Pandit

A couple boards for AVR and one for PIC. These boards are well under $50,

- Arduino:

formatting link
- ARC Controller:
formatting link
The second board above fits MarkIII sumo platform from
formatting link
- The MarkIII also has controller board using 16F877

- Pandit

Thanks, that does look interesting. These Stellaris processors look pretty neat -- 32-bit, and (perhaps most importantly, considering the discussion in this thread!) they appear to have pretty extensive documentation. Certainly worth looking at more deeply.

Best,

- Joe

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

Yes, all true, but a bit pedantic, don't you think? If the tools (including, for example, hardware that requires a parallel port) only exist under Windows, then I will refer to it as a Windows-only MCU as a shorthand for "MCU which can only be programmed under Windows without going to a ridiculously Herculean amount of effort."

Well then no, I couldn't, since I don't have a Windows machine with a parallel port, and I'm unwilling to sell my soul just to accomplish that step. Better alternatives are out them, I'm certain -- it's just a matter of digging them up. (Indeed, I already have one -- the Coridium ARMexpress -- and I'm just looking for others.)

Best,

- Joe

You're missing the forest for the trees. I'm talking about the AVAILABILITY of tools. There are programmers for most every popular MCU for the Mac, Linux, BSD, and other operating system. They aren't always as easy to set up as the ones in Windows. The choice is how much effort you want to put into getting started. There are a lot of Windows-based solutions that make MCU programming very easy, literally a 10 minute setup.

I'm not rrying to convince you to embrace Windows, just stating a fact of life.

-- Gordon

Thanks, Wayne. I've followed your RoboBriks2 project for a while, and been very impressed. This does look like a decent controller.

Best,

- Joe

Oh, you must mean avr-libc:

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

avr-gcc is the compiler that WinAVR installs.

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

formatting link
Project: Micro Raptor (Small Biped Velociraptor Robot)
formatting link

Thanks -- that's a neat one! Uses Wiring, which John pointed out as a good possibility for beginners. I don't really know anything about Wiring yet, but I'll certainly look into it.

Also looks interesting.

Thanks again,

- Joe

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

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:

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

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 (

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

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

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

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

Look up avrdude... (compliments of my brother Dave)

Later, Jon

-------------------------------------------------------------- Jon Hylands snipped-for-privacy@huv.com

formatting link
Project: Micro Raptor (Small Biped Velociraptor Robot)
formatting link

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

formatting link
Click on projects, Click on avr.

Later, Jon

-------------------------------------------------------------- Jon Hylands snipped-for-privacy@huv.com

formatting link
Project: Micro Raptor (Small Biped Velociraptor Robot)
formatting link

Hi Joe

You sound a bit like I was a couple of years ago.

I wish I could say something brief, but you asked for it... :-]

It sounds like you are looking for a controller *board* (printed circuit board, or PCB).

It is often a compromise of many variables, and trade-offs. There are more permutations and combnations than you can poke a stick at.

There are several very good books on amateur robotics, some written by people here. Some have detailed help in building specific projects, including sheet-metal fabrication and circuits and even home-made PCBsas well as all source code. They mostly cover BASIC programming (except Myke Predko's book covering C and the free limited version of Aussie Hi-Tech PICC compiler). Something you need to be aware of is that the BASIC compiler PIC BASIC Pro (or the superior Proton+ PIC BASIC compiler) are expensive @ USD $250. I discovered these details after purchasing some of these books.

It is also noteworthy that the BASIC Stamp PBASIC code is very similar to the examples given in these books, so it may be cheaper to buy a BASIC Stamp, as the byte-code interpreter and programming harware are economical. But you could always sell the BASIC compiler later and move up to C for free, or half the cost for buying the CCS C (outstanding) compiler.

I (as have many people frequenting this group) have done a LOT of similar research on 'controllers', robot kits, microcontrollers, compilers, IDEs, and programming languages, and the list doesn't stop there... Some here have written books and write articles for magazines.

*This is a good place to start. Research and planning are probably the most important phases in a robot project.* You are on the right track.

There are many factors to consider, not just the cost of a 'bot controller. It's like a non-programmer interested in robotics hardware, but just wants the cheapest compiler/IDE, and doesn't really want to learn how to program! :-)

Or a programmer who wants to program GUIs and looks for the cheapest compiler and IDE say like Bloodshed Dev++. You need the right tool for the right job.

You can buy a pre-built robot that to use a programming term, encapsulates the hardware issues, and has a diagram-based programming paradigm and engine, but at the cost of many hundreds of dollars.

You can save lots of money and get a free microcontroller sample from

formatting link
develop circuits on a solderless breadboard, build your own programmer, and use a student-version of a C compiler, at the cost of more time spent on hardware.

You can buy a BASIC Stamp with the most comprehensive support and resources in the world, only requiring a simple serial cable for programming, with a free IDE and byte-code interpreter - but the controller boards and robot kits are relatively expensive, and the disdavantage (in my opinion ) of having to use BASIC, and a lack of performance for more advanced demands. Although it *is* a good place to start, and you could always sell the gear later on a Parallax forum. Then later when you are more confident you could move over to C programming and a more powerful controller, and building your own circuits and hardware.

This like a beginning programmer learning procedural programming in C, then moving up to OOP in C++, then to Windows programing, then a RAD environment like Borland Builder, VB or VC++, etc.

To be a professional programmer doesn't happen by magic, it takes hard work, maybe a university degree, experience, patience and time. It's the same with any field of endeavour. Robotics is no exception.

*The US amateur robotics magazine "Servo" had/has a series of articles on robotics on USD $50 per month from what I have read, it will give starters like yourself practical advice on 'How To' step-by-step robotics, as well as being of interest to others with some experience.* Coincidently, I used the same gear-box and motors for my first 'bot, the Tamiya kit is excellent.

I am building my second 'bot using a Mark III from

formatting link
The controller board is USD $30, and the optional Sensor board (recommended)is $20 - right on $50. There are plenty of sensors to be bought at reasonable prices.

Support (limited) for programming and hardware is via a yahoo! group.

The microcontroller (uC) is a PIC 16F877 or 16F877A with a bootloader loaded on it, requiring only a serial cable to program it (and a compiler & IDE of course).

*My experience with Futurlec is poor documentation and supporting code for a starter, and the borad is not really commonly used by many roboteers.*

Hope this helps, without too much confusion!

:-]

Dale

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required