Date   

Re: microstep mode switch with TMC drivers...

Ken Hunter
 
Edited

Thanks Howard...

I am confused... I see that you are swapping the M1 and M2 pins on the
stepper driver input pins but not sure that I haven't confused the issue above.

The TB6600 (generic description) has dip switch w/contacts labeled M1, M2,
and M3. that can provide the 32/8 uSteps shown here:

                   M1           M2          M3
32 uStep     Low         Low        Low  
  8 uStep     Low         High        Low

I'm looking for a pin that is High during Slew/Goto so that I can use it to switch the
External TB6600 driver to 8 uSteps.

I'll try those changes and see how close I get to finding the correct connection.


Flashing Help: Failed to Connect to ESP32: Timed Out Waiting for Packet Header #esp32

NeoMoses
 

Hi, I'm having trouble uploading the firmware to my ESP32 with the Hujer Shield.  This board was pre-flashed from George and just needs an update to the drive ratios to match my final mechanical setup.  I keep getting the "A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header" when I try to upload the sketch.

I am connected to the computer and it shows up on port COM5 when I look in Device Manager.  I've both 921600 and 115200 upload speeds.  Any idea what I'm doing wrong here?  I feel like I'm getting really close now!  

Arduino: 1.8.19 (Windows Store 1.8.57.0) (Windows 10), Board: "ESP32 Dev Module, Disabled, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 80MHz (WiFi/BT), QIO, 80MHz, 4MB (32Mb), 921600, None"
 
Sketch uses 338537 bytes (25%) of program storage space. Maximum is 1310720 bytes.
 
Global variables use 21524 bytes (6%) of dynamic memory, leaving 306156 bytes for local variables. Maximum is 327680 bytes.
 
esptool.py v2.6
 
Serial port COM5
 
Connecting........_____....._____....._____....._____....._____....._____.....____An error occurred while uploading the sketch
 
_
 
 
 
A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header
 
 


Re: microstep mode switch with TMC drivers...

Ken Hunter
 

That is what I am currently doing with the TM6600 External Driver but there is no
uStep change sent to the driver in slew/goto. That is what I am trying to add.

Maybe there is a way to set one of the MCU pins during a slew/goto?
A feature perhaps?


Re: 18 Bit Magnetic Rotary Encoder

 

On Mon, May 9, 2022 at 07:25 AM, Howard Dutton wrote:
On Mon, May 9, 2022 at 07:20 AM, Howard Dutton wrote:
With OnStepX one could in theory correct tracking (as a servo motor driver) but that's another thing.
... and the idea a $33 18bit magnetic encoder will be useful for that is a real stretch, to say the least.
So 18 bit encoder is not enough accurate to correct tracking error? if I'm not wrong 2^18 = 262144 ticks /rev and the resolution if encoder on GR2/Final stage should be (360° x 3600)/262144 = 4.49 arc sec, its right? . Can I attach the encoder to GR1 to increase the resolution?


Re: TMC5160 substitute?

Howard Dutton
 

Note that TMC2209 support like this requires using the FYSETC TMC2209 version 3.1 as they have an onboard 1k resistor between TX and the TMC2209 chips PDN pin (and so RX pin.)  That is required and they are the only ones with it.

Read the TMC2209 datasheet to understand why it is required if you like.

Naturally one could design a different pinmap and add their own 1k resistor to make other TMC2209 drivers work.  Its just a matter of getting the wiring right.


Re: TMC5160 substitute?

Howard Dutton
 
Edited

On Mon, May 9, 2022 at 12:05 PM, Howard Dutton wrote:
That said once TMC2209 SoftwareSerial mode is checked out and OnStepX is released I will likely add the TMC2209 and TMC2226 to the list.  In software serial mode only the drivers themselves need modification (cut off their RX pins) otherwise they should just plug in and work.  Well, a single resistor (say 10k or so) between each drivers TX (aka the sockets CS) and Vio pins should be added as that prevents them from coming up powered for a moment before OnStepX gets control (the MaxSTM3.6 doesn't have stepper driver ENable pin control as it isn't really needed for TMC drivers.)
In TMC2209/TMC2226 driver HardwareSerial mode one would instead cut off the MS1 and MS2 pins of the drivers to program addresses 0, 1, 2, and 3.  One driver has none cut off (address 3.)  One has just MS1 cut (address 2.)  One has just MS2 cut (address 1.)  And finally one has both MS1 and MS2 cut (address 0.)
Then leave the RX pins intact, you want them to plug in and all connect together using what would be the SPI MISO line.
Then connect the RX1 and TX1 pins (STM32 hardware serial port) on the MaxSTM3.6 DB15 connector to the Axis1 drivers RX and TX pins (RX1 to RX and TX1 to TX in this oddball case.)
You still would want a pullup resistor on the TX pin of Axis1 to disable the drivers (one resistor would take care of all drivers.)
The pins that would otherwise be MOSI and SCK are automatically pulled HIGH (to help setting the driver address.)
The pins that would otherwise be CS and MISO are not initialized so they are OPEN and don't interfere with operation even though there are unused connections back to the microcontroller.

