Focuser for MaxEsp3


Seven Jones
 

Hi Guys,
I built a focuser for my telescope so I wanted to connect via RJ4 with the stepper.
see photo.


Can someone please answer some questions?
As a driver, I want to use DVR8825 for the Focuser. (FOC1)
Do I have to equip the pins under the drivers with jumper as at the CNC Shield to set the stepps?

Do I need to save in the config.h the focuser to ON something enable or adjust?

I put only this line on ON in the config.h?
#define ST4_HAND_CONTROL_FOCUSER      ON //    OFF, ON alternate to above: Focuser move [E]f1 [W]f2 [N]-     [S]+
Thanks


Dave Schwartz
 

On 2021-07-16 1:48 p.m., Seven Jones wrote:

Hi Guys,
I built a focuser for my telescope so I wanted to connect via RJ4 with the stepper.
see photo.


Can someone please answer some questions?
As a driver, I want to use DVR8825 for the Focuser. (FOC1)
Do I have to equip the pins under the drivers with jumper as at the CNC Shield to set the stepps?
yes


Do I need to save in the config.h the focuser to ON something enable or adjust?
set FOCUSER1 to ON

That will be the minimum to enable focuser #1. You may need to adjust AXIS4_STEPS_PER_MICRON to match the step size to your telescope's depth of focus and then adjust AXIS4_SLEW_RATE_DESIRED and AXIS4_LIMIT_MIN_RATE to adjust the speed to your liking.


I put only this line on ON in the config.h?
#define ST4_HAND_CONTROL_FOCUSER      ON //    OFF, ON alternate to above: Focuser move [E]f1 [W]f2 [N]-     [S]+
That's only for the basic hand controller. See https://onstep.groups.io/g/main/wiki/7150 to read about what it does.

Thanks


Seven Jones
 

On Fri, Jul 16, 2021 at 11:21 AM, Dave Schwartz wrote:
set FOCUSER1 to ON

Thanks. I'll try that right away.

Is the FOCUS stepper then controlled by Ascom?

 

 


Dave Schwartz
 

The current ASCOM driver from Howard's site is a unified driver allowing concurrent connections for both mount and focuser control.

On 2021-07-16 4:46 p.m., Seven Jones wrote:
On Fri, Jul 16, 2021 at 11:21 AM, Dave Schwartz wrote:

set FOCUSER1 to ON

Thanks. I'll try that right away.

Is the FOCUS stepper then controlled by Ascom?


Seven Jones
 

On Fri, Jul 16, 2021 at 02:17 PM, Dave Schwartz wrote:
The current ASCOM driver from Howard's site is a unified driver allowing concurrent connections for both mount and focuser control.


I had already installed that. thanks



Can I use a TMC2130 for the Focuser. Are the settings for the Focuser here then so ok?
 
#define FOCUSER1                       ON //    OFF, ON to enable this focuser.                                               Option
#define AXIS4_STEPS_PER_MICRON        0.5 //    0.5, n. Steps per micrometer. Figure this out by testing or other means.      Adjust
#define AXIS4_SLEW_RATE_DESIRED       500 //    500, n, Where n=200..5000 (um/s.) Max microns/second. In DC mode, max pwr %   Adjust
#define AXIS4_DRIVER_MODEL        TMC2130 //    OFF, TMC2130, TMC5160. Leave OFF for all drivers models except these.         Option


#define AXIS4_DRIVER_MICROSTEPS       OFF //    OFF, n. Microstep mode when tracking.                   For TMC2130, TMC5160. Option
#define AXIS4_DRIVER_IHOLD            OFF //    OFF, n, (mA.) Current standstill. OFF uses IRUN/2.0.                  "       Option
#define AXIS4_DRIVER_IRUN             OFF //    OFF, n, (mA.) Current tracking, appropriate for stepper/driver/etc.   "       Option
#define AXIS4_DRIVER_POWER_DOWN       OFF //    OFF, ON Powers off the motor at stand-still.                                  Option
#define AXIS4_DRIVER_REVERSE          OFF //    OFF, ON Reverses movement direction, or reverse wiring instead to correct.    Option
#define AXIS4_DRIVER_DC_MODE          OFF //    OFF, DRV8825 for pwm dc motor control on stepper driver outputs.              Option


