r-smith.net

LCA2007 - "How to" Build Custom Microcontroller Projects for Fun and Profit (Well mostly fun)

As part of my research I build electronic prototypes to aid my research. This page describes the process I have used to design and build my own electronic prototypes. Integrated cricuits such a microcontrollers have become increasingly easy to use with few components required to achieve a range of different functionalies. This how to discusses the Texas Instruments MSP430F1232 microcontroller although the techniques used generally apply to most of the MSP430's.

Designing PCB's and acquting parts
Schematic/PCB layout software
Etching your own PCB's
Stuffing boards
MSPGCC
Examples

Designing PCB's and acquiring parts

The designing of electronic schematics requires different skill levels, I do not have a electrical engineering degree but I am able to design and implement many different circuits following just a few simple procedures. In this section I describe some of the tecniques I use regularly.
Resources
Datasheets are the best source of information when designing circuits, this is of course followed by search engines (google) and other online recources.

MSP430F1232 microcontroller minimum Requirments

Schematic/PCB Layout Software

PCB, Linux PCB layout tool
EaglePCB, Linux, OSX, Windows, Schematic/PCB layout tool
Altium (Previously Protel), Windows Schematic/PCB layout tool

Etching your own PCB's

There are many different PCB etching processes, here I present what I have found to produce good quality boards that accomidate SSOP (20 mil pin-pin pitch) SMT packages. The basic process uses Kinsten Positive Acting presensitized PCBs and a UV light box and an etching tank. Once the etching process is finished the vias and other holes need to be drilled, these can be done by hand although we use a CNC (Computer Numeric Controlled) milling machine to make things faster.
Picture of Ross Smith

Prepare your work area, I have found it is very important to prepare everything before you begin. Make sure there is pleanty of bench room this helps prevent mistakes at that critical time. Here is a list of the usual things I have setup:

  1. Etching Tank and etchant (Ammonium Persulphate)
  2. UV Light Box
  3. Developer Solution
  4. Container with water for rinsing the PCB
  5. Timing Device (I use my mobile phone)
  6. Kinsten presensatised PCB
  7. Transparency mask as prepared in previous setup instructions
  8. Latex Gloves
  9. Camera if you want photos !!
 

Supplies
http://www.computronics.com.au
www.wiltronics.com.au

