<<

Steer-by-Wire Control System Adem Kader Swarthmore College Department of Engineering Advisor: Erik Cheever May 2006

Abstract The automotive industry has already implemented many advanced computer systems in an attempt to increase safety and comfort of drivers. In parallel with these advancements we see a big shift from mechanical systems to electrical systems and steer-by-wire is another implementation that is very promising in terms of safety and functionality. Already, there are some commercial prototypes of such ‘by-wire’ systems[1] and there is a lot of research, both academic[2] and comercial[3], in the field. For my Engineering Senior Design Projet at Swarthmore College, I chose to work on a steer-by-wire system to gain more insight into control theory and I thought the double-control system that provided the crucial feedback to the driver was an interesting engineering problem.

1 Contents

1 Introduction 3 1.1 Definition and Benefits of Steer-By-Wire ...... 3 1.2 Introduction to the Project ...... 3

2 Design 4 2.1 System Overview ...... 4 2.2 Physical Components ...... 4 2.2.1 ...... 4 2.2.2 Feedback Motor ...... 6 2.2.3 Angular Sensors ...... 6 2.3 Electronics ...... 7 2.3.1 Microcontrollers ...... 7 2.3.2 Pulse Width Modulation and the H-Bridge ...... 9 2.3.3 Motor Controller for Steering Actuator ...... 10 2.4 Computer Modeling ...... 10 2.4.1 Simulink Modeling ...... 10

3 Testing 11 3.1 Testing Procedure ...... 11 3.2 Determining PID constants ...... 12

4 Discussion 14

5 Future Work 14

6 Acknowledgements 14

7 APPENDIX 16

2 1 Introduction 1.1 Definition and Benefits of Steer-By-Wire A steer-by-wire system aims to eliminate the physical connection between the steering and the of a by using electrically controlled motors to change the direction of the wheels and to provide feedback to the driver. Today’s automobiles benefit more and more from the many uses of electronic systems. The integration of a steer-by-wire system can enhance these systems in many ways. In particular, the handling and the safety of the can be improved significantly. Since a steer-by-wire system is easily modifiable, different drivers will be able to adjust the system to accommodate their styles and this will enhance handling. I addition, disabled people and the elderly will benefit immensely from steer-by-wire because they will be able to situate the to meet special needs. Traction control systems are very closely tied with driving safety and they can be enhanced with steer-by-wire vastly. For instance, in a situation where the car starts oversteering (when the rear of the heads towards the outside of the corner), the natural instinct of many inexperienced drivers is to turn the steering wheel towards the inside, which in turn causes more oversteer. A steer-by-wire system could be modified to take control in a situation like this to steer to the outside. Since there are virtually no physical connections between the steering wheel and the wheels, a steer-by-wire system can be implemented on different cars easily. The steering wheel could be placed on either side of a car (or anywhere else). Both of these improvements would reduce costs of production and allow a wider range of designs. The downsides of a steer-by-wire system are maintenance and power cost. Concievably steer- by-wire will use more power than the currently used system, however considering the power con- sumption of the power cost will be insignificant. There might also be more electrical failures, but presumably steer-by-wire systems will last longer because they have fewer mechanical parts and will improve safety and therefore help the overall maintenance costs.

1.2 Introduction to the Project I chose to work on a steer-by-wire system control because it is an interesting double-control problem. As seen in Figure 1, my system has two rotary encoders that provide angular information to a computer controller through two microcontrollers. Then the computer controller regulates two external controllers that are necessary for voltage and current adustments. The adjusted output drives the feedback actuator and the steering actuator to their desired positions. Whenever there is a difference in the angles of the two motors, the system tries to bring the difference back to zero, which is the equilibrium and the desired confiuration. The system has two different motors with different parameters that depend on each other and this necessitates two controllers that have to be merged into one big controller that is capable of reacting to outside disturbances. The outside disturbances are the driver and the road. The driver controls the smaller of the two motors in the system since it is easier to steer a motor with lower torque. The road might cause quick disturbances (for instance when a car hits a curb and the wheels instantly change direction) and clearly these are unwanted and dangerous disturbances so a motor with high torque is required to control the wheels in order to minimize destructive interferences.

3 Figure 1: Overview of system

2 Design 2.1 System Overview The steer-by-wire system consists of two main parts. The steering section consists of the steering wheel, the feedback actuator and the feedback actuator angle sensor. The wheel section contains the wheels, the rack and , a steering actuator and the pinion angle sensor. Figure 2 shows the system components. In my system I only demonstrated the double control mechanism and did not implement it in a rack and pinion configuration. The feedback angle sensor provides the steering actuator with its primary input signal and the pinion angle sensor provides the feedback motor primary signal. The small size of the feedback motor lets the driver rotate the steering wheel with little difficulty. As soon as the driver starts steering, the control mechanism tries to push the steering wheel back into place (and the wheels into the position dictated by the current position of the steering wheel) and this mimics the resistive force of a real steering wheel. However, changing the proportional constant of the feedback motor can make it harder/easier for the driver to steer and allows for adjustable steering (with some drawbacks such as more vibration).

2.2 Physical Components 2.2.1 Steering Actuator The steering actuator needs to be very powerful in order to turn the wheels of a car when the car is loaded. Minimizing the effects of unwanted disturbances also requires a powerful motor. In the design, I wanted to use a small wagon as a model and measurements showed that a motor with a torque of about 80lb-in was necessary. Ideally this motor would be a brushless DC motor in order to reduce noise and maximize motor life. However, the high cost and low availability of brushless motors led me to acquire the DC motor shown in Figure 3. This is a Groschopp 50757, a 88.9 lb-in

4 Figure 2: Components of a steer-by-wire system