What about these settings here?
#define AXIS4_DRIVER_MICROSTEPS     
#define AXIS4_DRIVER_IHOLD         
#define AXIS4_DRIVER_IRUN          
#define AXIS4_DRIVER_POWER_DOWN   
#define AXIS4_DRIVER_REVERSE       
#define AXIS4_DRIVER_DC_MODE   

How can I use the SHC for the FOCUS. Does the focus stepper have to be connected to the handcontroller then and activate these line here?
#define ST4_HAND_CONTROL_FOCUSER      OFF //    OFF, ON alternate to above: Focuser move [E]f1 [W]f2 [N]-     [S]+            Option

sorry...because of the many questions :)


Seven Jones
 

can not activate the focuser because arduino ide make this error. What does it mean?

OnStep:162:27: error: 'Axis4_M2' was not declared in this scope
     tmcSpiDriver tmcAxis4(Axis4_M2,Axis4_M1,-1,Axis4_M0,AXIS4_DRIVER_SUBMODEL,AXIS4_DRIVER_RSENSE);
                              ^
OnStep:162:36: error: 'Axis4_M1' was not declared in this scope
     tmcSpiDriver tmcAxis4(Axis4_M2,Axis4_M1,-1,Axis4_M0,AXIS4_DRIVER_SUBMODEL,AXIS4_DRIVER_RSENSE);
                                    ^
OnStep:162:48: error: 'Axis4_M0' was not declared in this scope
     tmcSpiDriver tmcAxis4(Axis4_M2,Axis4_M1,-1,Axis4_M0,AXIS4_DRIVER_SUBMODEL,AXIS4_DRIVER_RSENSE);
                                                ^
C:\Users\digit\Documents\Arduino\OnStep\Initialize.ino: In function 'void initPre()':
Initialize:30:11: error: 'Axis4_M2' was not declared in this scope
   pinMode(Axis4_M2,OUTPUT); digitalWrite(Axis4_M2,HIGH);
           ^
exit status 1
'Axis4_M2' was not declared in this scope


Dave Schwartz
 

The MaxESP does not support SPI mode for the focuser1 or 2 drivers. You need to use drivers where the microstep mode is set using jumpers (which are underneath the driver as you asked before).

The ST4_HAND_CONTROL_FOCUSER setting is only for the basic hand controller. For the SHC, a double-press on the center button brings up the function key mode selection menu where you select 'Focus' and then when at the normal status display screen the function keys will move the focuser in and out.


On July 17, 2021 3:02:12 p.m. EDT, Seven Jones <sofacity@...> wrote:
On Fri, Jul 16, 2021 at 02:17 PM, Dave Schwartz wrote:
The current ASCOM driver from Howard's site is a unified driver allowing concurrent connections for both mount and focuser control.


I had already installed that. thanks



Can I use a TMC2130 for the Focuser. Are the settings for the Focuser here then so ok?
 
#define FOCUSER1                       ON //    OFF, ON to enable this focuser.                                               Option
#define AXIS4_STEPS_PER_MICRON        0.5 //    0.5, n. Steps per micrometer. Figure this out by testing or other means.      Adjust
#define AXIS4_SLEW_RATE_DESIRED       500 //    500, n, Where n=200..5000 (um/s.) Max microns/second. In DC mode, max pwr %   Adjust
#define AXIS4_DRIVER_MODEL        TMC2130 //    OFF, TMC2130, TMC5160. Leave OFF for all drivers models except these.         Option


