Stepper Driver Adjustment
I used caution as stepper motors and drivers handle significant electrical power and can get hot, even burning hot (though they shouldn't be configured to allow that.)
The current (Amperes) used for a given motor will likely never be the maximum for the motor. Rather the current should be between 40% to 70% of that maximum.
Which exactly depends on experimenting with different values, starting with the lower end.
So, the Vref selected should be the one that produces a current according to this formula:
Motor Max Amp * 1.41 * 0.4 = Starting Amp for Vref
So for a motor that has a rating of 0.9A, the starting value will be: 0.5A
You experiment with that, and see if there are no stalls during slewing, otherwise adjust up in small increments (0.1A or so).
Method A: Tune using Vref:
This video at the Pololu website is an excellent resource and should be watched by anyone unfamiliar with the procedure.
First check the stepper motors you have for their current rating. Usually we don't run at 100% current but something around 30% to 60% and so you will need to pick a reasonable current you'd like to test at (within the limits of the stepper motor and stepper driver) and check the mount operation (in the final stages fully loaded) until you are satisfied with the temperature the motors and drivers run at and with the overall performance.
- For the SSS TMC5160 there is no trim-pot on the driver and you must use OnStep version 3 or later and set the current from OnStep's Config.h file AXISn_DRIVER_IRUN (etc.) settings. You can optionally set the TMC2130 current using this same method then set its Vref trim pot to 2.5V as described below.
- If setting a TMC2130's Vref at 2.5V it is important that you also set AXISn_DRIVER_IRUN current (in Config.h) to a reasonable value. If this setting is omitted OnStep will configure the driver for 100% power (assuming Vref is limiting current) which is far more than the driver, and likely your motor, can handle and may very well damage hardware and/or cause extreme heating of motor/driver/etc. It is also important to be sure your TMC2130's are the correct model with SPI control enabled otherwise you will get the full 2.5A current setting and possibly damage the drivers.
To set that current of other drivers you want to test you need to find out what voltage you need to adjust the trim-pot on the driver to, the follow resources can help with that. For SSS TMC drivers I use the "Peak Current" and NOT "RMS Current" since that's in-line with how every other StepStick driver behaves, the formula for this setting on SSS TMC drivers is simple: voltage = current.
1. Assemble the OnStep controller. Double check the wiring/soldering before applying power make sure the components, drivers, WiFi module, etc. are all installed properly.
2. Connect appropriate (suitable voltage and current capability) power supply to the controller.
3. Configure and uploaded the firmware.
4. DO NOT attach stepper motors to the drivers. Never connect or disconnect a stepper motor if the system is powered up.
5. Adjusted each stepper driver's trim pot to the Vref voltage setting you determined. Measure voltage w/ the ground lead touching a PCB ground and + (Red) lead on the driver trim pot (or on the screw driver shaft while turning the trim pot.)
- Having two persons can help.
- Be careful to not touch anything but a ground and the trim-pot.
Method B: Tuning by feel:
I used this with A4988 and DRV8825 stepper drivers but it's not very effective with Silent Step Stick drivers. Slowly increasing the current with the potentiometer I could hear the pulse width modulation resonance (singing) and the motor started to move. Then, I adjust the motor so that the motion was smooth; too little and the motion was erratic, too much and it would cog to the full-step positions. Be sure to monitor the stepper drivers and stepper motors for >half an hour (minimum) to be sure nothing overheats.
1. Follow the Method A steps (1-5) to set the drivers trim-pots at their minimum voltage then power the system off.
2. Plug/connect stepper motors to the drivers. Never disconnect a stepper motor while the system is powered up.
3. Connect OnStep USB interface to your computer.
4. Open a serial console in the Arduino software then typed ":A1#" - this *starts the equatorial tracking pulses (RA).
5. Adjust the RA/Azm stepper motor current for smooth operation as described at the start of this section.
6. From the serial console in the Arduino software type ":R2#:Ms#" - this starts the Dec motor moving.
7. Adjust the Dec/Alt stepper motor current for smooth operation as described at the start of this section.
8. Focuser/Rotator drivers, if present, can be adjusted in a similar fashion using the WiFi Addon or Android App to make the motors move.
* = If you have an Alt/Az mounted 'scope there is no tracking motion at startup since it's assumed you're pointed parallel with the Earth's axis of rotation (NCP or SCP.) So the ":R2#:Mw#" command is necessary to start motion in Azm.