Developer Liquid

  • Mix the developer, the one I use is labeled DP-50 it is an alkaline powder. You mix 1 litre of water with one sachel.
  • H20

  • Also have some water for rinsing, and remember to label each of the containers with their contents and the times.
  • Etching Tank

  • Prepare the etchant, I use amonium per sulphate as it remains quite clear while etching. This means you can visibly inspect the boards without removing them. 75deg c with..
  • Transparent Film

  • Print positive on transparency, as you can see in the photo I have made an envelope so the PCB material can be slid inbetween. This requires the two sides of the board to be printed on a transparency film, remember to make sure you mirror the second side. I have also found it is important to make sure the printed side (one with the toner on it) is pressed against the PCB material. Finally I use double sided tape to hold the two pieces together, you should try to select tape that is aproximatley the same thickness as the PCB material you are using.
  • Kinsten PCB

  • Now you are ready to remove the protective film from the Kinsten PCB
  • Kinsten PCB and Transparency

  • Slide Pre sensatised PCB in transparency mask
  • UV Box

  • We have a single sided UV box so it is necesary to expose both sides seperatley. I have found 6:30 per side works quite well.
  • Developing

  • After exposure place the PCB into the developer, the developing time varies from 30seconds to a few minutes. I usually hold the board and gently agitate it untill all the tracks look well formed
  • Rinse

  • Once the tracks all look good wash the developer off in water
  • Etching

  • Now we are ready to suspend the PCB in the etching tank. It is important to use a tank with bubbles to agitate and if you are using amonium persulphate it should be aproximatley 75 dec c. After some time you should notice the edges of the PCB disolving away, once you see this things are almost ready. Watch closley untill all the tracks are well formed and remove from the etching tank. Be carefull not to leave it in for too long or there will be no copper left on the fibreglass!!
  • Etch Rinse

  • Rinse the board in water.
  • Re-expose

  • Re-expose to remove the resist from all the tracks
  • ReDevelop

  • Re-develop to remove the resist from all the tracks and rinse
  • Etch PCB

  • Voila
  • Drill PCB

  • Drill any header holes and vias etc.
  • Stuffing boards


    MSPGCC

    To program MSP430's I have tried a number of different software environments, there are both windows and linux tools available. In this section I describe the steps used to get mspgcc compiler set up on a Ubuntu - Dapper linux release. The best source of information is the sourceforge project page (http://mspgcc.sourceforge.net) there is more complete information in their documentation.

    Get all mspgcc files from CVS
    cvs -d:pserver:anonymous@mspgcc.cvs.sourceforge.net:/cvsroot/mspgcc login
    cvs -z3 -d:pserver:anonymous@mspgcc.cvs.sourceforge.net:/cvsroot/mspgcc co -P .
    (You dont need to get everything, I just wanted all the Examples etc.)

    ***Binutils***
    wget http://ftp.gnu.org/gnu/binutils/binutils-2.14.tar.bz2 (or here)
    tar --bzip2 -xf binutils-2.14.tar.bz2
    cd binutils-2.14/
    ./configure --target=msp430 --prefix=/usr/local/msp430
    make
    sudo make install
    Add to your path
    export PATH=$PATH:/usr/local/msp430/bin (**check this is correct****)

    ***GCC***
    (if not already checked out) cvs -z3 -d:pserver:anonymous@mspgcc.cvs.sourceforge.net:/cvsroot/mspgcc co -P gcc
    wget http://ftp.gnu.org/gnu/gcc/gcc-3.2.3/gcc-core-3.2.3.tar.bz2 (or here)
    tar --bzip2 -xf gcc-core-3.2.3.tar.bz2
    cp -a gcc/gcc-3.3/* gcc-3.2.3 (Yes this is a known mismatch that was an accident when naming)
    cd gcc-3.2.3
    ./configure --target=msp430 --prefix=/usr/local/msp430
    make (if it fails on msp430-ar not found you have not set the path correctly)
    sudo make install

    ***msp430-libc***
    (if not already checked out) cvs -z3 -d:pserver:anonymous@mspgcc.cvs.sourceforge.net:/cvsroot/mspgcc co -P msp430-libc
    cd msp430-libc/src
    mkdir msp1 msp2 (failed on make for me not sure why)
    make
    sudo make install

    ***GDB***
    wget http://www.mirrorservice.org/sites/sources.redhat.com/pub/gdb/old-releases/gdb-5.1.1.tar.bz2 (or here )
    tar --bzip2 -xf gdb-5.1.1.tar.bz2
    cp -a gdb/gdb-5.1.1/* gdb-5.1.1/
    cd gdb-5.1.1/
    ./configure --target=msp430 --prefix=/usr/local/msp430
    make
    sudo make install

    ***gdbproxy***
    download the following from http://sourceforge.net/project/showfiles.php?group_id=42303&package_id=211507

    libHIL.so
    libMSP430.so
    msp430-gdbproxy

    cvs -z3 -d:pserver:anonymous@mspgcc.cvs.sourceforge.net:/cvsroot/mspgcc co -P jtag
    cd jtag/hardware_access
    make
    sudo cp libHIL.so /usr/local/lib
    ldconfig

    mknod parport0
    mknod /dev/parport0 c 99 0

    Examples

    is a sample schematic in pdf format, it has all IO pins brokenout to headers, RS232 is attached to a MAX3232 for level shifting and a 3.3V regulator.

    Previous projects

    Glove Circuit THis is a set of pinch gloves we developed for the tinmith back, they are used in stead of a mouse and keyboard as an alternative user interface.
    Glove Close Up This picture shows a close up of the circuit, it uses a MSP430F1232 for the microcontroller, has a promi ESD bluetooth module for communications, the lithium poly battery that is mounted directly behind the circuit.
    t-