-
2022-09-16 16:00:09
LM628/LM629 Precision Movement Controller
General description
lm628 /LM629 is a dedicated sports control processor design for various DC and brushless DC servings motors and other feedback signals that provide orthogonal increase. The dense and real -time computing task high -performance digital motion control required for part execution. The host control software interface is implemented by the advanced command set. LM628 has an 8 -bit output that can drive 8 or 12 -bit DACs. Construct a servo system to simplify into DC motors/actuators, an incremental encoder, a digital modular converter, a power amplifier and LM628. The system based on LM629 is similar to it. It only provides an 8 -bit PWM output to directly drive the H switch. These parts are manufactured and packaged in 28 stitches in a 28 -pin plug -in package or 24 -pin surface installation packaging (only LM629). The maximum frequency is 6 MHz and 8 MHz versions available to -6 and -8, which are used for designated versions. They include a SDA core processor and SDA design unit.
Features
32 -bit position, speed and acceleration register
16 -bit coefficient can programmable digital PID filter
programmable differential sampling interval
8位或12位DAC输出数据(LM628)
8位符号幅度PWM输出数据(LM629)
内部梯形速度剖面发生器
速度、 The target position and filter parameter can change during the exercise
position and speed operation mode
A real -time programming host interrupt
8 -bit combined step host interface [ 123]
A orthogonal incremental encoder interface with an indexPulse input
Provide 28 -pin dual -column direct inserted packaging or 24 -pin
Surface installation Component (only LM629)
Absolute maximum rated value (Note 1)
Any pins voltage
Environmental storage temperature 65 ; C to+150 ; C
28 -pin dual -column direct insertion [123 ]
Packaging (welding, 4 seconds) 260 ; C
24 -pin surface installation
Packaging (welding, 10 seconds) 300 ; C
Maximum power consumption (TA≤85 ; C, (Note 2) 605 MW
Static discharge tolerance (CZAP 120 PF, RZAP 1.5K) 2000 volts
Rab operation
Temperature range 40 ; c lt;+85 ; C
Clock frequency: lm628n- 6, LM629N-6, LM629M-6 1.0 MM LT; FCLK LT; 6.0 Might LM628N-8, LM629N-8, LM629M-8 1.0 MM LT; 8.0 MM vdd vdd 4.5V LT; VDD V 3
] DC special feature
(VDD and TA of each working rated value; FCLK 6 MHz)
AC electrical characteristics
(123] ( The VDD and TA of each working rated value; FCLK 6 MHz; CLOAD 50 PF; Enter the test signal TR TF 10 NS)
AC electrical characteristics (continuing )
(VDD and TA of each working rated value; FCLK 6 MHz; CLOAD 50 PF; Enter the test signal TR TF 10 NS)
Note 1: Absolutely maximum rated value indicates the limit that may cause damage. During operation, the DC and AC electrical specifications are not applicable to devices exceeding the above -mentioned work rated values.
Note 2: When running at an environmental temperature above 70 ° C, the device must be protected to prevent the joint temperature from being too high. Install the program package to a printing circuit board with an area of more than 3 squares. The wires and the main body have wide copper wires and continuous large -area copper. For example, a ground plane is enough. The 28 -pin DIP (N) and 24 -pin surface packed packaging (M) is a molded plastic packaging with solid copper lead framework. Most of the heat generated by the mold flows out of the mold and enters the copper traces on the printing circuit board through the copper line frame. The copper trace method is used as a heat sink. The heat transfer characteristics of both sides or multi -layer boards are better than one -piece panel.
Note 3: In order to read the busy position, you must first read the status byte. The time required to read the busy position is far more than the time required for the chip setting. Therefore, it is impossible to test the actual busy delay. The busy bit is guaranteed to be effective immediately when the user can read.
AC electrical characteristics (continued)
AC electrical characteristics (continued)
Explanation
(see the connection chart) The pipe number of the packaging package installed in the 24th needle surface is in the bracket. Point 1 (17), index (input): receiving optional attachment pulse comes from the encoder. If it is not used, it must be tied to high.When indexing as a needle 1, 2, and 3, the reading position. Point 2 and 3 (18 and 19), encoder signal (A, B) input: Receive the two -phase orthodontic signal incremental encoder. When the motor rotates in a positive ( forward ) direction, the signal of 2 stitches will guide the signal to rotate 90 degrees at 3. Please note that the signals of the pin 2 and 3 of the needle must be kept in each encoder state (see Figure 9) at least 8 clock cycles to be recognized. Because the resolution advantage of the four -to -one decoding the orthogonal encoder signal, this corresponds to the maximum encoder status capture rate of 1.0 MHz (FCLK 8.0 MM) or 750 kg (FCLK 6.0 MM). The clock frequency of other encoder signals must also be maintained at least 8 clock cycles in each state. Plug 4 to 11 (20 to 24 and 2 to 4), host I/O port (D0 to D7): The two -way data port/processor connected to the host. It is used to write commands and data to LM628, to read status bytes and data LM628 from it. Essence
pin 12 (5), chip selection (CS) input: LM628 used for reading and writing operations.
pin 13 (6), read (RD) input: used to read status and data.
pin 14 (7), ground (GND): Power loop pins.
pin 15 (8), write (WR) input: used to write commands and data.
Put a pin 16 (9), port selection (PS) input: used to select commands or data ports. When you select the command port at a low data, the side is the side. The following mode is controlled by the pin
16: 1. The command is written to the command port (pin 16 low), 2. Read the status bytes from the command port (pin 16 low),
3. The data is written and read through the data port (16 high).
pin 17 (10), host interrupt (Hi) output: this activation high -level signal reminding the host (through the host interrupt service program) interruption conditions have occurred.
Point 18 to 25, DAC port (DAC0 to DAC7): The output port can be used in three different modes: 1LM628 (8 -bit output mode): output the lock -up data to the digital modular converter. MSB is 18, LSB is needle 25.
2LM628 (12 -bit output mode): Output 2, multi -way reuse 6 -bit words. Not very important words output first. This MSB is located on the pin 18 and LSB is located on the pin 23. Needle 24 is used to relieve words; pin 24 is not very important for words. The positive edge of the signal on the pin 25 is used to select the output data. Figure 8 shows the timing of multiple reuse signals.
3.LM629 (Symbol/amplitude output): Output signal (11 for surface installation) and amplitude signal on PWM (13 for surface installation) on the PWM signal needle 18 (11 for surface installation). Do not use 20 to 25 in the needle LM629. Figure 11 shows the PWM output signal format.
pin 26 (14), clock (CLK) input: receiving the system clock.
pin 27 (15), reset (RST) input: low activation, after the positive edge is triggered, the LM628 is reset into the internal conditions shown. Note that the reset pulse must be a low level of logic, at least 8 clock cycles. The following operations are reset:
1. Filter coefficient and trajectory parameters are zero.
2. Set the position error threshold to maximum value (7fffhex) and effectively execute the command LPEI.
3.SBPA/SBPR interruption is shielded (disabled).
4. The other five interruptions were canceled (enabled).
5. Initialize the current position to zero, or the origin position.
6. Set the guidance sampling interval to 2048/FCLK or 256μs for 8.0 MHz clock.
7. DAC port outputs 800 hexadecimal to zero 12 -bit DAC and then convert 8 digits of DAC to 80 hexadecimal to zero .
Foot instructions (continued)
After loosening the reset pin from LM628, the status port should be 00 . If the reset is successfully completed, the state word will become hexadecimal 84 or C4 within 1.5 milliseconds. If the status word does not change from 00 to 84 or C4 from the hexadecimal character, perform another reset and repeat the above steps within 1.5 milliseconds. Determine resetting is correctly executed and execute the RSTI command. If the chip has been correctly reset, the state byte will change from hexadecimal 84 to or C4 to 80 or C0 . If this happens, another step is to reset and repeat the above steps. Point 28 (16), power supply voltage (VDD): power supply voltage (+5 volts).
Operation theory
Introduction
Typical system frame diagram (see Figure 1) illustrates the establishment of LM628 in the servo system. The main processor communicates with LM628 through the I/O port to facilitate programming trapezoidal speed section and digital compensation filters. DAC output and external digital modular converter interface to produce an enlarged motor. The incremental encoder provides feedback for the closure position servo circuit. Calculate the trajectory required for the operation position or speed mode of trapezoidal section. In operation, the LM628 minus the actual position (feedback location) comes from the required position (general position position), and the position error generated by this is driven by digital filterMove the horse to reach the required position. Table 1 Briefly summarizes LM628/LM629: Location feedback interface LM628 via an incremental encoder and motor interface. Provide three input terminals: two orthogonal signal inputs, and index pulse input. The orthogonal signal is used to track the absolute position of the motor. Each logical conversion occurs in one of the orthogonal input end LM628 internal position registers corresponding to increase or decrease accordingly. This provides four times more resolution than the number of rows provided by the encoder. See Figure 9. Each encoder signal input and LM628 clock. The optional pulse output provided by some encoders assumes that the logic is low every time. If LM628 is programmed by user, it will record the absolute motor position in the special register (index register) when all three encoder inputs are logical. If the encoder does not provide index output, the LM628 index input can also be used to record the motor. In this case, the motor usually turns off a switch. It is arranged to cause a low logic at the index input, and the LM628 will record the motor position registration and notify the (interrupt) main processor in the index. Permanently grounding the index input will cause LM628 to fail.
Operation Theory (continued)
Speed Section (Track) Generation
trapezoidal speed section surface The expected position and time of the generator computing motor. In position mode, the main processor specifies the acceleration, maximum speed, and final position. LM628 uses this information by accelerate until the maximum speed or until the deceleration must start to stop at the specified final position. The deceleration rate is equal to acceleration. The motor will accelerate or decelerate accordingly at the maximum speed and/or target position. Figure 10 shows two typical trapezoidal velocity profiles. Figure 10 (a) shows a simple trapezoidal diagram, and Figure 10 (b) is an example of the trajectory when the speed and position change during the movement at different times.
When running in the speed mode, the motor accelerates at the specified acceleration and maintains the prescribed speed until the command stops. Keep the speed at a constant rate by promoting the required position. If the exercise is disturbed during the speed mode, the long -term average speed remains unchanged. If the motor cannot maintain the prescribed speed (probably caused by the rotation, for example), the required position will continue to increase, resulting in a very large position error. If this situationOperation theory (continued)
The detection of the motor is not released, and the motor may reach a very high speed in order to catch up with the required position you need (That is, it still advances in accordance with regulations). This situation is easy to detect; see the command LPEI and LPES. All trajectory parameters are 32 -bit. The job is the number of contracts. The acceleration and speed specifies 16 bits, and only the positive integer has 16 -bit scores. The integer part of the speed specifies the sampling interval of the motor passingCount. Although the position resolution of the LM628 is limited, the additional score count of each sampling interval specifies each sampling interval For integer counts, the score count provides a higher average speed resolution. The processing method of acceleration is the same attitude. In each sampling interval, the acceleration value of the command is added to the current required speed to generate new expectations (unless the instruction speed has reached).
One method is to determine the required trajectory parameters to move below. For example, if there is a 500 -wire shaft encoder, I hope that the motor will accelerate every second and one second every second, until it moves at a rate of 600 rpm and then slows down to 100 rpm. Calculate the ballistic parameters to
Following:
Let P target position (unit encoder count)
Set R Code line*4 (system resolution) [System resolution) [ 123]
then R 500*4 2000
p 2000*expectation turnover
p 2000*100 rpm 200000 count (load value)
] P (Code) 00030d40 (write LM628)
Set V speed (unit count/sample)
Set T sampling time (second) 341μs (6 mHz clock)
Set C the conversion coefficient 1 minute/60 seconds
then v r*t*c*expected speed
v 2000***2000* 341e 6*1/60*600 rpm
v 6.82 counting/sample
v (mark) 6.82*65536 446955.52
v (Four House and Five Entry) 446956 (load value)
V (encoding) 0006d1EC (write LM628) acceleration/acceleration unit sample number
a r*t* T*expectation acceleration (Rev/SEC/SEC)Then A 2000*341e 6*341e-6*1 rotation/second/second
a 2.33e #8722 4 counts/sample/samples
a (standard) 2.33e 4*65536 15.24
a (four houses and five entry) 15 (load value)
[[
[[
[[
123] A (encoding) 0000000F (write LM628)The above position, speed, and acceleration value must be converted to binary code to install LM628. The speed and acceleration value shown must be multiplied by 65536 (as shown in the figure),Adjust the integer/score format of the input data according to the requirements. Note that after the zoom speed and acceleration value, the text score data cannot be loaded; the data must be entered and the data must be converted to binary. The factors that increase the system resolution four times are due to the method signal for decoding orthogonal encoders, as shown in Figure 9.
PID compensation filter
LM628 uses digital proportional integration guide (PID) to compensate the filter of the control loop. The engine keeps the motor that is positively proportional to the position error, error integral and error derivative. The following content discrete time equation explains that in the formula of LM628:
, u (n) is the motor control signal output when the sampling is sampled. The position error, N'INDI is sampled by the guidance number sampling rate, and KP, Ki, and KD are discrete time filter parameters loaded by users. The first, the proportional item provides a positive proportional to the position errors, obeying the law of Hu Ke like a spring. The second item, points, provide recovery power over time to ensure that the static position error is zero. If there is a constant torque load, the motor can still achieve zero errors. The third item, the guide number item provides a proportional force to the position error change. Its behavior is like a viscosity damping in the damping spring and the quality system (such as the shock absorber on the car). The sampling interval is related to the user's selection; this function enables the LM628 to be better approximate by providing a continuous guide number. Generally speaking, the longer sampling interval is useful for low -speed operations. During the operation, the filter algorithm receives 16 error signals from the cycle. Error signal saturated 16 digits to ensure predictable behavior. In addition to multiplied by the filter coefficient KP, the error signal is added to the accumulation of previous errors (forming points signals), and at the rate determined by the selected guide sampling interval to minus the previous error (forming a differential signal). All filter multiplications are 16 -bit operations; only 16 digits of the product are used. The integration signal is kept at 24 bits, but only 16 bits are used. This zoom technology makes the range of coefficient Ki more reasonable (not so sensitive). The 16 -bit is shifted to the right and multiplied by the filter coefficient Ki to form a control output contributed to the engine. The absolute quantity of this product is compared with coefficient IL. The amplitude of the significant value of the less value helps the motor control signal. In each competitive sampling interval, the guide number signal is multiplied by the coefficient KD. The product in each sampling interval helps the motor to control the output, and the number sampling interval with the user selected. KP, LIMITED KI and KD products are summarized as 16 -bit. Depending on the output mode (font size), the top 8 or the top 12 becomes a motor control output signal.
Operation theory (continued)
LM628 Reading and writing operation The main processor of the read and write operation The main processor of the read -write operation of the read command port (PS) input (pins 16) as the logic LowEssence The required command code is applied to the input terminal (15) in the parallel program. This command byte locks to the WR input in LM628 in the rising edge. When writing the command by byte, you need to read the status byte and check the status of the logo first. If the busy logic is high, it may happen if you write a command. The busy part will never be higher than 100 μs, usually between 15 μs and 25 μs. The main processor reads LM628 status bytes in a similar way: when PS, low reading (RD) input (pin 13) (pin 16) is low; as long as RD is low.Write and read data (with writing commands and reading status) to LM628 is highly logically high. These reads and write are always the number of two -byte characters (from 1 to 7), and the bytes of each word are more important. Each byte is required to write (WR) or read (RD). Data characters (byte pairs) when transferring, you need to read the status bytes first and check the busy position. When the logic is low, the user can transmit two bytes in order to contain one data word, but the busy position must be checked before trying and found a lower byte pair (when transmitted multiple words). Data transmission is completed through the internal interrupt of LM628 (not nested); when the LM628 may not be interrupted for data transmission, the bus is notified the host process (or command byte). If a command is high when you are busy, the command will be ignored. After writing the command, the busy position immediately becomes higher than the byte, or the data of the second byte reads or writes (see Figure 5 to Figure 7).
Electric output
LM628 DAC output port can be configured to provide 8 -bit parallel output or multi -way replication of 12 -bit output output. The 8 -bit output can be directly connected to the circulation (non -input atresia) D/A converter; the 12 -bit output can easily unlock the use of an external 6 -bit lock and the input lock 12 -bit D/A converter. The output data of the hair assistance association uses a binary dual encoding; the zero 8 -bit code is 80 hexadecimal, and the 12 -bit zero code is 800 hexadecimal. The value will be reduced, otherwise the motor will generate a negative torque. On the contrary, the larger torque value will cause the motor's positive torque torque. When the configuration is 12 -bit output, the LM628 provides a signal of the control process. Learn more. LM629 provides a signal of 8 -bit, symbols and amplitude PWM output direct drive switch motor driving amplifiers. Figure 11 shows the format of the PWM amplitude output signal.
Operation theory (continued)
Note 4: You can dynamically execute commands during exercise.
Note 5: Not applicable to commands during exercise.
Note 6: If the acceleration parameters have not changed, you can execute the instruction during exercise.
Note 7: The command does not require code, becauseThe hardware fully supports the command port status byte.
User command set
General
The user command set LM628 described below. Some commands can be issued separately, and some need a supporting data structure. For example, command STT (startup motion) does not require additional data; command LFIL (loading filter parameters) requires additional data (guide number sampling interval and/or filter parameters). Commands are classified by functional classification: initialization, interrupt control, filtering control, trajectory control and data reports. These commands are listed in Table 2 and come to the following paragraphs. Together with each command name, the command byte code is used. The number of data accompanied by the data must be written (or read), and the command can be executed during exercise. The initialization command mainly uses the following four LM628 user commands to initialize the initialization system for use. Reservation command: reset LM628
Command code: 00 HEX
Data byte: None
Exercise can be executed: Yes
This command (and hardware (and hardware Set the input, pin 27)
Set the following data items to zero: Filter coefficient
and their input buffer, trajectory parameters and input buffer and motor control output. Zero motor control output is a half -scale, offset binary code: (80 hexadecimal 8 -bit
output mode; 800 HEX (12 -bit mode). The 12 -bit DAC of the zero system is restored to 80 hexadecimal to a zero 8 -bit DAC. The command will also clear the five of the six interrupt masks (only the SBPA/SBPR interruption, which will The output port size is set to 8 bits, and the current absolute position is defined as the original point. Reset may be executed at any time and will be completed within 1.5 milliseconds. Please see the command port8 and port12. 8 -bit
Command code: 05 HEX
Data byte: No
Executive: not applicable
LM628's default output port size of the output port size For 8 bits; therefore, when 8 bits are used, the PORT8 command digital modulus is not required. When 12 -bit converter is used; it will cause unstable, unpredictable motor behavior. LM628.
Port12 command: Set the size of the output port to 12 digits
command code: 06 hex
Data byte: No
During the exercise period Executive: not applicable when 12 -bit DAC is used, the command port 12 should be issued very early during initialization. Because the use of this command is hard by the systemThere is only one foreseeable reason for the decision: if the command is reset (because the 8 -bit output will be selected by the default) command port 12 should be executed immediately. This command cannot be issued in the following circumstances: the PWM output version of the 8 -bit converter or LM629, LM628.
DFH command: Define the original point
Command code: 02 HEX
Data byte: No
Exercise can be executed: Yes
] Initialization command (continued)
This command declares the current position as Home , or absolutely zero. If the execution of DFH during exercise will not affect the stopping position that is underway, unless the command is executed at the same time.
Interrupt control command
The following seven LM628 user commands are related conditions for interrupt hosting computers. In order to make any potential interrupt conditions actually interrupt the host by inserting the pin 17, the corresponding position is set to the logical high (non -shielding state) related to the command MSKI. All interrupt logos read and analyze status bytes. Even if all interruptions are shielded by command MSKi, the state of each situation is still reflected in the state bytes. This function helps to inquire about the status information of LM628 instead of interrupt driving operations.
SIP command: Set the index position
Command code: 03 HEX
Data byte: None
Exercise during exercise: After this command is executed The absolute position corresponds to the emergence of the next index pulse input input will be recorded in the index register, and the state by byte 3 of the bit 3 will be set to a logic high level. When the position is recorded, the phase input of the encoder and the index pulse input are low logic. The user can then read the register (see the instructions of the command RDIP) in order to adjust the definition of the starting position (see the instructions of the command DFH). Users can also arrange the LM628 interrupt host to indicate the index pulse.
LPEI command: interrupt loading position error
Command code: 1b hex
Data byte: 2
Data range: 0000 to 7fff hex [123 ]
Execution during exercise: The position error is too large (the output joint of the cycle) may indicate a serious problem with the system; The instruction LPEI allows the user to enter the position error detection threshold. Error detection When the absolute value of the position error exceeds the threshold, the fifth bit of the state byte is set to logic high. If you need to stop (off) motor when the position error is required, please refer to the command LPES, below. The first byte command LPEI of the written threshold data is more important. Users can interrupt the host LM628 to indicate excessive positioning errorsEssence See instructions MSKI and RSTI instructions.LPES command: stop loading position error
command code: 1A hex
Data byte: 2
Data range: 0000 to 7fff hex [ 123]
Execution during exercise: The instruction LPES is the same as the command LPEI but increased the function of turning off the motor when the position error is detected. The motor driver is not actually turned off, but is set to a half scale, that is, the binary code is zero. Like the command LPEI, the fifth place of the state byte is also set to logic high. The first byte of the written threshold data is more important to use the command LPES. Users can let LM628 interrupt the host to indicate an abnormal position error. See the relevant instructions MSKi and RSTI.
SBPA command:
Command code: 20 hex
Data byte: 4
Data range: C0000000 to 3ffffFF hex
Execution during exercise:
This command allows users to set the absolute position of breakpoints. The 6th bit of the state byte is high when the logic reaches the breakpoint position. This situation is used to send trajectory signals and/or filter parameters update. Users can also arrange for LM628 to interrupt the host to indicate that the position of the breakpoint has been reached.
SBPR command:
command code: 21 hex
Data byte: 4
Data range: see the text
During the exercise period Executable: This command allows the user to set the relative position of the breakpoint. Like the command SBPA, when the breakpoint position, the sixth bit of the STA TUS byte is set to the logic high (the target position of the current command) is reached. The relative breakpoint input value must be kept within the absolute position range of the system when this value is added to the target position (C0000000 to 3FFFFFFF FISI). This condition is updated to the signal trajectory and/or filter parameters. Users can also arrange for LM628 to interrupt the host to show the atlaid position. See the command of the command MSKI and RSTI.
MSKi command: mask interrupt
command code: 1c hex
Data byte: 2
Data range: see the text
] Execution during exercise: The MSKi command allows users to determine which potential interrupt condition will interrupt the host. The instructions of the six conditions of the bits 1 to 6 are the candidates for the interruption of the host. When the interrupt is interrupted, the host read the state byte to understand which condition occurs. Please note that the MSKi command consists of two data bytes immediately. No. 1 to 6th (moreLess important) Byte writing determines the state of each potential interruption/non -shielding/non -shielding. Any zero field in these 6 digits will shield the corresponding interrupt; any (or more) enable the interrupt. Other bits that make up these two bytes have no effect. The mask only controls the host interrupt process; reading the status bytes will still reflect the actual situation that has nothing to do with the mask bytes. See Table 3.
RSTI command: reset interruption
command code: 1d hex
Data byte: 2Data range : See the text
During exercise, it can be executed: When one of the potential interruption conditions of Table 3 OC CURS appears, the command RSTI is used to reset the corresponding interrupt logo bit in the state byte. The host can reset one or all logo. Reset a priority of allowing the host to be repaired one by one according to the priority set by the user. In the MSKi command, the second (not important) byte (not too important) byte 6 corresponds to the potential interrupt conditions as shown in Table 3. Please refer to the instructions of the RDSTAT command. Any zero -site reset of these 6 places corresponds to the corresponding interruption. The remaining part is not effective.
The filter control command
The following two LM628 user commands are used to set th