Home                                                Go to Page 1                 Jump to Troubleshooting                                                 

Excerpts from the Scope-drive List

 

Microstepping                       Microstep-Adjusting                Modem to modem             Motors-Steppers              Motors-Stalling            Mount            Mouse

Network Connection               Noise                                   Operating System              Overvoltage                    Parallel Port                Periodic Error Correction

 Planetarium Programs             Pointing                             Pointing Model Corrections                                     Polar Alignment

Power Supply                        Program Display                    Quarter Step Correction      Refraction                       Remote Telescope        Reset Equatorial 

Scroll Files                           Serial Port                             Servo system                        Siderostat                        Slewing                       Scope.exe Software 

 Software - other                 Test Strings                         Time                                    Torque                                 Tracking                         Vibration                        Weather

 Websites                             Yahoo                                Z1Z2Z3

 

MICROSTEPPING:         http://www.bbastrodesigns.com/operate_microstep_config.html 

The # of microsteps should be based on 2 factors: use sufficient microsteps such that an individual microstep is 1/4 to 1/2 arcsecond in size, and, sufficient microsteps such that the motor feels smooth when tracking.  Mel Bartels

+++

If you set a single microstep on my system to 0.2 arcsecond, then max speed is 80,000 * 0.2 arcsecond or 16,000 arcsecond/sec, or 4.4 deg/sec.    Mel Bartels

+++

The 40 microsteps is not for every situation. It will slow down the max microstepping speed, so don't go to 40 unless you need it because your gearing is coarse (under 1000:1). I continue to use my 20 inch at 20 microsteps as the best balance between max Ms speed, smoothness, and accuracy.    Mel Bartels  367

+++

Another point to make too, is that the software does have a finite limit on how fast it can process microsteps. Make them too small, and you will not be able to move fast enough using the handpad in microstepping mode. So don't overdo it on the microsteps.  There is but one goal: smooth even motion at the eyepiece/camera. Typically you do this by making microstep size at 1/4 to 1/2 arcseconds. While that matches scope resolution, it more importantly matches dissonance of the mount (no vibrations transmitted to eyepiece) and with a modest flywheel, means even motion.  Mel Bartels

+++

The number of microsteps needed is a function of the gearing between the motor and the mount, and also the spec's of the motor. Mel advises that you should strive for .25 to .5 arc/sec per microstep. I'll give an example of why only 4 microsteps is needed with the stock Hurst motor (3008-002) when used on a G11 mount.

Before we begin the math a few items of info. There are 1,296,000 arc/sec per 360º, the Hurst motor is 24 steps/rev, the gearbox is 150:1, and the G11 mount has a 360 tooth worm gear.

Take 1,296,000 and divide by 360 (G11 worm gear) then divide by 150 (Hurst gearbox) then divide by 24 (steps Hurst motor) and that equals 1. So without microstepping, there is a resolution of 1 arc/sec per fullstep of the motor. If we want to have a resolution of .25 arc/sec per microstep (my preference) then divide 1 by .25 and that gives us 4 microsteps. This reasoning will work for any motor and gearing combination. Just substitute the particulars for the mount and motors you will be using and the size of the microstep you want to use in arc/sec.

Considering the uneven steps of the original Hurst motor, the large gear reduction produced steady visual viewing with my C11 at f10.

Here's the PARMS that worked for the Hurst motor. You may still need to adjust the MSDelayX, MSPause, MaxDelay, and MinDelay for your system.

[*** halfstep section ***]

HsRampStyle 1          HsTimerFlag 1            MaxDelay 1700

MinDelay 600            HsDelayX 1                HsRampX 1

InterruptHs 5             HoldReps 5                 HsOverVoltageControl 0

MaxConsecutiveSlews 5

[*** microstep section ***]

MsPowerDownSec 180          PWMRepsTick 22                                       AvgPWMRepsTickOnFlag 1

MsDelayX 6                             MsPause 66                                                  Ms 4

MaxIncrMsPerPWM 8           MsHsToggleIncrMsPerPWM 16             MaxPWM 100       

PWM[0] 100 : 10

PWM[1] 100 : 60     

PWM[2] 100 : 100

PWM[3] 60 : 100                    Don D'Egidio

+++

I would only add one thing... The only reason 0.25arcsec/ms might not work is if the structure of the scope and mount ends up resonating with the pulsing of the motor. You will not know that till you start tracking, and for an alt/az mount that rate will vary for each axis as a function of the part of the sky you are in. For an equatorial mount (GEM, fork or horseshoe) the RA motor will run at the same speed all the time, so the problem is a bit easier (same problem, fewer motors to worry about). We had a 32" alt/az scope made from old locomotive parts, and it was using TINY little gearhead SAIA steppers. When they were running at the right place (speed) the image at the eyepiece would have noticeable vibration. Does not take much energy being pumped in if its at a resonant frequency.

