Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FR] Input Shaping with I2S_STEPPER_STREAM #25605

Open
1 task done
ahmetcemturan opened this issue Mar 30, 2023 · 17 comments
Open
1 task done

[FR] Input Shaping with I2S_STEPPER_STREAM #25605

ahmetcemturan opened this issue Mar 30, 2023 · 17 comments
Assignees
Labels

Comments

@ahmetcemturan
Copy link

ahmetcemturan commented Mar 30, 2023

Did you test the latest bugfix-2.1.x code?

Yes, and the problem still exists.

Bug Description

If Input shapıing is enabled, the printer will home x and then y axis. Then stops responding (does not home z).
Homing works fine if I send "M593 F0" before homing

Bug Timeline

It is existent in the 2.1.2 and the latest bugfix

Expected behavior

I expect it to home

Actual behavior

It stops responding during the homing routine.

Steps to Reproduce

enable input shaping and set it to a value >=1
Home the printer

Version of Marlin Firmware

2.1.2 or 2.1.bugfix

Printer model

Prusa clone (Bedslinger)

Electronics

Tinybee v3

Add-ons

Z-probe as Z-endstop

Bed Leveling

ABL Bilinear mesh

Your Slicer

Prusa Slicer

Host Software

Pronterface

Don't forget to include

  • A ZIP file containing your Configuration.h and Configuration_adv.h.

Additional information & file uploads

>>> M593 F0

echo:DEBUG:ECHO,INFO,ERRORS,COMMUNICATION
echo:M105
echo:M105
echo:M105
echo:G28
echo:busy: processing
echo:busy: processing
echo:G92 E0
echo:M114
echo:M105
echo:M105
echo:M105
echo:M105
>>> M593 F22
SENDING:M593 F22
echo:M593 F22
echo:M105
echo:M105
echo:G28
echo:busy: processing
>>>>>Becomes Unresponsive....

will only respond after a reset.

Only other modification is That I have changed the ADC voltage to 2.585 as that gives correct values

Marlin.zip

@thisiskeithb thisiskeithb changed the title [BUG] TinBee Board does not home Z if Input Shaping is enabled [BUG] TinyBee Board does not home Z if Input Shaping is enable Apr 1, 2023
@ahmetcemturan ahmetcemturan changed the title [BUG] TinyBee Board does not home Z if Input Shaping is enable [BUG] TinyBee Board does not home Z if Input Shaping is enabled Apr 1, 2023
@ahmetcemturan
Copy link
Author

Some additional observations:

  • when trying to compile Marlin with SHAPING_FREQ_ =0, I get an error. (not a big problem as it makes basically no sense)
  • when I compile Marlin with IS enabled and then set F to 0 I am able to home and print.
  • when I start the print and then enable IS it printed after I put a value for x then stopped after I put in a value for Y.
  • Marlin with IS disabled but FT enabled behaved similar:
  • I chose these values: M493 A39 B36 K0.06 P1 S11
  • No homing possible
  • After Restart and M493 S0, I was able to home and start the print but print stopped after I sent M493 A39 B36 K0.06 P1 S11
  • Currently both disabled..

@tombrazier
Copy link
Contributor

IS is not supported with ESP32. My naive guess is the FT is not either. We should add a sanity check.

ESP32 works around some of the core stepper logic. We really need a refactor of stepper.cpp that puts all the step generation in one place and prevents more than one step being generated per pass through the loop. Then ESP32 could be integrated with IS properly. (Not to mention baby stepping and really getting it working with LA.)

when trying to compile Marlin with SHAPING_FREQ_ =0, I get an error. (not a big problem as it makes basically no sense)

You could want to compile with SHAPING_FREQ_[XY]=0 so that IS defaults to disabled. That is possible if you define SHAPING_MIN_FREQ. There should be a sanity check error which tells you this.

@thisiskeithb thisiskeithb added T: Feature Request Features requested by users. C: Motion labels Apr 4, 2023
@thisiskeithb
Copy link
Member

thisiskeithb commented Apr 4, 2023

IS is not supported with ESP32. My naive guess is the FT is not either.

I'll mark this as a feature request for I2S_STEPPER_STREAM instead.

We should add a sanity check.

Added:

@thisiskeithb thisiskeithb changed the title [BUG] TinyBee Board does not home Z if Input Shaping is enabled [FR] Input Shaping on ESP32 Apr 4, 2023
@cbagwell
Copy link
Contributor

cbagwell commented Apr 5, 2023

when trying to compile Marlin with SHAPING_FREQ_ =0, I get an error. (not a big problem as it makes basically no sense)

You could want to compile with SHAPING_FREQ_[XY]=0 so that IS defaults to disabled. That is possible if you define SHAPING_MIN_FREQ. There should be a sanity check error which tells you this.

I created #25358 to apply the related AVR sanity check to everything.

@thisiskeithb thisiskeithb changed the title [FR] Input Shaping on ESP32 [FR] Input Shaping with I2S_STEPPER_STREAM Apr 6, 2023
@vfbank
Copy link

vfbank commented May 27, 2023

All hardware currently using the ESP32 chipset is experiencing the same issue. This is because the ESP32 chipset communicates through the I2S Stream. Unfortunately, most EPS32s can't handle Marlin's I2S stream properly.

Therefore, the following features are currently not implemented:

1.Incompatible with INPUT_SHAPING

2.Incompatible with Babystep

3.Incompatible with FT motion