#define AXIS4_DRIVER_MICROSTEPS       OFF //    OFF, n. Microstep mode when tracking.                   For TMC2130, TMC5160. Option
#define AXIS4_DRIVER_IHOLD            OFF //    OFF, n, (mA.) Current standstill. OFF uses IRUN/2.0.                  "       Option
#define AXIS4_DRIVER_IRUN             OFF //    OFF, n, (mA.) Current tracking, appropriate for stepper/driver/etc.   "       Option
#define AXIS4_DRIVER_POWER_DOWN       OFF //    OFF, ON Powers off the motor at stand-still.                                  Option
#define AXIS4_DRIVER_REVERSE          OFF //    OFF, ON Reverses movement direction, or reverse wiring instead to correct.    Option
#define AXIS4_DRIVER_DC_MODE          OFF //    OFF, DRV8825 for pwm dc motor control on stepper driver outputs.              Option


What about these settings here?
#define AXIS4_DRIVER_MICROSTEPS     
#define AXIS4_DRIVER_IHOLD         
#define AXIS4_DRIVER_IRUN          
#define AXIS4_DRIVER_POWER_DOWN   
#define AXIS4_DRIVER_REVERSE       
#define AXIS4_DRIVER_DC_MODE   

How can I use the SHC for the FOCUS. Does the focus stepper have to be connected to the handcontroller then and activate these line here?
#define ST4_HAND_CONTROL_FOCUSER      OFF //    OFF, ON alternate to above: Focuser move [E]f1 [W]f2 [N]-     [S]+            Option

sorry...because of the many questions :)


--
Sent from my Android device with K-9 Mail. Please excuse my brevity.


Dave Schwartz
 

The MaxESP does not support either SPI mode (stated in the previous reply) or microstep mode control by the MCU (a single microstep mode is set via the jumpers) so the MaxESP pin map does not even define MCU pins that go to the SPI or AXIS?_M[012] positions of stepstick drivers.


On July 17, 2021 3:45:23 p.m. EDT, Seven Jones <sofacity@...> wrote:
can not activate the focuser because arduino ide make this error. What does it mean?

OnStep:162:27: error: 'Axis4_M2' was not declared in this scope
     tmcSpiDriver tmcAxis4(Axis4_M2,Axis4_M1,-1,Axis4_M0,AXIS4_DRIVER_SUBMODEL,AXIS4_DRIVER_RSENSE);
                              ^
OnStep:162:36: error: 'Axis4_M1' was not declared in this scope
     tmcSpiDriver tmcAxis4(Axis4_M2,Axis4_M1,-1,Axis4_M0,AXIS4_DRIVER_SUBMODEL,AXIS4_DRIVER_RSENSE);
                                    ^
OnStep:162:48: error: 'Axis4_M0' was not declared in this scope
     tmcSpiDriver tmcAxis4(Axis4_M2,Axis4_M1,-1,Axis4_M0,AXIS4_DRIVER_SUBMODEL,AXIS4_DRIVER_RSENSE);
                                                ^
C:\Users\digit\Documents\Arduino\OnStep\Initialize.ino: In function 'void initPre()':
Initialize:30:11: error: 'Axis4_M2' was not declared in this scope
   pinMode(Axis4_M2,OUTPUT); digitalWrite(Axis4_M2,HIGH);
           ^
exit status 1
'Axis4_M2' was not declared in this scope

--
Sent from my Android device with K-9 Mail. Please excuse my brevity.


Seven Jones
 

On Sat, Jul 17, 2021 at 01:38 PM, Dave Schwartz wrote:
The MaxESP does not support either SPI mode (stated in the previous reply) or microstep mode control by the MCU (a single microstep mode is set via the jumpers) so the MaxESP pin map does not even define MCU pins that go to the SPI or AXIS?_M[012] positions of stepstick drivers.

okay that's why. Thank you

Can you tell me how I have to put the jumper there. At the CNC Shield it was 6pin. Here are again 9?


Dave Schwartz
 

When you look at the MaxESP3 PCB, the M0, M1 and M2 labels where the drivers plug in are almost lined up with the jumpers (in that order top to bottom). The jumper placed on the left and center pins of a row sets that pin to 'high' (3.3V) and when placed on the center and right pins of the row, sets that pin to 'low' (GND). Now just set your desired microstep mode using the chart for the driver you are going to use.


