Welcome to the CPM Homepage

Table of Contents


I was a Computer Science student at Boise State University  until 2001.  Currently, I  run my own contract software company.

Joe Coffland
Cauldron Development LLC

For many years I had thought about building the CPM or chess playing machine, but it wasn't until Fall of 2000 when I mentioned the idea to a professor of mine Dr. Amit Jain that the idea began to become a reality. I put together a proposal for an independent study in conjunction with Dr. Jain. The proposal was accepted and I began in the Spring semester. The basic idea was to build a machine which could play chess on a physical board against a human opponent. Now months later the CPM is not yet finished but much closer to actualization. In this document I will describe the CPM in more detail, show what has been completed, and what remains.

I have split the CPM into three major parts. These parts include Movement, Detection, and the Software Interface. Movement refers all requirements related to the movement of chess pieces by the CPM. Detection consists of the requirements for detection of the human players moves on the chess board. The Software Interface includes all of the software required to interface the hardware of the CPM to the GNU Chess program.

If you have any questions about this project, are interested in building a CPM, or would like to contribute to this project (machining, money, web advice, etc.) please contact me at jcofflan@onyx.boisestate.edu. I hope you find this sight informative and interesting


Movement of the pieces is accomplished via magnetic chess pieces, an electromagnet, and a chess board mounted above an XY positioning table. Building the XY-table was very difficult. Dr. Jain's and my first attempts were quite laughable in hindsight. Eventually I realized that this kind of job required a machine shop. After many months of searching for parts and working with BSU's excellent machine shop I had the XY-table you now see in the pictures. For those interested in building a CPM this will be the biggest hurdle.

Powering the table are two stepper motors. Stepper motors allow precise and repeatable movement of the XY-table. The card in the corner of the table attached to the motors is the stepper motor driver board.

Stepper Motor Driver Card Version 1 (Redesigned for more power) Schematic Parts List

Stepper Motor Driver Card Version 0 PCB Postscript top Postscript bottom Eagle CadSoft (Postscript viewer CadSoft)

See Making Circuit boards for more info.


The magnet in the bottom of each chess piece serves a dual purpose. Hal-effect sensors will be embedded in the plexi-glass chess board under each square. Wires run down the columns and rows of the chess board. Using a 4 to 16 demultiplexer the Microcontroller scans through 14 columns of the chess board. 14 = 8 columns + 4 columns, two on each side of the board for captured pieces. When a column is selected or powered the presence of chess pieces can be detected by reading the 8 lines running down the rows. Scanning occurs many times a second. This to the human user seems like automatic move detection. When the Microcontroller detects a change in the chess board it relays that change to the PC. The wires, Hal-effect sensors, and some capacitors will all fit in grooves cut into the plexi-glass. I have created a 3D-model of this board which will be used to create the cuts using a CNC milling machine. I am currently seeking a machinist and CNC willing to cut me a deal or donate some time to this part of the project.


To control the hardware, scan the chess board, and communicate with the computer I am using an Atmel AT90S2313. This is an 8-bit AVR architecture RISC Microcontroller with 2K bytes serial programmable flash. This is a very cool chip. It can be clocked up to 10MHz and executes close to an instruction per clock cycle. It also includes a UART, 8 and 16-bit timers, 128 bytes SRAM and 128 bytes EEPROM. You may use my source code according to the restrictions of the LGPL. The AT90S2313 comes in a 20-pin DIP. The CPM currently requires 22 I/O pins, because of this I have interfaced it with an 82C55A. This yields 27 usable I/O lines. This part of the CPM is still under development and currently sits on a breadboard. To program this Microcontroller I use Pony Prog for Linux and SI-Prog a serial port programmer. Schematics for SI-Prog are online. This programmer is really easy to build. I don't know why anyone would pay ~$100 for the ones I have seen offered commercially.

Here is a list of the current port mappings of both the AT90S2313 and the 82C55.

Power Supply

This has been my first real electronics project so I also needed to learn how to make power supplies. Unlike may other parts of the CPM this was quite easy. As my main reference I used Building Power Supplies by David Lines. The CPM requires 3 power supplies. Two unregulated (60v & 20v) and one regulated (5v). In the 5v I used a LM317 adjustable regulator. The 60v powers the electromagnet. The stepper motors use the 20v supply. All the CMOS and TTL logic uses 5v. The case it is sitting in is the bottom half of a Commodore 64, 5 1/4 inch floppy drive. (not required ;) The huge capacitors are basically filters for the unregulated power supplies.

Power Supply PCB Postscript Eagle CadSoft (Postscript viewer CadSoft)

See Making Circuit boards for more info.

Software Interface

For communication with the Microcontroller and GNU Chess I have written a Java application. This program can also be used for debugging purposes, reconstructing the board in case of a spill, and remote network play. If two CPMs are ever built two people could play against one another over the Internet. This program is still Beta. You may also use this code with the caveats of the LGPL.


10/22/2000Dual Stepper Motor Card Redesign
10/19/2000Colloquium 0

Data sheets

You will need the Acrobat Reader to view these pdf files.
MM74HC1544 to 16 Line Decoder
82C55AI/O Expander
HAL114Hal Effect Sensor
UCN5804BStepper Motor Translator/Driver
AT90S2313Atmel AVR 8-bit risk Microcontroller
LM317Adjustable Regulator
SN75C189AQuadruple Low-Power Line Receiver
DM74LS05Hex Inverter with Open-Collector Outputs
74LS07Hex Open Collector Buffers
IRL540NHight Current MOSFET
74F541Octal Tri-State Buffer
DM74LS1694 Bit Up/Down Counter
74HTC139Dual 2-4 Bit DEMUX
7407Hex Open Collector Buffer


I am releasing all designs, source code, and web pages under the Lesser GPL. In short this allows you to do almost anything except make a profit from my work.


(in alphabetical order)
  1. Advanced Precision Machining
  2. Boise State University Computer Science Department
  3. Boise State University Machine Tool Technology
  4. LM76
  5. Micronas
  6. Thomson Industries, Inc.

Credit Due

(in alphabetical order)
The following people have given me substantial help with this project.

Hit Count

Comments, suggestions, or questions mail to: jcofflan@onyx.boisestate.edu