Archive for November, 2006

Bootloader for ATMEGA168 with Arduino

Main-ATmega168.jpg

The AVR ATMEGA8 chip that comes with the basic Arduino board has 8K of memory. This isn’t very much and it quickly fills up even with a small amount of code and variables. The Arduino system now supports the ATMEGA168 chip as well, which has 16K of memory–comparatively huge! However Arduino 0006 environment does not directly support bootloading the ATMEGA168.

These are working files for bootloading the 168 chip on the AVR ISP programmer that we have in the equipment room here at ITP. You will probably need to change the PORT parameter in the burn.command script to reflect the actual USB or serial port in use on your local system.

Some handy commands to use in the Macintosh Terminal window:

To show ports on the local system:

ls /dev/tty.*

To switch to the bootloader directory (this path may be different on your system):

cd /Applications/arduino-0006/bootloader168/

To run the burn.command program, from the bootloader directory:

./burn.command

To look at a calendar for 2002, which the UN proclaimed the International Year of Mountains, but has nothing at all to do with bootloading:

cal 2002

Lego Logic Gates

Heather, Zach and myself created four logic gates out of Legos scrounged from various Lego Technics vehicle model kits. Full information and pictures after the jump…
Continue reading ‘Lego Logic Gates’

Two-bit Mechanical Adder

Heather, Zach and myself created a two-bit adder using laser-cut foam core board, wire and marbles. We initially tried a “boat” design similar to the one used in our one-bit adder. The boats didn’t quite come together properly, so we decided to try Zach’s secondary design that was cut at the same time. It worked beautifully, as long as we tilted the board back to at least a 75 degree angle so that the marbles didn’t fall off the front of the flip-flop gates.

The right side of the adder is the least significant bit. The top flip-flops indicate binary zero or one. The bottom ones are carry bits, and each one is intended to drop a marble onto the next most significant top flip-flop, thereby carrying the product of adding one to one up to the next place.

This design can be extended to any number of bits. Currently the marbles fall off the board or stay on the flip-flop levers. A future version could include holes in the board and a collection system that returns the marbles to the top of the adder, for reuse. It would be fun to add bells to give an acoustic bling to the project. Maybe whistles and a music box too. More pictures after the jump…
Continue reading ‘Two-bit Mechanical Adder’

Moisture Sensor Circuit

This moisture sensor circuit is based on a design by Forrest Mims, and adds a Shunt Ammeter so that the output is 0 to +5 Volts instead of amperes. We are using it for the ITPlants project, so that when soil moisture drops below a minimum, the plant can make a phone call for help. Other call-worthy events will be a thank-you when the plant does get watered, a warning if the plant is watered too often, and a follow-up call if the watering is insufficient. This is going to be one chatty shrub.