FYSETC E4


Howard Dutton
 
Edited

A while back Chris Whitener and Serge CLAUS pointed out this board: https://wiki.fysetc.com/E4/

Now that OnStepX can control TMC2209 UART drivers and do basic WiFi internally I've been thinking about it more deeply...

It's fairly cheap, comes with some nice stepper drivers, and looking over the schematic it should generally work with OnStepX:

The good:
  • Inexpensive considering what you get.
  • It seems to have the usual setup for flashing across USB/Serial.
  • You'd have control of 2 or 3 dew heaters.
  • The 4 TMC2209 stepper drivers are ready to go and configured to use one ESP32 UART.
  • It has protected/conditioned inputs for home sense (X_MIN, Y_MIN) and Limit Sense (Z_MIN) and PEC (TE), plus a spare (TB.)

The bad:
  1. There is no way to effectively have an ST4 port (not enough pins.)
    • Probably most can live with this limitation, especially with the wireless SHC option we have now.
  2. There are several "wasted" pins devoted to the SD card that we don't use, shame, no easy way to access those that I see.
  3. Only (reasonably easy) way to attach an SWS would be to use the RX/TX pins going to the USB serial bridge chip (would need to be disconnected to flash OnStepX.)
    • Easier to take since OnStepX can at least provide the WiFi command channels without doing that.
  4. The TMC2209 needs a hardware serial port.
    • The primary option is to use the I2C pins (as a serial port.)
    • The secondary option is to use the use the RX/TX pins going to the USB serial bridge chip (would need to be disconnected to flash OnStepX.)
  5. No free pin for 1-Wire DS18B20 point temperature sensing (for dew heaters.)
  6. No pin for a buzzer.
    • Could be added on a GPIO or in exchange for a dew-heater.
  7. No pin for the status LED.
    • Could be added on a GPIO or in exchange for a dew-heater.

...nothing is a show stopper there, but not ideal.

Ideas:
  • I wonder if the FAN-E0 output could serve as the Serial TX (perhaps TX only and no RX) going to the TMC2209 drivers.  You can setup an ESP32 Serial interface to invert the output (would be needed since the MOSFET inverts) but would it be fast enough for say >= 115200 baud?
    • That would free both the I2C and the Serial USB interfaces at the same time and still leave two dew heaters.
    • If one really wanted the SWS they could make one tradeoff (giving up Serial USB) instead of being backed into a corner.
    • There are other ways but they involve modifying the board and fine soldering... a poor option for most users looking at this.
  • I don't see any way to use 1-Wire that doesn't involve some tradeoffs but probably thermistors could be made to work for point temperature measurement (dew heaters) instead.
    • The spare TB pin should be good for that.
    • In exchange for the PEC pin you could have another if really needed.
    • This isn't always required anyway.


Robert Benward
 

It is attractive, but a lot of SMT.  I've trashed an ESP32, and others have trashed stepper drivers.  Regulators are always on the sacrificial list.  There is something to be said for plug in modules and thruhole. 

With that said, it is smaller @90x67mm vs 120x95mm for the MaxESP.  Can you run the program from the SD card?  Does the SD card solve the star map memory space problems?

Bob


Michael Ring
 

Seems you were reading my mind, I am have just today tried to make OnStepX work on the E4.

As I am fairly new to OnStepX I have not yet found the need for all the interfaces so what I did was this:

Keep SDA/SCL Pins jumpered to be tx/rx for the tmc2209

configure x-min and y-min so that they can be used with real limit switches or can be connected to the DIAG outputs of the tmc2209 for sensorless homing.

unfortunately z-min cannot be used as an output but if x-min or y-min are not used for endstops they could perhaps be used as tx pin for the tmc2209, then a simple jumper wire could be used to make the connection, no soldering required.

fan-e0 is perhaps not an ideal choice as it is either 24V or 5V level, likely way to much for the TMC2209 serial input

I have attached a new pinmaps file for the E4 but something is not correct, my steppers do not yet move when I connect everything to Nina.

I have set this in extended config:

#define DRIVER_UART_HARDWARE_SERIAL   ON //    OFF, Uses SoftwareSerial (transmit only) or ON for hardware serial.           Option

and have set driver model in config.h:

