Difference between revisions of "Stepper"
(21 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | == General Setup == | ||
+ | |||
Used Stepper: 17HM19-2004S | Used Stepper: 17HM19-2004S | ||
Line 8: | Line 10: | ||
This is the limit of the driver. It runs from the internal oscillator at 12.1MHz. Measure by giving a 9.765kHz pulse and read out register TSTEP as 0x277 (DEDGE=true). | This is the limit of the driver. It runs from the internal oscillator at 12.1MHz. Measure by giving a 9.765kHz pulse and read out register TSTEP as 0x277 (DEDGE=true). | ||
− | Take One, Lifting Weights | + | == Take One, Lifting Weights == |
Driver Configuration is basically the recommended default from the datasheet for a coil current of about 2A: | Driver Configuration is basically the recommended default from the datasheet for a coil current of about 2A: | ||
Line 23: | Line 25: | ||
<gallery> | <gallery> | ||
− | Weightlifting.jpeg| | + | Weightlifting.jpeg|Weight Lifting Setup |
</gallery> | </gallery> | ||
Line 65: | Line 67: | ||
Full data sheet of the motor: https://www.omc-stepperonline.com/download/17HM19-2004S.pdf | Full data sheet of the motor: https://www.omc-stepperonline.com/download/17HM19-2004S.pdf | ||
+ | |||
+ | == Take Two, Weight Spinning == | ||
+ | |||
+ | <Gallery> | ||
+ | Weightspinning.jpeg|Setup for torque measurement by a spinning weight | ||
+ | </Gallery> | ||
+ | |||
+ | The idea here is to measure the torque at a given RPM by testing how fast the stepper can accelerate to a higher RPM. This way the measurement is not limit to the length of a linear motion as in the previous chapter. | ||
+ | |||
+ | === Lost step detection === | ||
+ | |||
+ | With each round the rotor goes through a photo interruptor. The controller has an internal counter to keep track of the current angle with respect to an arbitrary reference. The home command puts the controller into a mode where it resets the counter if the rotor goes through the interruptor. After that, with each round it checks if the interruptor signal asserts during a given window around the reference. The window can be programmed and is currently set to +/- 4 full steps. | ||
+ | |||
+ | === Measurement === | ||
+ | |||
+ | We spin the motor to the RPM under test and try to accelerate it to the next higher RPM level. We use the interruptor signal to detect lost steps. | ||
+ | The acceleration directly corresponds to the torque the motor can generate at the given RPM. | ||
+ | |||
+ | We now have a detailed torque curve RPM vs. Ncm. | ||
+ | |||
+ | Do the same for deceleration | ||
+ | |||
+ | Repeat everything with the other set of weights. | ||
+ | |||
+ | The following series are all done with two 50g weights. The full setup corresponds roughly to a moving mass of 11kg when using a 16T pulley. | ||
+ | |||
+ | === 1st Series === | ||
+ | |||
+ | The following graph shows the max acceleration in RPM/s in steps of 200 RPM. | ||
+ | |||
+ | Driver config (just pasted here for reference): | ||
+ | |||
+ | reg 0x04 -> 0x00000000 | ||
+ | reg 0xec -> 0x200100c3 | ||
+ | reg 0x90 -> 0x00061802 | ||
+ | reg 0x91 -> 0x0000000a | ||
+ | reg 0x80 -> 0x00003144 | ||
+ | reg 0x93 -> 0x000001f4 | ||
+ | reg 0xf0 -> 0x000401c8 | ||
+ | |||
+ | {{ | ||
+ | Graph:Chart|width=600|height=200| | ||
+ | xAxisTitle=RPM| | ||
+ | yAxisTitle=RPM/s| | ||
+ | type=line| | ||
+ | x=0.00,200.00,400.00,600.00,800.00,1000.00,1200.00,1400.00,1600.00,1800.00,2000.00,2200.00,2400.00,2600.00,2800.00,3000.00,3200.00| | ||
+ | y=7101.94,7611.49,6377.73,5601.97,3675.27,2408.02,1860.57,1763.62,1583.96,1071.46,935.91,891.38,776.37,751.01,664.83,612.14,581.51| | ||
+ | interpolate=monotone| | ||
+ | colors=seagreen,orchid| | ||
+ | }} | ||
+ | |||
+ | === StealthChop === | ||
+ | |||
+ | 4 Series with StealthChop | ||
+ | |||
+ | tmcw(TMCR_CHOPCONF, | ||
+ | TMC_CHOPCONF_DEDGE | | ||
+ | (2 << TMC_CHOPCONF_TBL_SHIFT) | | ||
+ | (7 << TMC_CHOPCONF_HEND_SHIFT) | | ||
+ | (2 << TMC_CHOPCONF_HSTRT_SHIFT) | | ||
+ | (5 << TMC_CHOPCONF_TOFF_SHIFT)); | ||
+ | tmcw(TMCR_IHOLD_IRUN, | ||
+ | ( 6 << TMC_IHOLD_IRUN_IHOLDDELAY_SHIFT) | | ||
+ | (24 << TMC_IHOLD_IRUN_IRUN_SHIFT) | | ||
+ | ( 3 << TMC_IHOLD_IRUN_IHOLD_SHIFT)); | ||
+ | tmcw(TMCR_TPOWER_DOWN, 0x0a); | ||
+ | tmcw(TMCR_GCONF, | ||
+ | TMC_GCONF_DIAG0_INT_PUSHPULL | | ||
+ | TMC_GCONF_DIAG1_PUSHPULL | | ||
+ | TMC_GCONF_DIAG1_STALL | | ||
+ | TMC_GCONF_DIAG0_OTPW | | ||
+ | TMC_GCONF_EN_PWM_MODE | ||
+ | ); | ||
+ | tmcw(TMCR_TPWMTHRS, 0); | ||
+ | tmcw(TMCR_PWMCONF, | ||
+ | TMC_PWMCONF_PWM_AUTOSCALE | | ||
+ | ( 1 << TMC_PWMCONF_PWM_GRAD_SHIFT) | | ||
+ | (200 << TMC_PWMCONF_PWM_AMPL_SHIFT)); | ||
+ | |||
+ | |||
+ | {{ | ||
+ | Graph:Chart|width=600|height=200| | ||
+ | xAxisTitle=RPM| | ||
+ | yAxisTitle=RPM/s| | ||
+ | type=line| | ||
+ | x=0,200.00, 400.00, 600.00, 800.00, 1000.00, 1200.00, 1400.00,1600,1800,2000,2200,2400,2600,2800,3000| | ||
+ | y1=4652.11,8270.53,6688.88,4508.25,2932.28,2138.08,1581.30,1271.33,1328.75,1022.06| | ||
+ | y2=4771.72, 7918.49, 6734.86, 5036.72, 3401.45, 2294.83, 1554.91, 1694.32, 1295.62, 1284.12, 723.39, 704.20, 564.93, 578.95, 699.80, 502.95| | ||
+ | y3=4701.81, 7671.34, 6738.24, 5021.65, 3757.66, 2462.01, 1405.32, 1644.94, 1242.94, 1150.06, 902.61| | ||
+ | y4=4378.76, 7908.38, 6726.26, 5059.55, 3786.02, 2977.99, 1582.61, 1773.34, 1360.92, 1319.06, 700.13, 593.96, 497.86, 611.02, 609.19, 492.01| | ||
+ | interpolate=monotone| | ||
+ | colors=seagreen,orchid| | ||
+ | }} | ||
+ | |||
+ | === SpreadCycle vs. StealthChop at 37V === | ||
+ | |||
+ | {{ | ||
+ | Graph:Chart|width=600|height=200| | ||
+ | xAxisTitle=RPM| | ||
+ | yAxisTitle=RPM/s| | ||
+ | type=line| | ||
+ | x=0,200.00, 400.00, 600.00, 800.00, 1000.00, 1200.00, 1400.00,1600,1800,2000,2200,2400,2600,2800,3000,3200| | ||
+ | y1=7101.94,7611.49,6377.73,5601.97,3675.27,2408.02,1860.57,1763.62,1583.96,1071.46,935.91,891.38,776.37,751.01,664.83,612.14,581.51| | ||
+ | y2=4771.72, 7918.49, 6734.86, 5036.72, 3401.45, 2294.83, 1554.91, 1694.32, 1295.62, 1284.12, 723.39, 704.20, 564.93, 578.95, 699.80, 502.95| | ||
+ | y1Title=SpreadCycle|y2Title=StealthChop|legend=Legend| | ||
+ | interpolate=monotone| | ||
+ | colors=seagreen,orchid| | ||
+ | }} | ||
+ | |||
+ | === SpreadCycle vs. StealthChop at 24V === | ||
+ | |||
+ | {{ | ||
+ | Graph:Chart|width=600|height=200| | ||
+ | xAxisTitle=RPM| | ||
+ | yAxisTitle=RPM/s| | ||
+ | type=line| | ||
+ | x=0,200.00, 400.00, 600.00, 800.00, 1000.00, 1200.00, 1400.00,1600,1800,2000,2200,2400,2600,2800,3000,3200| | ||
+ | y1=7542.89,7479.90,6916.74,5115.56,3970.36,2537.81,1991.76,1270.71,974.54,1100.13,654.58,493.23,526.57,475.44| | ||
+ | y2=5023.15,6511.14,4549.33,2146.70,1382.23,1040.71,890.69,754.43,372.66,406.07| | ||
+ | y1Title=SpreadCycle|y2Title=StealthChop|legend=Legend| | ||
+ | interpolate=monotone| | ||
+ | colors=seagreen,orchid| | ||
+ | }} | ||
+ | |||
+ | === SpreadCycle vs. StealthChop at 45V === | ||
+ | |||
+ | {{ | ||
+ | Graph:Chart|width=600|height=200| | ||
+ | xAxisTitle=RPM| | ||
+ | yAxisTitle=RPM/s| | ||
+ | type=line| | ||
+ | x=0,200.00, 400.00, 600.00, 800.00, 1000.00, 1200.00, 1400.00,1600,1800,2000,2200,2400,2600,2800,3000,3200| | ||
+ | y1=6833.09,6936.92,6967.79,5795.93,5090.94,4218.19,4093.83,2910.22,3110.80,2005.70,1814.99,1182.57,1083.50| | ||
+ | y2=4627.26,6868.87,6580.90,5164.92,3780.01,2877.61,2168.31,1452.74,1413.20,1641.69,865.66| | ||
+ | y1Title=SpreadCycle|y2Title=StealthChop|legend=Legend| | ||
+ | interpolate=monotone| | ||
+ | colors=seagreen,orchid| | ||
+ | }} | ||
+ | |||
+ | === SpreadCycle at different Voltages === | ||
+ | {{ | ||
+ | Graph:Chart|width=600|height=200| | ||
+ | xAxisTitle=RPM| | ||
+ | yAxisTitle=RPM/s| | ||
+ | type=line| | ||
+ | x=0,200.00, 400.00, 600.00, 800.00, 1000.00, 1200.00, 1400.00,1600,1800,2000,2200,2400,2600,2800,3000,3200| | ||
+ | y1=7542.89,7479.90,6916.74,5115.56,3970.36,2537.81,1991.76,1270.71,974.54,1100.13,654.58,493.23,526.57,475.44| | ||
+ | y2=7101.94,7611.49,6377.73,5601.97,3675.27,2408.02,1860.57,1763.62,1583.96,1071.46,935.91,891.38,776.37,751.01,664.83,612.14,581.51| | ||
+ | y3=6833.09,6936.92,6967.79,5795.93,5090.94,4218.19,4093.83,2910.22,3110.80,2005.70,1814.99,1182.57,1083.50| | ||
+ | y1Title=24V|y2Title=37V|y3Title=45V|legend=Legend| | ||
+ | interpolate=monotone| | ||
+ | colors=seagreen,orchid,blue| | ||
+ | }} | ||
+ | |||
+ | === StealthChop at different Voltages === | ||
+ | {{ | ||
+ | Graph:Chart|width=600|height=200| | ||
+ | xAxisTitle=RPM| | ||
+ | yAxisTitle=RPM/s| | ||
+ | type=line| | ||
+ | x=0,200.00, 400.00, 600.00, 800.00, 1000.00, 1200.00, 1400.00,1600,1800,2000,2200,2400,2600,2800,3000,3200| | ||
+ | y1=5023.15,6511.14,4549.33,2146.70,1382.23,1040.71,890.69,754.43,372.66,406.07| | ||
+ | y2=4771.72, 7918.49, 6734.86, 5036.72, 3401.45, 2294.83, 1554.91, 1694.32, 1295.62, 1284.12, 723.39, 704.20, 564.93, 578.95, 699.80, 502.95| | ||
+ | y3=4627.26,6868.87,6580.90,5164.92,3780.01,2877.61,2168.31,1452.74,1413.20,1641.69,865.66| | ||
+ | y1Title=24V|y2Title=37V|y3Title=45V|legend=Legend| | ||
+ | interpolate=monotone| | ||
+ | colors=seagreen,orchid,blue| | ||
+ | }} | ||
+ | |||
+ | == Series without weights, corresponds to ~1.4kg == | ||
+ | |||
+ | === StealthChop at 40V === | ||
+ | |||
+ | {{ | ||
+ | Graph:Chart|width=600|height=200| | ||
+ | xAxisTitle=RPM| | ||
+ | yAxisTitle=RPM/s| | ||
+ | type=line| | ||
+ | x=0,200.00, 400.00, 600.00, 800.00, 1000.00, 1200.00, 1400.00,1600,1800,2000,2200,2400,2600,2800,3000,3200,3400,3600| | ||
+ | y1=20918.88,31064.29,49822.66,30495.68,19954.14,16975.80,15092.86,12889.57,7374.21,6677.21,6548.32,6316.87,5661.69,5542.80,3859.08,3112.40| | ||
+ | y2=30349.05,52366.55,59085.26,38463.68,23076.22,16421.99,16383.62,12566.21,12533.29,7263.07,6329.07,5970.43,6619.73,4893.02,3537.95,3102.99,4084.08,2583.17| | ||
+ | interpolate=monotone| | ||
+ | colors=seagreen,orchid,blue| | ||
+ | }} | ||
+ | |||
+ | == Series with light carriage, corresponds to ~1.0kg == | ||
+ | |||
+ | === StealthChop vs. SpreadCycle at 40V === | ||
+ | |||
+ | The maximum acceleration is limited by the test at around 115kRPM/s. | ||
+ | |||
+ | {{ | ||
+ | Graph:Chart|width=600|height=200| | ||
+ | xAxisTitle=RPM| | ||
+ | yAxisTitle=RPM/s| | ||
+ | type=line| | ||
+ | x=0,200,400,600,800,1000,1200,1400,1600,1800,2000,2200,2400,2600,2800,3000,3200,3400,3600| | ||
+ | y1=23137.12,45351.95,73983.21,42162.44,29957.53,21268.41,19982.27,13800.77,9733.59,7626.85,8532.23,6685.51,7317.66,8956.42| | ||
+ | y2=23137.12,59027.42,82641.29,49993.23,30113.92,26132.31,21437.48,17065.80,12562.94,10972.92,10575.51,7747.58,7276.92| | ||
+ | y3=88892.94,115697.80,115697.80,71927.42,42162.44,40650.53,27954.04,26407.05,21147.65,20060.77,15362.09,10972.92,10566.26,10187.33| | ||
+ | y4=88892.94,115697.80,115697.80,115567.90,53737.80,41659.46,29454.54,25967.47,21488.81,20673.65,15362.09,13912.91,12951.11,9789.92| | ||
+ | interpolate=monotone| | ||
+ | legend=Legend| | ||
+ | y1Title=StealthChop run 1| | ||
+ | y2Title=StealthChop run 2| | ||
+ | y3Title=SpreadCycle run 1| | ||
+ | y4Title=SpreadCycle run 2| | ||
+ | colors=seagreen,seagreen,orchid,orchid| | ||
+ | }} | ||
+ | |||
+ | === StealthChop vs. SpreadCycle at 24V === | ||
+ | |||
+ | {{ | ||
+ | Graph:Chart|width=600|height=200| | ||
+ | xAxisTitle=RPM| | ||
+ | yAxisTitle=RPM/s| | ||
+ | type=line| | ||
+ | x=0,200,400,600,800,1000,1200,1400,1600,1800,2000,2200,2400,2600,2800,3000,3200,3400,3600| | ||
+ | y1=32391.97, 115697.80, 42156.53, 29577.12, 19773.95, 14572.80, 13153.82, 7835.60, 6139.66, 5751.55, 4382.65, 4462.05, 3427.55,2647.98| | ||
+ | y2=32391.97, 112596.44, 41973.08, 29238.98, 19834.33, 14628.87, 13848.22, 7835.60, 6139.66, 4378.46, 3977.58, 4204.04, 3292.27,3025.32| | ||
+ | y3=88892.94, 115697.80, 71602.67, 35348.48, 21509.94, 19674.32, 15362.09, 14395.97, 9789.92, 7670.99, 6010.68, 6052.91,4742.82,3714.20| | ||
+ | y4=88892.94, 115697.80, 73736.75, 34591.05, 24944.59, 19568.65, 15362.09, 14395.97, 10778.83, 10193.49, 6776.97, 5310.16,5406.36,5434.36| | ||
+ | interpolate=monotone| | ||
+ | legend=Legend| | ||
+ | y1Title=StealthChop run 1| | ||
+ | y2Title=StealthChop run 2| | ||
+ | y3Title=SpreadCycle run 1| | ||
+ | y4Title=SpreadCycle run 2| | ||
+ | colors=seagreen,seagreen,orchid,orchid| | ||
+ | }} |
Latest revision as of 13:27, 13 May 2018
Contents
General Setup
Used Stepper: 17HM19-2004S
Driver Voltage: 37V
Driver: TMC2130
Max RPM reached with the motor, unloaded: 3600RPM This is the limit of the driver. It runs from the internal oscillator at 12.1MHz. Measure by giving a 9.765kHz pulse and read out register TSTEP as 0x277 (DEDGE=true).
Take One, Lifting Weights
Driver Configuration is basically the recommended default from the datasheet for a coil current of about 2A:
reg 0x6c -> 0x200100c3 reg 0x10 -> 0x00061c02 reg 0x91 -> 0x0000000a reg 0x80 -> 0x00003144 reg 0x93 -> 0x000001f4 reg 0xf0 -> 0x000401c8
For very slow step rates stealthChop was disabled
Load Testing at 1/256 microstepping. Testing done lifting a weight by winding a rope on a cylinder with effective radius of 16.5mm.
9.5kHz 2250g 19.5kHz 2150g 39kHz 2240g 58.5kHz 2220g 78kHz 2240g 97.5kHz 2230g 117kHz 2230g 137kHz 2130g 156kHz 2150g 195kHz 2030g 234kHz 2050g 312kHz 2030g 468kHz 1700g 624kHz 1300g 936kHz 740g 1092kHz 556g 1400kHz 250g 1700kHz 150g
Syntax error
Source for torque curve from datasheet: https://www.omc-stepperonline.com/download/17HM19-2004S_Torque_Curve.pdf
Full data sheet of the motor: https://www.omc-stepperonline.com/download/17HM19-2004S.pdf
Take Two, Weight Spinning
The idea here is to measure the torque at a given RPM by testing how fast the stepper can accelerate to a higher RPM. This way the measurement is not limit to the length of a linear motion as in the previous chapter.
Lost step detection
With each round the rotor goes through a photo interruptor. The controller has an internal counter to keep track of the current angle with respect to an arbitrary reference. The home command puts the controller into a mode where it resets the counter if the rotor goes through the interruptor. After that, with each round it checks if the interruptor signal asserts during a given window around the reference. The window can be programmed and is currently set to +/- 4 full steps.
Measurement
We spin the motor to the RPM under test and try to accelerate it to the next higher RPM level. We use the interruptor signal to detect lost steps. The acceleration directly corresponds to the torque the motor can generate at the given RPM.
We now have a detailed torque curve RPM vs. Ncm.
Do the same for deceleration
Repeat everything with the other set of weights.
The following series are all done with two 50g weights. The full setup corresponds roughly to a moving mass of 11kg when using a 16T pulley.
1st Series
The following graph shows the max acceleration in RPM/s in steps of 200 RPM.
Driver config (just pasted here for reference):
reg 0x04 -> 0x00000000 reg 0xec -> 0x200100c3 reg 0x90 -> 0x00061802 reg 0x91 -> 0x0000000a reg 0x80 -> 0x00003144 reg 0x93 -> 0x000001f4 reg 0xf0 -> 0x000401c8
Syntax error
StealthChop
4 Series with StealthChop
tmcw(TMCR_CHOPCONF, TMC_CHOPCONF_DEDGE | (2 << TMC_CHOPCONF_TBL_SHIFT) | (7 << TMC_CHOPCONF_HEND_SHIFT) | (2 << TMC_CHOPCONF_HSTRT_SHIFT) | (5 << TMC_CHOPCONF_TOFF_SHIFT)); tmcw(TMCR_IHOLD_IRUN, ( 6 << TMC_IHOLD_IRUN_IHOLDDELAY_SHIFT) | (24 << TMC_IHOLD_IRUN_IRUN_SHIFT) | ( 3 << TMC_IHOLD_IRUN_IHOLD_SHIFT)); tmcw(TMCR_TPOWER_DOWN, 0x0a); tmcw(TMCR_GCONF, TMC_GCONF_DIAG0_INT_PUSHPULL | TMC_GCONF_DIAG1_PUSHPULL | TMC_GCONF_DIAG1_STALL | TMC_GCONF_DIAG0_OTPW | TMC_GCONF_EN_PWM_MODE ); tmcw(TMCR_TPWMTHRS, 0); tmcw(TMCR_PWMCONF, TMC_PWMCONF_PWM_AUTOSCALE | ( 1 << TMC_PWMCONF_PWM_GRAD_SHIFT) | (200 << TMC_PWMCONF_PWM_AMPL_SHIFT));
Syntax error
SpreadCycle vs. StealthChop at 37V
Syntax error
SpreadCycle vs. StealthChop at 24V
Syntax error
SpreadCycle vs. StealthChop at 45V
Syntax error
SpreadCycle at different Voltages
Syntax error
StealthChop at different Voltages
Syntax error
Series without weights, corresponds to ~1.4kg
StealthChop at 40V
Syntax error
Series with light carriage, corresponds to ~1.0kg
StealthChop vs. SpreadCycle at 40V
The maximum acceleration is limited by the test at around 115kRPM/s.
Syntax error
StealthChop vs. SpreadCycle at 24V
Syntax error