4.Incompatible with Linear Advance

And there are currently issues with inaccurate temperature sensors and layer shift issues.

The ESP32 chipset has powerful processing performance, but unfortunately, only ARM or STM32 series are mainly developed in Marlin, so it's better not to use the ESP32 chipset until a capable person comes out. The reason why this board is inexpensive is because of the above reasons, and the manufacturer will no longer update after version 2.0.9.

(There were some translation errors, so I re-edited some phrases.)

@EvilGremlin
Copy link
Contributor

EvilGremlin commented May 27, 2023

@vfbank you weren't paying attention, LA and babystep are supported now

@ellensp
Copy link
Contributor

ellensp commented May 27, 2023

@vfbank Your thinking is backwards, Need more controllers using esp32 to attract esp32 developers to the project

@vfbank
Copy link

vfbank commented May 28, 2023

Unfortunately, when I activate the extension, it compiles, but Babysteps still doesn't work.

@EvilGremlin
Copy link
Contributor

INTEGRATED_BABYSTEP still don't work on i2s? Someone send Tom TinyBee already! 😆

@vfbank
Copy link

vfbank commented May 28, 2023

INTEGRATED_BABYSTEP 여전히 i2에서 작동하지 않습니까? 누군가 이미 Tom TinyBee를 보냅니다! 😆

Enabling the INTEGRATED_BABYSTEPPING definition compiles but babystep doesn't work. No matter how much you turn the dial, only the value changes and the Z-axis does not move. Same goes for other features. The 2.1.2 key features listed above compile but do not actually work.

If it works, please share the video and setting file that works for me. please.

This issue has already been answered by asking the same issue in the TinyBee thread.

makerbase-mks/MKS-TinyBee#92

Again, the problem is caused by the ESP32 chipset not properly supporting I2S streams. I2S function is not the problem. This issue should be addressed by the hardware manufacturer.

@vfbank
Copy link

vfbank commented May 28, 2023

Your thinking is backwards, Need more controllers using esp32 to attract esp32 developers to the project

For reference, the ESP32 hardware should control all communication with 32 pins. About 2-4 times less compared to ARM or STM32 processors. This causes layout configuration issues. The EPS32 chipset operates at an amazing 180Mhz speed and has Bluetooth/WIFI functions, but due to the size of the chipset, there is a problem in configuring the communication interface.

The reason I think of it negatively is that I actually tried to improve it, but eventually gave up due to a lot of limitations. Improving the features won't be easy unless you're an engineer or developer with great skills.

First of all, the Arduino core of the EPS32 chipset is still in the development stage, and there are numerous functional problems and hardware compatibility issues. The qualitative difference between ARM and STM32 chipsets and libraries with a long history is quite large.

Marlin firmware works with Arduino to maintain compatibility with AVR boards. Therefore, in order to develop EPS32, efforts of hardware developers are desperately needed. However, they are not very interested in updating the Arduino core of the EPS32 (to be precise, the ESP-IDF development tools are too slow to update). The reason is probably financial. This is very sad.

@EvilGremlin
Copy link
Contributor

ESP32 chipset not properly supporting I2S streams

Maybe you meant framework?
Though as general stepping works, problem lie in forming pulse train which is 100% marlin code. Or could it be FreeRTOS messing with interrupts somehow?

@vfbank
Copy link

vfbank commented May 28, 2023

ESP32 chipset not properly supporting I2S streams

It seems to me that the ESP32 chipset's G-code processing part is the problem. Probably a data exchange problem (not sure)

For better understanding, let's compare them in the same way as the G-code slicing program.

Let's assume that the existing pure G-code (original source via SD card or USB) is modified with the desired function through post-processing.

I need to intercept the original data (sorry English is not my native language, so I don't know how the translation will work) and replace that part with new G-code to get what I want. However, this part doesn't seem to work properly due to some problem.

So, while the existing data is being processed, it seems that all related functions do not work because it cannot be changed in the part where it is to be changed by modulating it with other data.

This is speculative, so it may not be correct. So I can't give you any good advice on this matter. sorry.

*Once this issue is resolved, there will be many 3D printer motherboards using the ESP32 chipset.

@tombrazier
Copy link
Contributor

INTEGRATED_BABYSTEP still don't work on i2s? Someone send Tom TinyBee already!

First I have some X axis improvements to make on my printer so I can print a 15ish minute benchy on 8 bit and 12V just to showcase how awesome Marlin is.

Then I need to finish fixing my coffee machine and make a very niche youtube video for anyone else wanting to to do the same fix.

And I want to get on with my variation on rq3's TAP-XXX bed sensor.

Then it would be really great to look into why bugfix is still causing stepper issues for some users.

And there's a weird E stepper thing that might be related to a backlash correction bug.

And some memory improvements I've had in mind for ages.

And smooth multistepping.

And I've started contributing to another github project for head tracking for simulators.

And I really should look over the FT stuff.

And having a life.

How did I get in so deep? 😮

@EvilGremlin
Copy link
Contributor

At least you deserve some new shiny toys 😛

@thinkyhead
Copy link
Member

First I have some X axis improvements to make on my printer so I can print a 15ish minute benchy on 8 bit and 12V just to showcase how awesome Marlin is.

I'll be very happy to post a video of that to Twitter to steal a little of the limelight from Prusa who are arriving late to this party but getting all the jellybeans.

@tombrazier
Copy link
Contributor

Great, thanks Scott. I'll let you know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants