This is one of my CNC motion control revisions and it is currently an work in progress.

CNC Controller Motion Board (Rev. C)

Table of Contents

Introduction

This is the Revision C version of my motion control board.

Design

I ultimately decided that the real problem with Revision B was I wanted to use a depower strategy for limit switched rather than an advisory strategy.

Communication between the two '628's is via a 3-wire phase bus that reports the low order 3 bits of the current axis position. This makes the communication `stateless'.

The board has no straps. None. Instead all configuration is performed through the parallel port interface in a special `configure' mode. The configuration information is stored in the EEPROM portion of the '628's.

The first PIC16F628 pin assignments are as follows:

Pin Description
Number Name Kind
1 RA2/AN2 Analog In Comparator2 Vin+
2 RA3/AN3/C10 Analog In Comparator1 Vin+
3 RA4/TOCKI/CMP2 Digital In Phase0
4 RA5/MCLR*/THV Digital In Phase1
5 VSS Ground Ground
6 RB0/INT Digital Out Motor0A
7 RB1/RX/DT Digital In Serial Input
8 RB2/TX/CK Digital Out Serial Output
9 RB3/CCP1 Digital Out Motor0B
10 RB4/PGM Digital Out Motor0 Enable
11 RB5 Digital Out Motor1A
12 RB6/T1OSO/TICK1 Digital Out Motor1B
13 RB7/T1OSI Digital Out Motor1 Enable
14 VDD Power +5 Volts
15 RA6/OSC2/CLKOUT Digital In Phase2
16 RA7/OSC1/CLKIN Digital In Oscillator In
17 RA0/AN0 Analog In Comparator1 Vin-
18 RA1/AN1 Analog In Comparator2 Vin-

The second PIC16F628 pin assignments are listed in the following table:

Pin Description
Number Name Kind
1 RA2/AN2 Digital Out Phase2
2 RA3/AN3/C10 Digital In Limit+
3 RA4/TOCKI/CMP2 Digital In Home
4 RA5/MCLR*/THV Digital In Limit-
5 VSS Ground Ground
6 RB0/INT Digital In Step
7 RB1/RX/DT Digital In Serial In
8 RB2/TX/CK Digital Out Serial Out
9 RB3/CCP1 Digital In Direction
10 RB4/PGM Digital Out DAC Clock
11 RB5 Digital I/O DAC Data
12 RB6/T1OSO/TICK1 Digital In Encoder0
13 RB7/T1OSI Digital In Encoder1
14 VDD Power +5 Volts
15 RA6/OSC2/CLKOUT Digital In Configure
16 RA7/OSC1/CLKIN Digital In Shared Oscillator In
17 RA0/AN0 Digital Out Phase0
18 RA1/AN1 Digital Out Phase1

Schematics

The schematics are broken into 1 connectors schematic and 4 relatively identical axis schematics.

The parts list is kept in a separate file.

The parallel port schematic is shown below:

Parallel Port Schematic
The serial port schematic is shown below:
Serial Port Schematic

The power supplyschematic is shown below:

Power Supply Schematic

The X Axis schematic is shown below:

X Axis Schematic

The Y Axis schematic is shown below:

Y Axis Schematic

The Z Axis schematic is shown below:

Z Axis Schematic

The A Axis schematic is shown below:

A Axis Schematic

The Patched Axis schematic is shown below:

Patched Axis Schematic

Printed Circuit Board

The printed circuit board files are listed below:

Software

The software for the chopper microcontroller code is listed below:

chop.ucl
The µCL code for the chopper microcontroller.
chop.asm
The assembly code for the chopper microcontroller.
chop.lst
The assembly listing for the chopper microcontroller.
chop.hex
The Intel® Hex file for the chopper microcontroller.

The code for the control microcontrollers is based on the code below. Due to some wiring mistakes on the Revision C board, I have to program each axis controller slightly differntly.

control.ucl
The µCL code for the control microcontroller.
control.asm
The assembly code for the control microcontroller.
control.lst
The assembly listing for the control microcontroller.
control.hex
The Intel® Hex file for the control microcontroller.

xcontrol.ucl
The µCL code for the X control microcontroller.
xcontrol.asm
The assembly code for the X control microcontroller.
xcontrol.lst
The assembly listing for the X control microcontroller.
xcontrol.hex
The Intel® Hex file for the X control microcontroller.

ycontrol.ucl
The µCL code for the Y control microcontroller.
ycontrol.asm
The assembly code for the Y control microcontroller.
ycontrol.lst
The assembly listing for the Y control microcontroller.
ycontrol.hex
The Intel® Hex file for the Y control microcontroller.

zcontrol.ucl
The µCL code for the Z control microcontroller.
zcontrol.asm
The assembly code for the Z control microcontroller.
zcontrol.lst
The assembly listing for the Z control microcontroller.
zcontrol.hex
The Intel® Hex file for the Z control microcontroller.

I never set up the forth A channel; hence, there is no software for the A axis microcontroller.

Issues

The following fabrication issues have come up:


Copyright (c) 2001-2002 by Wayne C. Gramlich. All rights reserved.