motor that uses a 12V source and draws approximately 3.4 amps. Initially, I wanted to use a small wagon to implement my project and show that I could steer the wagon with a person seated on it. In order to find the right size motor, I put a 200lb weight located in the center of the wagon body and used a 39.5 inch crank to turn the rack of the wagon. With the wheels on a painted floor the force required was about 1.9lbs (and it never exceeded 2lbs). Thus the total torque was measured to be 39.5 · 2 ≈ 80lbs. Although this motor has sufficient torque, the maximum rotation speed is limited to 13.3 RPM. Using only 13.3 RPM, it is impossible to simulate rapid movements experienced in a car, therefore this motor requires to increase rotational speed at the expense of reducing force.

Figure 3: Steering Actuator

The high current characteristics of this motor make it impossible to control using an H-bridge

5 configuration and require a special controller. The specification sheet for this motor can be found in the appendix.

2.2.2 Feedback Motor

Figure 4: Feedback Motor

The feedback motor does not have to be as powerful as the steering actuator. In fact, it has to be much less powerful in order to be turned easily by a driver. I opted to use the motor seen in Figure 4. It was a used motor I acquired from the department. Initially I tested this motor with full power, and the torque it provided was similar to the torque felt in a real car and I concluded that this would be a sufficient motor. The power requirements were also reasonable. It operates at 12V and draws less then 1.5A, so the low current requirements allow for an H-Bridge controller.

2.2.3 Angular Sensors The angular sensors of the system are very crucial and they need to be very accurate because little perturbations or errors ultimately make the control of the system much harder for a driver. In a real implementation of a steer-by-wire system then would have be very high sensitivity and accuracy in order to minimize risks. In my project I used two optical digital encoders that were used in a previous project. These are BEI Duncan’s EX-11 and MX-15 encoders and both of the sensors are seen in Figure 5.

Figure 5: Angular sensors: Incremental encoders

6 Optical digital encoders’ precision and accuracy make them preferable over potentiometers. They output 1024 pulses per revolution in two channels. The channels have a 90-degree offset to indicate direction of rotation. Figure 6 shows the output wave form of the encoders. The specifications of both encoders can be found in the appendix.

Figure 6: Output wave form of the encoders (taken from the specifications)

2.3 Electronics Although most of the control mechanism is done in software, I needed some electronics that pro- vided sensible inputs for the controller and regulated the output from the computer to drive the motors. Firstly, since the rotary encoders did not provide absolute angle information, I used PIC microcontrollers to convert line counts to a voltage in the range of 0-5V. Secondly, the output of the digital acquisition board attached to the computer could generate voltages from -5 to +5 volts with a resolution of 1.22 mV and the current output is too low to drive the motors used. Although I never measured the maximum current output, I believe it is in the milliamp range. At least it is essentially zero compared to 3.4A needed by the steering actuator. Figure 1 shows where the electronics are located in the system.

2.3.1 Microcontrollers The rotary sensors have four possible combinations of outputs and these outputs have to be pro- cessed in order to measure the actual angle of rotation. This is done using the PIC microcontrollers. Once the C code for PICs is compiled, the ICD interface lets us install the program onto the PIC and the EEPROM allows the program to stay on the PIC even when the power is turned off and on. You can see a picture of the PIC microcontroller in Figure7, and see the schematics of the PIC in Figure 8. I appropriated C code from a project done by Emery Ku to run the PIC controllers. The code can be found in the appendix. Since the PIC is a digital device, it only outputs 0 or 5V. In order to get the intermediate values, we have to use the pulse-width-modulated output of the pics. This is done by the output

7 Figure 7: PIC microcontroller.

Figure 8: PIC microcontroller schematics (courtesy of Erik Cheever).

8 with a resistor and a capacitor. Depending on the values of the capacitor and resistor, the noise and speed of the output can be varied. I opted for a 12kΩ resistor and a 33µF capacitor.

2.3.2 Pulse Width Modulation and the H-Bridge The feedback motor requires low current and this makes the H-bridge configuration coupled with a pulse width modulated input signal (seen in Figure 9) a good choice for a controller. The pulse- width-modulation uses a comparator to compare a triangular wave to a user-specified input. The output is a square wave that has a duty cycle proportional to the specified input. The square wave is very useful because it can be used to switch transistors on and off.

Figure 9: Pulse width modulation and the H-Bridge Configuration

The pulse-width modulated signal goes through an inverter (4017) and a buffer (4016) to adjust the voltage to a range of 0-12V instead of the comparator output range of 0–5V. The outputs of the buffer and inverter are adjusted using a resistor between the outputs and a 12V source. Using the same source for the H-bridge and the output adjustment is a good idea because that way the gate and drain voltages of the mosfets are adjusted accordingly. The H-Bridge takes its name from the way it looks (see Figure 9). It consists of pairs of P-channel and N-channel mosfets. The right side and the left side of the H-bridge get exactly opposite signals and since the pulse-width-modulated signal runs the gate voltages, we get a very quick switching effect through the motor. Note that at a given time we only have P1 and N1 (which are on opposite sides) or P2 and N2 in operation. The current direction keeps changing and the motor stays idle when the duty cycle is 50%. When the duty cycle increases (or decreases), it allows more current

9 to flow though the motor in one direction than the other and thus the motor starts rotation. One drawback of the h-bridge is that it dissipates most power when the motor is idle. If we consider the fact that most of the time the steering wheel is idle the h-bridge can be very inefficient in terms of power consumption. However, for our purposes it gets the job done.

2.3.3 Motor Controller for Steering Actuator As mentioned earlier, the steering actuator is very powerful and draws a lot of current. Therefore a powerful controller is necessary to control it. I chose the KBBC-24M (see Figure 10) because it can be modified easily for use in various motors and can be used in future projects. With the

Figure 10: KBBC-24M controller for the steering actuator. wig-wag option selected, KBBC-24M accepts an input in the 0–5V range where 0 and 5V represent the fastest reverse and forward speeds respectively.

2.4 Computer Modeling Alhough the control system can be done in hardware, it is much easier to implement the control system in software. I chose to use Matlab because I was familiar with it from previous classes. There were some simulations of steer-by-wire systems done using Matlab[4] so I knew it would be a great choice.