On July 17, 2021 5:10:49 p.m. EDT, Seven Jones <sofacity@...> wrote:
On Sat, Jul 17, 2021 at 01:38 PM, Dave Schwartz wrote:
The MaxESP does not support either SPI mode (stated in the previous reply) or microstep mode control by the MCU (a single microstep mode is set via the jumpers) so the MaxESP pin map does not even define MCU pins that go to the SPI or AXIS?_M[012] positions of stepstick drivers.

okay that's why. Thank you

Can you tell me how I have to put the jumper there. At the CNC Shield it was 6pin. Here are again 9?


--
Sent from my Android device with K-9 Mail. Please excuse my brevity.


Seven Jones
 

On Sat, Jul 17, 2021 at 02:50 PM, Dave Schwartz wrote:
When you look at the MaxESP3 PCB, the M0, M1 and M2 labels where the drivers plug in are almost lined up with the jumpers (in that order top to bottom). The jumper placed on the left and center pins of a row sets that pin to 'high' (3.3V) and when placed on the center and right pins of the row, sets that pin to 'low' (GND). Now just set your desired microstep mode using the chart for the driver you are going to use.
thank you. I did so, Is there some i have to activate in SHC Firmware to use the focuser with the SHC. I cant find any options in the addon folder and the focus stepper dont move?


Dave Schwartz
 

When first powered up, the SHC 'Feature keys' (the two in the bottom corners) will increase or decrease the guide rate but there are several other such two-way functions they can do. To change the mode of what they do, double-click on the center button (the same button you long-press to get the main menu) and you will see the 'Feature keys' menu. The last entry in that menu is 'Focuser' (if it is not there it means that the focuser is not enabled in the main controller) and when you select it the bottom two keys will now run the focuser in or out.

You may need to watch very carefully because the speed is quite slow using the default parameters. However, after continuously holding down the focus in or out button, the SHC automatically switches into fast focus mode and that should be visible.


On July 17, 2021 6:09:35 p.m. EDT, Seven Jones <sofacity@...> wrote:
On Sat, Jul 17, 2021 at 02:50 PM, Dave Schwartz wrote:
When you look at the MaxESP3 PCB, the M0, M1 and M2 labels where the drivers plug in are almost lined up with the jumpers (in that order top to bottom). The jumper placed on the left and center pins of a row sets that pin to 'high' (3.3V) and when placed on the center and right pins of the row, sets that pin to 'low' (GND). Now just set your desired microstep mode using the chart for the driver you are going to use.
thank you. I did so, Is there some i have to activate in SHC Firmware to use the focuser with the SHC. I cant find any options in the addon folder and the focus stepper dont move?

--
Sent from my Android device with K-9 Mail. Please excuse my brevity.


Seven Jones
 

Thank you. I was looking for that. Everything works now.

The only problem is that the NEMA17 becomes very hot. I've left the Vref already down to 0.5V.
Can I also put the 2130 in there and configure with the jumper pins and poti. In the hope that the 2130 does not run the engine so hot?


Dave Schwartz
 

If the motor becomes too hot it means your current is too high. The minimum current required is that just (about 10 to 15 percent) above the point where it starts to miss steps under your normal load. Any more current will just be wasted as heat in both the driver and motor and may actually cause it to run rougher.

No, microstepping on 2130's (V1.1 and higher) can only be configured through SPI.

On 2021-07-19 3:26 p.m., Seven Jones wrote:

Thank you. I was looking for that. Everything works now.

The only problem is that the NEMA17 becomes very hot. I've left the Vref already down to 0.5V.
Can I also put the 2130 in there and configure with the jumper pins and poti. In the hope that the 2130 does not run the engine so hot?


Seven Jones
 

