Microcontroller Mondays Goes Educational!

What: A five-part microcontroller course, taking you from zero to hero in just 30 days!

Where: The space.

When: Monday nights, 7:00pm to 9:00pm (nominally).  Sept 8 through Oct 6.

Syllabus:

Each class will be about 30 min introductory lecture, 20 min lab, 20 min lecture, 20 min lab. We’ll cover two big topics per night (usually) and get cool projects working for each.

0) Setup: What the AVRs are, what all the pins do, what it can do for you. Then the toolchain: soldering together the programmer kits, getting the software up and running.  Reading the datasheets.  Labs: building the kit and running a test LED flasher. (Almost all lab today, little talk.)

1) Outputs and bit math: How to make chips speak to the outside world, pin-by-pin. Enough C programming fundamentals to make it work. Pulse-width modulation. Labs: Cylon eyes and dimming LED’s. Extra credit: cross-fading cylon eyes!

2) Inputs: Buttons and Analog-to-Digital conversion (ADC). Gather data input the world. Labs: pushbutton organ, light-dependent theremin.  Extra credit: something else!

3) Interrupts and Timers: Interrupts call subroutines when certain conditions are true. Timers let you time stuff. Together, they take a lot of the programming burden off your shoulders, and enable really cool stuff. Labs: Driving servo motors and/or build a better audio synth, use an LED as a light-source and light-sensor. Extra credit: capacitive touch-switch!

4) Serial I/O: Make the micro speak to your computer (and vice-versa). We can also cover other serial protocols (I2C, SPI). Labs: Basic serial in/out, data-logging light sensor.  Maybe SD/MMC cards? Extra credit: ADC + serial output + Python + laptop = ghetto oscilloscope.


5) EEPROM, PROGMEM, etc: Tying up loose ends, special requests. PROGMEM lets you use the program memory to store lots of (constant) data. EEPROM is like flash — there’s not much of it, but it stays when you power off. Can also do misc topic requests here. Labs: writing out really long strings to serial, saving last known states for battery failure.  Maybe I can think up something sexy to use these methods.  Maybe not.

The Kit: The class will be based around the  ATMega 48 ($4 in bulk).  The basics of a programming kit for the AVR chips include: a computer (bring a laptop), a programmer ($22), a breadboard ($5).  We’ll be rounding out the projects with some push-buttons, LEDs, light-sensing resistors, speakers, and servo motors.  Some of this stuff is in the space, some I’ll bring in, and some will be bought for you all.  $35 for the basic kit, delivered.

For $20 more, you can opt to get a super-swanky USB/TTL-serial cable, which will enable simple and clean bi-directional communication with laptops.  I highly recommend ponying up for one if you think you’ll continue using micros, but if you want to kludge something together out of a plain-old USB/RS-232 Serial converter, I can help.

Let me know by Friday, Aug 29, what kind of kit you want and if you’re interested but bringing your own gear.

Posted in Uncategorized

Door Unlockerator Project

Last night, Ash came to the meeting with an RFID reader and a couple cards and an idea to turn it into an automatic door locker/unlocker by hooking it up to a motor and a small microprocessor. I liked the idea enough to toss it up as a project.

The reader speaks 2400 baud 8N1, so it’s a piece of cake to interface, and the cards are only $1.19 each. We’d probably have to mount the reader outside the metal-covered door, but that’s about the only hassle I forsee. This is certainly the path of least resistance — we could have a working system up in a week or so. The downsides from a tech/fun perspective are that the reader we’ve got only works with its own cards, and that the whole project is just a little too easy. Plus, we’d have to get the reader out of Ash’s hands…

Cooler still would be a homebrew RFID reader that allowed us to read whatever RFID tags you’ve got in your wallet or purse. This may be non-trivial and will certainly require building up a receiver. It might be as easy as these guys had it, or it might be truly impossible. Could be super fun, could be a dead end. Anyone have DIY RFID experience? Know how to build a SmartTrip reader?

Other, less-secure and less-tech but nonetheless-groovy ideas include:

  • Knock-pattern sensor: Detects rhythmic series of knocks and pauses. I’ve implemented one of these before, and it’s a fun toy. The biggest obstacles are if some members have bad rhythm or our neighbors have particularly good rhythm. The keyspace isn’t really all that huge either. But it’s a classic.
  • Phone-dialing entry: Re-use a telephone (rotary is coolest, touch-tone will work in a pinch) as an entry keypad. It’s fun to open doors by dialing.

In any case, none of this is to replace the real keys, and so whatever mechanism we choose has to be key-overridden. It’d be no good if it crashed and locked us all out, and I don’t want to make anyone learn the secret knock or implant an RFID chip if he/she doesn’t want to. And if we can keep the systems cheap, it won’t be a big hassle to switch from a knock-lock to an RFID lock, or heck, use both/either.

What else do you folks think would be a good or fun? How can we lock and unlock the door?

Post comments and/or e-mail Elliot or Ash if you’re interested.

Posted in Uncategorized