









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!










ABSTRACT
A low-level control system for a Seiko Industrial Robot with both input and output capabilities is described in this functional specification. This system will take inputs from a higher-level control system describing the speed and length of time at which the motor needs to move, and send these commands to different motor controllers, which will handle the voltages and currents necessary to actually move each of four motors in the robot. This controller will also receive feedback from the motors such as position or errors, and handle the situations appropriately. In addition, when the instructions are received, a pulse will be sent to the tooling pneumatic valve either to open or close the claw.
1.0 INTRODUCTION
This circuit acts as a medium between the Seiko Industrial Robot and a higher-level circuit. The higher-level circuit will be determining the speed and length of time at which each motor needs to move to in order to reach the robot's destination. In addition, they will determine when the claw needs to be opened or closed. Serial or parallel communications will be used for both data transmission and reception. In addition to communication with the high-level circuit, there will be communication with the actual motor controllers that move each individual motor. In addition, there will be a connection to a pneumatic valve, which is responsible for controlling a claw. A modulated pulse width based on the speed must be determined and sent to each of the four motor controllers. Further background will be discussed on DC servo motors, pulse- width modulation, series and parallel communications.
1.1.1 DC Servo Motor Background
The direct current (DC) motor is one of the first machines devised to convert electrical power into mechanical power [3]. Permanent magnet (PM) direct current converts electrical energy into mechanical energy through the interaction of two magnetic fields. One field is produced by a permanent magnet assembly; the other field is produced by an electrical current flowing in the motor windings. These two fields result in a torque which tends to rotate the rotor. As the rotor turns, the current in the windings is commutated to produce a continuous torque output. Permanent magnet (PM) motors are
will see the average supply voltage (half of the full supply voltage), and will run more slowly accordingly. As the amount of time that the voltage is on increases compared with the amount of time that it is off, the average speed of the motor increases. The ratio of on-time to off-time is called duty cycle. Therefore, as duty cycle increases, speed of the motor will increase, and vice versa. An example of the effect of duty cycle on speed can be seen when the supply voltage is 12(V), as shown in figure 1.
Figure 1: Effect of Duty Cycle on 12(V) Supply
Pulse width modulation is a method of carrying information in a string of pulses. A logic one is held for duration of time which determines the pulse. A periodic signal changes its ratio of high time to low time, its duty cycle, in response to some signal. There are usually two counts involved: one for the high time and one for the low time. If just one of the numbers is varied, then this is a form of frequency modulation, as the period will change as well. If both numbers are varied so that they always total a set value, then the frequency stays the same and just the duty cycle varies.
1.1.3 Serial Communications Background
The name "serial" comes from the fact that a serial communication "serializes" data [4]. That is, it takes a byte of data and transmits the 8 bits in the byte one at a time. The advantage is that a serial communication requires only one wire to transmit the 8 bits (while a parallel port needs 8). The disadvantage is that it takes 8 times longer to transmit the data than it would if there were 8 wires. Serial communication lowers cable costs and makes cables smaller, and allows for faster communications, since there is no skew issue.
Serial ports, also called communication (COM) ports, are bi-directional. Bi-directional communication allows each device to receive data as well as transmit it. Serial devices use different pins to receive and transmit data -- using the same pins would limit communication to half-duplex, meaning that information could only travel in one direction at a time. Using different pins allows for full-duplex communication, in which information can travel in both directions at once.
Before each byte of data, a serial port sends a start bit, which is a single bit with a value of 0. After each byte of data, it sends a stop bit to signal that the byte is complete. It may also send a parity bit.
Communicating serially involves sending a series of digital pulses back and forth between devices at a mutually agreed-upon rate. The sender sends pulses representing the data to be sent at the agreed-upon data rate, and the receiver listens for pulses at that same rate. This is what's known as asynchronous serial communication. There isn't one common clock in asynchronous serial communication; instead, both devices have their own clock and agree on a rate to which to set their clocks.
For example, two devices have to exchange data at a rate of 9600 bits per second. First, three connections are made between the two devices:
Now, since the data rate is 9600 bits per second (9600 baud), the receiver will continually read the voltage that the sender is putting out, and every 1/9600th of a second, it will interpret that voltage as a new bit of data. If the voltage is high, it will interpret that bit of data as a 1. If it is low, it will interpret that bit of data as a 0. By interpreting several bits of data over time, the receiver can get a detailed message from the sender. At 9600 baud, for example, 1200 bytes of data ideally can be exchanged in one second. The actual number will be slightly less than 1200 bytes per second, due to the overhead of the start and stop bits.
For example, sending the number 90 from one device to another will involve the following. First, the number has to be converted from the decimal representation 90 to a binary representation. In binary notation, 90 is equal to 01011010. So the sending device will pulse it’s transmit line, using 0(V) as logic 0, and +5(V) as logic 1, as shown in figure 2.
1.1.4 Parallel Communications Background
When IBM introduced the PC in 1981, the parallel printer port was included as an alternative to the slower serial port as a means for driving the latest high performance dot matrix printers [5]. The parallel port had the capability to transfer 8 bits of data at time whereas the serial port transmitted one bit at a time. The parallel port, as implemented on the PC, consists of a connector with 17 signal lines and 8 ground lines. The signal lines are divided into three groups:
Control (4 lines) Status (5 lines) Data (8 lines)
As originally designed, the control lines are used as interface control and handshaking signals from the PC to the printer. The status lines are used for handshake signals and as status indicators for such things as busy indication and interface or peripheral errors. The data lines are used to provide data from the sender to the receiver, in that direction only. Later implementations of the parallel port allowed for data to be driven from the peripheral to the sender.
Table 1 identifies each of the signal line signals and gives their Standard Parallel Port (SPP) definitions. The signals within these groups are assigned to specific bits within the registers that make up the hardware/software interface to the parallel port. The parallel port is mapped into the I/O space of the PC. The registers consist as a contiguous block of 3 registers starting from the parallel port's base address. These ports are commonly referred to as the LPT ports and have the familiar I/O base addresses of 3BCh, 378h and 278h. Newer implementations of the parallel port, that support the advanced modes of the 1284 standard, use 8 to 16 registers and are located at I/O addresses 378h or 278h, or are re-locatable, as in the case of a Plug and Play compliant parallel adapter.
Table 1: SPP Signal Definitions (ex. Data sent from PC to a printer) Group SPP Signal In/Out Signal Description
Control nSTROBE Out Active low. Indicates valid data is on the data lines.
nAUTOFEED Out Active low. Instructs the printer to automatically insert a line feed for eachcarriage return nSELECTIN Out Active low. Used to indicate to the printer that it is selected. nINIT Out Active low. Used to reset the printer.
Status nACK In A low asserted pulse used to indicate that the last character was received.
BUSY In A high signal asserted by the printer to indicate that it is busy and cannottake data.
PE In Paper Empty SELECT In Asserted high to indicate that the printer is online. nERROR In Asserted low to indicate that some error condition exists
Data DATA[8:1] Out 8 data lines- output only in older SPP
Table 2 identifies the registers for the standard parallel port.
Table 2: SPP Register Definition Register Offset Name Read/Write Description
0 Data Register R/W Data port to read or write data
1 Status Register R Contains status bits
2 Control Register W Used to set control signals
3-7 Various N/A Used differently by various implementations
Byte mode will be used for parallel communications between this circuit and the high- level circuit. With later implementations of the parallel port interface, some manufacturers, led by IBM on the PS/2 parallel port, added the capability to disable the drivers used for driving the data lines, and allowed the data port to become an input read data port. This enables a peripheral to send an entire byte of data to the PC in one data transfer cycle by using the 8 data lines, rather than the two cycles required using the Nibble mode.
This ability enables a Byte mode for reverse channel data transfer that can be used to provide data rates into the PC approaching that of the Compatibility mode, from the PC. This type of port is sometimes referred to as a "enhanced bi-directional" port, and has caused some confusion when mistaken for an Enhanced Parallel Port (EPP).
The following table identifies the Byte mode signal names, and figure 3 shows the handshake for a Byte mode data transfer.
Table 3: Byte Mode Signals SPP Signal Byte ModeName In/Out (^) Signal usage when in Byte Mode data transferDescription
nSTROBE HostClk Out Pulsed low at the end of each Byte mode data transfer to indicatethat the byte was received. Acknowledge signal.
nAUTOFEED HostBusy Out Set low to indicate host is ready for byte. Set high to indicate bytehas been received. Handshake signal.
nSELECTIN 1284Active Out Set high when host is in a 1284 transfer mode.
nINIT nINIT Out Not used. Set high.
nACK PtrClk In Set low to indicate valid data on the data lines, set high inresponse to HostBusy going high.
BUSY PtrBusy In Forward channel Busy status.
PE AckDataReq In Follows nDataAvail
SELECT Xflag In Extensibility flag. Not used in Byte mode.
nERROR nDataAvail In Set low by peripheral to indicate that reverse data is available.
DATA[8:] DATA[8:1] Bi-Di Used to provide data from peripheral to host.
Figure 4: Parallel Communication of a Binary String
It has been agreed upon that if this circuit and the high-level circuit use parallel communications, the rate of data transfer will be 700 bytes of data per second, or 700 baud.
1.1.5 Pneumatic Valve Background Information
The pneumatic valve that controls the claw on the arm of the robot functions quite simply. It is supplied with air pressure from an external connection. This solenoid has two output hoses, labeled hose A and hose B. Hose A connects to the rear of an air cylinder, while hose B connects to the front of the air cylinder. The air cylinder is responsible for pushing a piston that, depending upon direction it is pushed, will open or close the claw. When this solenoid is energized, the air pressure will flow through the valve and through hose A, to push the piston in the air cylinder outward to open the claw. When the solenoid is de-energized, the air pressure will flow the other direction through the valve and out through hose B, pushing the piston in the air cylinder back inward, closing the claw.
1.1.6 Floating Point Number Representation
Floating-point numbers are all input as a four-byte value. The first byte defines the exponent, followed by the three-byte mantissa; the sign of the mantissa is stored in the most significant bit of the mantissa. A negative mantissa will have its most significant bit set (one) and a positive mantissa will be cleared (zero). The exponent byte indicates the position of the binary point and is biased by decimal 128. This gives us a range of about 1x10±^38.
The mantissa is normalized. This means that the most significant bit, the integer portion, is always one. Since the integer is always one, it is assumed that this bit can instead be used to store the sign of the mantissa. The rest of the mantissa describes the fractional portion, or the portion of the number to the right of the binary decimal point. This format is called hidden-bit normalized form. This is how all floating-point numbers will be stored in memory and transferred to and from the high-level circuit.
The current controls system for the Seiko Industrial Robot is outdated and dying. The cost to upgrade to new hardware and software is very expensive. We will be designing and making this part of the control system using a total cost of $50 or less. The goal of this project is to design a new functional control system for the robot with heavy cost savings, as well as specific design tailored to this robot.
The low-level control system will consist of multiple data lines using either serial or parallel communications for input and output, a microprocessor containing pulse-width modulation capability, as well as a serial and parallel interface, and a power connector. This board will be taking inputs from a high-level control system that describes the direction, speed, and on-time that each of four robot motors must move. These speeds will be converted to a pulse-width for the DC servo motors, and the outputs are transmitted to individual motor controllers.
The top pin must be supplied with a regulated +5(V), at a minimum of 0.5(A). The bottom pin is the ground pin.
2.1.3 Serial Communications Port
For communication between the high and low-level controller, an RS-232 serial port will be used. In this case it will be a DB-9 connector, as shown in figure 6.
Figure 6: Picture of 9-Pin Connector
Our circuit will only use pins 2, 3, and 5 to transmit and receive data and connect to ground.
2.1.4 Outputs to Motors
The output to each of the four individual motors will actually consist of three separate outputs: a common ground, a high/low output to signify the direction of the motor, and the pulse width modulation output. The motor controller uses an H-Bridge design [6], shown in figure 7, which uses four MOSFET’s.
Control Signal B
V (^) low
V (^) high
Control Signal A
M
Control Signal C
Control Signal D
Figure 7: An H-Bridge Motor Controller
When the directional output has +5(V) applied to it, the motor will turn in one direction. When this output has 0(V) applied to it, the motor will turn in the other direction. The PWM output will actually be split into four separate inputs to the motor. These four
outputs will be in the form of a modulated pulse width, with one of these outputs going to each control signal. Only two of the MOSFET’s may be turned on at the same time, and they must be in one of two configurations: signal A and signal D are receiving a PWM while signals B and C are receiving 0(V), or signals C and B are receiving a PWM while signals A and D are receiving 0(V).
2.1.5 Inputs from Motors
The motors use an encoder to determine how far each of the motors has traveled. We will be receiving this information as feedback from each motor. This information will then be passed on to the high-level circuit in the form of a floating-point number with radians as the unit.
2.1.6 Inputs from High-Level Controller
The high-level controller will be determining the speed, direction and time that each of the four robot motors must move. The speed will be converted into a modulated pulse width using the PWM algorithm. This data will then be communicated to this controller, using either serial or parallel communications. The format of these communications is illustrated in section 3.2 of this document.
This process controller will be used to control the motion of a robot. This is to be accomplished by receiving the speed, direction, and the length of on-time of each motor from a high-level circuit. This data will be used to generate a modulated pulse width that indicates to the motor controller what speed the motor is to move at. A second output to the motor controllers will tell the motor what direction to rotate. The on-time of each of the motors will be tracked by a counter within the circuit. The pulses for each individual motor will not be sent until all of the speeds and times for the four motors have been received, followed by a ‘GO’ signal from the high-level controller.
2.2.1 The Pulse Width Modulation Algorithm
The pulse width modulation algorithm is fairly simple and straightforward. The high- level circuit will be sending the speed that each motor should travel as an input to this circuit. Through a proportionality calculation, the circuit will determine the pulse width of the necessary signal. Each of the pulse width modulation signals will then be sent to the appropriate motor driver simultaneously.
All communication between this circuit and high-level circuit will be performed through either a series or parallel connection, using ASCII code format. One data line will be dedicated to input to the circuit, while the other will be dedicated to output from the circuit. The circuit will be receiving data concerning what direction, speed, and on-time each motor will have. Likewise, the circuit will be transmitting data concerning the rotational distance traveled of each motor as feedback information.
The inputs to the circuit from the high-level controller have been agreed upon. The signals received will consist of a letter, representing one of four motion axes, the X-axis (designated motor X), the Y-axis (designated motor Y), the Z-axis (designated motor Z), and the tooling axis (designated motor T). Each letter will be followed with a letter representing the direction of that motor. This will be followed by a number representing the speed of the motor. This will be followed by a number representing the on-time of the motor. For example, if motor X is instructed to rotate left, at a speed of 35, for an on- time of 20 seconds, the output will be the ASCII representation of the following string: "X L 35 20". When the claw is to be opened, the motor T information will be followed by and ASCII "O" for open or "C" for closed. For example, if motor T is instructed to rotate right, at a speed of 15, for an on-time of 10 seconds, and the claw is to close, the output will be the ASCII representation of the following string: "T R 15 10 C". If a motor does not receive new instructions, it will be assumed that the motor is to be held in its current position. All of the destination data will be stored in a buffer, until a “GO” signal, designated ‘G’, is received. When this "GO" signal is received, a pulse-width modulation will be sent to each individual motor controller, which the motor interprets as motor speed.
The outputs from this circuit to the high-level controller will occur when the motors stop movement. It will consist of a floating-point value, in radians, of the rotational distance that each motor has traveled. In the event that an error occurs, a new string will be sent followed by the rotational distance that each motor has traveled. This new error string will consist of the letter ‘E’ indicating an error, followed directly by the letter of the motor that encountered the error. Next, a number will follow, indicating which predetermined error has occurred. The numbering of the errors is as follows: Error 1: End of Range of Motion Error, Error 2: Motor Not Functioning. For example, if motor Z reaches its end of range of motion, the output to the high-level controller will be the ASCII representation of the following string: "E Z 1". As soon as an error is encountered, all motors will stop and hold their current position until a new ‘GO’ signal is received from the high-level circuit.
4.0 REFERENCES
[1] Microcontrollers, connectors, and other assorted parts can be found online at: http://www.DigiKey.com
[2] Useful Pulse Width Modulation links can be found at: http://homepages.which.net/~paul.hills/SpeedControl/SpeedControllersBody.html#7. http://www.4qdtec.com/pwm-01.html http://www.acroname.com/brainstem/examples/pwm/pwm.html
[3] Useful DC Servo Motor links can be found at: http://www.epanorama.net/links/motorcontrol.html#dc http://etidweb.tamu.edu/projects/labview/closedloop/motor.htm
[4] Useful Serial Communications links can be found at: www.howstuffworks.com/serial-ports http://fargo.itp.tsoa.nyu.edu/~tigoe/pcomp/serial.shtml
[5] Useful Parallel Communications links can be found at: http://www.fapo.com/ieee1284.htm
[6] Useful H-Bridge Motor links can be found at: http://www2.tntech.edu/me/courses/canfield/me4370/HBridgeMotorDriver.htm