2.4.1 Simulink Modeling Most of the modeling and control is done using SimuLink and Matlab . The Real-Time Workshop in Simulink allows the user to design the controller in blocks and then compiles the scheme and runs the program in real-time as long as the computer is on. As opposed to past years, when the DAQ Board could only be used for a limited number of data samples (and therefore time), the Real-Time Workshop is a huge improvement. In the steer-by-wire system, I implement the model seen in Figure 11. Although the controls of both motors seem similar, their inherent differences require different control parameters. The input to both controllers is governed by the difference in the rotary sensor readings. In other words, the error signal is the difference in the angular sensor voltages. Both systems use PID controllers but the parameters vary. Also, since integration causes more noise, the integration constant is very low.

10 Because the steering wheel angle sensor and the pinion angle sensor will usually be very close to each other, the integral control component does not help the system very much.

Figure 11: Control model

In Figure 11, you can see that the output of the PID goes through a saturation and a constant of 2.5 is added after the saturation. This is because both motors are at rest when the inputs are 2.5 V and they work in the range of 0–5V. The saturation adjusts the voltage to a range of -2.5–2.5V and the addition of 2.5V puts the final controller output in a range of 0–5V.

3 Testing 3.1 Testing Procedure Once I implemented my system with all individual parts working, I had to find optimal constants for the PID controller and adjust the saturation levels of the PID output. First I tested each motor individually, and observed their behavior for step inputs. I saw that the steering motor was very slow and that the controller output would be at a maximum (or minimum for reverse) most of the time. On the other hand, the feedback actuator would spin very fast with controller outputs of 5V or 0V, so I adjusted the saturation levels to -0.75–0.75V. With this saturation level, the input to the H-bridge was between 1.75V and 3.25V. This still provided enough feedback and a fast response. Since the controller output was saturated most of the time, I did not do simulations on the computer, and instead I found the PID constants by trial and error. However this did not mean

11 that I would have to rely on my luck to find the right values. Since I was familiar with the effects of changing control parameters, I could reach good values pretty soon and build on them.

3.2 Determining PID constants There are a few tuning methods to find the constants (or get in the ballpark of good constants). I first used the Ziegler-Nichols method introduced by John G. Ziegler and Nathaniel B. Nichols. This method starts with finding a critical gain Kc (the gain for which a proportional controller using this gain starts to oscillate). Then at the oscillation frequency it finds the oscillation period, Pc. Then the Ziegler-Nichols method suggests the values seen in Table 1.

parameter Kp Ki Kd value 0.6Kc Pc/2 Pc/8

Table 1: PID controller constants using the Ziegler-Nichols method

Initially, this gave me some guidance, and I had some success with controlling each of the motors individually, but I noticed that when I put the two systems together, these parameters did not help me much. The feedback actuator would vibrate a lot especially because the steering motor was very slow in reacting. I noticed that if I held the steering rod in place and waited for the steering motor to approach its desired position, the integral control would increase the output to the feedback actuator too much, and releasing the steering rod would cause it to overshoot a lot. When the system was in equilibrium, small differences in the sensor angles caused vibrations in the feedback actuator so eventually, I opted to eliminate the integral component of the feedback motor. The steering motor controller was very slow in switching from maximum forward to maximum reverse direction, so the control of the motor was very hard. When I was deciding the PID constants, I noticed that all combinations pretty much gave similar results. In the end, I decided to use values for which the step response would cause the motor controller to switch in time to drive the motor in the opposite direction and stop it. In general I followed the guideline in Table 2 to achieve acceptable controller constants. The final values I used can be found in Table 3

Parameter Rise Time Overshoot Settling Time Kp decrease increase small change Ki decrease increase increase Kd small change decrease decrease

Table 2: Effets of increasing parameters: a guideline for picking PID controller constants

steering motor feedback actuator

Kp 0.5 0.65 Ki 0.05 0 Kd 0.8 0.4

Table 3: PID controller values for the final design

The Matlab set-up during an operation of the system can be seen in Figure 12.

12 Figure 12: Sample operation Scope 0: Saturated feedback actuator output, Scope 1: error signal for feedback actuator, Scope 2: output for steering motor, Scope3: error signal for steering motor, Scope 4: input from feedback actuator sensor, Scope 5: input from steering angle sensor, Scope 6: Unsaturated output from steering motor PID

13 4 Discussion

Although there were many problems I encountered with each part of the project, in the end, I was able to show that a steer-by-wire system could work. However, given the slow responses of the system, my setup is far from ideal and needs many improvements. The feedback motor worked very well and to a certain extent it simulated the real driving experience. The steering motor didn’t work very well at all, and this can be attributed to the characteristics of the motor and the motor controller. The motor controller had a very slow switching time. It would take about 0.4 seconds to switch from one direction to the other and this really hindered the operation. Also, the steering motor was quite powerful so even though the motor controller were able to switch very fast, the motor would still be slow to react. In a real implementation, it might be a good idea to use two dedicated motors, one for each direction. The steering wheel can also be improved by adding dampers and springs. I believe that with various improvements, steer-by-wire can achieve some success. Sometimes even very small delays in reaction can be fatal so the delay between steering wheel rotation and actual steering might pose a great threat in the development of SBW systems. However, given other advancements in automotive technology, we see that more and more AI systems are being integrated into cars and combining SBW systems with these can be very promising. Doinng this project has improved my understanding of control systems greatly and I have gained significant experience in combining electronic and mechanical systems. Although I have not accomplished my initial goals of the project 100%, I believe that there was a lot of progress made and I think that this system can be improved upon.

5 Future Work

