adam.setapen...how.to.make.(almost).anything

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

Making an RSS-notifiable clock

After picking the excess copper away with an exacto knife:

Making an RSS-notifiable clock

My brand new adamISP:

Making an RSS-notifiable clock

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:

Making an RSS-notifiable clock

My board after some light grooming:

Making an RSS-notifiable clock

My finished LED/Button board:

Making an RSS-notifiable clock

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:

Making an RSS-notifiable clock

The traces that were cut:

Making an RSS-notifiable clock

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

Making an RSS-notifiable clock

So I switched to the Modela and milled this beauty:

Making an RSS-notifiable clock

Another view:

Making an RSS-notifiable clock

The final stuffed foodCamBoard:

Making an RSS-notifiable clock

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:

Making an RSS-notifiable clock

Putting the clock together at my desk:

Making an RSS-notifiable clock

Some nice pics of the finished foodClock:

Making an RSS-notifiable clock

Making an RSS-notifiable clock

Making an RSS-notifiable clock

Making an RSS-notifiable clock

Design and Software

The design for the foodClock is here:

The software for foodClock is here:

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: