BRAK Project-> Design info-> Electronics-> Motor board



Quik links

The BRAK Project
What's new
Project background
Design info
Student projects
Photo gallery
Vendor info
Related projects
Relevant links
Site map
Project timeline
The Next Generation

Brak E-mail
Engineering
Pacific

Page maintained by
khughes@uop.edu

Motor Controller Board


(click photo for full-size image)

This board is designed to control the steering and drive motors on the base of Brak. The drive system uses two identical Matsushita GMX-6MP013A 24VDC motors; each requires a minimum current of 200mA and have a rated stall current (when there's so much load the motors won't turn) of 4.5A. The motors also have integrated quadrature encoders which can be used to determine the direction and speed of the motor's shaft. We wanted a driver circuit which would be easy to control digitally and would require as few parts as possible. After searching and asking around we found the Allegro Microsystems UDN-2998W dual full-bridge motor driver. These full-bridge devices can drive loads up to 3A peak and 2A sustained and are equipped with TTL-level enable and direction control inputs. Each of these inputs is connected to the board's microcontroller through 4N32 optocouplers for noise isolation.

The PC-side of the driver board has gone through a number of revisions, but all have been built around a Philips Semiconductor 8xC552 microcontroller. The microcontroller was somewhat of an overkill but was chosen (1) for later expansion, (2) to learn more about the 8051 microcontroller family, (3) to learn more about the I2C serial bus, and (4) because it has two PWM outputs. An 8-bit address latch and a 32Kx8 EPROM are used with the microcontroller. The original version of this board was an ISA bus card, prototyped in wirewrap during 1994. This board was in use until the summer of 1998. A wirewrap prototype for an I2C serial bus version was developed during the summer of 1997 and boards were manufactured in winter of 1998 (shown in the photo above). This board was tested in the summer of 1998 and replaced the ISA version. A few problems were found and corrected on the production board.

One addition to this board, made possible by the large package size of the 8xC552, was 4 digital I/O pins and 4 analog input pins. The 8xC552 has a built-in 8-bit ADC and since it was not being used -- as were many of the other digital I/O pins -- we added an extra header to the final PCB design which would let us take address future analog or digital inputs. A Panasonic DN8897 Hall-effect magnetic sensor was added to the robot in Summer 2000 to sense the orientation of the steering wheels, and this header was used to interface with the device.

The software for the 8xC552 microcontroller is has slowly been extended since the board was designed. It allows the PC to specify the direction and PWM setting for each full-bridge motor driver, to read/clear the motor's encoder values, and to home the steering system using the Hall effect sensor. The motors have integrated quadrature encoders so direction and rate information is available to the microcontroller. The 8xC552 has enough I/O pins to accommodate the quadrature encoder outputs of both motors, as well as built-in input capture capability. Currently the board detects changes in the encoders by using one channel to interrupt the microcontroller; the interrupt service routine checks the second channel to determine the direction of rotation and increments or decrements the encoder count. The original ISA bus card did not use the encoder outputs, but the I2C bus card has circuitry to use them. Future software may implement speed control for the motors using a PID controller or fuzzy logic.

The C program development for the 8051 was originally done in a convoluted manner; in Summer 2000 the code was ported to the SDCC compiler. The original convoluted source is (V1.03) is shown below for reference only.

Parts List

Part numberDescriptionQtyPrice
Newark Electronics
UDN-2998WDual full-bridge motor driver 2 $5.45
Marshall Industries
S80C552-4A68Microcontroller, PWM and I2C interface 1 $13.06
Digikey
DN8897-ND IC Sensor, Hall Effect, Bi-Pullup 1 $1.69
Mouser Electronics
511-M74HCT573Latch, octal D-type 1 $0.81
511-M27C256B-15FEPROM, 32Kx8, DIP-28 150ns 1 $3.57
73-XT49S1200-20Crystal, 12MHz, HC-49/US 1 $0.73
512-4N32Optocouplers, Darlington output 4 $0.42
151-1568IC Socket, PLCC-68 tin thru-hole 1 $1.57
571-26403623IC Socket, DIP-28 0.600" thru-hole 1 $0.14
571-26404643IC Socket, DIP-20 0.300" thru-hole 1 $0.10
571-26412963IC Socket, DIP-6 0.300" thru-hole 4 $0.04
154-UL6641PCB modular jack, RJ11, 6 position/4 contact 4 $0.87
571-34356400DIP switch, 3 position 1 $1.37
517-6121TGHeader, 0.100" double row, 80 contacts 1 $1.66
163-5008DC power jack, 1.3mm 1 $0.73
571-3502091PCB connector housing, 2 circuit 1 $0.36
571-3502111PCB connector housing, 4 circuit 1 $0.66
333-KSP2222ATransistor, NPN, TO-92 2 $0.18
569-L83-1KResistor pack, 1.0K, isolated, 8 pins 2 $0.25
571-6404567Header, 7 pins, 0.100" friction lock 2 $0.44

Board designs

  • V1.3 Schematic in Adobe PDF (23Kb)
  • V1.3 Schematic in PostScript (135Kb)
  • OrCAD Schematic files and libraries
  • Gerber 274-X format

Software (includes source code and Intel HEX-format files)

Tools (programs you may need)


Create FREE graphics at FlamingText.com