...that's the theory anyway as this too hasn't been tested (except similar on the MaxESP3 which works fine.)  This allows very high baud rates (460800 bps) and bidirectional communication.  The latest MaxSTM3.6 designs have a RX1/TX1 header added on the PCB so you don't have to wire into the DB15.


Re: TMC5160 substitute?

Howard Dutton
 
Edited

On Mon, May 9, 2022 at 11:24 AM, Vladimir wrote:
Didn't knew that, I think Max series wiki page state that only SPI drivers can be used with MaxSTM but I didn't go for details...
Best left that way and to generally not speak of hacks like this in the Wiki as that is not within the scope of the intended (and tested) use.

That said once TMC2209 SoftwareSerial mode is checked out and OnStepX is released I will likely add the TMC2209 and TMC2226 to the list.  In software serial mode only the drivers themselves need modification (cut off their RX pins) otherwise they should just plug in and work.  Well, a single resistor (say 10k or so) between each drivers TX (aka the sockets CS) and Vio pins should be added as that prevents them from coming up powered for a moment before OnStepX gets control (the MaxSTM3.6 doesn't have stepper driver ENable pin control as it isn't really needed for TMC drivers.)

That gets you the ability to set any mode on any driver and to mode switch ... but no status info. from the drivers.


Re: TMC5160 substitute?

eugenecisneros
 

You are free to configure OnStep to do what you will with it though, and it can do that kind of thing AFAIK.  How you map those features onto the available otherwise unused pins/connections of a MaxSTM3.6 is up to you.

The STM32F411 can step at 62.5 KHz in square wave mode (best for external stepper drivers.)  That's enough for about 1.75 deg/s in 64x microstep mode in your case, I believe.  Or double that speed (3.5 deg/s) in 32x mode and that's without mode switching.  Naturally that doesn't mean the motors/drive are capable of reaching those speed
Thanks Howard, I think that the above is beyond my abilities as I have been out of the game, retired for 20 years now.  Since TMC5160s are not available, my progress has stopped, so I will have to look for another option.  


Re: microstep mode switch with TMC drivers...

Howard Dutton
 

On Sun, May 8, 2022 at 12:48 PM, Ken Hunter wrote:

On the Amazon TB6600 driver (which is actually using a TB67S109AFTG
Driver module to get 32 uSteps) I can switch from 32 to 8 uSteps by 
supplying 5V logic high to the M2 switch contact. How can I find a suitable
point on a MaxESP3 board for Axis 1 & 2 to get that signal during slewing?
Configure OnStep for the MaxESP3 like its has S109 drivers in axis1 and 2.

Change the pinmap as required so M2/CS (the dedicated unique pin) is mapped to the MS2 (M1 in OnStep lingo) pin for the driver (the only one that changes state between 8x and 32x modes.)

Whatever voltage level requirements etc. are needed for those pins interfacing directly to the drivers will need to be looked after.

// Axis1 RA/Azm step/dir driver
#define Axis1_EN             12     // Enable
#define Axis1_M0             13     // Microstep Mode 0 or SPI MOSI
#define Axis1_M1             23     // Microstep Mode 1 or SPI SCK (was 14 but is now the Axis1 CS pin)
#define Axis1_M2             14     // Microstep Mode 2 or SPI CS (was 23)
#define Axis1_M3           Aux2     // SPI MISO/Fault
#define Axis1_STEP           18     // Step
#define Axis1_DIR             0     // Dir
#define Axis1_DECAY    Axis1_M2     // Decay mode
#define Axis1_HOME         Aux3     // Sense home position

// Axis2 Dec/Alt step/dir driver
#define Axis2_EN         SHARED     // Enable pin control shared with Axis1
#define Axis2_M0             13     // Microstep Mode 0 or SPI MOSI
#define Axis2_M1              5     // Microstep Mode 1 or SPI SCK (was 14 but is now the Axis2 CS pin)
#define Axis2_M2             14     // Microstep Mode 2 or SPI CS (was 5)
#define Axis2_M3           Aux2     // SPI MISO/Fault
#define Axis2_STEP           27     // Step
#define Axis2_DIR            26     // Dir
#define Axis2_DECAY    Axis2_M2     // Decay mode
#define Axis2_HOME         Aux4     // Sense home position


Re: TMC5160 substitute?

 

On Mon, May 9, 2022 at 03:31 PM, Howard Dutton wrote:
No reason a MaxSTM3.6 can't work with stand alone drivers.
Didn't knew that, I think Max series wiki page state that only SPI drivers can be used with MaxSTM but I didn't go for details...


Re: microstep mode switch with TMC drivers...

 

Yeah, this is treasure, however on MaxESP3 only some combinations of modes will work because two out of three cfg pins are connected together and but if wisely connected this can be very usable.


Re: microstep mode switch with TMC drivers...

George Cushing
 