The SBW system I build can be improved a lot, but the main problem seems to be with the choice of controllers and motors. For a future project, given better equipment, this system could be implemented in a small model car and can be used for control theory demonstrations. New control systems, such as state-space controls, can be implemented to enhance the performance of the system. Although not in the near future, given enough resources, this system can be implemented in real roadcars and perhaps be combined with regular steering to take advantage of the safety benefits of a steer-by-wire system.

6 Acknowledgements

I would like to thank my advisor Prof. Erik Cheever for his invaluable help with the project. Without his guidance, patience and encouragement, this project would never be complete. I would also like to thank Prof. Fred Orthlieb, Grant Smith, Ed Jaoudi, Aron Dobos, Danielle Miller and Emily Kan with their guidance and help with mechanical parts of the project. I would like to thank Prof Bruce Maxwell and Prof Cheever for all the engineering classes I took with them (a lot). Finally, I would like to thank all fellow Swarthmore Engineers for being the people they are.

14 References

[1] Newlaunch.com. Steer-by-wire concept cars exhibited at tokyo motor show. [2] Kassakian Dominguez-Garcia. Haptic interface for automotive steer-by-wire systems. [3] Jon Demerly Sanket Amberkar, Farhad Bolourchi and Scott Millsap. A control system method- ology for steer by wire systems. [4] Joachim Langenwalter and Tom Erkkinen. Model-based design with production code generation for steer-by-wire system development.

15 7 APPENDIX

16 EX11 Data Sheet 1/11/2001 10:11 AM Page 1

Miniature Incremental Rotary Optical Encoder EX11Series

The EX11 Series was developed to provide a high precision, low cost enclosed shaft encoder for light duty applications. The EX11 offers benefits of the Opto-ASIC design with 1024 line counts in a 1.1 inch diameter size. Packaged in a glass filled polycarbonate housing with a 1/8" stainless steel shaft and precision bearings, the EX11 provides superior performance at a lower cost. The EX11 Series is capable of operating over a temperature range of -10°C to +70°C without degradation of signals. Proven design and Duncan Electronics’ experience makes the EX11 perfectly suited for high volume OEM applications, including: robotics, process control and instrumentation.

Standard Features • Line counts up to 1024 PPR • RS422 compatible 26LS31 line driver • 1.1 inch diameter package in servo or flange mount configurations • 2-year warranty

Figure 1 Figure 2 Servo Mount Flange Mount

.47 .05 .42 .093 .095 .437 .078 ¯ .08 .432 ¯.435±.002 DATE CODE TTWW EX113-XXX-1

DATE CODE TTWW EX113-XXX-2 .1247 .1247 ¯ ¯.1244 .1244

PIN 1 ± .38 .03 PIN 1 PIN 2 1.30 MAX PIN 2 1.25 MAX BROWN TO PIN 1 12°±1.0 12°±1.0 BROWN TO PIN 1

THRU HOLE 4X ¯ .100 1.10 SQ. .750 B.C. MOUNTING ¯.998 +.000 -.005 HOLES 2X .936 4X 2-56 THDS. MOUNTING HOLES X .15 DEEP All dimensions in inches .xx = ±.02 .xxx = ±.005

15771 Red Hill Avenue Tustin, CA 92780-7303 (714) 258-7500 Fax: (714) 258-4629 email: [email protected] www.beiduncan.com ISO9001 Certified/QS9000 Compliant EX11 Data Sheet 1/11/2001 10:11 AM Page 2

EX11 Series Miniature Incremental Rotary Optical Encoder

Performance Specifications Mechanical Pin No. Color Signal Dimensions see Figure 1 1 Brown N/C Weight 2.0 oz. (Approx.) 2 Red +5V Shaft Diameter 0.1247 +.0000/-.0003 3 Orange B Shaft Load axial 2 lbs., Radial 1 lb. Torque, starting less than 0.4 oz. in. 4 Yellow B running less than 0.2 oz. in. 5 Green index Inertia 3.0 x 10-5 oz. in./sec. 6 Blue index Motor Interface 7 Violet A Servo Mounting Holes 4 places #2-56 @ 90¡ on 0.75" B.C. 8 Gray A Servo Mount designed to accommodate motor 9 White N/C mount cleat “PIC type” L2-2 10 Black Ground Flange Mounting Holes 4 places .100 dia. thru holes Shaft Coupling must be flexible (do not hard mount) Electrical Figure 3 Code incremental 125 Pulses per Revolution see “Ordering Information” RPM X PPR KHz = PR 60 4 P 02 Supply Voltage +5 volts ±5% @ 80mA max. 100 1 Output Format dual channel quadrature and index with complements (no index on EX112) 75

Output Type TTL differential line driver (26LS31 or equiv.) 50 should be terminated into a line receiver (26LS32, or equivalent circuit) 25 200 PPR

Rise Time 1.0µsec. max. KHz (Cycles/Second X 1000) FREQUENCY: Frequency Response see graph: Fig. 3 12345678 SPEED (RPM X 1000) Environmental Temperature operating: -10¡C to +70¡C storage: -40¡C to +125¡C Output Wave Form

Termination 360°E NOM. Type 28 AWG flat ribbon cable with 10 position ° connector Berg P/N 65863-165 or equiv. 180 E NOM. Mates with Berg P/N65863-165 or equiv. 90°E NOM. (mating connector not provided)

A

A

B

Ordering Information B EX11 X - XXXX - X Basic Model No. 90°E TO 450°E Output Format INDEX 2 = Quadrature 3 = Quadrature w/index 6 = Quadrature w/index & complements INDEX Pulses Per Revolution (PPR) -200, -256, -500, INDEX -512, -1000, -1024 Mounting CW ROTATION OF SHAFT 1= Servo mount EX112 OUTPUTS A & B ONLY 2 = Flange Mount EX113 OUTPUTS A, B & INDEX ONLY EXAMPLE: EX113-500-2 EX116 OUTPUTS AS SHOWN