#define AXIS1_DRIVER_MODEL            TMC2209U //    OFF, Enter motor driver model (above) in both axes to activate the mount.    <-Often

Michael

Am 18.05.22 um 22:19 schrieb Howard Dutton:

A while back Chris Whitener and Serge CLAUS pointed out this board: https://wiki.fysetc.com/E4/

Now that OnStepX can control TMC2209 UART drivers and do basic WiFi internally I've been thinking about it more deeply...

It's fairly cheap, comes with some nice stepper drivers, and looking over the schematic it should generally work with OnStepX:

The good:
  • Inexpensive considering what you get.
  • It seems to have the usual setup for flashing across USB/Serial.
  • You'd have control of 2 or 3 dew heaters.
  • The 4 TMC2209 stepper drivers are ready to go and configured to use one ESP32 UART.
  • It has protected/conditioned inputs for home sense (X_MIN, Y_MIN) and Limit Sense (Z_MIN) and PEC (TE), plus a spare (TB.)

The bad:
  1. There is no way to effectively have an ST4 port (not enough pins.)
    • Probably most can live with this limitation, especially with the wireless SHC option we have now.
  2. There are several "wasted" pins devoted to the SD card that we don't use, shame, no easy way to access those that I see.
  3. Only (reasonably easy) way to attach an SWS would be to use the RX/TX pins going to the USB serial bridge chip (would need to be disconnected to flash OnStepX.)
    • Easier to take since OnStepX can at least provide the WiFi command channels without doing that.
  4. The TMC2209 needs a hardware serial port.
    • The primary option is to use the I2C pins (as a serial port.)
    • The secondary option is to use the use the RX/TX pins going to the USB serial bridge chip (would need to be disconnected to flash OnStepX.)
  5. No free pin for 1-Wire DS18B20 point temperature sensing (for dew heaters.)

...nothing is a show stopper there, but not ideal.

Ideas:
  • I wonder if the FAN-E0 output could serve as the Serial TX (perhaps TX only and no RX) going to the TMC2209 drivers.  You can setup an ESP32 Serial interface to invert the output (would be needed since the MOSFET inverts) but would it be fast enough for say >= 115200 baud?
    • That would free both the I2C and the Serial USB interfaces at the same time and still leave two dew heaters.
    • If one really wanted the SWS they could make one tradeoff (giving up Serial USB) instead of being backed into a corner.
    • There are other ways but they involve modifying the board and fine soldering... a poor option for most users looking at this.
  • I don't see any way to use 1-Wire that doesn't involve some tradeoffs but probably thermistors could be made to work for point temperature measurement (dew heaters) instead.
    • The spare TB pin should be good for that.
    • In exchange for the PEC pin you could have another if really needed.
    • This isn't always required anyway.


Michael Ring
 

Think I found my Error, the SDA/SCL Pins must be set to OFF

// SDA/SCL pins. 21/22 are the default values
#define SDA_PIN                 OFF
#define SCL_PIN                 OFF

Am 18.05.22 um 22:45 schrieb Michael Ring:

Seems you were reading my mind, I am have just today tried to make OnStepX work on the E4.

As I am fairly new to OnStepX I have not yet found the need for all the interfaces so what I did was this:

Keep SDA/SCL Pins jumpered to be tx/rx for the tmc2209

configure x-min and y-min so that they can be used with real limit switches or can be connected to the DIAG outputs of the tmc2209 for sensorless homing.

unfortunately z-min cannot be used as an output but if x-min or y-min are not used for endstops they could perhaps be used as tx pin for the tmc2209, then a simple jumper wire could be used to make the connection, no soldering required.

fan-e0 is perhaps not an ideal choice as it is either 24V or 5V level, likely way to much for the TMC2209 serial input

I have attached a new pinmaps file for the E4 but something is not correct, my steppers do not yet move when I connect everything to Nina.

I have set this in extended config:

#define DRIVER_UART_HARDWARE_SERIAL   ON //    OFF, Uses SoftwareSerial (transmit only) or ON for hardware serial.           Option

and have set driver model in config.h:

#define AXIS1_DRIVER_MODEL            TMC2209U //    OFF, Enter motor driver model (above) in both axes to activate the mount.    <-Often

Michael

Am 18.05.22 um 22:19 schrieb Howard Dutton:
A while back Chris Whitener and Serge CLAUS pointed out this board: https://wiki.fysetc.com/E4/

Now that OnStepX can control TMC2209 UART drivers and do basic WiFi internally I've been thinking about it more deeply...

It's fairly cheap, comes with some nice stepper drivers, and looking over the schematic it should generally work with OnStepX:

The good:
  • Inexpensive considering what you get.
  • It seems to have the usual setup for flashing across USB/Serial.
  • You'd have control of 2 or 3 dew heaters.
  • The 4 TMC2209 stepper drivers are ready to go and configured to use one ESP32 UART.
  • It has protected/conditioned inputs for home sense (X_MIN, Y_MIN) and Limit Sense (Z_MIN) and PEC (TE), plus a spare (TB.)

The bad:
  1. There is no way to effectively have an ST4 port (not enough pins.)
    • Probably most can live with this limitation, especially with the wireless SHC option we have now.
  2. There are several "wasted" pins devoted to the SD card that we don't use, shame, no easy way to access those that I see.
  3. Only (reasonably easy) way to attach an SWS would be to use the RX/TX pins going to the USB serial bridge chip (would need to be disconnected to flash OnStepX.)
    • Easier to take since OnStepX can at least provide the WiFi command channels without doing that.
  4. The TMC2209 needs a hardware serial port.
    • The primary option is to use the I2C pins (as a serial port.)
    • The secondary option is to use the use the RX/TX pins going to the USB serial bridge chip (would need to be disconnected to flash OnStepX.)
  5. No free pin for 1-Wire DS18B20 point temperature sensing (for dew heaters.)

...nothing is a show stopper there, but not ideal.

Ideas:
  • I wonder if the FAN-E0 output could serve as the Serial TX (perhaps TX only and no RX) going to the TMC2209 drivers.  You can setup an ESP32 Serial interface to invert the output (would be needed since the MOSFET inverts) but would it be fast enough for say >= 115200 baud?
    • That would free both the I2C and the Serial USB interfaces at the same time and still leave two dew heaters.
    • If one really wanted the SWS they could make one tradeoff (giving up Serial USB) instead of being backed into a corner.
    • There are other ways but they involve modifying the board and fine soldering... a poor option for most users looking at this.
  • I don't see any way to use 1-Wire that doesn't involve some tradeoffs but probably thermistors could be made to work for point temperature measurement (dew heaters) instead.
    • The spare TB pin should be good for that.
    • In exchange for the PEC pin you could have another if really needed.
    • This isn't always required anyway.


Howard Dutton
 

On Wed, May 18, 2022 at 01:33 PM, Robert Benward wrote:
It is attractive, but a lot of SMT.  I've trashed an ESP32, and others have trashed stepper drivers.  Regulators are always on the sacrificial list.  There is something to be said for plug in modules and thruhole. 
I see this as a replacement for the ESP32/CNC3 (mostly) and often the S6.

A lot of the pain is associated with plugging in stepper drivers (and other components) incorrectly, soldering mistakes, and quality problems.

I just feel the complexity here is much less than with something like an S6 or even the D1R32/CNC3, there is just not as much to go wrong.  Really with luck one wire needs to be run from that FAN pin the M-TX pin and that's it.  Hopefully the quality will be better than a D1R32/CNC3, that doesn't seem too difficult to do.

With that said, it is smaller @90x67mm vs 120x95mm for the MaxESP.  Can you run the program from the SD card?  Does the SD card solve the star map memory space problems?
I wouldn't use the SD Card.  I've thought about it and putting the catalogs in OnStep has a certain appeal, but at the end of the day I'm opposed to it.


Howard Dutton
 

On Wed, May 18, 2022 at 01:45 PM, Michael Ring wrote:
fan-e0 is perhaps not an ideal choice as it is either 24V or 5V level, likely way to much for the TMC2209 serial input
You can jump Vcc in.


Howard Dutton
 

On Wed, May 18, 2022 at 02:05 PM, Howard Dutton wrote:
On Wed, May 18, 2022 at 01:45 PM, Michael Ring wrote:
fan-e0 is perhaps not an ideal choice as it is either 24V or 5V level, likely way to much for the TMC2209 serial input
You can jump Vcc in.
P15 pin2 to P16 pin 2.