I got an ad for one of these before. Might be worth a look for something like this.

image.png



Re: TMC5160 substitute?

Howard Dutton
 

On Mon, May 9, 2022 at 09:56 AM, eugenecisneros wrote:
Is there any plan to make the MaxSTM3.6 compatible with stand alone drivers whereby microsteps can be changed for goto speeds?
No.

You are free to configure OnStep to do what you will with it though, and it can do that kind of thing AFAIK.  How you map those features onto the available otherwise unused pins/connections of a MaxSTM3.6 is up to you.

The STM32F411 can step at 62.5 KHz in square wave mode (best for external stepper drivers.)  That's enough for about 1.75 deg/s in 64x microstep mode in your case, I believe.  Or double that speed (3.5 deg/s) in 32x mode and that's without mode switching.  Naturally that doesn't mean the motors/drive are capable of reaching those speeds.


Re: TMC5160 substitute?

eugenecisneros
 

On Mon, May 9, 2022 at 06:31 AM, Howard Dutton wrote:
No reason a MaxSTM3.6 can't work with stand alone drivers.  You might want to add a pair of enable pins to the pinmap for Axis1 and Axis2, I'd map them over those axes CS pins.
Is there any plan to make the MaxSTM3.6 compatible with stand alone drivers whereby microsteps can be changed for goto speeds?


Limit sensor options

Oscar Lithgow
 

Dear members.,

 

First of all, I have very limited electronic and electric knowledge, but I have assembled a few onstep controller kits with great success. But right now im struggling to install a limit sensor for a Dobsonian telescope Altitude axis. I have installed one trigger type switch for the 90 deg limit, but for the lower limit I don’t have any physical way to install the same type of switch without being very “on the way of stuff”. The controller Im using is a maxESP.

So Im writing here to ask the following:

Is it possible to use some type of wireless sensor for limit sense, like a hall effect sensor? What types? And if so, how to correctly connect it to the ESP32 controller…

 

Thanks in advance.


Re: 18 Bit Magnetic Rotary Encoder

Howard Dutton
 

On Mon, May 9, 2022 at 07:20 AM, Howard Dutton wrote:
With OnStepX one could in theory correct tracking (as a servo motor driver) but that's another thing.
... and the idea a $33 18bit magnetic encoder will be useful for that is a real stretch, to say the least.


Re: 18 Bit Magnetic Rotary Encoder

Howard Dutton
 

On Mon, May 9, 2022 at 07:05 AM, Hanif Nanda wrote:
1. What type of encoder is currently supported with onstep?
A/B Quadrature.
CW/CCW.
Broadcom AS37-H39B 23bit absolute (BISS-C interface.)

 
2. Is the encoder used only to correct pointing error or can it also correct tracking error?
Smart Web Server uses this to work with OnStep to correct pointing error.  With OnStepX one could in theory correct tracking (as a servo motor driver) but that's another thing.

 
3. I found a cheap 18 bit magnetic encoder on Aliexspress, does it support onstep? https://aliexpress.com/item/1005003961485963.html?spm=a2g0o.cart.0.0.17853c0072u7hH&mp=1&gatewayAdapt=glo2idn  
No.

There is provision in the SWS for adding other encoder types, so a determined user with the device in hand might be able to add support.


18 Bit Magnetic Rotary Encoder

 

Hi.......I have modified the mount several times using onstep such as EQ5,CG4 dan EQ3-M. I'm planning to add a rotary encoder to my mount. I'm currently using MAX STM. There are a few things I want to ask.
1. What type of encoder is currently supported with onstep?
2. Is the encoder used only to correct pointing error or can it also correct tracking error?
3. I found a cheap 18 bit magnetic encoder on Aliexspress, does it support onstep? https://aliexpress.com/item/1005003961485963.html?spm=a2g0o.cart.0.0.17853c0072u7hH&mp=1&gatewayAdapt=glo2idn  

Best Regards, 
Hanif 


Re: TMC5160 substitute?

Howard Dutton
 
Edited

On Mon, May 9, 2022 at 03:53 AM, Vladimir wrote:
Will MaxSTM 3.6 support Fysetc TMC2209 v3.1 in UART mode on OnStepX?
Not sure as it hasn't been tested.  But in theory, yes.  SoftwareSerial mode and not with status feedback though, and if used all four axes must be TMC2209's.

If not, then it may be cheaper for him to replace board with something that work with standalone drivers and then use TMC2209 as they can deliver required power and you can buy handfull of them for a few bucks.
No reason a MaxSTM3.6 can't work with stand alone drivers.  You might want to add a pair of enable pins to the pinmap for Axis1 and Axis2, I'd map them over those axes CS pins.


Re: TMC5160 substitute?

 

@Howard
Will MaxSTM 3.6 support Fysetc TMC2209 v3.1 in UART mode on OnStepX? If not, then it may be cheaper for him to replace board with something that work with standalone drivers and then use TMC2209 as they can deliver required power and you can buy handfull of them for a few bucks.

2921 - 2940 of 46388