CHALKROACH-1
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
make a chalkroach ATMega32 microcontroller board  
   

Back to resources

make a chalkroach ATMega32 microcontroller board

set up the programming environment for chalkroach

upload the bootloader and programs on chalkroach

introduction to C programming for microcontrollers

 
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

 

Welcome to the chalkroach tutorial. This tutorial is divided into 4 sections:

. make a chalkroach ATMega32 microcontroller board

. set up the programming environment for chalkroach

. upload the bootloader and programs on chalkroach

. introduction to C programming for microcontrollers

Please read the Overview and jump to the section you are interested in.

Overview

A microcontroller is a highly integrated chip (or IC- a small electronic device made out of a semiconductor material) that contains all the electronic components needed to control electronic devices. These components include: a Central Processing Unit (CPU), Random Access memory (RAM), Read Only Memory (ROM), Input/Output ports (I/O ports) and timers.

The microcontroller is an indispensable component for any person who wants to do electronics and it is used in a very wide variety of electronic systems around us: Keyboards, electronic measurement instruments, Printers, Cell Phones, Alarm systems and many more.

There is a large number of companies that manufacture microcontrollers, one of them being Atmel. One of Atmel's newest product lines is the AVR Microcontroller family. The AVR is a family of 8 bit high performance microcontrollers with low power consumption. The family comprises of three groups: tinyAVR, AVR, and MegaAVR. The three groups differ in the number of pins and size, but have the same instruction set and overall architecture.

Chalkroach is a simple, easy to use development board based on the ATMega32 AVR. Once you have built and set up a chalkroach board, you will be able to write simple programs to perform complex tasks with your microcontroller.

A very important document to keep at hand when working with a microcontroller is its datasheet. Download the ATmega32 datasheet here and look through it. Although the information will not make a lot of sense at this early stage, it will be useful once you are more proficient in microcontroller programming.

In this chalkroach tutorial, we will:

- make a chalkroach PCB (A Printed Circuit Board is a flat base of insulating material containing a pattern of conducting material. It becomes an electrical circuit when components are attached and soldered to it).

- solder the chalkroach components to the PCB

- set up the PC environment for programming chalkroach by downloading software such as: AVRStudio, AVR-GCC

- install AVRlib, a C library to make programming easier and less time consuming (a library is collection of small programs used to develop larger programs. Including libraries in your program allows you to directly use functions that perform common tasks and enable you to write more complex programs easier).

- set up the chalkroach by downloading a bootloader on the ATMega32 (a bootloader is the code that first executes when the microcontroller device 'boots' ie after a reset or a power-on. The bootloader allows for the easy loading of user programs on the microcontroller).

- Write a C program, debug it and load it on the chalkroach

more links:

microcontroller tutorial

newbie's guide to AVR development (very good link)

wikipedia microcontroller page

 

Components list

Part
Description
Value
Package
Digikey part number
C1 Capacitor 18 pF C050-030X075 P10831-ND
C2 Capacitor 18 pF C050-030X075 P10831-ND
CI Capacitor 10uF E2,5-6E  
CO Capacitor 47uF E2,5-6E UVR1A470MDD
IC2 Voltage regulator 7805T TO220H LM7805CT-ND
LED1 Light Emitting Diode LED5MM 67-1528-ND
Q1 Oscillator 16 MHz QS X143-ND
R2 Resistor 0204/7  
SV1 Header Connector FE06-2  
SV2 Header Connector FE06-2  
SV5 Header Connector FE08-2  
U$1 AVR microcontroller MEGA32-P DIL40 ATMEGA32-16PC-ND
  40 pin socket     ED3740-ND
U$2 bridge rectifier DFRECTIFI DF15005 DF15005SDICT-ND
U$4 switch CHALKSWIT CHALKSWITCH EG1903-ND
U$6 serial header COKSERI COKSERI H2107-ND
  serial header receptacle     H2085-ND
X2 power jack 2.1 mm SCD-014-A CP-002A-ND

Eagle Files

Download the chalkroach design files below. The design was made on eagle, a PCB layout editor software from cadsoft. Once you have these files, you can use the board layout file (chalkroach.brd) to make the PCB. There are several ways to manufacture PCBs:

- send pcb out to be made (send .brd file to custompcb and they will manufacture the pcb, drill it and deliver for a reasonable price)

- etch pcb in house (see tutorial here)

Schematic

chalkroach.sch

Board

chalkroach.brd

 

Drill bits

If you decide to manufacture the pcb yourslef, you will have to drill holes for the components. You can use a drill press or a dremel tool for this and purchase the drill bits at DrillBitCity. Below is the size drill bits you need for each of the components on chalkroach.

#65 (.0350")
------------
Use for most holes, including the Atmega32.
Also use for the cockroach-compatible
serial port header "G R T 5"

#58 (.0420")
------------
Use for the 7805 holes, and the switches.

# (.12"")
----------
Use for the three female power jack terminals.

#44 (.0860")
------------
Use for the 9V battery terminal connectors, if your board has them.

Stuffing

Now that you have made and drilled the board, you can solder the components onto it. To help with the correct placement of the components, you can use the chalkroach.sch file, as well as the pictures below.

more links

limor fried's resource page

soldering tutorial

Pictures

references

Noah Vawter's chalkroach page

Simon Schiessl's cockroach manual

               
 

Back to resources

make a chalkroach ATMega32 microcontroller board

set up the programming environment for chalkroach

upload the bootloader and programs on chalkroach

introduction to C programming for microcontrollers