Howard Dutton
 
Edited

In operation the logic high will be pulled up via the 2.2k resistor and led though.  Hope pulls up fast enough else one would have to use a lower resistance, but that can be done too if needed.


Michael Ring
 

My board came pre-configured with 24V on +fan. It is at least another good chance to accidentially burn a board.

I just realized that z-diag can be used as an universal pin, one side of the jumper seems to be directly connected to GPIO15 which can be I/O. so that one copuld be a nice one for software serial.


Michael


Am 18.05.22 um 23:07 schrieb Howard Dutton:

On Wed, May 18, 2022 at 02:05 PM, Howard Dutton wrote:
On Wed, May 18, 2022 at 01:45 PM, Michael Ring wrote:
fan-e0 is perhaps not an ideal choice as it is either 24V or 5V level, likely way to much for the TMC2209 serial input
You can jump Vcc in.
P15 pin2 to P16 pin 2.


Howard Dutton
 

And one hand that's great to hear... on the other hearing that the schematic doesn't match the board doesn't make me happy.


On Wed, May 18, 2022, 5:11 PM Michael Ring <mail@...> wrote:

My board came pre-configured with 24V on +fan. It is at least another good chance to accidentially burn a board.

I just realized that z-diag can be used as an universal pin, one side of the jumper seems to be directly connected to GPIO15 which can be I/O. so that one copuld be a nice one for software serial.


Michael


Am 18.05.22 um 23:07 schrieb Howard Dutton:
On Wed, May 18, 2022 at 02:05 PM, Howard Dutton wrote:
On Wed, May 18, 2022 at 01:45 PM, Michael Ring wrote:
fan-e0 is perhaps not an ideal choice as it is either 24V or 5V level, likely way to much for the TMC2209 serial input
You can jump Vcc in.
P15 pin2 to P16 pin 2.


Michael Ring
 

Not sure what makes you think I said that schematic and board do not match. with 'preconfigured with 24V on +fan' I wanted to say that the jumper is set to 24V position.

What do you think about my pinmap, does it make sense? I can create a pull request if you would like to use it as an initial version for the E4.

I will try if z-diag can be used as serial tomorrow, first have to find my Saleae logic analyzer, it must be somewhere well hidden under some PCB's....

In case you plan to do a wiki page for the E4 I am eager to help, the board is so small so that it should fit nicely in my HEQ5 so I will very likely continue using it.

Michael


Am 18.05.22 um 23:21 schrieb Howard Dutton:

And one hand that's great to hear... on the other hearing that the schematic doesn't match the board doesn't make me happy.

On Wed, May 18, 2022, 5:11 PM Michael Ring <mail@...> wrote:

My board came pre-configured with 24V on +fan. It is at least another good chance to accidentially burn a board.

I just realized that z-diag can be used as an universal pin, one side of the jumper seems to be directly connected to GPIO15 which can be I/O. so that one copuld be a nice one for software serial.


Michael


Am 18.05.22 um 23:07 schrieb Howard Dutton:
On Wed, May 18, 2022 at 02:05 PM, Howard Dutton wrote:
On Wed, May 18, 2022 at 01:45 PM, Michael Ring wrote:
fan-e0 is perhaps not an ideal choice as it is either 24V or 5V level, likely way to much for the TMC2209 serial input
You can jump Vcc in.
P15 pin2 to P16 pin 2.


Howard Dutton
 
Edited

On Wed, May 18, 2022 at 02:32 PM, Michael Ring wrote:

Not sure what makes you think I said that schematic and board do not match. with 'preconfigured with 24V on +fan' I wanted to say that the jumper is set to 24V position.

I wasn't entirely following I guess.  Still not too, as I don't see how z-diag (which is really z-min and so tied to an RC network) will do it.

What do you think about my pinmap, does it make sense? I can create a pull request if you would like to use it as an initial version for the E4.

I think what I started, in concept anyway, was further along so I committed it.  Compare/fix/recommend changes as needed, see if you can get it working.