Fortunately, you have four ways to combat this with scope.exe. The first is to rebuild and change the gear ratio (not required with Mel's system, but it was the only real option for the Tangent system used on the 32"). For Mel's system doing a simple re-tune of the motors you can vary the number of ms's per fullstep, and/or you can change the PWMRepsTic value to something higher or lower, and/or you can vary the current the motor is drawing, and hence the energy in each pulse by varying the combination of MsDelayX and MsPause. For me, lowering the current with MsDelayX & MsPause has the largest effect. That's why I recommend that after you pick a value for the number of ms/fullstep, then set MsDelayX and vary MsPause with the motor turning at around 30-50 ms/sec with a pointer on the shaft to get the lowest current you can through the motor while still providing smooth motion. That keeps that pulsed energy from the motor as small as possible. This will also vary PWMRepsTic, but at this stage do not worry about that unless the sound at whatever frequency you end up with is objectionable to you. If it is, vary MsDelayX and find another MSPause and see if that helps. You will need an ammeter in series with the power supply for this...(and remember you will be measuring the combined current from the motor AND the electronics, to get the motor current only. measure the current without the motor turning and subtract that from the current with the motor turning. Most motors I have are happy pulling between 200-300ma while ms'ing at 30 ms/sec. Less current makes getting the ms's even more difficult, more current makes tuning easier, but you ae pumping more energy into the system and risk resonance pumping if it gets too much). Life's a compromise, eh???? Then tune your ms's with a laser pointer shooting at a bit of mirror attached to the motor shaft, while the motor is either mounted on the scope, or a rubber band is looped around the shaft to provides slight amount of drag on the shaft.   Chuck Shaw

+++

When I was tuning the 17 size Vexta motors for the G11, I had an ammeter in series with the common lead from the motor so that I could monitor the current going only to the motor. I would get the motor running the fastest by setting the 2 Motor Track speed close to what Scope.exe told me was the max value. Then, while holding the motor in my hand while I was adjusting the MSDelayX, I would find the value that felt the smoothest. Next I would adjust the MSPause value until there were no perceptible vibrations and make a note of those values and the current reading. There would always be several combinations of MSDelayX and MSPause that would give very smooth motor running, so I would use the one with the lowest current reading, as a start, until everything was on the mount and a trial could be done with all components on the telescope. At that point some more adjusting would be done until the mount ran smoothly, gave slews with no motor stalling, and used the minimum current needed to achieve that condition. I do like Mel's software because of it's ability to be configured to almost any motor and mount available. Still, those Hurst motors were very stubborn in adjusting for smooth running.  Don D'Egidio

+++

try to get the PWMRepsTick value up as high as possible.  If that means setting MsDelayX to 1 and MSPause to very small numbers, then do it. The motors tend to run much smoother.   Mel Bartels

+++

Q.  I have an old 386 running at 16 MHz…  A. This should work ok - make sure you have no device drivers running from config.sys or autoexec.bat. Be sure any power management in bios is turned off. Then set the PWM reps (PWMRepsTick) at 20 and see if you can get it to run at that rate. If not, try lowering a bit. Otherwise the motors will run rough. Mel Bartels 

+++

If microstepping, then speed controlled by the MsArcsecSec value. If halfstepping then speed controlled by MaxDelay MinDelay values. Mel Bartels

MsArcsecSec

1. Set the microstep rate to the maximum possible (use the M hotkey and set
the maximum value suggested).

2. Try moving the scope in the Microstep mode using the handpad. If the
motors stall then the maximum microstep rate is too high. In this case:

3. Reduce the MsIncr parameter using the Motors | MsParams menu.

4 Goto step 1 and repeat until both motors will move at the maximum
microstep rate without stalling..   Chris Roland 11417

+++

In the end we have to find the balance between current draw, reasonable margin for adjusting smoothness and saturation of the CPU, which means:  -High enough PWM values that do not strain the CPU and give us margin to adjust Microsteps, but might result in fairly high current draw -MsPause values that lower current draw and leave us with a PWMRepsTick of approx. 30   Berthold  

+++

Q.  Is there any restrictions in less than 10 MS/step? Does it need to be and even number of MS?

A.  No - you can do any number of MS including odd numbers. But there is no harm in adding more microsteps - does not negatively affect performance or slow down the software in any manner. The software has to output a continuous pulse width modulation no matter what - might as well let it output finer microsteps than coarser ones, all things considered. Mel Bartels 

+++

Q.   ...if the displayed PMW count is right when tracking or when tracking is turned off.  

A.   It's most accurate when tracking is turned on.     Mel Bartels

+++

PWM's of 15/14 is a little low.  The 36/36 is a lot better although I've gone as low as 10 with decent results. Mel Bartels

+++  

Q.  I'm trying this on a 386-16 The pmw count can get up to 50 but the average is around 16.should I turn off the avr. PWM's and set it manually to 25 or so.?

A.  setting it (PWMRepsTic) to a higher number will not make the actual PWMs any faster - it's a value that the user puts in for the program to kindof expect to see as an averaged value.   Mel Bartels

+++

Setting MsPause and MsDelay to the lowest possible values will give you maximum PWMRepsTick which for my 486DX/50 is about 180 

+++  

AvgPWMRepsTickOnFlag: if 1, then auto-averaging of the PWMRepsTick will occur, based on the actual number of PWM repetitions per timer tick as averaged over 3.5 seconds; if 0, then the PWMRepsTick value as entered in the config.dat file will be used.  Mel Bartels

+++

...it is critical that the PMWRepsTick value be high enough for smooth motion. If too low, you can see and feel and hear the roughness as the motor responds to individual pulse width modulations. The PWMs must happen fast enough so that the motor responds to their average.  

So the PWM needs to be at least 10 and preferably 20 or more. Some motors like 50 to 100 or above. Turn off all the error correcting in the config.dat file. Make sure that you have no device drivers loaded on your laptop. Make sure that power saving features are turned off. Make MsPause and MsDelay 1. Make the PWM[] values a maximum of 100, and if necessary, divide all values by 2 to make the maximum 50. Even so, with a 286, you should be able to get 9-10 PWms per tick out of the software.

+++

q.  What's the reason for "sticking to about 40 PWM"?

I should have added +- 100%!

If too fast, the motors will not see the pulse width modulations, and if too slow, the individual pulses within the pulse width modulation will cause the motor shaft to shake. 20 to 100 is fine.  Mel Bartels 

+++

The microstepping parameters control the voltage to the motor.

Voltage is PWM value * MsDelayX / (MaxPWM * MsDelayX + MsPause)

Typically you adjust MsPause to control microstepping voltage, and adjust MsDelayX to control the speed of the PWMs.  
Mel Bartels

+++

MaxPWM value is the maximum that any PWM[] value can be.  However, PWM[] values can be less.  This gives flexibility in assigning PWM[] values to help precisely position rotor for each microstep.  Most people including me use 100 for MaxPWM and PWM[0] as it is convenient and gives enough resolution.  However, 200 can be used. Higher than that will cause fastest microstep speed possible to be rather low, also, if MaxPWM is too great, convention DOS that scope.exe is run under will start to run out of memory to hold all the PWM[] values. 

When maximum is set to 100 you can vary the microstep only by 1 up or down, so the smallest amount of change gives you 1%. When you put a maximum on 200 , you change by 1 thus 0.5 % difference possible between 2 microsteps                         Mel Bartels

+++

Heavy torque on the stepper motor shaft retards the shaft position by percentage of load vs capacity, so if torque loading is 30% (not unreasonable) then when rotor is between windings, the rotor will lag behind by 30%. By increasing the current draw when the rotor is between windings, an attempt is made to fight this. At least that is the idea behind the PWM values in the config.dat files that I use.    Mel Bartels

...the pwm's that I put into the config.dat have increased power in the middle of the microsteps to hold the rotor position better  Mel Bartels

As long as the ratio of current between the windings is constant, then the rotor will be positioned properly. At this point it is a matter of how much total current you wish to put into the motor, ie, if 100 MaxPWM and a particular winding is 60:40, 30:20 is equivalent but at lower power. By having one winding always at 100, you ensure max current to achieve that rotor position.  Mel Bartels   7147

+++  

Try MaxPWM of 50 and 200, but 100 seems to work best for my laptop; a 486DX50.  200 showed promise because it appeared to be much quieter, however the steps did not become smoother.  Now I know its because of the additional overhead on my machine

+++

Q.  I am wondering if anyone have an experience with tuning a motor 2 Volt under 12 Volt power supply ?

A.  This is a 6:1 ratio, which is ok only with the current limiting circuit.  You will likely wish to reduce your PWMs to 40 or so. The greater inductance of these motors requires lower PWMs.  Mel Bartels

+++

On a 33mhz machine, it is sometimes needed to lower the max PWM to 80. It just depends on what the PWM's are when you are tracking. If you go to 40 ms, have MsDelay at 0 and MsPause to 1 and the PWM value that show on the screen when tracking is too low, your steppers will act funny and be untunable. Too low being like 15 or so. Lowering the max PWM for all of the step values and the MaxPWM setting will raise the PWM displayed when tracking up to a higher value.  An old 386 would not run well on 20 ms so Mel tuned them by using 50 as a MaxPWM and a value for all of the steps.             Lenord Stage

+++

The PWM controls the amount of voltage in each microstep.  The percentage of ons vs offs control the current going to the motors. For instance, a PWM value of 50 with a MaxPWM value of 100 will do 50% current, as will PWM of 150 and a MaxPWM of 300. The MsPause is a value tacked onto the end of the PWMs. So a MsPause of 100 with PWM of 50 and MaxPWM of 100 is the same as PWM of 50 with MaxPWM of 200. MsDelayX is a multiplier - if 2 then all values are doubled. This makes faster computers work the same as slower  computers if you simply increase MsDelayX until the PWMs per timer tick are the same.               Mel Bartels

+++

it takes a certain amount of PWM numbers to get the motor to sense the current. That's why that final PWM[] number always seems high.  Mel Bartels

+++

The PWM[] value of 100 was selected to give enough resolution to the other PWM[] values. That is, if you pick the extreme case of PWM[0] = 1, then there are not a lot of choices for the other PMW[] values! But 100 is not a magic number. Certainly 50 is a fine choice for slower machines, and even down to 25 will work.

Remember that inside the program, the actual PWM[] number is the configured PWM[] value times the MsDelayX, so the following are equivalent:

PWM[0] 100
MsDelayX 1

PWM[0] 50
MsDelayX 2

But the first example gives you twice the resolution for the other PWM[] values, which, you may or may not need.

+++  MSDelayX

The MsDelayX was added a long time ago when PCs began running too fast, and the PWM[] values  consequently had to be several hundred. If you try this (make the PWM[0] value 500 or a 1000), you will run out of memory to build the PWM[] arrays. The PWM[] array output bit patterns are allocated to a memory location for fastest retrieval when doing the actual microsteps. I could recreate the PWM output bit patterns on the fly, and avoid the array completely, but then the minimum computer would become a Pentium 166 or so.    Mel Bartels

+++

MsDelayX cannot be fractional. It is a multiplier for PWM[] values.  Every PWM[] pulse that goes out, is delayed or multiplied in the code by MsDelayX.  So PWM[0] of 100 with MsDelayX of 1 is same as  PWM[0] of 50 with MsDelayX of 2.    Mel Bartels

+++

Setting MsPause and MsDelay to the lowest possible values will give you maximum PWMRepsTick which for my 486DX/50 is about 180.     Andy Martyn   8162
+++

MSDelayX is a direct multiplier of PWMs.  It is the number of times the PWM[x] value is read before it is executed.  If you increase the PWM Value, you will also need to adjust down the MSdelayX value accordingly for the same performance to get the same PWMRepsTick value (i.e. how many PWM pulses get crammed into a cycle, etc.).  Changes to MsDelayX also require adjusting MsPause to control the current and smoothness   Chuck Shaw

+++

Simplified, MSDelayx is used to keep the arrays of PWMs reasonably small on faster machines. Setting Msdelay at ie. 2 and having a PWM of 50 equals to having Msdelay 1 and PWM of 100. Since on a slow machine you are not likely to get prohibitively high PWM arrays, there is no need to set Msdelayx to anything but 1.

The PWMs control the voltage sent to your motors . Also simplified, each microstep is divided into 1 PWM and 1 MsPause. Each PWM is divided into a certain number of parts (Ons and offs) and so is MsPause, defining such the voltage the associated Ms will receive.

Lets say for example (simplified again!):
Ms1 has associated PWM1 with a value of 100
Ms2 has associated PWM2 with a value of 50
MsPause stays constant all the time.
Ms2 (or better the associated motor winding) will receive 50% of the voltage that MS1 received.

The point is that the higher the PWM values are, the more you strain your CPU as well. The lower they are the less margin you have for adjusting them for smoothness.  Interestingly using the same motors, a high PWM value on a slow machine will result in higher current draw then on a fast computer. I guess it must have something to do with the way the waveform is generated.

In the end we have to find the balance between current draw, reasonable margin for adjusting smoothness and saturation of the CPU, which means:  -High enough PWM values that do not strain the CPU and give us margin to adjust Microsteps, but might result in fairly high current draw -MsPause values that lower current draw and leave us with a PWMRepsTick of approx. 30   Berthold  

+++

MSPauseX – dummy loop at end of each PWM[] loop to take up time.  After equalizing the microsteps, use an ammeter to adjust MsPauseX till the current reading is no higher than the rated wattage of the steppers when the system is in track mode   Chuck Shaw

+++

Lowering the numerical values (of MSPause and MSDelay) gives you more juice to the steppers. Raising the number values takes away juice.   Lenord  Stage

+++

MsDelayX sets the overall frequency of the PWM (the Humm) 

MsPause controls the Duty cycle (current flow)

With stepper motors (any coil/inductor) as the frequency applied rises so do the resistance of the coil, thus you need to adjust the duty cycle to compensate to get the current flow back up, as current flow often = Torque.          James Lerch

+++

Q.  I have found that THE MSPAUSE IS VERY IMPORTANT TO PULSE METHOD, with this parameter, 1 you can adjust the width of the "pulse" 2 control that the pulse train has a correct frequency.

A.  Yes, on faster computers, this is very true. My testing is usually on slower 486/pentiums, and they are not so sensitive since their cpu speed is so much slower.  Mel Bartels  

+++

With a pointer on the motor shaft, and the invertoutput set correctly, select MSDelay=1, use the tracktest (now Motors | MSSpeed) and set the rate to step the motor at about 20-30 ms/second. Then vary MSPause up and down in value looking for smooth motion at the lowest current reading (this is a tradeoff, too low  current will get jerky). 

Then increase MSDelay=2, and repeat looking for the best tradeoff between smoothness and low current.

Keep increasing MSDelay and repeating the MSPause/Current experiment till you feel things are not improving. I suspect with a 30mhz machine you would not go beyond MSDelay=2 or 3, and for your 50mhz machine maybe you would get as high as 3-4 in your testing.....

Also watch the PWMReps value being displayed. If its not in the 30-60 range, decrease ALL the PWM[x] values in your array by the same  percentage (i.e. reduce them to 50% of their current value, or maybe 70% or 80%, etc..... That will help increase the PWM's being displayed. A very low PWM will work, but its hard to get smooth motion at very low PWM's being displayed. Setting the PWMRepsTick in config.dat does NOT change the PWM's being displayed.... The PWMRepsTick in config.dat is part of what tells scope.exe how fast it can track in ms mode. The displayed PWM value is showing you what your CPU is able to do. When you are all done tuning, set the PWMRepsTick in config.dat to the value shown on the display...

Once the MSPause/MSDelay setting are picked, then move to tuning your ms's to get smoothness there, using a very slow ms/second rate (0.5 to 1.0 ms/second).   Chuck Shaw 2777

+++

I've seen laptops that operate nicely with a couple of sets of numbers, yet operate rougher and noiser if you pick numbers between... Mel Bartels

+++

From my understanding PWMRepsTick is derived from MsDelayX. Basically decreasing MsDelayX will increase PWMRepsTick with the maximum value you can achieve on your machine reached when MsDelayX = 1 (About 180 on my 486 laptop). As you change MsDelayX and thus PWMRepsTick you change the frequency of the pulses sent to the motors which changes the frequency the motor tends to vibrate at which you can hear via a change in the noise pitch of the motor. It would seem that a MsDelayX = 11 is produces the frequency at which vibration is at a minimum for your setup.

MsPause will change the effective current you supply the motor with so that by increasing MsPause you will decrease the current used by your system which may make the motor run smoother but will definitely reduce torque.  Increasing MsPause may also reduce PWMRepsTick to a lesser extent than changing MsDelay but I cannot remember at the moment.

After all the above I truly believe the best way to set MsDelayX and MsPause is to use the AutoMsParms feature which will automatically work out the values for you if you give it the PWMRepsTick and % current values you want to use.  Andy Martyn

+++

MsPause adds dummy loops to the PWM cycles. Those dummy loops strain the CPU, which is why normally you should keep them low on slow PCs.  An indication for, whether your computer keeps up is the PWMRepsTick.  If it goes below 25 then smoothness of microstepping will be seriously compromised. I got a decent balance between smoothness and power consumption at around PWMRepsTick 35 on my old 386.

+++

MsPowerDownSec 600 in config.dat that will keep the motors powered if no movement for 10 minutes  Mel Bartels

+++

How did you set your MsDelayX and MsPause???? It has been my experience that unless these are set pretty close first, it is impossible to get any good results with setting the PWM[x] values......

The technique I have found to get pretty close values for MsDelayX and MsPause is as follows (this came originally from Tom K.):

1. Hook up an ammeter to the power to the motor. attach a cardboard pointer about 8-10" long to the motor shaft (you need a good visual indicator for the first part of this technique, NOT something super accurate for movement measurement....)

2. Start with the default values for PWM[x] in config.dat. Use the test routine to run the motor at about 20-30 ms/sec

3. Pick a value of MsDelayX, and then use the menu test routine to vary the value of MsPause up and down until the motion is smooth. Watch the current going to the motor, and try to get as low of a current reading as you can, while still achieving smooth motion. Write down the MsDelayX and MsPause value that goes with it.

4. Pick another value of MsDelayX, and repeat step #3.

5. Repeat step#4 as many times as you feel you want to.....

6. Update Config.dat with your best combination of MsDelayX and MsPause, and  THEN (and ONLY then) you can attach a laser pointer or an encoder to the motor to adjust the individual PWM[x] values to achieve individual ms of equal size.

7. Set the rate to zero ms/sec, and then use the +/- keys to move the motor one ms at a time to adjust the PWM[x] values. You can take as much time as you like between commanding the motor to the next ms.

8. Once you think you have things about right, repeat step #3 to verify the MsPause value you are using with the MsDelayX still gives smooth motion at 20- 30 ms/sec. If yes, you are done. If you had to tweak anything while repeating step#3, you will also have to repeat steps 6 and 7.....

This is an iterative process, and one that should NOT be rushed. Enjoy it, the results will amaze you and really be worth while at the eyepiece!!!!   Chuck Shaw   5630

+++

I just came in from tweaking the msDelayX and msPause setting for my scope due to too much "jitter" in the eyepiece. I was operating at 715x looking at Mars and the image had an annoying viabration to it. I am using 0.9 deg vexta motors, and 32 ms. I also have QSC and current comps in config.dat.  The ms spacing is very even. I think the viabration from the motor is coupling into the structure of the mount.  The system works well for deep sky imaging.

I was able to pretty much totally eliminate the vibration by letting the system track Mars, and going to Motor/msparams, and adjusting msdelayx and mspause while watching the results in the eyepiece and watching an ammeter in series with the power supply input to the PCB. 

I had previously been using MsDelayx=2, and MsPause=112. Things smoothed out when I changed things to MsDelayX=1 and MsPause=200. The current also dropped, which seems to have the effect of making the "energy" in the motor's pulses weaker, and thus coupling less energy into the structure.  The sound is also a bit "smoother"....

This was the first time I tweaked the motor tuning steps while tracking something at high power to see the results. Its a pretty easy way to get things really smooth!  Chuck Shaw

+++

Q.  What is used to determine the current percentage? Is it the motors voltage rating and the voltage used to power them? I'm thinking that if 6V motors were powered with 6V, then the current percentage would be 100%. A 6V motor powered with 12V would be 50%. Is this correct? 

A Correct. Also, during microstepping, you usually don't need all the torque that the motor can deliver, so you can reduce current percentage down by another half often. This makes noise quieter and saves battery.  Mel Bartels

A.  Yes   100 % means only relative and not the absolute value of the current. The beauty of mels system is that it uses Pulse width modulation to achieve microsteps. What is meant by 100 % is that the pulse is "on" at all times and motors draw as much as they can. and by 50 % means that the pulse train has "on" states 50 % of the time or in other words the average value of the current is 50 % of max . If u use a 6 V stepper on 12 volts the current drawn by it in the 100 % will be double the current it will draw at 6 V .  Higher voltage is prescribed so that u can manage a higher RPM. .  Sanat Kumar-

+++

On my 486DX-25 I use:

MSdelayX 1

MSPause 0

MaxPWM 100

PWMRepsTicks 180

This is the max at which my computer will run at. I have tried lower PWMRepsTicks but the higher values give lower vibration.  Andy Martyn

+++

Q.  Are the following parallel port "out" commands exactly the same for micro-step one?

 Out 1
 PWMRepsTick = 40
 MaxPWM = 100
 PWM[1] = 90
 MsDelayX = 2
 MsPause = 50

 Out 2
 PWMRepsTick = 40
 MaxPWM = 200
 PWM[1] = 180
 MsDelayX = 1
 MsPause = 50

A.  MsDelayX doubles each PWM output, so the two options are essentially identical. el Bartels

+++

Q.  Can you give a brief description/explanation of how 'auto adjust ms parms' works? 

A.  Well, there are three values

The pwm value which is the frequency of the pulse width modulations (times this number by 18 to get pwm freq per second, ie, a value of 40 means close to 600 Hertz) 

The mspause which is the dead quiet time at the end of every pwm (adjusts voltage or current level into the motor) 

The msdelayx which allows for equivalent smaller pwm values which is good for the software so that you don't push the old DOS memory limits, ie, a pwm[0] of 50 0 with msdelayx of 2 is same as pwm[0] of 100 0 with msdelayx of 1 the auto adjust ms parms menu option calculates these values for you, given a few seconds of time, based on your desired current percentage and desired pwm number   Mel Bartels

+++

Auto Ms parms, under the control section.  Here, you input the desired PWM repetitions per timer tick, and the percentage of current draw you wish going to the motors, and the program will do its best to settle in on the appropriate MsDelayX and MsPause values. Values are updated every 3 seconds, so allow a few seconds for the program to reach the best numbers. Desirable PWM reps per tick range from the lowest suggested of 10, to the best range of 30 to 100, with 200 as highest suggested. Percent of current draw should be minimized so that only the current required to microstep track is actually pulled from the power source. For instance, with 6 volt motors and a 12 volt supply, current % should be no more than 50, and can often be 20%. In combination with the new auto PWM reps tick averaging, this should speed up  configuring the microstepping parms.             Mel Bartels

+++

Maximum microstepping speed is MaxIncrMsPerPWM.  At some point before reaching this speed, the program will switch from PWMs to halfstepping, this speed being MsHsToggleIncrMsPerPWM.  MsHsToggleIncrMsPerPWM should be less than or at most, equal to MaxIncrMsPerPWM.     Mel Bartels

+++

make MaxIncrMsPerPWM equal to half of your total microstep number, and make MsHsToggleIncrMsPerPWM about half of that. Mel Bartels 2795

+++

Microstepping switches from pulse width modulation to halfstepping at MsHsToggleIncrMsPerPWM. Microstepping speed using halfsteps can increase to a maximum of MaxIncrMsPerPWM. Either employing pulse width modulation or halfstepping, the current to the windings is timed by the PWMs that occur approximately the same count per bios clock tick. This is to be distinguished from halfstep slewing which is timed differently.   Mel Bartels

+++

Let me try to explain these variables.          MaxIncrMsPerPWM    MsHsToggleIncrMsPerPWM

The motor needs a small period of time in order to feel or sense the pulse width modulations. The PWMs are a fast series of ons and offs sent out through the parallel port to the amplifier circuit. If these occur rapidly, the motor feels an averaged value. For instance, if 50 ons and 50 offs, then the motor will feel a current or voltage as 50% of maximum. So this combined series of ons and offs have to occur over some finite small period of time in order for the motor to feel or sense the desired current.  

This value, from my empirical experience ranges from 300 to 2000 Hertz (frequency per second).  

Now, if you are doing a PWM displayed value of 20, and knowing that the timer tick on all PCs operates at 18Hertz, your PWM frequency is 360 Hertz.  So that's ok.

But that also means that you can only step through 360 microsteps per second.

Consider a PWM displayed value of 110. That computes to 2000 Hertz. But the difference from the first example is that you can do 2000 microsteps per second.

When I went from 10 to 20 to 40 microsteps capability in the software, I found that the maximum microstepping speed dropped too low for my tastes. I reasoned, why should people running at 40 microsteps be penalized to moving at maximum microstepping speed 1/4 that of people using the 10 microsteps per second? In addition, when moving at highest microstepping speed, the microsteps occur so rapidly that it is not necessary to have such fine microstep resolution. So, why not allow the people running at 40 microsteps to temporarily pretend that they are using only 10 microsteps and thus move at 4x the maximum microstepping rate they would otherwise have?

Hence, the MaxIncrMsPerPWM value was born. That is the number of microsteps that can be skipped. If running at 40 microsteps, and this value is set to 4, then at maximum microstepping speed, scope.exe skips to every 4th microstep value, or in effect, treats the microsteps as if there were only 10 per fullstep.

Whether you can achieve that rate of speed with your motor and power supply considering the torque loading or friction on the motor shaft is another matter.

So:

MaxIncrMsPerPWM: maximum microstep increment per pulse width modulation. In order to microstep faster, microsteps can be skipped. Consequently, this sets the maximum microstepping speed. Microsteps can be skipped up to very roughly 4 per fullstep. For instance, if you have 20 microsteps per fullstep, then you can enter a value of 5 here. Consequently, this variable also controls the maximum microstepping or tracking speed. For instance, if you set it to 1, then your max microstepping speed will be the PWMRepsTick * 18 (ticks per second). The max value that you can set it to will be the number of microsteps in a halfstep, because the fastest the microstepping routine can work at is one halfstep per PWM. (if the number exceeds MsHsToggleIncrMsPerPWM, the routine switches from microstepping per each PWM to halfstepping per each PWM)

Now in order to move even faster, how about if the PWMs are set to maximum voltage once the microstepping speed exceeds a certain value? That's where MsHsToggleIncrMsPerPWM comes in.

I did this mainly for tracking through high altitudes in the 89+ degree range. You can watch the program start to skip microsteps and eventually move into full current halfstepping (in effect, skipping microsteps down to the halfstep level). If all works with motor shaft friction and power supply and so on and so forth, the scope will smoothly track through a very high rate of speed, up to 1 deg/sec.

MsHsToggleIncrMsPerPWM: while microstepping, the routine will switch into halfstep mode if necessary. This is toggled when the number of microsteps per each PWM repetition exceeds MsHsToggleIncrMsPerPWM. For instance, if the PMW repetitions per timer tick is 50, and if MsHsToggleIncrMsPerPWM is 5, and you ask the program to track at more than 250 (50*5) microsteps per PWM, then the routine will toggle to halfstep movement. Max speed is still the # of microsteps per fullstep divided by 2, equivalent to halfstepping.  In this example of 20 microsteps per fullstep, the max speed is 20/2 or 10 microsteps per PWM, or 500 (50*10) microsteps per PWM. Overall speed in any case is still limited by MaxIncrMsPerPWM.    Mel Bartels

+++

Lets assume: PWMRepsTick = 50

MaxIncrMsPerPWM = 8

MsHsToggleIncrMsPerPWM = 4

Ms = 32, and microstep size = 0.2 arcsec

When the scope is tracking the scope will switch to halfstepping using timing based on the PWM rate when it hits  MsHsToggleIncrMsPerPWM. This will occur when the number of microsteps required to be moved per PWM exceeds 4 which equates to a tracking speed of 18.2 * 50 * 4 * 0.2 = 728 arcsec/sec. 

The drive will then continue in tracking mode using halfsteps timed by the PWM rate until it gets to the next limit set by MaxIncrMsPerPWM at which time it will exit tracking mode and go into slew mode. The tracking speed at which this will occur in the example given will be 18.2 * 50 * 8 * 0.2 = 1456 arcsec/sec.   Andy Martyn

+++

MaxIncrMsPerPWM sets the acceleration rate for microstepping slew. This parameter is used by Scope when it moves the mount on "its own", that is as the result of the difference between target coordinates and where scope is pointing at. If you press your handpad button in microstepping mode there is no acceleration - it simpley picks the rate given by MsArcsecSec and applies it flat.  Now, look at the above parameter (MaxIncrMsPerPWM) : it tells program how many microsteps can it add EVERY PWM (not bios tick!). There could be lots of PWMs in case of fast PCs. Even with my ancient 486 I'm reaching 250+. Now 5 microsteps doesn's sound much, but accumulated over every PWM that is a LOT of microsteps in a very short time!  200 PWMRepsTick means that every second there is 200*18.2=3640 PWMs.

If you have MaxIncrMsPerPWM set to 5, even if you start at zero, at the end of first secound you would reach 3640*5 = 18200 microsteps per second ! That is a LOT ! Of course Scope will not let this happen and will switch to halfstepping long before, but that's not the point. Point is that this acceleration rate is way too high. Motors have no chance to keep up, so even when Scope switches to halfstepping, the rate of pulses is way too fast for a stationary  stepper (as it will be just jittering at this point). In other words, motor will make a 'bliiip' noise, but not move.

My suggestion is that eveyone starts with MaxIncrMsPerPWM of 1 and gradualy increase it (which I can't really see the need for, all this will only be used for very short slews like applying the final correction at the end of the long slew - so who cares if it takes say 2 seconds instead of 0.5 seconds). Especially for people with ultra high PWMRepsTick - I'd say that even going to values less than 1 (0.5 or 0.2) for MaxIncrMsPerPWM could be in order.   Bratislav

+++

100 microsteps or 256 or 1000 microsteps can be implemented with my code, but then the issue becomes one of managing all those steps and trying to tune them. I think 32 microsteps the optimum compromise.Mel Bartels

+++

Q.  have been trying to tune some RS Component steppers cat#440-442, 200 step 5v 1 amp. I am unable to get them to rotate smoothly in microstep mode. I have tried 2 laptops, a Toshiba 486 33mhz, and an IBM 2.0 gig p4. Using a 12volt battery power supply.In all cases I get a sort of cogging rotation, slow/fast, a bit like a second hand that does not smooth out despite many hours trying various combinations of parameters. I have tried 10, 20, 32 and 40 microstep versions, and every conceivable figure for mspause and ms delay, had currents up to 1.5 amps flowing and I have had pwm figures from 15 through to 100. Has anybody ever tuned these to work smoothly?

A.  Most likely causes of erratic motor operation:

--- not running in a pure DOS environment

--- other software running in the background like device drivers

--- power saver mode on, in BIOS, in a device driver, in the operating system

--- inadequate power supply

--- bad circuitry

--- mistuned software configuration     Mel Bartels

+++

1. make microstep speed as high as you can - eventually the software will not be able to keep up, and or the motors will be unable to handle the startup inertia and stall    Mel Bartels

+++

You can use the hotkeys of F1-F4 to simulate the handpaddle buttons for microstepping motion.  The F1/F2/F3/F4 keys actually do microstepping.                    Mel Bartels

+++

Do this with menu selection:   motors | auto adjust ms parms set pwm for 30 or 40, and current at 100% (assuming 12 volt supply and 12 volt motors, if 6 volt motors (and 12v supply), then set current at 50%); let run for a few seconds to stabilize now hit the f1 or f3 keys and see if the motor turns in microstepping mode go into menu selection   move | halfsteps   entering 400 steps - see if motor spins  Mel Bartels

+++

There are 18 ticks per second, so you want the motor to feel several hundred to a couple of thousand PWMs per second for smooth motion.  The software may be a tad slower now but should not be too much slower - this is because of the additional code in the microstepping function that automatically turns off the non moving motor after 5 seconds, and that automatically switches to halfsteps for tracking when necessary.Mel Bartels

+++

Try to pick motor speeds where you have a whole number of microsteps per timer tick which occurs 18.2 times per second)                Mel Bartels  

+++

AccumMs. are the motors' absolute position in accumulated microsteps  Mel Bartels

+++

Q.  Why 32 microsteps max? Is there a specific reason for this number?

A. Yes, there is a reason. I use integers for fastest speed for the slower computers. It is possible to run over the max integer at 32k if you have larger MaxPWM and higher count of microsteps per fullstep.  I will probably convert these numbers to 'long' values when the slowest computer in use running scope.exe can handle them with decent speed.  Mel Bartels

+++

The ms parameters (PWM[x]) can be tailored to each motor.  However the parameters that control current (MsDelayX and MsPause) are common to both motors.   Chuck Shaw

+++

Q.   ...when I turn tracking on (just having the RA/AZ motor connected it just sits there juddering erratically. 

A. Have you adjusted the microstep speed, via the menu option msspeed? Go to a little lower speed.   Mel Bartels

+++

you can calculate % of current by:
MaxPWM * MsDelayX  /  MaxPWM * MsDelayX + MsPauseMel Bartels

+++

Go to Motors | msparms    use the + and - keys to advance/decrement single microsteps

Check the display in the lower right to verify that steps are being made

After you cycle through all microsteps (beginning at 'A00', for example)  you will be on next fullstep indicated by a 'B00' and so forth

+++

To disable microstepping, do not turn on tracking, and leave the handpad in halfstep mode. Mel Bartels

+++

Q.  Is it possible to turn off microstepping? 

A.  You might try setting MsHsToggleIncrMsPerPWM 1. No guarantees!  You might also try a microstep setting of 2 with PWM[0] and PWM[1]                    Mel Bartels

I have done that for setting up a drive testing system and it works just fine. PWM[0] was 100:0 and WM[1] was 100:100     Chuck Shaw

+++  

Changed how the end of each bios clock tick cycle terminates the pulse width modulation. This cycle occurs 18.2 times per second. Now the PWMs are immediately terminated and the motors set to power off condition. Mel Bartels

+++  

Microstepping power down occurs regardless of motor's shaft or rotor positioning. Before, power down would only occur if rotor positioned on a fullstep. If the motor is not commanded to move in microsteps during an interval lasting MsPowerDownSec, motor will be powered down. Any subsequent microstep command will power up the motor.Mel Bartels

+++

..that backwards microstepping jitter and possibly missed steps came from the MSPowerDownSec. Apparently when moving fairly slowly, as the motor would reach a winding and then immediately power down, the motor would sometimes kick back to the previous fullstep thanks to residual magnetism in the stepper motor windings and torque on the motor shaft. So I have changed this to not power down the motor for 5 seconds. This seems to be the ticket. So for equatorial mounts, the declination motor will humm in place for 5 seconds, then power down, after concluding a slew. Mel Bartels 109

+++

In addition you can turn off microstepping completely for the declination motor via the menu system. This is handy if you have a perfectly  aligned scope with no practical declination drift.   Mel Bartels

+++

it is possible to bring the dec motor to rest on a fullstep. You can do this by hitting the 't' for track on/off twice rapidly. This forces the dec motor to the nearest fullstep to end tracking, then resumes RA motor tracking immediately. Mel Bartels

+++

MICROSTEPS - ADJUSTING:    http://www.bbastrodesigns.com/operate_microstep_config.html 

The "Ms" area shows the number of microsteps per timer tick (occurs 18.2 times per second) for altitude and azimuth motors, the winding from 'a' to 'd', the microstep within the winding for altitude and azimuth motors, and the quarter step correction for altitude and azimuth motors in decimal fullsteps.     Mel Bartels   4201

+++

The microstep display line on the lower right hand side of the screen will always indicate what winding and what microstep you are on, for each motor.  For example, this screen shows the altitude/declination motor on winding C microstep 0, and the azimuth/right ascension motor on winding A microstep 0.     Mel Bartels

+++

Lots of things can change the evenness of the (micro) steps, such as increasing the torque load by unbalancing the tube assembly.             Mel Bartels

+++

To step through individual microsteps, go to the menu option:
motors | msparms and use the + and - keys to advance or retreat individual microsteps.
Use the 't' or 'q' key to quit.                mb

+++

If using an equatorial mount, tune your motor with the other motor powered down, since most of your time will be spent with the declination motor powered off.  mb

+++

what you tune (on the bench) with a touch of drag on the motor shaft is fine for use at the scope. The steps mainly have to be smooth and roughly similar in size unless the gear ratio is very small in the 300:1 area. I've never gone to great lengths to tune my motors at the telescope (a 20 inch f/5) as local seeing effects obscure issues below 1 arcsecond anyhow.  Mel Bartels

+++

I totally agree with Mel's opinion that smoothness is more important than totally even ms's. I use my Alt/Az scope almost totally for CCD imaging with my CB245. I have not gone to any greater lengths than using a pointer on a motor to get the smoothness and even-ness settings. Visually (watching the 8" long cardboard pointer tip thru a magnifying glass) gets me very close to even ms's (I use 20 ms's). My step size is only 1.5 arcsec/full step though, so I rationalize the very slight potential unevenness as being buried in lots of other errors like seeing, etc.. I suspect I will remeasure things with a mirror on the motor shaft and my laser collimator bouncing off the mirror just to see how accurately I CAN get the steps, but that is stuff for cloudy nights.....

I use a simple and quick technique passed on by Tom Krajci for getting the motor motion nice and smooth:

Hook a pointer up to your motor (cardboard, about 8" long or so) Configure an ammeter in series with the power going to the motor (use the highest range initially).  Use the Test Motor routines [note: these routines are no longer in the software- use MsSpeed from the menu - bd] to start spinning the motor at about 20 to 30 ms/sec.  Pick a value for MsDelayX, and then vary MsPause up and down watching both the motion of the pointer tip and the current the motor is drawing.

Write down the MsDelayX and MsPause value combination that gives the smoothest motion for the lowest current drawn. As current decreases, the motion will be less smooth. At too much current, the motion is smoother. The idea is to lower the current till the motion starts to NOT be smooth, the raise it a little. You will be surprised at how changing MsPause by only ONE number will make a big difference when you get close to the optimal values....

Repeat this for other values of MsDelayX. Then pick the best of the different MsDelayX/MsPause combinations.

THEN lower the rate the motor is spinning from 20 to 30 ms/sec to around 1 (or less) ms/sec and play with the PWM [x] values to get the ms's each of equal size.

Finish up by re-checking the MsDelayX and MsPause settings at 20 to 30 ms/sec again to see if MsPause needs to be tweaked a tiny bit.   Chuck Shaw

+++

Some of the things that I have learned with my motors are.  First that the step sizes get much more equal if you use higher current.  I run my steppers at 12 volts and they are rated at 5.2V 7.28Watts which means I'm pulling .6 amps at 12 volts instead of the .1 that’s recommended.  This gives me good motion both forward and reverse.  Second my steppers would not draw constant current through the halfstep.  The 1/4 point drew less and the 3/4 point drew more for all four full steps so that the current would oscillate from .4 to 1 amp as the motor microstepped.  The slower the step rate the more pronounced the Oscillation.  The motors turned very smooth and even on the bench but this change in current was evident when the motor was mounted to the scope.  I fixed this by altering the PWM values.  I got the microstepping equal then I took the ones that were drawing to much current and lowered both sides of the PWM values so as to maintain the same ratio.  So now not all of my MS have a PWMmax of 100 some are lower and the current draw is smooth and so is the motion on my scope.  I did use the QSC to help equalize the 1/4 steps. This helped but I still want to measure some more.  You have to make sure that the laser is mounted really firm and the motor vibration does not change the motor orientation.

One last thing.  If you can measure the current draw during the 4 fullsteps you might find that the large change in half step sizes is due to a big change in current for phase A B C & D.  You can control this with the (current compensating) software also which should change the half step sizes.  It is explained briefly on Mels web page under configuring the software close to the end.  It was page 8 of 10 on my hardcopy.                          Andy Martyn

+++

Made laser spot analysis over a four-fullstep interval. (That was tedious!...and for two motors!!) Set the first laser spot (microstep 0 of the first fullstep...where winding A is energized) as zero and measured the distance of every laser spot from this 'zero point.' I did this all the way up to the next time the A winding was energized, at microstep zero. This point was the end of my four fullstep analysis. The distance between the first and second point (first time A winding was energized, and the second time the A winding was energized) was my baseline distance...and I divided that distance by the 80 microsteps in between to determine the "ideal" spacing of micro, quarter, half, and full step positions.

Then I loaded all the distance data of the 80 microsteps in a spreadsheet and compared the real world distance data to the 'ideal' positions. Based on the difference/deviation of real world data from 'ideal'...that was the basis for my QSC values for each motor. (Actually I did a linear fit to the data deviation, every quarter step.)

I've uploaded the spreadsheet I used to do this analysis to the list's "microstep" file area...it's called: QSC.XLS.    Tom Krajci  2682

+++

Start scope.exe. Using MsSpeed in the menu set microsteps at 1/10 (.1) microsteps per second. This will give you 10 seconds between each microstep and allow your test apparatus to stabilize between readings. If necessary, stop down your laser pointer with a piece of tape with a pinhole in the middle.

At step 0, make a pencil mark in the center of the dot. As the program advances, keep marking each microstep in a like manner, making marginal notes where necessary.    Bob Norgard   http://home.gci.net/~rnorgard/Scope/Microsteps.html" 

+++

Q. Did you "curve" the paper you took the data points (microstep lengths) on to match the radius of the data points or did you just keep it flat, and use a long projection distance to keep the tangent error small? (I assume the latter)


My projection distance was about nine feet, with the mirror on the shaft (to double the angle sensitivity of the setup). I did not bend the  paper...and for analyzing movement over only one motor step (1.8 degrees for a 200 step motor) you can get away with that.

Even for four fullstep analysis I did not bend the paper...but I did apply a trig correction to the data to reduce the distance values on flat paper into angles at the motor shaft. In that case I needed to keep track of where along the trail of spots on paper that the projection angle between the paper and laser spots was perpendicular...that was my 'zero trig correction factor' point, and I adjusted from there...which is not hard to do with a spreadsheet...the relationship/correction factor is something like (in Excel spreadsheet language):   =1/((TAN(C2*PI()/180))*(180/PI())/C2) ...where in this case C2 is the cell value in my spreadsheet that represents the angle distance of the laser spot from the 'zero trig correction point' (the point where the laser line of sight is perpendicular to the paper).            Tom Krajci    2710

+++

I don't know if Vincent Steinmetz's method of determining the PWMs ever made it to the list... here it is in case not...  Mel Bartels

"I just have tuned pwm table, because astromeccanica motor makes 11.25 arsc per step, after testing everything i could test , with not much success , i did following :

(1) I have constructed a cosinus current from 0 to pi/2 curve from 600mA to zero on paper.

(2) Then i have make a second curve with intensity i could measure in mA in one coil versus the corresponding PWM value ( i started from 200 down to zero ) : this curve makes easy to choose any intensity , and to "read" the PWM value with the graphic.

(3) On the first curve, i cut the curve in 40 step, and for each step i take the current value on the cosinus curve, then i search the corresponding PWM value with the (2)

(4) i take "opposite" value for the second pwm value

(5) When scope is tracking , motors are fed with cos/sin current, and motion is very smooth.

(6) To fine tune , i make a third graph from agular value ( 40 values from 0 to pi/) versus measured position in mm.

I take ideal position in mm, and i read the ideal angular value , i put the value of current on the cos curve, and finally the PWM to take. I wanted to tell this first to you, since i did not know the right words in english, but i feel it is a good method, and it is not iterative : for example the spot never stops or go"back" , as it did when i tried other method ...One advantage is with this kind of PWM table, an example of what i get is this :

PWM[0] 201 : 0

PWM[1] 200 : 110

PWM[2] 201 : 132

PWM[3] 201 : 145

PWM[4] 200 : 152

PWM[5] 200 : 158

PWM[6] 199 : 162

PWM[7] 198 : 167

PWM[8] 197 : 170

PWM[9] 197 : 172

PWM[10] 196 : 174

PWM[11] 195 : 176

PWM[12] 194 : 178

PWM[13] 193 : 180

PWM[14] 193 : 181

PWM[15] 192 : 183

PWM[16] 191 : 184

PWM[17] 190 : 185

PWM[18] 189 : 186

PWM[19] 188 : 187

PWM[20] 187 : 188

PWM[21] 186 : 189

PWM[22] 185 : 190

PWM[23] 184 : 191

PWM[24] 183 : 192

PWM[25] 181 : 193

PWM[26] 180 : 193

PWM[27] 178 : 194

PWM[28] 176 : 195

PWM[29] 174 : 196

PWM[30] 172 : 197

PWM[31] 170 : 197

PWM[32] 167 : 198

PWM[33] 162 : 199

PWM[34] 158 : 200

PWM[35] 152 : 200

PWM[36] 145 : 201

PWM[37] 132 : 201

PWM[38] 110 : 200

PWM[39] 24: 201

the qsc position are also more stable , more near to the mean value."

+++

you can use the quarter step correction (QSC) to fix microstep positioning, particularly if the microsteps are fairly evenly spaced but yet tend to bunch up such that the middle microstep comes early or late.

+++

.14 amps current consumption while microstep tracking is close to ideal for many people - it's more a measure of the friction requirements of the drive reducer than anything else     Mel Bartels

+++

I see significant improvements going from 10 to 20 microsteps, and others like Tom Krajci have seen benefit going to 40. This is not only in terms of smoothness but also in terms of absolute positioning. As you mention, the software allows compensation to make each microstep meaningful     Mel Bartels

+++

Q.  The motor has not load. Is it necessary to do the adjustment with the motor under load?? 

A.  Highly recommended, even if you have to put a little clamp on the stepper motor shaft while tuning the microsteps. Mel Bartels

+++

I found that the way to adjust the microsteps is go into the MsParms menu where you can advance the stepper motors one microstep at a time using the + and - keys and adjust the PWM values in the same menu. This feature only works for the Altitude motor output so to tune the Azimuth motor you have to plug the Azimuth motor into the Altitude output. The standard config file only has one set of PWM values but you can create another set of values called PWMZ that will be for Azimuth motor while the existing PWM values will drive the Altitude motor.

I always start the tuning with 10 ms. I get that evened up and double it, (Press D on the MS#). After 20ms is even, I go to 40.   ls

+++

You should mark the A0, B0, C0, and D0 positions first, based on actual pointing, and not on calculated position. These are fullstep positions and are motor/gearing dependent, not software or voltage dependent. Now you can go back and adjust the microsteps to evenly fill the gaps between the fullstep positions. Variations in fullstep position from the ideal need to be compensated with the quarter step correction (QSC).  Mel Bartels

+++

general advice:  Have read through the answers to this question and I can say from my own experiences tuning the motors can be a frustrating process and what you have experienced is not uncommon. From my experience:

1. Try and get motors with halfstep sizes that are within 10% of each other. QSC can make the motion smoother but it you will still have unequal step sizes between difference half steps.

2. Use the minimum number of microsteps you can get away with. The more you have the harder it is to get steps near the halfstep position accurate.

3. If you find you are running out of tuning resolution you can increase the PWM values from the standard 100 to 200 to give more fidelity in your tuning steps. Also increasing current helps resolution so when setting up in AutoMsParms set a high PWMRepsTick and high % current value.

4. Always set the middle microstep to have equal current applied to both coils ie 100:100 and then adjust your values so that you get equal microsteps for the half step each side.

5. Always make sure you are making the adjustments for microstepping over the same coils ie from a0 to b0. If you really want to get technical, get the best PWM values over each of the 4 full steps ie a0 to b0, b0 to c0, c0 to d0, and d0 to a0 and then average them.

6. When marking and measuring the microstop positions always go in one direction which means if you want to measure a position a few steps backwards in the opposite direction, take more backwards steps than you need, and then step forward to the required step. Andy Martyn

+++

One way I like to do it is to set up a laser pointer system (or use a magnifying lens and precision scale with a long pointer on the stepper shaft). Make a mark, move the stepper motor two halfsteps, and make another mark. Now divide that up into 20 steps. Go into microstep track parameter mode, and set it up to do 1 microstep per 10 seconds.  Tune that microstep so that the pointer goes 1/20th of the way. You have 10 seconds... :)                     Mel Bartels

+++

Generally, when expanding the number of microsteps, only lower the last value a bit. So if PWM[9] = 30 and you wish to go from 10 microsteps to 20, make the new PWM[19] = 27 or so. The proportion the other values accordingly. If you get into real trouble, a linear progression will work, but the motion will be a tad uneven. But you can adjust from there if nothing else seems to work. Generally the PWM[] numbers will follow a sin/cosine type curve or progression.    Mel Bartels   378

+++

Stepper motor construction 'issues' affect the PWM[] values. You will see, with certain motors, the middle PWM[] value shift earlier or later in the microstep PWM[] series. My basic rule is to make the PWM[] values whatever it takes to get the steps as smooth as possible. Sometimes really funny looking numbers result. A different motor will act differently, but as long as you can reasonably tune the microsteps for smooth motion at the eyepiece, then you ought to consider things successfully configured.     Mel Bartels

+++  

1. Set your half step size.

2. Set your half step speed parameters.

3. Put in best guess PWM values for your microsteps,

4. Adjust microstep parameters (MSDelay, MSPause, MaxPWM etc) so that your motor turns with minimal vibration and minimal current.

5. Adjust PWM values for each microstep to get step values fairly even.

6. Do step 4 again.

7. On motor coil a, microstep through a full step and using a laser pointing at a piece of paper on a distant wall mark the starting position, the half step position, and the full step position.  

8. Divide the two half step distances equally by half the number of microsteps you are using and mark them on the paper (As half steps are often not equal, your microstep sizes may be different for the two half steps).

9. Adjust the PWM values for each microstep so they are as good as you can get them and record the values.

10. Repeat steps 7 to 9 for the other three coils (b,c, and d).

11. Average the 4 recorded PWM values for each microstep and use this as your final PWM value.

12. Then the final thing you do is QSC which will even out your different half step sizes on a coil and also the differences between coils.

Andy Martyn   http://www.spin.net.au/~afmartyn/software.html 

+++

  1. Input guesstimate PWM[X] values for each microstep and then use the AutoMsParms menu to get the motor to turn as quietly and smoothly as possible. I found that the higher PWMRepsTick and higher current values gave me the best result. I ended up with a PWMRepsTick of about 180 and 100% current. The main reason I use 100% current is that I am running 24V motors with only a 17V supply.

    2. The next step is to adjust the PWM[X] values to get the microstep sizes right. To indicate the step sizes I Fattached the laser to the output shaft of the motor and projected it onto a piece of paper about 5m away. I tuned both motors separately and averaged over the 4 coils to get the best possible result but you may get good result by using the same values for both motors and tuning over just one coil.

    3. To tune the azimuth motor you must plug it into the altitude output of the control box as tuning via the MsParms menu only works for the altitude motor.

    4. Using the + and - keys in the MsParms menu move the motor to position a0   and mark the position of the laser pointer on the paper, move to the halfstep position a16 and place another mark, and then move to the fullstep position b0 and place another mark. Then divide the halfsteps into 16 equal microsteps and mark them on the paper. While the marked microstep distances may be different for the two halfsteps by using this method you can keep the middle PWM or halfstep value at 100:100 and then fix the different sizes using QSC.

    5. Now step through the microsteps from a0 to b0 and adjust the PWM values so that the laser points at the correct microstep mark on the paper. After you have done this record the PWM values. This can be a fiddly process and you will probably find that results will change depending on the direction you are moving and the adjustments you make. My hints are to increase MsPowerDownSec to 100 sec so that the motor does not power down at full step positions, always move the motor in the same direction, and after you have made a correction check it by backing off a couple of microsteps and then advance it again to check the adjusted microstep position.

    6. Repeat the previous two steps for the other 3 coils, ie b0 to c0, c0 to d0, and d0 to a0.

    7. Average the recorded PWM values for each microstep and input these values.

    8. Next you work out QSC which is worthwhile if you see large differences between halfstep sizes. First point the laser at the paper on the wall for fullstep position a0 and make a mark. Advance the motor through 4 fullsteps until you get back to a0. Divide the distance between the two marks equally into 16 equal distances which gives you the ideal quarter step sizes. A point to note is that because the motor is moving a few degrees over the four steps and the laser is projecting onto a flat surface you will small tangential errors. You can adjust the marks to allow for this error, or make an adjustment when you are working out your QSC values.

    9. Now just step through the microsteps and mark on the paper where the laser says the quarter steps are.

    10. Calculating the QSC values is then just a matter of measuring the difference between the measured quarter mark and the ideal quarter mark and then dividing it by the fullstep distance. For example if the distance covered by the 4 fullsteps is 600mm then the full step size is 150mm and the differences for the first 4 quarter steps are 0 (the first value is always 0), +10, +5, and -10, then the QSC values are 0, 0.067, 0.033, and -0.067.

    11. This completes the process for the azimuth motor and you transfer the PWM values for the microsteps into the PWMZ values which drive the azimuth motor.

    12. You now plug the altitude motor into the altitude output and repeat the whole process again for the altitude motor.       Andy Martyn

+++

PWM(Z):   In the tuning mode, with your laser pointer etc., put the Dec. stepper on the RA axis and see how well it is tuned compared to the RA stepper. If it still looks fairly well tuned, don't bother doing two arrays.  Lenord Stage

+++

If you find at lower current you have repeatability problems with microstep positions (when microstepping from one direction or the other...the laser spot doesn't fall in the same place for a given microstep), and that increasing current improves the situation, then you are at least partially solving the problem.  If there is no improvement in repeatability in microstep position with higher current, then something else is the culprit.