Home
Gorasia Actuation an..
Contents
1. OT imm gt gt gt m 180 615 SAN abe l Motor Control Mode ITF EEE p TOOD A m m GE I 2 FI Main Loop Build Text2 Command Sting zz b Ei 5 7227777777 ma FPA Stepper Control Bundle ri B mL ooo li oil Clean Up error out 2 vi Target RICO 0 1 0 Value 4 Position Control Default p gt gt stepper default velocity deg s Control Mode gt A ms per frame This either enab
2. DCS1 Enable Disable Cluster gt MILLE 2 p z z z z k z 8 z z EN DCS1 Disable Drive uk DCS1 Enable Drive x Enable Drive DCS1 Status Cluster OUT 4 LI TJ LI ir Velocity Control FPGA Commanded Position steps Half Step Time ticks Reset Position to0 Ta 1 a Contro Mode Mode VEE EEE A Enable OOO s p ErableDisable EEE EE
3. Heartbeat Da fpgasotemplate FPGA Stepper O Ex Current Position steps i Error steps 1 gt i gt kai Direction GH ETE ster Step Wait ticks utput Drive Status Drive Fault Over Temperature Fault EE EEE EEE CL LH LH LLC LLC CL LH LH LLC LLC LH LH LE EEE LH LE LE LH LE CL EL 4 Drive Status Present Present Drive Drive Fault Over Over Temperature Fault T E DCS1 Status Cluster OUT ga A KA 4 JERRY 4 460 gt sS kol A DC Servo 1 Control f True Read a new speed value else use old DE SE ir Counterclockwise DCS1 Drive Control Cluster a ie Frl DCS1 DCS1 Speed Old Speed Value
4. re 14 Figure 14 Position to velocity converter based on the change in position of the motor and the ticks per count o ER TT 15 Figure 15 Velocity of DCS1 as a function of the PWM duty This chart compares the measured angular velocity in degrees per second to the inputted PWM duty cycle expressed in our internal control units consisting of vales between 1800 and 1800 The response is very linear with a correlation coefficient of over 99 However there is a small dead zone around 0 Though we did not try to quantify the extent it is slightly visible in this graph 16 EXECUTIVE SUMMARY We developed a control system for four different motors in this lab a digital DC motor a stepper motor an analog DC motor and a RC servo motor Since we used a single board RIO as our controller we had access to two real time operating systems on the PowerPC and a FPGA This gave us the ability to have accurate high speed control of the motors and make precise closed loop control schemes While the motors needed to be interfaced to in different ways they can be abstracted out to be identical Doing so makes it trivial to control all motors and make them do things like sway in unison or play music SUMMARY OF READINGS Actuation and control is very important to mobile robotics If robots are going to have any actuators these need to be controlle
5. dea DCS1 Speed DCS1 Status Clu 60 51 Counts M DCS1 Index Z DCS2 Encoder DCS2 Counts DCS2 Index Z DCS2 Reset Posit x 0 IW This either enables or disables the n ox prive 1 7 BRETTET OT i 0051 Reset Position b DCS1 Enable Disa Bundle By Name 1 N DCS1 Reset P DCS1 Enable Drive TE DCS1 Reset Posit DCS1 Disable Drive gb DCS1 Drive Cont Disable Drive DCSI Reset Value 0651 Go I DCS1 Encoder Enable Drive DCS2 pcs2Go E DCS2 Reset Value Mu DCS2 Reset P ne DCS2 Reset Position DCS2 Drive Cont LJ DCS1 Sampled position DCS1 ticks 0 DCS1 velocity 0 DCS1 time DCS2 Sampled position DCS2 ticks DCS2 velocity 0 2 DCS2 time 0 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 Cl
6. r Drive Fault 1 Over Temperature Fault ji i a Figure 7 DCS1 Enable and disable chip DCS1 is controlled by a NI 9505 motion control module which needs to be enabled before being used Using the motion control module gives a few indicators to troubleshoot motor performance like drive faults or over temperature faults Next a PWM signal needs to be generated to control the speed of the motor Looking at the datasheet of the motion control module it can take a 20kHz PWM signal and modulate the speed of the motor based on the duty of the signal To make the control easier the PWM signal input DCS1 speed is allowed to range from 2000 to 2000 This allows us to also insert the direction for the motor to travel to into the DCS1 input as that is a separate control to the motion control module The PWM signal works by incrementing two counters One keeps track of the signal length while another keeps track of duty length By incrementing the two counters appropriately it is easy to create a PWM signal DC Servo 1 Control Old Speed Value P nnr Mod Drive Direction Counterclockwise Y prom Read Speed DCS1Go i DCS1 Speed gt 2000 i Number of ticks 2000 ticks i for this cycle 20 kHz 0 0 4 P Mod Motor Figure 8 0651 Control chip This chip generates the PWM signal that drives 0651 and controls the motor di
7. 7 Drive Direction Read Speed Number of ticks 20 kHz Bm 40 par 4 True DCS1 Inde 2 Read the encoder phase values rara Er a N N ki RR wane f d T IE d F P H E a E SES EE EES III III ETTE E ETTE EES IIE 2 4 d n d r d x mmm gt 1 e a EEE OOO OOO TT TITTET rnm 55595555 TEE E EEE EE AS ye Wa ELE N Count Case 4 EE n reset counts 1 Reset Po 1 Reset Po F ition Value DCS1 AO Encoder Position DCS1 JEF Tick Count at Last Encoder count Time between Encoder Counts DC
8. I I lt V XWII KII I II IIS IIIII I IIIO I WAIZ YQx OCWI G II I lt WMWw I II IIIIIIAIIIIIIIIAIFIAI Drive Status Erz DCS2 Position DCS1 Counts no reset DCS1 Index Z Position DCS2 Motor Position DCS1 Encoder Position DCS1 Motor Postion z 0051 Sampled position DCS1 ticks 0 DCS1 velocity o DCS1 time DCS2 Sampled position DCS2 ticks 0 DCS2 velocity DCS2 time 0 1 Pos WEL DCS1 Voltage in DEl CS1 Desirec 0 1 PID gains CS1 Time delay DEL I DCS2 Voltage in DEL FPGA vi FPGA Stepper Output Generated Ctrl Signals
9. I I I IIII I I II I IKIIIVYVYVUYCZV Sa Heartbeat l Heartbeat n DC51 Enable Disable Cluster 51 Reset Position Drive Status DC51 Reset Position Value Vsup Present dk ONS Drive Control Cluster Drive Fault DCS1 Go 1 Encoder Position Over Temperature Fault DCS1 Speed 2051 Status Cluster OUT e p 251 Counts reset PCS1 Index 2 Position Ticks Count Ticks Count 252 Encoder Position TICES DoS Counts no reset m 252 Index 2 Position DESS Reset Position Value wu S2 Reset Position Drive Control Cluster Sm y U UYYPE e ss y RF W WYIY V I I Y Y I I I I I I I9 I lt II IIAK KUII gm et Position 5 IRA M 5 A I EE ED byssa3 xyxyb yr O o 6 lt yeWI lt lt D I II ZII I Ix W WWI I I I I amp IIIIW I W IIZYVWIV
10. R 9 99233E 01 300 200 1004 Pad Figure 15 Velocity of DCS1 as a function of the PWM duty This chart compares the measured angular velocity in degrees per second to the inputted PWM duty cycle expressed in our internal control units consisting of vales between 1800 and 1800 The response is very linear with a correlation coefficient of over 99 However there is a small dead zone around 0 Though we did not try to quantify the extent it is slightly visible in this graph The other motors were tested in similar ways by eyeballing the speeds and making sure they matched up For DCS1 and the stepper motor we used the physical dials to make sure that the motor was moving to the positions we thought it was supposed to Through testing we learned that we could make the stepper motor run at about 700 RPM This made it possible for us to produce audible notes which we then utilized to produce music CONCLUSIONS Using the FPGA allowed us to have real time control over the motors which is important when dealing with a physical system like motors We were lucky that all motors had very linear responses making it trivial to develop a control schematic for them Based on our experiences in this lab the steps to control a motor can be summarized as e Interface with the motor e Make the motor move e Determine the motor position e Test the response of the motor to different inputs e Develop a control scheme This plan worked wel
11. Encoder A XOR Shift Register B Counter clockwise Encoder A Encoder B Shift register A Shift register B Encoder A XOR Shift Register A Encoder 8 XOR Shift Register B Encoder A XOR Shift Register B Figure 10 The shift registers are used to create a delay to the encoder signals If the XOR of Encoder A or B and its shift register is true the count increments Finally if the XOR of Encoder and the shift register B is true we know the motor is rotating clockwise and vice versa DC SERVO MOTOR 2 ANALOG CONTROL DC Servo Motor 2 DCS2 is very similar to DC Servo Motor 1 The main difference is that DC servo 2 is controlled by an analog voltage which is passed through a Sabertooth motor controller to control the motor The encoder position is fed back to the PowerPC via digital 105 Individual Motor Tuning Control and Monitoring DC Motor 1 Stepper DC Motor 2 RC Servo Enable Drive 2 DCS2 Motor Position Plot o VA gt 360 300 T 250 D 200 2 150 DCS2 Reset Position DCS2 Reset Value 100 50 0 1 0 511 DCS2 Desired Time DCS2 Control Velocity fen 200 Velocity 250 M 100 2m DC52 Voltage 1 Position EN 0 00 gt gt DCS2 Position i 353 315 08 DC52 PID gains proportional gain Kc DCS2 Time delay E integral time d d derivative time Td min 2 Figure 11 Front panel for DC Servo 2 Since the wiring of DCS2 i
12. does not have position feedback Therefore it must keep track of its position by keeping count of the number of steps it has moved and make sure it does not skip steps http www lynxmotion com images html build136 htm comform Figure 4 Front panel to control the Stepper motor The FPGA code is shown in Figure 5 The FPGA compare the stepper s current position with the intended position and then steps in the appropriate direction that would close that difference Since there is no encoder the FPGA keeps track of the number of steps that it has commanded in a tally which is later used to determine the position of the motor In addition the motor also gets the time between steps allowing it to do velocity control Complication in the code arises because a few gotchas that needs to be accounted for Firstly the FPGA should only update its tally of number of steps when it actually sends a step command Next there is a feature to zero the stepper tally to allow the position of the motor to be set Finally direction control is achieved by simple position control comparing the desired position to the current position There is also a control mode input which gives either velocity control or position control Velocity control is achieved by comparing the position to a known position and determining how past the stepper should have moved in the timestep fpgasotemplate FPGA Step Commanded Position steps Half
13. 1 Enable and disable chip DCS1 is controlled by a NI 9505 motion control module which needs to be enabled before being used Using the motion control module gives a few indicators to troubleshoot motor performance like drive faults or over temperature 15 11 Figure 8 DCS1 Control chip This chip generates the PWM signal that drives DCS1 and controls the motor ET 12 Figure 9 The encoder reading chip uses gates and shift registers to convert the quadrature encoder signals into a motor direction and rotation count The chip also keeps absolute position of the encoders taking that responsibility off the PowerPC In addition the chip gives a time between encoder counts which is useful to determine the Velocity OT ine motor anne 12 Figure 10 The shift registers are used to create a delay to the encoder signals If the XOR of Encoder or B and its shift register is true the count increments Finally if the XOR of Encoder A and the shift register B is true we know the motor is rotating clockwise and vice 13 Figure 11 Front panel f r DC Servo 2 er s ro ak 13 Figure 12 Enable and speed control chip for DCS2 It is a simple chip that keeps the output voltage between 0 and NN 14 Figure 13 Ticks to degrees sub VI This takes the number of ticks moved coming from the encoder and scales it to Sp LS ee
14. ENGR3390 ACTUATION AND CONTROL Encoder Brush cover Brush Ironless winding Housing magnetic return p Shaft Motor flange Ball bearing Motor pinion Gear mounting plate Planet carrier plate Planets Internal gear Ball bearin Gearhead flange Output shaft TEAM BRAVO J GORASIA 11 1 09 TABLE OF CONTENTS TVEN NN 2 PSN 4 TT TN 5 ONS NNN 5 NIE QO Ano EE 5 NNN 7 PETN 8 DC Servo Motor 1 Digital COME ON ad 10 DE SEG Motor tana lO CONTROL EEE E NE EEE EEE 13 Supporting Vis Tor NNN 14 TEN 15 A A E OC E OO 16 da ee A 17 il ER 17 TABLE OF FIGURES Figure 1 Main motor block diagram This is a huge VI which is divided into bands for separate motors 6 Figure 2 The block diagram for the RC servo motor This packages the string to be sent via serial to the SSC 32 motor controller Inputs from the front panel are scaled from degrees to the appropriate values for the motor COT EEE 7 Figure 3 Front panel for the RC servo motor The initialize serial port command initializes the serial port while the position and speed are controlled in 8 Figure 4 Front panel to control the Stepper 9 Figure 5 Chip Tor controlling the stepper 00 2 10 10677106051 re 10 Figure 7 DCS
15. Enable Direction Step DCS1 Reset Position DCS1 Reset Position Value 0 DCS1 Status Cluster OUT DCS1 Index Z Position 0 DCS1 Counts no reset 0 DCS1 Encoder Position 0 DCS1 Ticks Count 0 DCS2 Index Z Position 0 DCS2 Counts no reset 0 DCS2 Encoder Position 0 DCS2 Drive Control Cluster DCS2 Ticks Count 0 DCS2 Reset Position DCS2 Reset Position Value FPGA Stepper Control Bundle 0 Commande Half Step 1 0 P Reset Posit PF Enable Position Control Cor a Heartbeat DCS1 Enable Disable Cluster DCS1 Drive Control Cluster fpgasotemplate 4 Velocity Control FPGA Steppe Commanded Position steps jg Half Step Time ticks Reset Position to 0 Current Position steps Enable H Error steps Control Mode Direction FPGA Stepper Output gt gt Enable lis EnableDisable Wait sticks Drive Status DCS1 Enable Disable Clust E Tue nable Disable Cluster rue gt True pi 3 5 DCSI Disable Drive DCS1 Enable Drive Enable Drive Disable Drive Heartbeat DCS1 Status Cluster OUT Read the encoder phase values Mod7jEncoder Phase l b Modz Encoder Phase Mod7 ncoder Index Drive S
16. S Read the encoder phase values Encoder ChA 36 k SE SS SS SS Encoder ChE A AA A vr ES SE ESS SS EEE SS SS A A A n A A A A A n SS SEE SS SS SEE SS FLL LEE ELE EEL EE EEE EEE EEE EEE EEE EEE TR A PPPE A YES i n E FI d 2 x h Aa EEE TEEN ENTE SEES SSSSSSSSESESESS Bah ha a ROCA Count Case non reset counts EEE ET EEE TE ET EN ET RAA F _ _ _ nm I BError p Z Position VEETEE EE IT OT IT ET 2 222222227202 ES counts no reset Encoder Positi
17. Step Time ticks FPGA Stepper Output EN Reset Position to 0 Current Position steps 7 gt Error steps jim Control Mode G gt 0 step lt Figure 5 Chip for controlling the stepper motor DC SERVO MOTOR 1 DIGITAL CONTROL DC Servo motor 1 DCS1 is controlled through a NI 9505 motion control module The module gives full H bridge control of the DC motor It also takes in the encoder inputs allowing us to implement closed loop control of the motor To control the motor we pipe a PWM signal to the motion control module and this is translated to an analog voltage to command the motor Figure 6 Front Panel for DCS1 The control on the FPGA for DCS1 consists of 4 chips e Signal Enable Disable e PWM pulse generator e Encoder reading Since DCS1 is controlled by a motion control module it needs to be enabled before it can be used as shown in Figure 7 DCS1 Enable Disable Cluster a Tre puc Drive Status DCS1 Disable Drive Dc51 Enable Drive k Mod Enable Drive Disable Drive DC51 Status Cluster OUT w Disabled Mod sup Present E E Drive Status i Drive Fault id Ower Temperature Fall Fines uh f Status Cluster GUT RE OR sup Present
18. d In this lab we are granted specialized hardware to better accomplish this the Single Board RIO The single board RIO consists of a PowerPC chip a FPGA and many interchangeable modules The advantage of using the Single Board RIO is that it is a real time operating system That means that we can better predict and control the execution of operations on the computer This is important in a physical system as we want to control the physical systems precisely in time While both the PowerPC and the FPGA operate in real time the FPGA operates much faster than the PowerPC at certain operations The FPGA is software reconfigurable hardware which means we can shape hardware with software into highly optimized structures for certain operations While this means that the FPGA is limited in the operations it can perform it can t do floating point math it is very good at what it does Therefore by using the PowerPC and FPGA together it is possible to design a very computationally efficient method for controlling motors SOFTWARE SYSTEMS OVERVIEW The code can be broadly divided in two code running on the FPGA and code running on the PowerPC Vis running on the FPGA will be referred to as chips while Vis running on the PowerPC will be referred to as sub Vis MAIN CODE The main code is a combination of all the code for the four different motors It was developed by independent teams then pieced together to make the main code Therefore the main co
19. de can be easily grouped in bands ME RC Servo Motor Stepper motor Figure 1 Main motor block diagram This is a huge VI which is divided into bands for separate motors The main VI gives the possibility of controlling the all four motors together or individually In addition a command was implemented to make the motors oscillate with a configurable period amplitude and offset Initialize Hardware How the individual motors are controlled is described in the next few sections RC SERVO MOTOR The RC servo motor is controlled through a Lynxmotion SSC 32 servo controller The controller takes in a serial command input which it interprets to control up to 32 servo motors simultaneously Hardware Set Up Initialization VISA resource name Speed Figure 2 The block diagram for the RC servo motor This packages the string to be sent via serial to the SSC 32 motor controller Inputs from the front panel are scaled from degrees to the appropriate values for the motor controller to use The command string for the controller follows the following format ch P pw S lt spd gt H ch P pw S lt gt T time cr Example 40 P1600 S750 lt cr gt From the user manual e lt ch gt Channel number in decimal 0 31 lt pw gt Pulse width in microseconds 500 2500 e lt spd gt Movement speed in uS per second for one channel Optional e lt time gt Time in mS for the wntire m
20. ean Up 8 error ut 2 Pa a Stepper Error Output 00000000000 on00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 EEE pper Control Bundle Stepper Output Tg FPGA Stepper Output nanded Position steps alf Step Time ticks Reset Position to 0 M Current Position steps Error steps Control Mode RPM 60 gt degrees rotations sec deg sec La t ble Cluster 81 sition on Value Drive Status ol Cluster u Position DCS2 Position Ter p DCS1 Counts no reset io reset b DCS1 Index Z Position Position ount ount gt D Position reset b Position Value sition ol Cluster DCS1 Encoder Position i ls 123 DCS1 Motor Postion DES TA Pad gt x DCS1 Voltage in DCS1 Desired ok DCS1 Control Velocity DCS2 Voltage in ES 5 DCS2 Time delay DCS2 Control Velocity per n EY Stop
21. l for this lab and will be the method I use for future robotics projects REVISED LAB WRITEUP The lab handout is confusing which is a function of having strange Vis in it that seems disparate More work needs to be done to make the Vis flow better In addition the wiring schematic for DCS2 was completely wrong The correct wiring is Encoder Phase A Module 1 004 Encoder Phase B Module 1 65 Encoder Index Module 1 6 00 Module 5 0 APPENDIX Code is attached at the end of this document PowerPC vi Initialize Hardware 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 Individual Motor Tuning Control and Monitoring sition Hardware Set Up Initialization Master Pos n LOBE Main Loop VISA resource name gt gt gt a k 38 180 615 E 615 180 Build Text2 115200 ee 10 l b Device rapidash stop bits 10 1 bit gt gt gt pe 1132 Position 69 Die 22 Speed harder hardt 2350 Build Text 3 BR Wb gt CR m Ta Device Magic Wan er ur Ir 70 Serial Port ge Position Cowgirl TEH n Speed of Love gt 1132 Lil Contiol Mod 1735 gt TE FPGA vi FPGA Target RIOQ E Position Control Default gt
22. les or disables the Enable Drive motor DCS1 Reset Positi Bundle By Name DCS1 Enable Drive I T DCS1 Disable Drive Disable Drive n DCS1 Reset Enable Drive DCS2 DCS2 Go DCS2 Speed 2 PRA F PORRA YEEEKEEKUUYYUPYKKSQ IVxK GV II OIEIIEIUEEVE WIWUIYuIIII IIIIIWI FI lt I IIICIIIUHNMUIIOIIII I I IIIAI WSII I AII I IIIMII II IAUIIII IIAI UI I III IMWOIUAUIII JSE FPGA Stepper Output Half Step Time ticks Reset Position to 0 Enable Control Mode RPM 60 lt gt degrees gt rotations sec gt 160 360 ARIAS A 5 5 5 5 5 5 5 Current Position steps Error steps FI Commanded Position steps Enable TEH deg sec m T I VI T ZIK WKKI M IIIC DH I Xw WI 6K IYIYI III II IIIIIII II I II I IW IW IIIQIIGCT I ZI lt
23. on AE EEA S SS SE EEA S SS SEES EE ES SS FTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT FA A rrr DC Servo 2 Anal DCS2 Drive Control Cluster DCS2 Speed BCS Go L Control VEIL RESEL Valle CS2 Reset Position IIIIII Encoder Position Tick Count at Last Encoder count Time between Encoder Counts DCS2 Counts no reset DCS2 Ticks Count ZE
24. ove affects all channels 65535 max Optional Cr Carriage return character ASCII 13 Required to initiate action e esc Cancel the current action ASCII 27 For us the channel number used was 0 since there was only one servo motor The pulse pw was a value from 615 to 2350 By scaling the pulse width to the corresponding position of the motor in degrees we found that O degrees corresponds to a pulse width of 615 and 180 degrees to a pulse width of 2350 The rest of the positions varied linearly within this range The speed spd was determined in the same fashion giving a speed of 180 degrees per second with a value of 1735 A note from the user manual was that the first positioning command should be it ch P lt pw gt This allows the controller to learn where the servo is positioned on power up If this step is ignored speed and time commands will be ignored by the controller Thus we created a button to send this default string Individual Motor Tuning Control and Monitoring DC Motor 1 Stepper DC Motor2 RC Servo Command String YISA resource name 1 Position 0 P1482 59639 pa ASRLI INSTR Y r 90 00 stop bits 10 1 bit Speed 7 error out 2 Figure 3 Front panel for the RC servo motor The initialize serial port command initializes the serial port while the position and speed are controlled in degrees STEPPER MOTOR The stepper is unique in this set of motors as it
25. r will give the position of the output shaft in degrees 3 AAA Sampled Pos in degrees Sampled Pos out degrees al DE Current Pos degrees Ticks Accum in 2 Mew Ticks Ticks Accum Cut Sample Rate Ticks fa Velocity In internal fi n Gain to Degrees Velocity Cut internal Velocity Cut degrees Figure 14 Position to velocity converter based on the change in position of the motor and the ticks per count value Next we have a sub VI which uses the change in position of the motor and the sample tick rate to give the velocity of the motor Interestingly it does not use an accumulator for the tick rate to give time Instead it simply reads the ticks per count value from the encoder then resets the shift register that could be used to keep track of it The false case for this VI simply passes values through TESTING To create a control system we needed to determine if the motor s responded linearly to their input signals Therefore we tested DCS1 by sending it PWM signals of different duties and determining the velocities of the motor Using a stopwatch and eyeballing the rotation of the motors for several revolutions we managed to get the graph in Figure 15 From the graph we can tell that the motor responds linearly to changes in duty which makes controlling it easier DC Servo 1 Angular Velocity vs Input 5 85614E 00 0059 00
26. rection Finally the encoder position is determined using clever use of XOR logic gates and shift registers The encoders consist of 3 separate rings two of which are for relative positions while the third is for absolute positioning We can think of the encoders producing square wave signals The number of counts of the square wave can be used to determine the relative position of the motor On the other hand the phase offset of Encoder A and Encoder B can be used to determine if the motor is spinning clockwise or counter clockwise Read the encoder phase values AAA A AN Mod Encoder Phase ah ANI Mod Encoder Phase 85 Ban Mod7 Encoder Index EE E EE EE E we non reset counts r DCS1 Reset Position Value Counts no reset 0 Encoder Position 1 0 Tick Count at Last Encoder count Time between Encoder Counts Figure 9 The encoder reading chip uses XOR gates and shift registers to convert the quadrature encoder signals into a motor direction and rotation count The chip also keeps absolute position of the encoders taking that responsibility off the PowerPC In addition the chip gives a time between encoder counts which is useful to determine the velocity of the motor The diagram in Figure 10 helps explain how the chip in Figure 9 works Clockwise Encoder A Encoder B Shift register A Shift register B Encoder A XOR Shift Register A Encoder Shift Register B
27. s simple only a single chip is required to enable the motor and to control its speed The motor will not move if sent a signal of 2 5V while a signal above that will make it rotate clockwise and a signal below that will make it rotate counter clockwise This chip is shown in Figure 12 DC Servo 2 Control DZS Drive Control Cluster pesz DCS2 Go Figure 12 Enable and speed control chip for DCS2 It is a simple chip that keeps the output voltage between 0 and 5 volts The encoder used for DCS2 was identical to DCS1 therefore the chip in Figure 9 was reused SUPPORTING VIS FOR DC SERVOMOTORS On the PowerPC we receive position in ticks from the DC motors and we send either PWM duty signals or an analog voltage value to control the velocity of the motors 052 Encoder Position Degrees Figure 13 Ticks to degrees sub VI This takes the number of ticks moved coming from the encoder and scales it to degrees To convert the tick values coming from the encoders to rotation values in degrees of the motors we employ a modulus operator and linear scaling Since the encoder is a quadrature encoder with 500 counts per revolution and is connected to a 65 5 1 gear reduction there will be 131000 counts per revolution of the output shaft Taking the remainder of the cumulative number of ticks divided by 131000 will constrain the number of ticks between 0 and 131000 a position in ticks Finally scaling this numbe
28. tatus DCS1 Status Cluster OUT Vsup Present Drive Fault Over Temperature Fault a Count Case d True DC Servo 1 Control TM PWM tl non reset counts DCSI Reset Position Value BEST Reset Posti DCS1 Counts no reset eset Position gt mz If True Read 2 a new speed value else use Encoder Positi old 0 ncoder Position 9651 Encoder Position Ex Mod Drive Direction CS a a a som Er Read Speed Tick Count at Last Encoder count Time between Encoder Counts icks Count 2000 Number of ticks 2000 ticks for this cycle 20 kHz 0 l Hero Read the encoder phase values ka Count Case 7777 7 1 non reset counts Ka T DCS2 Reset Position Value Ll 657 Reset Position DCS2 Counts no reset 0132 gt a o 0 DCS2 Encoder Position DC Servo 2 Control 32 Analog ES DCS2 Drive Control Cluster Tick Count at Last Encoder count I DCS2 Speed DCS2 Go 5 0 ra Time between Encoder Counts DCS2 Ticks Count i 132
Download Pdf Manuals
Related Search
Related Contents
Co mos - Billiger.de Manuel CTC EcoAir 400 30400 BRAKE CONTROL WIRING HARNESS Philips 196V3LSB2 Manual Service manual for DC/DC converter Zステージ(昇降型)[取扱説明書] Copyright © All rights reserved.
Failed to retrieve file