This is the revision D version of the Shaft2 module.

Shaft2 Module (Revision D)

Table of Contents

1. Introduction

The Shaft2 module keeps track of two quadrature rotation sensors.

Shaft2 (Rev. D) Picture

2. Programming

Command
Name
Action Bit Description
8 7 6 5 4 3 2 1 0
Count Latch Send 0 0 0 0 0 0 0 0 0 Latch the current rotation count for both shafts.
Count Clear Send 0 0 0 0 0 0 0 0 1 Clear rotation count for both shafts.
Shaft High Get Send 0 0 0 0 0 0 0 1 s Read the latched 16-bit shaft value for shaft s. Return the high order 8 bits as hhhh hhhh. Save the low order 8 bits for the Shaft Low Get command.
Receive 0 h h h h h h h h
Shaft Low Get Send 0 0 0 0 0 0 1 0 0 Return the low order 8 bits of the last shaft read as llll llll.
Receive 0 l l l l l l l l
Common
Commands
Send 0 1 1 1 1 1 x x x Standard common command. See specifications for details.
Receive 0 a a a a a a a a
Select Send 1 a a a a a a a a Select the module with an address of aaaa aaaa. A time-out indicates that the module is not selected.
Receive 0 1 0 1 0 0 1 0 1

3. Hardware

The hardware consists of a circuit schematic and a printed circuit board.

3.1 Circuit Schematic

The parts list kept in a separate file -- shaft2.ptl.

The schematic for the Shaft2 module is shown below:

Shaft2 Schematic

3.2 Printed Circuit Board

The printed circuit board files are listed below:

shaft2_back.png
The solder side layer.
shaft2_front.png
The component side layer.
shaft2_artwork.png
The artwork layer.
shaft2.gbl
The RS-274X "Gerber" back (solder side) layer.
shaft2.gtl
The RS-274X "Gerber" top (component side) layer.
shaft2.gal
The RS-274X "Gerber" artwork layer.
shaft2.gml
The RS-274X "Gerber" mask layer.
shaft2.drl
The "Excellon" NC drill file.
shaft2.tol
The "Excellon" tool rack file.

4. Software

The following files are available:

shaft2.ucl
The Shaft2 µCL source code file.
shaft2.asm
The Shaft2 firmware assembly code listing.
shaft2.lst
The Shaft2 firmware listing file.
shaft2.hex
The Shaft2 firmware Intel® Hex file.

5. Issues

The following fabrication issues came up:

6. Additional Information

The motors and shaft encoders that have been used with this module come from Solutions Cubed. In particular, the motor is the MOTOR1 and the encoder is the ENC300. The motor is available from alternate vendors such as Jameco. The encoders are actually from US Digital. The nice thing about Solutions Cubed is that they sell the motor, encoder, and encoder mounting kit all together, so there is no finger pointing if parts are missing.

The shaft encoder chip is the LS7366 from LSI Computer Systems and it is very difficult to obtain. I eventually wound up buying a tube of the chips from Gemini Electronics. When I called them I had to ask if they sold the chip, since it was not listed on their web site.

The encoders from US Digital conform to the following pin outs.

Pin Usage
1 Ground
2 Index
3 A Channel
4 +5 Volts
5 B Channel
Note that the LS7366 must have a logic low voltage less than 1.0V and a logic high voltage above 3.5 volts.


Copyright © 2005-2007 by Wayne C. Gramlich. All rights reserved.