On Mon, Jul 19, 2021 at 12:40 PM, Dave Schwartz wrote:
If the motor becomes too hot it means your current is too high. The minimum current required is that just (about 10 to 15 percent) above the point where it starts to miss steps under your normal load. Any more current will just be wasted as heat in both the driver and motor and may actually cause it to run rougher.

No, microstepping on 2130's (V1.1 and higher) can only be configured through SPI.
OK. I try to further reduce the motor current. But as a stepper in the RA AXE the same engine supplies 0.67V and was not hot. The driver "DRV8825" also is not to hot...?


George Cushing
 

Remember that if you use the #define AXIS4_DRIVER_POWER_DOWN       ON option the motor is getting continuous power. 

I have found that the DVR8825 will run Vixen MT1 drives (PF42-48) hot unless I set them to 0.03A. The PF42s are 6 wire steppers and they have no current rating. So using the DMM and Ohm's Law (Voltage (V)/ Resistance (R) = Current (I)), where V=12 and R=200Ω we find that The PF42s max current is 0.06A and half of that is 0.03A.

Driving the PF42s by half coil (100Ω) doubles the current needed to 0.06A. They still run warm to the touch but not hot.


Seven Jones
 

On Tue, Jul 20, 2021 at 07:17 AM, George Cushing wrote:
Remember that if you use the #define AXIS4_DRIVER_POWER_DOWN       ON option the motor is getting continuous power. 

"#define axis4_driver_power_down" is OFF.

I exchanged the engine against a NEMA17 with 60mm. And so far it works well. Besides that 4 pin 4p4c cables is pretty hot. Href is 0,75V.

I also had the DRV at the beginning of the CNC. But there were always problems with the temperature of the motors or the driver.
Which alternatives do I have the choice of drivers for AXIS 3 and 4?

If I understood correctly, I can also use the 2130 there but do not set the steps via SPI or jumper to any value?

 


Howard Dutton
 
Edited

On Mon, Jul 19, 2021 at 12:26 PM, Seven Jones wrote:
The only problem is that the NEMA17 becomes very hot. I've left the Vref already down to 0.5V.
Well DRV8825's are usually Vref x 2, so you probably set 1A.  There are plenty of stepper motors that are rated for < 1A and will get mighty hot or damaged (given enough voltage into the driver for it to do what you're asking.)  That last part about the voltage is due to the fact that's it's impossible to overpower a stepper motor if operating below the rated (design) voltage.

Provide electrical specifications for the motor, also the voltage you're running it at.


Mike Ahner
 

On Tue, Jul 20, 2021 at 01:28 PM, Seven Jones wrote:
so far it works well. Besides that 4 pin 4p4c cables is pretty hot. Href is 0,75V.
Seven, your 4-pin cable looks like a voice cable. Measure the resistance of the wire from each end, I think you will have a very high resistance. If so, that will cause a large voltage drop and the wire will start to heat up, as well as the motor. I don't see any reason at all that you should need a NEMA 17 or high current for a focuser, unless the focuser is damaged in someway that makes it very stiff to move.

Try a Cat-5 cable, you can temporarily strip back just 4 wires and twist them onto the motor wires. I think you'll find there is a big difference.


Seven Jones
 

On Tue, Jul 20, 2021 at 07:16 PM, Mike Ahner wrote:
Seven, your 4-pin cable looks like a voice cable. Measure the resistance of the wire from each end, I think you will have a very high resistance. If so, that will cause a large voltage drop and the wire will start to heat up, as well as the motor. I don't see any reason at all that you should need a NEMA 17 or high current for a focuser, unless the focuser is damaged in someway that makes it very stiff to move.

Yes you are right. I have used a voice cable. thats why it getting so warm.
Unfortunately, I have already soldered the RJ10 sockets on the board. Therefore, only the 4P4C plugs fit on the board side.
Should I remove the RJ10 sockets or is there another solution?

Here are the steppers. left 60mm, right 30mn

The NEMA17 30mm was just too hot. You could not touch it. That's why I took one with 60mm. He is also pretty hot but not so much. And it was the only one I had.