Specifications subject to change without notice. Printed in U.S.A. BE0025-EX11-1001 15771 Red Hill Avenue Tustin, CA 92780-7303 (714) 258-7500 Fax: (714) 258-4629 email: [email protected] www.beiduncan.com MX15 Data Sheet 1/11/2001 10:30 AM Page 1

Modular Incremental Rotary Optical Encoder MX15Series

By the time you have read this first sentence, you could have installed BEI’s model MX15 INSTA-MOUNT™ modular optical encoder. In addition to its quick and easy installation, the MX15 is designed to operate with jitter-free output signals without tight controls on shaft endplay, runout or perpendicularity. The new INSTA-MOUNT™ encoder is capable of operating within a temperature range of -10˚ to +70˚C, requiring less than 30 milliamps of L.E.D. current, without degradation of output signals and is short circuit protected. The MX15 is perfectly suited for motor manufacturers and other high volume OEMs. BEI’s INSTA-MOUNT™ Series encoder offers 5V TTL compatible quadrature outputs with index and complements as options. Axial shaft movements during operation, of ±0.010", will not adversely affect the output signals. Shaft runouts of 0.005" TIR can also be absorbed by this device without affecting output signal performance.

Standard Features Figure 1 • Resolutions to 1024 PPR (MX152/MX153) .75 • Quick and easy installation 1.280 .06

• Tolerant of axial shaft .70 OPTIONAL HEADER (H) movement often associated MOLEX 22-23-2071 .40 18" MIN. with less expensive motors PIN 7 1 • Jitter-free outputs 1.20 OPTIONAL CABLE ° • Index options TERMINATION 45 ¯ 1.54 • Increased MTBF

(lower component count) 2X.24 COVER BUTTON • 26LS31 line driver output AIR GAP CCW from MX156 PIN HOLE 2K ¯.120 THRU HOLE • High Frequency response • 2-year warranty Figure 2 (MX156) Dimensions not shown, same as Figure 1

.70 OPTIONAL HEADER (H) DUPONT #67996-510 18" MIN. 9 1 10 2

All dimensions .xx = ±.02 in inches .xxx = ±.005

15771 Red Hill Avenue Tustin, CA 92780-7303 (714) 258-7500 Fax: (714) 258-4629 email: [email protected] www.beiduncan.com ISO9001 Certified/QS9000 Compliant MX15 Data Sheet 1/11/2001 10:30 AM Page 2

MX15 Series Modular Incremental Rotary Optical Encoder

Performance Specifications Mechanical Environmental Dimensions see Figure 1 Temperature operating: -10¡C to +70¡C Weight 2.0 oz. storage: -40¡C to +125¡C Moment of Inertia 2.6 x 10-5oz in sec2 Enclosure unsealed housing unit must be Bore Size see “Ordering Information” protected from harsh environments Motor Interface Termination Mount Holes #2-56 threads @ 180¡ on 1.280 dia. B.C. Terminal Board (Header) Mount Hardware #2-56 x 3/4 in. long (provided) (MX152 & MX153) Pinout Perpendicularity Pin # Signal Pin # Signal Shaft to Mount ±0.002" TIR 1 N/C 5 data B Shaft Runout 0.005” max (each 0.0001 degrades 2 index (MX153) 6 data A accuracy by 0.5 arc minutes) 3 N/C 7 ground Shaft Endplay 4 +5 volt Dynamic or Static ±0.005” Shaft Finish 16 microinches or better (MX156) Pinout End must be chamfered or rounded Pin # Signal Pin # Signal Shaft Tolerance 0.0002"/-0.0007" (e.g. ¯.2493/.2498) 1 +5 volt 6 data A Shaft Length 0.45" minimum 2 +5 volt 7 ground (remove cover button for motor through-shafts) 3 index 8 ground Electrical 4 index 9 data B Code incremental 5 data A 10 data B Pulses per Revolution see “Ordering Information” Round Shielded Cable Index Pulse Options ungated index (U) (MX152 & MX153) Color Code (no index on MX152) gated index (G) Supply Voltage 5 volts ±5% @ 80mA max. Color Function Color Function Output Format dual channel quadrature and index Red +5 volt Green data B (MX152 & MX153) (no index on MX152) Black ground Orange index (MX153) Output Format dual channel quadrature and index White data A (MX156) with complements Output Type square wave TTL. 16mA sink (MX156) Color Code (MX152 & MX153) 500µA source. Short circuit protected Color Function Color Function Output Type TTL differential line driver (26LS31 or equiv.) Red +5 volt Green data B (MX156) should be terminated into a line receiver Black ground Wht/Blk date B (26LS32, or equivalent circuit) White data A Orange index Frequency Response see graph: Fig. 3 Blue data A Red/Blk index Rise Time 1.0µsec. max.

Figure 3 125 RPM X PPR ° KHz = 60 Output 360 E NOM. 100 1024 PPR Wave Form 180°E NOM. 75 90°E NOM. 50

25 200 PPR A FREQUENCY: KHz (Cycles/Second X 1000) FREQUENCY:

12345678 SPEED (RPM X 1000) A Ordering Information MX15 X - XX - XXXX - X - X B Basic Model No. Output Format B 2 = Quadrature 3 = Quadrature w/index INDEX GATED TO A & B 6 = Quadrature w/index & complements 90°E TO 450°E Bore Size INDEX UNGATED 25-.25", 38-.375" 6M-6mm, 8M-8mm Pulses Per Revolution (PPR) INDEX 500, 512, 1000, 1024 Index Option INDEX G = gated to data A & B U = ungated CCW ROTATION OF SHAFT Electrical Termination MX152 OUTPUTS A & B ONLY T = terminal board MX153 OUTPUTS A, B & INDEX ONLY H = terminal board w/header EXAMPLE: MX153-25-500-U-P P = round shielded cable MX156 OUTPUTS AS SHOWN

Specifications subject to change without notice. Printed in U.S.A. BE0025-MX15-1001 15771 Red Hill Avenue Tustin, CA 92780-7303 (714) 258-7500 Fax: (714) 258-4629 email: [email protected] www.beiduncan.com

