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."
Personally.. (Score:2)
Parallax and the Basic Stamp (Score:3, Informative)
Re:Parallax and the Basic Stamp (Score:4, Informative)
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)
Re: (Score:2, Informative)
Re: (Score:2)
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.
Re: (Score:2)
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? (Score:2)
Re: (Score:2)
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)
Re:options (Score:4, Informative)
Re:options... sorry, wrong size (Score:1)
PIC (Score:2, Informative)
Re: (Score:3, Informative)
Re: (Score:3, Informative)
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
MOD PARENT UP - Re:PIC (Score:3, Informative)
Re: (Score:2, Informative)
Re: (Score:2)
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)
Motorola 68HC11 (Score:2, Insightful)
I'm enjoying the class so far.
Re: (Score:2)
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
Freescale/Motorola 6808 (Score:5, Informative)
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.pd
Re: (Score:2)
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)
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.
Re: (Score:1)
Re: (Score:2)
Also, Microchip will give you PICs for free!
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
You don't get it. It's not all about speed. In a lot of applications, you don't need anywhere near 20MIPS. In a lot of places 1MIPS is more than enough. The thing is a microcontroller, not a general purpose computer. Also, think about power consumption, operating temperature range, power supply noise reduction, etc. The PICmicro is very good at what it does, and cheap, too. It's also a very good learning tool.
And you haven't refuted any of my original points: the PICmicro is easy to understand, wit
Reluctantly recommending the basic STAMP (Score:4, Interesting)
Atmel (Score:1, Informative)
PIC (Score:2)
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.
Re: (Score:2)
Avoid PICs at all costs (Score:2, Informative)
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
Re: (Score:2)
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
Re: (Score:1)
Re: (Score:2, Informative)
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
Re: (Score:2)
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.
Definitely AVR (Score:2)
I definitely agree with the AVR. It has lots of nice Linux tools, and has models with just about everything on board, including FPGA.
Re: (Score:2)
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.
ATMEL (Score:1)
Check out "Wiring" (Score:2)
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
Re: (Score:2)
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
Re: (Score:2)
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.
Re: (Score:2)
I am a happy man now!
Re: (Score:2)
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.
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
He wrote an Arduino guide for teachers (Spanish) [arduino.cc] of high-school (I think it is for 13 and 14 year-olds), which you can also download in a big zipfile of doom [195.178.229.129].
His personal site is karamaku.info [karamaku.info], any new develpment from him should appear there.
ARM, perhaps? (Score:1)
FIRST Robotics (Score:2, Interesting)
Atmel AVRs (Score:4, Informative)
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.
TI MSP430 series? (Score:2)
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
Re: (Score:2)
There's also an open source Java based robotics simulator that'll let the kids control virtual robots on deskto
Re: (Score:2)
>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
Re: (Score:2)
Re: (Score:2)
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,
Re: (Score:2)
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
Re: (Score:2)
That leads me to the comment on language. Because there are alot of pieces to a robotics puzzle, it see
Re: (Score:2)
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
Re: (Score:2)
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
MC68332 RoboMinds SBC (Score:2, Informative)
Hands down! The PICAXE microcontroller!!! (Score:2, Informative)
Are you doing more hardware or software? (Score:2)
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)
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)
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
Atmel AVR. No contest. (Score:5, Interesting)
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
Re: (Score:2)
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)
Re: (Score:3, Interesting)
Re: (Score:2)
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.
Re:Atmel AVR. No contest. -- Arduino (Score:4, Interesting)
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)
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
Lego Mindstorms NXT has a 32 bit ARM cpu! (Score:2, Interesting)
Looks like they offer an educational version too:
http://www.arm.com/markets/embedded_solutions/arm
How far do you want to go? Z80 (Score:2)
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
Re: (Score:2)
cheap, scalable (Score:2)
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 eZ8 Encore! works for us (Score:2)
And they run plenty of competitions with circuit cellar, so you can often get free devel kits.
Vex! (Score:2)
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
Make a framework first. (Score:2)
I would advise that YOU get a design to that level before you present it to the students. The interested stude
CMU Robotics Academy Curriculum (Score:2)
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.
A different idea (Score:2)
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.
What's wrong with Mindstorms? (Score:2)
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
Er, MIX? (Score:2)
The old 8051 learned some new tricks... (Score:2)
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
Re: (Score:2)
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)
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
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?
Re: (Score:2)
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
Analog Devices Arm (Score:2)
Re:Well... (Score:4, Insightful)
That being said, I would recommend a Basic Stamp from http://www.parallax.com/ [parallax.com]. While their chips are not the fastest, cheapest, or fully featured they offer EXCLELENT learning tools, books as well as a wealth of free code. There are plenty of robot kits you can get and easy to plug in designs. You can quite possibly even get a bulk discount for a school.
To be honest, I would rather have a class where the first half of the semester is designing AND building your radio. (Preferably FM) I learned microcontrollers first before I learned anything about analog components and a radio is the best way to teach that.
Re: (Score:2)
However, I agree, he does have the makings of a fun class here. I would say the way to go would be to probably do all of the code himself, and then just give them the plans to build their devices. I was going to recommend the boards from Tech Arts [technologicalarts.com]. They may be a bit advanced for this type of class, but if done right (like I said, give them code, and hardware design) they could work out really well.
If you do the class, good luck.
RonB
Re: (Score:3, Interesting)
Re: (Score:3, Insightful)
I disagree (not with the algebra bit), they are teenagers and will see leggo as a kids toy (what teenager want's to be mentally defeated by a "toy", better to just ridicule it from day one). A well designed project that results in a simple robot that reacts to light and/or sound will encourage some of them to find out more by themselves. That's what HS is supposed
Dumb typos (Score:2)
Only on slasdot are dumb typos apostle-ized.
You isensitive clod, no wonder you chose AC. I am the victim of a short lived "teaching revolution" in late 60's - early 70's, spelling and punctuation were ignored in favour of "raw expressiveness", I think it had something to do with the technology buzz over the space race. Anyhow, I realise it's a dumb typo but unfortunately my brain is now hard-wired in a way that does not see many o
Re: (Score:2)
At least you'll find out if one of the kids is going to be the next Woz. Everybody else will take one look at it and spend the rest of the day in the library sniffing paste.
Re: (Score:2)
Re: (Score:2)
FPGAs just never seem to be the best part for control applications. Bus-level interfacing, sure... but there always seem to be higher-level solutions for that (often involving someone else's FPGA-based design).
Re: (Score:2)
The good news is they'll soon be selling an even better micro-controller board.
GA Tech and Myro (Score:2)