Slashdot Mirror


What Micro-Controller Would You Use to Teach With?

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."

24 of 175 comments (clear)

  1. Parallax and the Basic Stamp by JimMcc · · Score: 3, Informative

    Check out http://www.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.

    1. Re:Parallax and the Basic Stamp by WndrBr3d · · Score: 3, Informative

      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 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!

  2. Snuh! by Anonymous Coward · · Score: 1, Informative

    AVR.

    1. Re:Snuh! by Anonymous Coward · · Score: 2, Informative

      AVR, and WinAVR (AVR-GCC) for the win.

  3. options by drrrl · · Score: 3, Informative

    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.

    1. Re:options by IceCreamGuy · · Score: 4, Informative

      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 -Julius

  4. PIC by Anonymous Coward · · Score: 2, Informative

    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.

    1. Re:PIC by zarthrag · · Score: 2, Informative

      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).

      --
      Why can't all fpga/microcontroller manufacturers just release free optimizing compilers???
    2. Re:PIC by thegrassyknowl · · Score: 2, 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 became pretty fluent at writing simple programs.

      Nearly all of the class got competent enough to build a simple storage scope using the in-built ADC and an r2r ladder connected to one of the 8-bit ports.

      --
      I drink to make other people interesting!
    3. Re:PIC by Raven15 · · Score: 2, Informative

      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).

  5. The leaf project? by noopm · · Score: 2, Informative

    The Make magazine featured the leafproject recently which uses a custom board [2] for their "open source robot using artificial intelligence and vision"

  6. Freescale/Motorola 6808 by StarWreck · · Score: 4, Informative

    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

    --
    ... and in the DRM, bind them.
  7. Atmel by Anonymous Coward · · Score: 1, Informative

    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.

  8. Avoid PICs at all costs by Flavio · · Score: 2, Informative

    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 to showcase a traditional design, introduce them to the 8051 (but don't necessarily have them in the lab). If you need more features, use the Freescale HCS12 with the GCC toolchain (coding in assembly for the HCS12 isn't practical, since it essentially implements the old fashioned, register starved 68HC11 instruction set). And if you want performance for higher level applications (which may not be the case), go with an ARM part.

    1. Re:Avoid PICs at all costs by hjf · · Score: 2, Informative

      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 microcontrollers of the same family. The hardware peripherals (A/D, USARTs, CCP, Timers) are very easy to use. In short, I love PICs. Tried to switch to Motorola once. Couldn't find a programmer. With PICmicro, you use only one programmer (I use my homemade ICD2, which lets me step and set breakpoints on the target circuit, and it has helped me a lot with debugging, for a project that costs $20, is wonderful). MPLAB is SO powerful, everyday I find new tricks and new ways to do things. For Motorola, a few years ago, I couldn't find an IDE either.

      Recently I started using the 18 series, with their own C compiler. Rather nasty at first, but when I finally understood it, it was straightforward.

      Besides, PICs are dirt cheap too. I love the way Microchip has made it easy for the hobbyist to access development tools (the ICD2 is really cheap, less than $200. And the REAL ICE, for $500, is great), and the amount of literature you can find on the internet is invaluable (due to the amount of people using PICs for a hobby)... forum.microchip.com and piclist.com are basically all you need (besides the data sheets).

  9. Atmel AVRs by lordlod · · Score: 4, Informative

    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.

  10. MC68332 RoboMinds SBC by RoRo_the_Troll · · Score: 2, Informative

    I'm personally using this : http://www.robominds.com/ There are good available libs for robotics purpose : http://www.motorobots.org/ I also saw others recommending the parallax which might fit better in your budget

  11. Hands down! The PICAXE microcontroller!!! by Brietech · · Score: 2, Informative

    This is basically what the Picaxe microcontroller series was made for. Their website is at http://www.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 you can get it. Additionally, the BASIC software development environment is free to download, has no limitations, and is geared towards an academic setting (it even includes the ability to draw out simple logic circuits and have it convert them to basic code). Also, THEY DO NOT REQUIRE A SEPARATE PROGRAMMER. To program a PIC normally, you would need a ~$50-100 programmer for each student, but these hook directly up to the serial port (a cable is just 3 wires coming out of a DB9 connector), so each student can easily reprogram their own, or even do it from home. They're incredibly versatile (check out the forum at their main site), and perfectly suited to academic use, for both younger and older students

    --
    I'm perfect in every way, except for my humility.
  12. A few ideas by Anonymous Coward · · Score: 1, Informative

    This is a common topic on comp.robotics.misc... search the archives -- its come up at least once in the past couple of months. Instead of using embedded processors, why not use the PC with an I/O board?
    http://www.phidgets.com/
    http://wiring.org.co/

    And single-board computers are getting affordable...
    http://www.sparkfun.com/commerce/product_info.php? products_id=8207

  13. AVR Butterfly by Anonymous Coward · · Score: 2, Informative

    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/ 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 like this is it's quick. You don't need to wire up a micro with an oscillator and some output devices. You don't need a special programmer. You don't need to buy a C compiler. It's all there, and $20 is fairly cheap. If the kids like 'em, they can buy their own for home.

    If you want to start off with something easier, like BASIC, the BASIC stamp seems like the way to go.

    Good luck!

  14. Fuck NO!! by Anonymous Coward · · Score: 1, Informative

    That's about the worst advice one can give IMO. Most of these MCUs programmed with basic are much more expensive than the other MCUs. And the memory fills all too quickly (as if it's not bad enough using C). And they're usually pretty slow. In think those 3 points kinda defeats the whole point of using MCUs in the first place. And if they're ever going to use 'em for anything (beyond this basic class), it's NOT going to be using basic anyways (makes me shudder just as much as the thought of teaching VB to people wanting to learn programming).

    What to use? There's lots of good stuff out there, but my favorite: Atmel AVR MCUs. Used with AVR Studio, WinAVR and a port of GCC/LibC - good dev environment for 0$ (there are free linux tools too). Works great. Simple to use. Inexpensive. Wide range of devices. You can use any other text editor you so please. There's tons of other compilers for it (like IAR). Mature tools. Lots of great docs on atmel's site. Very good communities like avrfreaks. Programmed using one of the 2 languages everybody else uses (C, or the specific MCU's assembly) Making programmers for the chips is trivial and inexpensive. There's tons of good and inexpensive development boards out there (atmels' and 3rd party). The only thing I can think of that makes me still consider the others is the new ICE MkII that's required if you want to use debugwire on some of the new tiny MCUs (expensive).

    In second choice, I'd pick Microchip PICs, but there are lots of other alternatives like the 8051 and 68HC11 based ones. I'd pick Basic Stamp stuff dead last.

  15. In defense of the Arduino by Anonymous Coward · · Score: 1, Informative

    You are absolutely right about the advantages of having pre-made educational resources. The situation is quite different depending on whether all the students are doing an activity or if just one or two of them are doing it as an activity. A single student or small group can be very motivated and can cope with almost anything. If you've got a whole class, you need something pretty bullet-proof.

    Having said the above, I have a student using an Arduino. He has already used other standalone chips but finds the Arduino much easier to deal with. It uses an AVR Atmel chip which seems to be the favorite among the other posters. It is cheap, is already connected to your computer and doesn't need an extra chip burner. It is designed as a multi-media interface and they've worked out connections to a wide variety of multi-media and web enabled programs. It really is excellent as a controller for robotics projects.

  16. MOD PARENT UP - Re:PIC by speculatrix · · Score: 2, Informative

    100% agree. Microchip's 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.

  17. ARMs by FrankSchwab · · Score: 2, Informative

    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/ boards, and happen to have their http://www.embeddedartists.com/products/education/ edu_base.php 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 a bit cheaper.
    ARMS are extremely well supported by the excellent GNUARM toolset (http://www.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

    --
    And the worms ate into his brain.