DATA SHEET Apr 26, 2006

420 15th Street [email protected] Sioux Center, IA 51250-2100 www.groschopp.com Voice: 800-829-4135 Fax: 712-722-1445 Catalog Part # 50757 Customer: GG-Web Motor: PM 6015 12 v DC Application: 2 Poles 800 rpm Quote: Gearbox: PS 1900 60:1 Ratio

Speed, Efficiency Vs. Torque Cold Rating: Hot Speed: 13.1 rpm Torque: 88.9 lb-in 22.5 90.0 Current: 3.4 amps Output: 14 watts 20.0 80.0 Output: 0.0184 HP Duty Cycle: On: Continuous 17.5 70.0 E Off: f Efficiency: 15.0 60.0 f Gearbox: 67.7 % S i Motor: 57.7 % p c System: 39.1 % e 12.5 50.0 i Start/Stall Conditions: e e Current: 8.15 amps d 10.0 40.0 n Torque: 288.90 lb-in c Constants: y Ke: 8.70 v/krpm 7.5 30.0 Kt: 0.74 lb-in/amp

5.0 20.0

2.5 10.0

0.0 0.0 30.0 60.0 90.0 120.0 150.0 180.0 210.0 240.0 270.0 Torque (lb-in)

Notes:

IMPORTANT: Submitted By: Groschopp.com Please note that there are not implied warranties PM6015-PS1960 that the goods shall be merchantable or that they 800-829-4135 are fit for a particular purpose. [email protected] © 2006 Groschopp, Inc. DATA SHEET D-905 KBBC SERIES MICROPROCESSOR CONTROLLED BATTERY POWERED DC/DC Variable Speed Motor Control

for 12, 24, 36 and 48 Volt PM and Series Wound DC Motors thru 2HP Continuous Duty and 4HP Peak Duty

TYPICAL APPLICATIONS Model KBBC-44M Shown • Scooters • Personnel Carriers • Carts • Electric Boats (Part No. 9501) • Portable Pumps • Lifts • Floor Polishers

STANDARD FEATURES • High Frequency PWM Operation: Reduces motor noise and DESCRIPTION increases efficiency. The KBBC series of battery powered variable speed controls • Controlled Acceleration and Deceleration: Provides timed accel- are designed for 12, 24, 36, and 48 Volt PM and Series Wound DC eration to set speed and deceleration to zero speed. motors. Microcontroller design provides superior performance • Diagnostic LEDs: Provide indication of power on (PWR ON) and control status (STATUS). and ease of tailoring to specific applications. Operating in a regen- • Built-In Reversing Contactor: Provides forward/reverse operation erative mode, precise and efficient control is obtained using state- with a low power reversing switch or with a center-off throttle poten- of-the-art MOSFET technology. The KBBC operates at a switch- tiometer (wigwag). ing frequency of 16 kHz, which provides high motor efficiency and • Run Relay: Used to turn on or off equipment or signal a warning if quiet operation. a fault has occurred. The KBBC contains many standard features such as current • Driver Circuit: Powers an optional electromechanical brake (current regulated and short circuit protected). limit, short circuit protection, speed potentiometer fault detector, • Key Switch Operation with Built-In Battery Power Contactor: overtemperature sensing, and undervoltage/overvoltage protec- Allows the use of a low power switch to turn control on and off. tion. A variety of trimpots are provided, which can be used to tai- • Inhibit Circuit: Allows control to be turned off electronically with a lor the control to exact specifications. The control also contains separate low power switch. LEDs that indicate “power on” and “status.” A DC power contac- • Latching Circuit: Allows momentary switches to start, stop, and reverse the control. tor allows a low power switch to turn the control on and off. • Limit Switch Circuit (Stop Forward and Stop Reverse): Allows Reversing contactors provide arcless forward, stop, and reverse limit switches to be used to immediately stop the control in forward operation. In addition, a brake driver circuit is used to power an or reverse directions. optional electromagnetic brake. • Single-Ended or Wigwag Potentiometer Control: Allows the The KBBC can be controlled in several ways, such as single- Main Speed Potentiometer to be used as single-ended (zero speed is at 0% rotation) or wigwag (zero speed is at 50% rotation). ended or wigwag speed potentiometer and 0 - 5 Volts DC signal following. The controls contain a built-in heat sink that also serves PROTECTIVE FEATURES as a mounting base. • Electronic Current Limit: Protects the motor and control against overload. • Polarity Protected: Prevents control damage if the battery is wired TRIMPOT ADJUSTMENTS incorrectly. • Timed Brake Delay (T-BRK): Sets the delay time before the brake is • Short Circuit Protected: Protects main power transistor from fail- engaged. ure due to a short at the motor. • Current Limit (CL): Sets the current limit (overload), which limits the maxi- • Overtemperature Protection: Reduces control output as the tran- mum current to the motor. sistors reach maximum operating temperature. • IR Compensation (IR): Sets the amount of compensating voltage required • Overvoltage Protection: Will turn off the control if the battery volt- to keep the motor speed constant under changing loads. age exceeds 125% of nominal. • Deceleration (DECEL): Sets the amount of time for the motor to deceler- • Undervoltage Protection: Will turn off the control if battery voltage ate from the set speed to zero speed. reduces below 65% of nominal. • Acceleration (ACCEL): Sets the amount of time for the motor to acceler- ate from zero speed to the set speed. SAFETY FEATURES • Minimum Speed (MIN): Sets the minimum motor speed. • Potentiometer Fault Circuit: Turns the control off if a short, open, • Reverse Maximum Speed (RMAX): Sets the maximum motor speed in or ground occurs at the potentiometer. the reverse direction (a % of FMAX setting). • High Pedal Disable Function: Prevents control startup until the • Forward Maximum Speed (FMAX): Sets the maximum motor speed in potentiometer returns to zero. the forward direction.

