
.: week 6.microcontroller programming :.
It's only when you look at an ant through a magnifying glass on a sunny day that you realize how often they burst into flames.
-- Harry Hill
An ISP to call my own
To start this week, I made a new FabISP. I forgot to wash my last board after stuffing, and some extra flux badly corroded some of the copper traces. I made no functional changes from my first FabISP - just changed the text on the board to adamISP. I milled the board with the Modela.
A picture of my milled adamISP:

After picking the excess copper away with an exacto knife:

My brand new adamISP:

The board programmed perfectly on the first try - a refreshing change from my last FabISP.
A simple LED-button board
Now, fresh ISP in hand, I started modifying the eagle design for the hello-world-style board. I just added a button and pullup resistor and an LED and resistor. I also added my name and the MIT logo on the board in photoshop. Helpful tip: I found out that the fab modules don't complain if you edit eagle PNGs with photoshop and go to Image->Mode->Greyscale. If the images are indexed or in a color mode, the modules complain.
My hello-world board, milled on the Modela:

My board after some light grooming:

My finished LED/Button board:

Stuffing both the new FabISP and hello world board went MUCH smoother than my first FabISP.
foodClock
Since my project for week4 morphed from a clock to a kinetic sculpture, I decided to design a board to power my planetary gearing system. Additionally, I wrote a program that looks at an RSS feed and when a new post is made an LED is lit up and the gears are spun. The primary purpose of this contraption is to get me free food. Let me explain - there is a webcam at the media lab called FoodCam, which is placed above a table where people bring leftovers and extra food. When the food is on the table, a button on the wall is pushed which generates an RSS event. An email goes out to all the students, and the frenzy begins. With my contraption, I would be able to beat the masses to the grub by my noisy aluminum gears spinning away. And so, the foodClock was born.
Electronics
The biggest design consideration was how to power a motor to spin the gears. I decided to take a 12V 1.5A wall-wart and connect it to my board. Also, I'm using a Maxon 110316 planetary gearhead with a 12V motor. The 12V signal is delegated using a MOSFET, with the gate controlled by the ATtiny44, the source connected to GND, and the drain connected to the motor's negative terminal. The motor's positive terminal is connected to the 12V signal, and when the MOSFET gate goes hot the power flows to the motor.
MAJOR thanks to Brian Mayton for helping me understand MOSFETs.
A schematic of the motor:

The traces that were cut:

I tried to mill this board first with the Mantis, but it made some very thin traces and ripped up a few:

So I switched to the Modela and milled this beauty:

Another view:

The final stuffed foodCamBoard:

The eagle files for foodCamBoard are here:
Schematic | Layout
Assembly
I cut a new acrylic wall-mount and motor-mount so I could hang the clock. I needed to countersink a few of the holes, but it worked very well on the acrylic.
Some countersunk holes:

Putting the clock together at my desk:

Some nice pics of the finished foodClock:




Design and Software
The design for the foodClock is here:
- 1/8" Aluminum (12"x12" required): Adobe Illustrator | DXF
- 1/4" Acrylic Sheet 1 (12"x24" required): Adobe Illustrator | DXF
- 1/4" Acrylic Sheet 2 (12"x12" required): Adobe Illustrator | DXF
The software for foodClock is here:
- foodCamBoard (microcontroller) source: foodCamBoard.tar.gz
- FoodCamNotifier (Java) source: FoodCamNotifier.tar.gz
Obstacles
The gearing system was quite difficult to get working. My motor mount did not have a spec sheet, so I had to measure the mounting holes using calipers. Consequently, I had to cut the central sun gear 8 times before I got the whole thing working. Gears are tricky.
Videos
A simple test of connecting LED and pushbutton:
Button activating a motor using a MOSFET:
foodClock in all its glory: