Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×
Education Robotics

What Micro-Controller Would You Use to Teach With? 175

Rukie asks: "I'm looking into starting some sort of robotics class for my high school, which severely lacks any sort of technological classes. I am now wondering what micro-controllers are best for an educational environment. I definitely want something more advanced than the Legos, but something that won't fly over people's heads. Are there cheap, scaleable micro-controllers for learning in a classroom or at home? I'm curious how my fellow readers have hacked up toys to make their own robotics at minimal cost."
This discussion has been archived. No new comments can be posted.

What Micro-Controller Would You Use to Teach With?

Comments Filter:
  • I like this one [g4tv.com].
  • by JimMcc ( 31079 ) on Wednesday January 31, 2007 @11:32PM (#17838524) Homepage
    Check out http://www.parallax.com/ [parallax.com] and their Basic Stamp series. They have a wide range or processors and great educational programs based on them. The also have robots and robotics based programs based upon the Basic Stamp.
    • by WndrBr3d ( 219963 ) on Wednesday January 31, 2007 @11:48PM (#17838682) Homepage Journal
      I've also used the Parallax boards and I have to agree that they are the best for simple robotics and teaching low level computing in the classroom.

      Personally, I would suggest using their Java [parallax.com] based Stamp, only because your students would not only be learning robotics and electronics, but also a standard language in use everywhere today.

      Their other controllers use a language much like BASIC but is unique to the Parallax hardware, not much value there.

      Cheers!
  • Snuh! (Score:1, Informative)

    by Anonymous Coward
    AVR.
    • Re: (Score:2, Informative)

      by Anonymous Coward
      AVR, and WinAVR (AVR-GCC) for the win.
      • by Andy Dodd ( 701 )
        I have to admit, while I usually prefer open-source tools, CodevisionAVR is an EXCELLENT tool with amazing support.

        CVAVR was what my undergrad microcontrollers class (Cornell's ECE 476) used, and I believe still uses. In the rare cases when our professor found a compiler bug, he would often have a one-day turnaround on bugfixes.

        Admittedly, we were a pretty big customer with a large site license, but I've heard many good things about CVAVR.
        • by Nutria ( 679911 )
          CVAVR was what my undergrad microcontrollers class (Cornell's ECE 476) used, and I believe still uses.

          Except that a Senior-level (4xx is still senior level?) University course is populated by much more technologically advance group of people than a High School class is.


  • Parallax sells these simple microcontroller devel systems with mini breadboards and a circuit project book. I've seen one for $60 or $80 at Radio Shack. I'm way beyond that though, so I have not really tried them. The big downside is it's probably programmed in BASIC.
    • Yeah, well, it's a little microcontroller stamp, what did you expect? Assembly, perhaps? Eh... Well, yes, it's quite amusing to read through the manual and find that you are allowed to have calls up to four GOSUBs deep! :)

      Anyway, it seems like a decent kit, as far as those go. We are using one of their kits (the BOEbot) in our AI class (Wake Forest University), and it is replacing the Lego Mindstorms this year for the first time here. Ultimately, I believe, we plan to attach it to a Bluetooth adapter and ju

  • options (Score:3, Informative)

    by drrrl ( 949518 ) on Wednesday January 31, 2007 @11:39PM (#17838590)
    I like the Brainstem from Acroname. I haven't done any big projects with one, but I've played with a couple and they definitely hit the spot in terms of easeability, powerfulity and economicalness. I've used the SV203 from Pontech in the past and it's a solid & simple board. Great if you're keeping the board tethered to a computer and not doing any actual processing on board. Brainstem gives you a little/lot more high level power.
    • Re:options (Score:4, Informative)

      by IceCreamGuy ( 904648 ) on Thursday February 01, 2007 @12:04AM (#17838836) Homepage
      I love the Brainstem, it's got 5 digital I/O ports, 5 analog I/O ports, 4 servo outs, GP2D02 port, RS232 port and an IIC bus. All of the functionality you could need, such as sonar, IR, servo, text-to-speech, even pyroelectric (human heat-signature sensor), and many more are implemented in pre-built, extensive libraries. You can run 4 VMs at once and swap them out among 11 different 1MB programs, with 1MB of shared scratch space. You can also program low level "reflexes" to run independently of the VMs. They're programmed with the TEA, or Tiny Embedded Application, language (you "steep" .tea files into .cup files, which are the binaries :-D), which is a stripped-down, easy to use, C-syntax language that's really easy to learn and program with. The compiler is just a tiny little console that can be downloaded for free and even runs on PalmOS. Did I mention they're really easy to interface with Palm Pilots? They're great for post-intro robotics classes when you want more functionality and would like to really get down into nuts and bolts construction. As well as being cheap and easy to use, there are a ton of kits and libraries for platforms that specifically use the Brainstem. After doing research at my university's robotics lab with several different platforms for over 3 years now, I'd recommend these over anything else, of course, that's just my personal opinion and there's a ton of other great controllers out there, especially the BASIC, JAVA and other Stamp controllers. Here's the link http://www.acroname.com/robotics/parts/S1-GP-BRD.h tml [acroname.com] -Julius
  • PIC (Score:2, Informative)

    by Anonymous Coward
    I would go for PIC: they are cheap, programmers are available everywere, free assembler/IDE and net is full of information. Yes they are stupid small ram devices, but also very easy to use.
     
    • Re: (Score:3, Informative)

      by zarthrag ( 650912 )
      That's what I learned on. Hitech's PIC C compiler is a wonderful companion - and quite powerful. Not to mention in-circuit debugging/programming/emulation, advanced features, serial communication, PWM, and simplified clock construction (xtal, some caps, and you're ready to go).
    • Re: (Score:3, Informative)

      I taught a second-year engineering class to program PICs in 4x2 hour sessions. Most of these students wouldn't have been able to work out basic digital logic or write hello world in C even though they had done the courses.

      The PIC's assembly language is simple enough and with a bit of hand holding they were working out how to read and write from memory locations, and turn on pins at the outpus. Teach them to work out what they need (peripheral interfacing) from the data sheets and most of them actually be
    • 100% agree. Microchip's [microchip.com] products are really great as they do a range of devices from cheap and simple devices up to quite complex ones. They are fun to use and quick to learn - sure, in the real world, high level languages like Java are desired by employers, but these are so abstract that you don't get a feel for the actual workings of the computer. Its vital that people understand how the actual machine works, and there's nothing like a bit of assembler and some flashing LEDs and push buttons to do this.
    • Re: (Score:2, Informative)

      by Raven15 ( 152175 )
      I just recently started my microprocessor programming experiences, and a PIC is what I used. That said, the instruction set is pretty anemic. I didn't like the way that branching worked especially. I'm about to start on my next project, and I'll probably be using an Atmel AVR (ATmega8, most likely).
    • by Temkin ( 112574 )


      Cheap: Yes
      Easy to Program: Yes
      Decent arch to learn on: Hell no!

      PIC's are crap. It's a oddball POS straight from 1975. It has limited addressing modes, small instruction set, no orthoginallity, and is difficult to program in a high level language.

      Looks at modern AVR's and derivative 8051's. If you want a real screamer, try Silabs.
  • The leaf project? (Score:2, Informative)

    by noopm ( 982584 ) *
    The Make magazine [makezine.com] featured the leafproject [leafproject.org] recently which uses a custom board [leafproject.org] [2] [leafproject.org] for their "open source robot using artificial intelligence and vision"
  • Motorola 68HC11 (Score:2, Insightful)

    by Ryan Stortz ( 598060 )
    I'm currently taking a Microprocessors class at Ferris State University [ferris.edu]. We're using the Motorola 68HC11. It's a CISC processor with simple nmenonics. We both have quite a few physical boards, but we also use a Windows-based emulator called Wookie with MiniIDE [ecu.edu.au] as the IDE/assembler.

    I'm enjoying the class so far.
    • by pjwhite ( 18503 )
      My favorite processors are the Freescale 68HC908 series and the Atmel 89C51RC. I use these all the time in my work. I have also done some projects with the Atmel Tiny series which are OK, too. The PIC is very low on my list of preferred devices due to its weird instruction set.
      I like the 8051 because the architechture has been around for decades and I figure it's pretty safe to design into a product with a long expected lifetime. I like the 68HC908s because the instruction set is very nice to work with
  • by StarWreck ( 695075 ) on Wednesday January 31, 2007 @11:45PM (#17838652) Homepage Journal
    The 6808 micro-controller (long version of the name is M9S08GB60) would be excellent for teaching a class on robotics. As its been around since the dawn of time, there's a lot of support readily available for it. Complete, detailed reference manuals are freely available, Freescale will even ship printed copies to you for free. Compilers are available that allow you to program in your choice of assembly, C, or C+. The "M68DEMO908GB60" demo board is available from many online retailers for around $50 which makes it easier to use the microcontroller for prototyping as well as experimentation and class labs.

    What lends the 6808 microcontroller is its Pulse-Width-Modulation components (it has 2 modules, one with 5 channels and the other with 3 channels and all channels can be set up for either incoming our outgoing). In addition to all that it runs up to 40MHz without cooling and includes 4K of RAM and 60K of ROM all on-die, so no extra chips for those. It has more power than you could ever hope to use in a class-room.

    A good example project is available here: http://home.comcast.net/~starwreck/FinalReport.pdf [comcast.net]
    • I second this choice.

      Either that, or the venerable 68hc11 part. 8k eeprom and 192 bytes of ram. Easy to program -- gives early exposure to assembler.
  • PICmicro (Score:3, Interesting)

    by _merlin ( 160982 ) on Wednesday January 31, 2007 @11:46PM (#17838666) Homepage Journal

    The Microchip PICmicro is a very good choice. Try the PIC16F84 [microchip.com] - the chip is cheap, programmers that connect to a PC parallel port are simple to build, a chip can be electronically erased and reprogrammed hundreds of times.

    The assembly language is also very simple. There are only thirty-five instructions and two addressing modes. It's also very easy to calculate instruction timing (for delay loops, etc.). I learned to program those things when I was at high school.

    Things like the BASIC stamp are less than helpful. You aren't close enough to the metal. If you don't like the PICmicro, an AVR chip would be my second choice.

    • PICs Are great, they are even good to integrate with a basic electronics course. Heck, if you wanted to go even simpler you could use picaxe chips. http://www.rev-ed.co.uk/picaxe/ [rev-ed.co.uk]. they use a basic-esque command set thats preloaded on the chip, comes with all software and a programming manual that students can easily read an learn by themselves. The best part is that as soon as they're done the basics, you can move on to actually programming them with native instructions.
    • PIC is the best. A $2 chip will get you persistent memory, flash reprogrammability, and ADC. But remember: 16F84 is old and busted. 16F88 is the new hotness. It is superior to the 16F84 in every way, and it costs less.

      Also, Microchip will give you PICs for free!
  • by Uncle Ira ( 586682 ) <xtos@nOspAM.bigfoot.com> on Wednesday January 31, 2007 @11:46PM (#17838668)
    As much as I love the open source Arduino [arduino.cc] board for my own personal use, and even though the basic STAMP is raher expensive (even with the education discount), Parallax has an extremely thourough set of documentation that is perfect for an educational environment. They have a fee book available for download called "What is a Microcontroller" [parallax.com] that should fit all your needs. It contains a series of predesigned lessons that assume no technical experience for your students. All your lesson plans are done for you.
  • Atmel (Score:1, Informative)

    by Anonymous Coward
    I would recommend either an 8051-based microcontroller or an AVR. Atmel makes both. They're easy to design hardware around, often include on-chip flash ROM, are very well documented, and simple to program. You can also get kits and evaluation boards if you don't feel like building your own hardware.
  • The University of Minnesota just moved to the PIC [microchip.com] because of its ease of programming as compared to the Motorola 6800 series microcontrollers that were in use before. The PIC comes in 8 and 16-bit varieties and has a range of available memory sizes. I'm not sure about pricing, but they are somewhat of a standard "learning" microcontroller, so your students will have a leg-up when they get to college.

    • That is just bizarre. I will never understand why people choose PICs over AVRs in applications like that. Guess it's just a matter of what the instructor or department head is familiar with.
  • by Flavio ( 12072 )
    PIC is a braindead horror show architecture from the 70s, and Microchip's microcontrollers are the hardware equivalent of spaghetti code, built with kludge upon kludge.

    Go with a simple yet elegant architecture, as it will teach good design practice. With PICs these kids will spend a lot of their time writing tricks to compensate for the hardware's flaws, and may get the impression that programming amounts to writing "clever", unmaintainable code.

    Avoid the frustration and go with the AVR lineup. If you want
    • Agree with the PIC vs the AVR. It's the same as the i386 vs m68k... One is a disgusting kluge, the other is an elegant architecture.

      In this modern age, though, I'd ditch both and go for the ARM - the kits aren't that much more these days (eg: from $30 [olimex.com]), and you can do a *lot* more with them... Obviously, the more you pay (up to ~$200) the more-capable the board you get...

      Simon
    • If they're doing something that requires you to trick the hardware, they should probably be using something more advanced - i'll agree with you to that point, but there are no circumstances in a beginners course that would require that. none that i can think of anyways.
    • Re: (Score:2, Informative)

      by hjf ( 703092 )
      What the hell are you talking about? I use PICs since 2001, when they taught me that in college. Since then, I have done quite a few projects with these microcontrollers. I started with the good 'ol F84, but since 2003 i have switched to the 16F628. I also programmed with the 16F88, the '877, the 18F4520, 12F629/675, etc.

      MPLAB macros help a lot, #defines can help you use your same ASM code over different families (12 and 16F for example), and make it straightforward to port the same code between different
      • by Andy Dodd ( 701 )
        The way you describe it, it sounds like Microchip is fixing the kludginess of their CPUs with workarounds in their development tools (MPLAB).

        And the original poster was reccommending Atmel AVRs - how the hell did you get on your Motorola rant? He only mentioned Motorola tools as an example of a "traditional" design and then went into a number of reasons NOT to use them because more modern variants exist.
    • I definitely agree with the AVR. It has lots of nice Linux tools, and has models with just about everything on board, including FPGA.

    • The main problem is the memory banks, and that's about it, I think.

      I just use a C compiler with my PICs and it's fine because I don't have to deal with that at all. It's very easy to program, pin-addressable and so on. I have no problem using the special function units or interrupts either.
  • I like the ATMEL line. They are straight forward and highly functional.
  • Take a look at Wiring [wiring.org.co]. This is a microcontroller development system for artists. There's a board with an Atmel microcontroller and I/O interfaces. There's an integrated development environment with a simplified programming language. All open source. IDE runs on Linux, MacOS, or Windows.

    The neat thing about this system is that it uses a modern microcontroller, the Atmel ATMega128, with 128K of memory and a 16MHz clock. This is a substantially more powerful machine than the PIC or the Basic STAMP. T

    • by CandyMan ( 15493 )
      The basic Arduino board is really a reference board for the cheaper ATmega8 chip (8 bit only) coupled with the Wiring software IDE+toolchain (based on GCC). Best of both worlds in my opinion. Cheap, powerful, and blessed with a very actively developed IDE. A friend of mine teaches robotics to the 12-year-old "problem-kids" in his school, and they take to it like a fish to water.

      The Wiring/Arduino language is a subset of C with a series of easy-peasy libraries, but you can also access the full C compiler if
      • by Animats ( 122034 )
        I have not followed Arduino lately and don't know whether it already supports interrupts.

        They've made some progress. The IDE now supports interrupts, and Wiring has moved up to the AtMega 128. Actually, they support most of the Atmel line. You can use their IDE with Atmel boards other than the Wiring board, but you may have to make configuration files that describe the other board's pinouts.

        • by CandyMan ( 15493 )
          > The IDE now supports interrupts

          I am a happy man now!
          • by Animats ( 122034 )

            The "Wiring" board is kind of hard to get, but take a look at this $54 board [microcontrollershop.com]. AtMega128, 2-line LCD, four buttons, relay, LED, buzzer, and connectors for most of the micro controller's interfaces. If that can be made to work with Wiring, you'd have a nice little self-contained board that students can learn on.

            • by CandyMan ( 15493 )
              I haven't even seen a Wiring board, so I am talking on hearsay, but wasn't the Wiring board too expensive? I think that is what gave Arduino the edge: it was simpler, but much cheaper. As to making the AtMega128 work with Wiring, do you mean the Wiring-hardware version of the Wiring/Arduino IDE+toolchain?
      • by ksheff ( 2406 )
        Does your friend have a website with any of the projects or resources that he uses for his classes?
  • I've never used it for robotics (used Stamps and 68hc11s before, though), ARM is a pretty sweet architecture. They're low cost, low power, and have really nice assembly code.
  • FIRST Robotics (Score:2, Interesting)

    by Quzarx ( 986221 )
    There are some robotics groups out there already. FIRST http://usfirst.org/ [usfirst.org] Robotics has been around for years. However, the cost is a bit steep, so a sponsor is needed. The team I work with was able to get a sponsor after one year of searching. The robots are pretty simple, you are handed a kit for electronics, and a base chassis, from there, you can add on accelleromters, gyroscopes, cameras, and other sensors to make things more complicated. Everything is custom made, so it is a great way to learn h
  • Atmel AVRs (Score:4, Informative)

    by lordlod ( 458156 ) on Thursday February 01, 2007 @12:24AM (#17839024)
    I'd go with Atmel AVRs.
    They are widely used, well documented and well supported.
    There are a large range of chips with a consistent instruction set, so they can learn on a simple eight pin 1-Kbyte chip and then apply that knowledge the next day on a large 32-pin 16-Kbyte device.
    They are extensively used in industry so students can feel like they are learning something practical.
  • Texas Instruments has $20 USB-based development boards [ti.com] for the MSP430 series microcontrollers. The MSP430 is a nice, clean C-friendly 16-bit architecture. It's practically luxurious, by microcontroller standards.

    Although perhaps, as others have said, microcontrollers are a bit too hardcore for students. A better idea might be to use full-fledged PCs running DOS (FreeDOS if there are licensing issues), either by scavenging old laptops or by running a cable to the robot from a desktop PC. DOS is nice an

    • by Locutus ( 9039 )
      I was thinking along the lines of a standard PC mobo also. Old ones with RS232 ports are cheap and the older memory is cheap too. Now, add an CF->IDE interface board and there's no need for a harddrive. I would go with something like DSL( Damn Small Linux ) and include the Java package. Note that this is all pre-course prep work for the instructor so that the kids have a platform to work with.

      There's also an open source Java based robotics simulator that'll let the kids control virtual robots on deskto
      • >I would go with something like DSL( Damn Small Linux )

        I'm doing something similar with a headless single-board computer. The one thing that you forget, that I thought would be easy, and which is now kicking the crap out of me, is that Linux is not out of the box hard realtime. Latency sucks for control applications.

        I thought I had a solution for this: RTAI. These are extensions to the kernel that allow you to do hard realtime tasks. But I can't get the damn thing to work. I can either compi

        • "Real-time" in an entry-teaching-level controller application is probably on the order of 0.01 seconds, or maybe even 0.1 seconds, which is well within the tolerance of a generic linux system. I know it won't *guarnatee* that response window, but the system would have to be awfully busy to miss a 0.1 second execution window.
        • by Locutus ( 9039 )
          I wouldn't exect the specified class to be targeting the next Darpa Grand Challenge any time soon. From what I understand of the requirements, they don't need any high end realtime control, just something easy to learn and hopefully something easy to more which has a couple of motors, wheels, and a bump sensor or two.

          Given that, I'd go for something leveraging Java since it can be developed on most platforms, runs on most platforms, can be tought with good design techniques, there's free software available,
          • Fair enough. Actually, there's a robotics course here at college that is taught using basically that sort of setup. So I'm not writing off his idea -- just giving fair warning about some limitations (because, since I've run into them, I'm quite frustrated right now... and I'd rather the OP not be!).

            Anyway.

            If you're really not concerned with hard realtime stuff, and you're teaching kids, you know, you might even want to use a teaching language instead of Java (not that there's anything really wrong wit

            • by Locutus ( 9039 )
              Bummer that you're having so much of a problem patching in RT support. As you mentioned, others seemed to have been able to do it but I will agree, there is a 'nack' to getting all the ducks in a row when patching. I guess this is why a number of embedded Linux device makers use supported RT Linux kernels. So their developers can develop app code and not spend too much time on the environment/OS-subsystem.

              That leads me to the comment on language. Because there are alot of pieces to a robotics puzzle, it see
      • by cgreuter ( 82182 )

        The problem with Java is that it's garbage-collected. Normally, this is a good thing but the garbage collecter introduces unpredictable delays into your program and that makes it useless for robotics.

        The traditional robotics language is Forth, although C is just as good. Free Pascal might also be a good bet. It's novice-friendly but not garbage-collected.

        For similar reasons, regular vanilla Linux isn't ideal either. Since it multitasks, that means the scheduler will introduce random delays as well. T

        • by Locutus ( 9039 )
          As I said earlier, these kids are not building a Preditor UAV and I think the garbage collection is helpful in it takes that aspect of programming out of their hands. When they move on to high levels of learning they can get to know the 'finer' details of what it's like to develope and keep track of your memory.

          As far as 'regular vanilla Linux' goes, again, it's there, it's up to the task and in the case of DSL, there are a bunch of easy addon parts. Sure LRP could work but they would take the whole course
  • I'm personally using this : http://www.robominds.com/ [robominds.com] There are good available libs for robotics purpose : http://www.motorobots.org/ [motorobots.org] I also saw others recommending the parallax which might fit better in your budget
  • This is basically what the Picaxe microcontroller series was made for. Their website is at http://www.picaxe.co.uk/ [picaxe.co.uk] and a reseller for them in the united states is located at www.phanderson.com. It is basically a PIC microcontroller (they use various models, from 8-pins to 40, so the scalability factor is there), with a custom ROM flashed onto them that has a BASIC interpreter. Think of a Parallax BASIC-STAMP, only all in one chip, and the chips range from $3-10 for most of them, so its almost as cheap as
  • Some micros are easier for one and harder for the other. If you're doing more software, are you going to be using a compiler, or will you be teaching them assembly? How critical is timing? If you're doing more hardware, you might think of what kind of microcontroller peripherals (i.e timers, UARTs, PWMs) will be useful to you.

    I prefer 16-bit micros because they're easier to program on, and thus easier to teach to beginners. If you go 8-bit, you will be dealing with pointers in weird ways which will dist
  • AVR Butterfly (Score:2, Informative)

    by Anonymous Coward
    If you want to start off with C, I recommend the AVR Butterfly.

    You can get an AVR Butterfly http://www.atmel.com/products/AVR/butterfly/ [atmel.com] for $20 at digikey... it comes with an LCD screen, a five way joystick-like button, a speaker, some sensors, RS232 level converters, and an ATMega processor. To program it, you just wire up an RS232 plug to the board and download the C/Assembly compiler from their web site. GNU tools for this are also available. No specialized programmer required.

    The advantage of a board l
  • better things (Score:2, Interesting)

    by KG6 ( 1007815 )
    I think you're students will become extremelly enthusiastic towards robotics if they get involved in a program like FIRST [usfirst.org] robotics. Check out regional event this year and talk to some of the students, a huge majority of them will tell you that because of FIRST they intend to persue a carrer in engineering.
    Check what people are working on at chiefdelphi [chiefdelphi.com], the environment there is very much like what the students are like at their schools. They ask questions, chat with each other, have fun, and mentors offer
  • by Miamicanes ( 730264 ) on Thursday February 01, 2007 @01:49AM (#17839596)
    I'd recommend Atmel AVRs without a moment's hesitation.

    The PIC and 8051 grew from architectures that were considered spartan and stripped to the bone a generation ago, and got a foothold only because (compared the "real" CPUs) they were somewhat affordable. They've matured, of course... but people who start on PICs almost inevitably get saddled with all the legacy baggage. In contrast, people whose first exposure is to Atmel or Motorola take one look at the PIC's legacy stuff, say "eeeewwww!", skip the first 20 chapters of the book, and go right to the good (modern) stuff.

    The Motorola/Freescale MCUs are powerful, but they're NOT for newbies.

    The nice thing about AVRs is that they're fairly robust and hard to permanently kill. I've abused AVRs pretty badly, and I've NEVER had one permanently die on me. There were a few I'd thought were dead, but ultimately they were all resurrected via high-voltage programming or by supplying an external clock signal to them. I've grossly exceeded the i/o pins' current-draw capabilities, connected power backwards, created pin-to-pin shorts, and still lived to tell about it. From what I've read, other platforms aren't quite as forgiving and wantonly abusable as AVRs. I know people who've driven 5v-relays straight from AVR i/o pins.

    AVRs also have a great resource -- avrfreaks.net

    AVR development tools are fairly cheap. An ISP-only programmer costs around $30-35. The Dragon costs $50, but adds support for high-voltage programming (handy for fixing messed up fusebits and reviving chips that otherwise appear to be dead) and Debugwire (think of it as single-wire JTAG for debugging). Unless you actually care about compatibility with Atmel's old chips, I'd recommend a Dragon over the STK500, if only for the Dragon's Debugwire capabilities.

    AVR Studio is a free IDE (Windows only, though... but I think there's a Linux alternative) that natively supports assembly, but also integrates seamlessly with WinAVR for C/C99/C++ (of the 3, C99 is the one I find the most useful... it basically gives you the linguistic niceties of C++, like parametric polymorphism, without the huge libraries and resource requirements normally required for full-blown C++).

    One major tip: if you want to use C (or eventually C99 or C++), buy John Pardue's book ("C Programming for Microcontrollers) and a Butterfly. He sells it directly from his website (smileymicros.com) for less than it costs from Amazon, and you can pick up the relevant hardware from him for less than you'd spend buying it all from Digikey. No, it's not the greatest book on C programming ever written... but it's the single best book you can get for learning C as it applies to AVR microcontrollers. Remember, 99% of C is learning how to use its libraries. Let's just say that time spent learning to use stdio in a generic C programming book isn't going to do much for your AVR programming skills...

    Architecturally, AVRs are fairly well-behaved. The biggest problem I've had is the fact that they're SO well-behaved, it's easy to get a false sense of security and overlook details that are different between them. Unfortunately, Atmel's datasheets seem to have the same general editorial philosophy as the first O'Reilly books (say it once, never repeat anything, and bury important details in the middle of otherwise nondescript paragraphs on page 183, without so much as a gray box or sidebar to call attention to it). However, everyone at avrfreaks.net is painfully aware of those documentation shortcomings, and when somebody gets snared by one of them, someone else usually notices within 5 minutes, sighs, yawns, and politely points them in the right direction. It's exceptionally rare for anyone to get flamed.

    As far as robots go, AVRs definitely seem to be just about everyone's favorite 8-bit processor. 6809s are popular with some more advanced users (though many of them freely admit that they aren't quite sure why they used a 6809 instead of an AVR), and the 68332 is a longtime favorite at the high en
    • Regarding the documentation, I suggest starting a wiki to record all the typical gotchas, and maybe make a third party data sheet system. That would help cut out the verbose cruft that most CPU data sheets seem to have.

      It sounds like an interesting chip family. As I use a compiler, I don't have to deal with the memory banks, which was the PIC's biggest issue. Everything else is great, I think, the documentation and sample code was clear and easy, in my opinion, and the book Easy PIC'n was a good start.
    • Re: (Score:3, Interesting)

      by Andy Dodd ( 701 )
      "The nice thing about AVRs is that they're fairly robust and hard to permanently kill. I've abused AVRs pretty badly, and I've NEVER had one permanently die on me. There were a few I'd thought were dead, but ultimately they were all resurrected via high-voltage programming or by supplying an external clock signal to them. I've grossly exceeded the i/o pins' current-draw capabilities, connected power backwards, created pin-to-pin shorts, and still lived to tell about it. From what I've read, other platforms
    • Re: (Score:3, Interesting)

      by drinkypoo ( 153816 )
      Just one more note on AVR cost - it's JACK DIDDLY. I bought a full development board that would program any part available at the time, with eight buttons and eight LEDs on it, AND a second ATmega chip, for $100 from Digi-Key! If it's only $100 from digi-key, you KNOW it's cheap. That package comes with everything you need to get started; you download the latest software from the web. Only problem is, it uses a serial connection (or maybe parallel?) so if you have the latest greatest computers (I know, unus
    • Yea, AVR's, in high school terms, ROCK. I have been using them for years now in pet projects and they are just a breeze to work with.

      I even went to a free seminar that Atmel was having here in Dallas and they given away free stuff, free butterflies as well as free food.
    • by MyDixieWrecked ( 548719 ) on Thursday February 01, 2007 @11:18AM (#17844390) Homepage Journal
      If you really wanna dive into AVR programming, you could also check out the Arduino [arduino.cc].

      It uses an AVR for the controller and doesn't require a PIC programmer, connects over USB to the computer, has support for Windows, Linux and OSX, and comes ready for working when you get it. The only part that is kinda limiting to people unfamiliar with programming is that it uses C++ as the language, but has a very simple instruction set, so the learning curve may be slightly steep for beginner programmers.
    • Re: (Score:3, Interesting)

      by iabervon ( 1971 )
      For Linux, you want gcc, avr-libc, and avrdude. One nice thing about the AVR over the 8051 is that GCC supports it. This means that you can use perfectly standards-compliant C99 with all the trivial optimizations (which is really nice, because you can write your numeric constants as explanatory expressions without wasting cycles in the resulting code).

      It's also worth noting that the AVR datasheets are incredibly detailed and require very little background information. E.g., the section about I2C (aka TWI) i
  • That's no lightweight system, and it comes with a serious set of development tools who's big brother version is used in the real world.

    Looks like they offer an educational version too:

    http://www.arm.com/markets/embedded_solutions/armp p/14149.html [arm.com]

  • Since if you want to do everything from the ground up (understanding of servos, of the electronics involved to run said servos, actually building the electronics, etc), I think that a Z80 would be a rather good choice.

    They're very cheap, very useful little toys, and no need for complex electronics either, generally no need for buffer structures, has its own ram refresh, you can just plug in an eprom pretty much without a problem, build the whole thing on standard experimental PCB, and has a very simple stra
    • by Alioth ( 221270 )
      I'm building stuff with the Z80 as a learning exercise right now. Sure, you have to have external ROM and RAM, but it's very simple to add, and I think for teaching the learning exercise of how to build the chip select logic would be very beneficial (as well as how to watch for your I/O address etc.) You also get a lot of flexibility you don't with a microcontroller with it all on board. Want to use dual ported SRAM? Sure, no problem.
  • IMHO, although I am not that much fond of their architecture, PICs are as scalable as you can get, from tiny little 5-pin SOT mites to serious high pin count have-it-alls.

    Just make sure you jump them on time when scale (functional, software complexity) grows too big, as they don't agree quite well with mainstream computer science paradigms, by which I mean: "no hardware supported general purpose stack in RAM".

    However, that probably will never be a problem for high school simple robotics projects.
  • Zilog has a nice range of chips with a very good amount of peripherals built in. Their development environment is very nice for stepping through and debugging code. Pity it is only for windows, and their really could be more sample code out there.

    And they run plenty of competitions with circuit cellar, so you can often get free devel kits.

  • by nullset ( 39850 )
    The Vex robotics kit (from IFI, the folks behind First Robotics) is geared towards what you're talking about.

    It can even be programmed visually, in "Easy-C". This lets people drag and drop into a visual editor, essentially making a flow chart. It displays the generated C code.

    When you tire of that, you can program it in C using the MPLAB compiler (and possibly others).

    I, too, would recommend First Robotics (www.usfirst.org) as well as the Best robotics competition, which has a lower cost of entry, but no pr
  • Whatever microcontroller you choose (I'm partial to the AVR ATMEGA series, but I haven't used much else), it's important to start with a good reference hardware design and software framework. When I started using the ATMEGA16, there was a long period before I got the basic functionality - LED blinking, serial port talking, and DAC and ADC working. Once I got that going, things really picked up.

    I would advise that YOU get a design to that level before you present it to the students. The interested stude

  • If you're interested in a whole curriculum out of the box, then CMU's Robotics Academy [cmu.edu] might be something worth checking out.

    The lesson plans involve either the LEGO NXT robotics kits, or the VEX robotics kits, and have been under development and used by school for several years now.
  • Maybe you should look into getting the TAB "Build your own robot" or "Build your own sumobot" kits.

    The bots are BASIC Stamp based, come with software for programming them, and the only thing needed to program one is a serial cable. They are expandable, fairly durable, easy to put together, cheaper than many of the other options I have seen on here, and the programs can be tried out immediately.
  • You immediately rule out Legos, and that may not be appropriate.

    I would agree that depending on the class level, the RCS programming may be overly simplistic. But by no means is RCS the only way to program the Lego Mindstorms. A quick peek at Google and you'll see things like NQC, a Lego Mindstorm with Linux Mini-HowTo, and a whole wealth of free stuff that keeps the Mindstorm relevant to a more experienced class level.

    The other nice thing about Mindstorms is that you can do things physical, not just things
  • --dave (With apologiis to Donald Knuth) c-b
  • Several people have mentioned the Atmel AVR's, and I can't fault them. But don't overlook the 8051 derivatives. Atmel makes a nice line, as does Silabs, NXP and Dallas. One in particular is worth mention. The Atmel AT89C51ED2. It has 64k of flash, 2k EEPROM, and 1.7k of internal XRAM, and a bunch of useful extensions like SPI etc...

    The real trick is, it has a bootloader ROM. You hold reset high, and pulse PSEN (from memory, check the Datasheet), and it starts a bootloader. You can do this with a coup
    • I can definitely appreciate the "Single Source" issue... for Christmas, I built a string of RGB Christmas lights. I bought 128 Tiny25s from DigiKey, and basically wiped them out. As of early December, I probably had more Tiny25s in my possession than any other end-user in the world (every light consisted of an RGB LED driven by its own Tiny25) ;-)

      I would have liked to have bought a smaller number first to test my design, but I was scared to death that if I didn't buy them all up front, someone else might bu
  • ARMs (Score:3, Informative)

    by FrankSchwab ( 675585 ) on Thursday February 01, 2007 @07:36PM (#17852914) Journal
    First off, I'd dump any mention of 68hc08, 68hc11, 8051, z80, etc. There are more of those doing more than you would ever believe out there in the world, but it's like suggesting that someone learn GUI programming by giving them an 8086 with dual floppy drives and 256K of memory, and a copy of Windows 1.0. Time has passed them by; learning the quirks and tricks necessary to get them running happily is more an exercise in dedication in the modern world than any way to learn modern processing.
    As a professional embedded programmer, I'm quite surprised by the number of recommendations for the AVR in this thread. I've never used it, but I may have to look into it. Quite a rabid following there.
    I would recommend getting into ARM. In the professional world, they have pretty much taken over the middle ground of 30-200 MHz 32-bit processors, especially in the custom-chip arena.
    With the NXP (nee Philips) LPC versions, you can have a 256KB FLASH/32KB RAM device with a USB port and a million on-board peripherals for the cost of a $10 chip (Digi-key quantity 1), a PCB, and a crystal. Pre-built development boards are a dime a dozen; I'm partial to the http://www.embeddedartists.com/ [embeddedartists.com] boards, and happen to have their http://www.embeddedartists.com/products/education/ edu_base.php [embeddedartists.com] LPC2148 Education board on my desk at the moment. It's a bit pricey at 99 EU, but without all the motors, LCD and LED displays you can get the basic board http://www.embeddedartists.com/products/boards/lpc 2148.php [embeddedartists.com] a bit cheaper.
    ARMS are extremely well supported by the excellent GNUARM toolset (http://www.gnuarm.com/ [gnuarm.com]), giving you a completely free C/C++/Assembly toolset, and there are a huge number of sample programs available from Embedded Artists, Keil, Olimex, etc., for doing almost anything you might want.
    Why teach them about code pages, completely screwey function call mechanics, 256 byte jumps, limited capability C libraries, etc., when they could be learning about putting their name on the display, spinning a motor, playing a tune, and shipping data up to a PC over USB?
    /frank
    • Why teach them about code pages, completely screwey function call mechanics, 256 byte jumps, limited capability C libraries, etc., when they could be learning about putting their name on the display, spinning a motor, playing a tune, and shipping data up to a PC over USB?

      You don't have to deal with most of that crap with AVR, which is a big part of its appeal - it feels a lot like big iron to develop for, you rarely even have to care that it's Harvard (till you realise your strings are eating RAM, but th

  • I just taught a C programming class using the ADuC microcontroller from Analog Devices. ARM based device with ADCs, DACs, and a bunch of digital IO, plus the software, and you can get it all for about 20 bucks.

"The great question... which I have not been able to answer... is, `What does woman want?'" -- Sigmund Freud

Working...