TM

A Complete Line of Motor Drives GENERAL PERFORMANCE SPECIFICATIONS Parameter Specification Factory Setting Input Voltage Range (% Nominal) 75 – 125 100 Intermittent Duty Operation (Minutes) 2 — Peak Duty Operation (Seconds) 7— Overvoltage Shutdown (% Nominal Input Voltage) 125 — Undervoltage Warning (% Nominal Input Voltage, ± 10%) 85 — Undervoltage Shutdown (% Nominal Input Voltage) 65 — Nominal Carrier Frequency (kHz) 16 — Electromagnetic Brake Delay Trimpot (T-BRK) Range (Seconds) 0.2 – 2.5 1 CL Trimpot (CL) Range (% Range Setting) 0 – 200 150 IR Compensation Trimpot (IR) Range (% Nominal Battery Voltage) 0 – 25 4 Acceleration Trimpot (ACCEL) Range (% Base Speed) 0.1 – 15 2 Deceleration Trimpot (DECEL) Range (% Base Speed) 0.1 – 15 2 Minimum Trimpot (MIN) Range (% Base Speed) 0 – 30 0 Forward Maximum Speed Trimpot (FMAX) Range (% Base Speed)* 60 – 100 100 Reverse Maximum Speed Trimpot (RMAX) Range (% Forward Maximum Speed) 50 – 100 100 Electromagnetic Brake Current Rating (Amps DC) 1 — Heat Sink Overtemperature Protection Point (ºC)100 — Deadband in Wigwag Throttle Mode (Volts DC) ± 0.3 — Wigwag Throttle Signal Input Voltage for Maximum Forward (Volts DC) 2.5 – 5.0 5 Wigwag Throttle Signal Input Voltage for Neutral (Volts DC) 1.2 – 2.5 2.5 Wigwag Throttle Signal Input Voltage for Maximum Reverse (Volts DC) 00 Single Ended Throttle Signal Range for Full Speed Forward or Reverse (Volts DC) 0 – 2.5 to 5.0 0 – 5 Timed Current Limit (TCL) Trip Time (Seconds) 7 — Run Relay Output Contact Rating (Amps at 30 Volts DC, Amps at 125 Volts AC) 1, 0.5 — Auxiliary Power Connector (P2) Rating (Maximum Amps DC) 10 — Operating Temperature Range (ºC) 0 – 45 —

*FMAX trimpot is also used as an input/output gain potentiometer.

ELECTRICAL RATINGS Intermittent Duty Peak Duty Continuous Duty Nominal Nominal (2 Minutes) (7 Seconds) Model No. Part No. Battery Voltage Motor Voltage (Volts DC) (Volts DC) Maximum Amps Maximum Amps Maximum Amps HP DC HP DC HP DC 12 0 – 12 1/2 40 3/4 60 1 80 KBBC-24M 9500 1 24 0 – 24 1 40 1 ⁄2 60 2 80 12 0 – 12 1/2 40 3/4 60 1 80

1 24 0 – 24 1 40 1 ⁄2 60 2 80 KBBC-44M 9501 1 36 0 – 36 1 ⁄2 40 2 60 3 80 48 0 – 48 2 40 3 60 4 80

Note: Custom units are available with various voltages and currents with or without DC Power Contactor or Reversing Contactor.

JUMPER SELECTABLE FEATURES

• JA - Battery Voltage (VOLTAGE - 12/24/36/48): Selects nominal battery voltage. • JB - Motor Current (CURRENT - 10A/20A/30A/40A): Selects nominal motor current. • J1 - Signal Type (SIG - VF/POT): Selects voltage following or potentiometer operation. • J2 - Speed Potentiometer Mode (SPD - SE/WW): Selects single-ended or wigwag speed control. • J3 - Current Limit Mode (TCL - NTCL/TCL): Selects non-timed current limit or timed current limit. • J4 - High Pedal Mode (HPD - NHPD/HPD): Selects non-high pedal disable or high pedal disable. • J5 - Deceleration Mode (STP - DEC/FIX): Selects adjustable or fixed (0.1 second) deceleration when a stop command is given. • J6 - Direction Switch Type (LATCH - OFF/ON): Selects maintained or momentary direction commands. • J7 - Cycling Mode (CYCL - OFF/ON): Selects cycling of relay which is used to brake the motor. • J8 - Relay Output Contacts (RLY - NO/NC): Selects normally open or normally closed Run Relay contacts.

TM 2 A Complete Line of Motor Drives 1 3 POTENTIOMETER (FRONT VIEW) MAIN SPEED SUPPLIED Notes: VOLTAGECONNECTION FOLLOWING +- Note: SetJumperJ1tothe"VF" position INHIBIT SWITCH WIPER (ORANGE) USED FORELEC- KEY SWITCH TROMAGNETIC HIGH (VIOLET) LOW (WHITE) USED FOR MOTOR 3. Customersupplied. 2. RUNFWDandREVDirectionSwitchesarenotusedinwigwagoperation. 1. BRAKE Terminal B+forthecontroltooperate. If KeySwitchisnotused,aconnectionmustbemadebetweentheredwireofConnectorP1andquick-connect T . 3 R LI EE RMAX DECEL IR CL BRK 76 B- 5 31 43 62 76 +

- M2 OTO LAYOUTDIAGRAM CONNECTION & CONTROL 5 2 31 43 0 -5VOLTSDC

P1

P1 A Complete Line of Motor Drives Motor of Line Complete A ACCEL KBBC M1 I FMAX MIN ENABLE P4 SIG 1J 3J J5 J4 J3 J2 J1 STATUS

SPD VF POT ENABLE SWITCH CONNECTION SWITCH ENABLE SE WW TCL

TM NTCL TCL JA P STP HPD VOLTAGE E (CLOSE TORUN) NHPD HPD NABLE SWITCH LATCH 36 24 12 ENABLE DEC FIX 52 J6 48 43 P4 2 JB 1 7J8 J7 CURRENT CYCL OFF ON P2