My changes include:
  • The ability to turn off SERIAL_A (not possible before.)
  • When SERIAL_A is enabled the TMC2209 UART is on the I2C pins.
  • When SERIAL_A is disabled the TMC2209 UART is on the main Serial port pins (I assume that's GPIO 1 TX and 3 RX.)
  • A few changes about how the I2C pins are shuffled around in the HAL.

Next I'll take a look and see if I can come up with a solution to allowing hardware comms without an actual RX pin.
Or, without a working RX pin, so we can perhaps use GPIO0 which should be ok as a place to park it for the purpose.

Then, figure out if that Z-MIN is workable or try for the FAN trick.


Chris Whitener
 

It does have wifi, could we at least have the ip serial port?
The Github for the 3d printer version of this uses a boot loader to load from the SD, and there is code in there for reading the Gcode for printing.


Howard Dutton
 

On Wed, May 18, 2022 at 06:55 PM, Chris Whitener wrote:
It does have wifi, could we at least have the ip serial port?
That's built into OnStepX already.

The Github for the 3d printer version of this uses a boot loader to load from the SD, and there is code in there for reading the Gcode for printing.
I won't be adding similar.


Howard Dutton
 

I made some small changes to the TMC2209 driver to allow using hardware serial mode with just a TX pin on the ESP32.

Tested with a MaxESP3 and works fine here.

To use this simply set the RX pin to OFF (which is -1) in the pinmap.


Michael Ring
 

Nice!

How do you think about making the TMC2209 project a git submodule in the src/libs folder?

I put your TMC2209 project into the standard Arduino Folder for Libs but I always get the info that there is an update available because it checks for the original module with the same name.

Or is there a better way (I am not a frequent user of the Arduino IDE)

Michael

Am 19.05.22 um 13:17 schrieb Howard Dutton:

I made some small changes to the TMC2209 driver to allow using hardware serial mode with just a TX pin on the ESP32.

Tested with a MaxESP3 and works fine here.

To use this simply set the RX pin to OFF (which is -1) in the pinmap.


Serge CLAUS
 

Same issue with Onewire librarie.


Howard Dutton
 

I'll keep that in mind but I'm not spending my time fixing it.


Howard Dutton
 

On Thu, May 19, 2022 at 06:34 AM, Howard Dutton wrote:
I'll keep that in mind but I'm not spending my time fixing it.
Guess you can turn off the check in the IDE.


Michael Ring
 

I think there is an issue in the code, but perhaps I do not understand something completely.

Shouldn't this line:

#if SERIAL_A_BAUD_DEFAULT != OFF

be

#if SERIAL_A_BAUD_DEFAULT == OFF

at least after changing to '==' the code behaves more as I'd expect and I can see Serial Data beeing sent to the TMC2209 in the case where I2C is getting used.

Also the comments you did make more sense to mew when there is a '=='


// Use the following settings TMC2209
#define SERIAL_TMC              Serial1          // Use a single hardware serial port to up to four drivers
#define SERIAL_TMC_BAUD         460800           // Baud rate
#if SERIAL_A_BAUD_DEFAULT == OFF
  // if SERIAL_A is OFF map the hardware serial UART to the Serial0 pins (remove jumpers for E4 fimware update)
  #define SERIAL_TMC_TX         1                // Transmit data
  #define SERIAL_TMC_RX         3                // Recieving data
#else
  // if SERIAL_A is ON map the hardware serial UART to the I2C pins, and disable I2C
  #define SERIAL_TMC_TX         22               // Transmit data
  #define SERIAL_TMC_RX         21               // Recieving data
  // SDA/SCL pins are disabled
  #define HAL_SDA_PIN           OFF
  #define HAL_SCL_PIN           OFF
#endif

also, GPIO15 (Z-MIN) seems to work fine, I can see serial data when I configure that Pin. Only one jumper cable is needed to make this work and SCL/SDA can stay active.

also:

  #define HAL_SDA_PIN           OFF
  #define HAL_SCL_PIN           OFF

creates redefinition warnings during compile when this code-path is active


Michael

Am 19.05.22 um 15:34 schrieb Howard Dutton:

On Thu, May 19, 2022 at 06:34 AM, Howard Dutton wrote:
I'll keep that in mind but I'm not spending my time fixing it.
Guess you can turn off the check in the IDE.