OFF ON RLY REMOVED 20A 30A 40A 10A JUMPER P5 NO NC RELAY P3 PWR ON B- B+ STOP LIMITSWITCHES DIRECTION SWITCHES B- B+ - USED FOR RUN RELAY CONTACTS RUN FWD RUN REV OUTPUT AUXILIARY STOP POWER + 3 2, 3 3 BATTERY *Flash Rate: Slow = 1 second on / 1 second off. Quick = 0.15 second on / 0.15 second off. second 0.15 / on second 0.15 = Quick off. second 1 / on second 1 = Slow Rate: *Flash Main Speed Potentiometer Fault (Shutdown) Fault Potentiometer Speed Main Overvoltage/Undervoltage Fault (Shutdown) Fault Overvoltage/Undervoltage Outside Florida Call Florida Outside 346-3377 (954) Fax • 346-4900 (954) • 33065-2516 FL Springs, Coral Street, 39th NW 12095 INC. ELECTRONICS, KB www.kbelectronics.com Overtemperature Fault (Shutdown) Fault Overtemperature Motor or Brake Fault (Shutdown) Fault Brake or Motor Timed Current Limit (Shudown) Limit TimedCurrent [159.11] 6.26 Undervoltage (Warning)Undervoltage Curent Limit (Warning)Limit Curent Control Status Control [146.05] [6.53] 5.75 0.26 Stop Run OLFREE TOLL T 75

. M2 R EE CE FMAX ACCEL DECEL BRK 62 41 3 LI RMAX IR CL (800) 221-6570 • 221-6570 (800)

P1 [mm]) SPECIFICATIONS/ (Inches MECHANICAL

M1 [20.32] 0.80 KBBC GREEN AND RED STATUSRED GREEN AND LEDs [5.08] 0.20 E-mail (2 PLACES) [63.50] TYPICAL (4PLACES) 2.50 MIN – [email protected] – Green LED Green [104.14] ENABLE 4.10 P4 On On On On On On On Off Off STATUS SIG J1

VF POT SPD J2

SE WW J3 TCL NTCLTCL JA HPD J4

NHPD VOLTAGE

STP HPD J5 LATCH 48 36 12 FIX 24 DEC 52 J6 4 2 JB ON 1 OFF CYCL CURRENT

3 P2 J7

Red LED Red OFF ON RLY J8 30A 40A 10A NC P5 20A On On On On On On On Off Off NO RELAY P3 PWR ON B- B+ [42.39] Double Quick Alternating Double 1.67 Quick Alternating Slow Alternating Flash Rate* Flash (A42116) – Rev. A – 11/2001 – (A42116)Rev.– A Steady Quick Quick Quick Slow Slow KB ELECTRONICS, INC. 12095 NW 39th Street, Coral Springs, Florida 33065 USA (954) 346-4900 FAX (954) 346-3377

LED Ref. Function Flash Code LED Color Normal Control Operation Slow Green Stop Mode Quick Green Speed Pot Fault Quick Red/Green (Alternate) Temperature Fault Slow Red/Green (Alternate) STATUS Over/Under voltage Quick Red+Green Green, Red Undervoltage Warning Slow Red+Green Motor/Brake Fault Quick Red, Red / Green, Green Internal Fault) Slow Red, Red / Green, Green Current Limit Steady Red TCL (Current Limit Time Out) Quick Red

"PWR" (Power) Normal Control Operation Steady Green Green Bus & Power Supply Fault Off

Slow flash: 1 Sec. on, 1 Sec. off Quick flash: 0.15 Sec. on, 0.15 Sec off

PIC-C Code

//Things we need. #include <16F873.h> //ADC set to 10 (open 16F873.h) #include //Required by read_adc() #fuses HS,NOWDT,NOPROTECT,NOLVP #use delay(clock=10000000) #use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7, BRGH1OK) // Jumpers: 8 to 11, 7 to 12

//Define quadrature-based states as grey-code. #define state_0 0 //Both encoder outputs A and B are low #define state_1 1 //A is high, B is low #define state_2 3 //Both encoder outputs A and B are high #define state_3 2 //A is low, B is high

//Inputs #use fast_io(A) //this requires the set_tris_X command long int angle; //Keep track of the angular position (10-bit) long int control; int cur_state; int old_state; void main() { SET_TRIS_A( 0x0F ); // A7,A6,A5,A4 are outputs // A3,A2,A1,A0 are inputs

SET_TRIS_B( 0x0F ); // B7,B6,B5,B4 are outputs // B3,B2,B1,B0 are inputs

setup_ccp1(CCP_PWM); // Configure CCP1 and CCP2 as a PWM setup_ccp2(CCP_PWM); setup_timer_2(T2_DIV_BY_1, 127, 1); // 20 KHz signal

setup_port_a(ALL_ANALOG); setup_adc(adc_clock_internal); set_adc_channel( 0 ); //A0 is the motor control voltage pin

angle = 0;

//Loop to collect/output data do { control=read_adc(); //Control should be a 10-bit long int, set in #device cur_state = input(PIN_B0) + 2*input(PIN_B1);

if (cur_state != old_state) { if (cur_state == state_1 && old_state == state_0 && angle > 200){ //angle+=64; //Encoder shaft is turning clockwise (theta) angle-=256; //Use this for the phi-direction encoder } if (cur_state == state_3 && old_state == state_0 && angle < 65200) { //angle-=64; //Encoder shaft is turning CCW (theta) angle+=256; //The max output comes to 1.04V if left @ +/-64 (phi) } }

old_state = cur_state; //For the next cycle...

///////////////////////////////// Outputs ////////////////////////////////////

//Need to convert angle to a voltage to output to DAQ set_pwm1_duty(angle/128);

//Need to output our motor control voltage as PWM: set_pwm2_duty(control/2);

} while(1); } 32