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

Problem: Disconnection error from SD Card #810

Closed
flavioprattico opened this issue Feb 17, 2023 · 22 comments
Closed

Problem: Disconnection error from SD Card #810

flavioprattico opened this issue Feb 17, 2023 · 22 comments

Comments

@flavioprattico
Copy link

flavioprattico commented Feb 17, 2023

Controller Board

MKS DLC32 V2.1

Machine Description

Just the MKS board with a stepper motor attached to the x axis

Input Circuits

No response

Configuration file

https://github.com/bdring/FluidNC/blob/main/example_configs/MKS_DLC32_21_XYZ.yaml

Startup Messages

[MSG:INFO: FluidNC v3.6.7]

[MSG:INFO: Compiled with ESP32 SDK:v4.4.1-1-gb8050b365e]

[MSG:INFO: Local filesystem type is spiffs]

[MSG:INFO: Configuration file:MKS_DLC32_21_XYZ.yaml]

[MSG:INFO: Machine K40 Laser]

[MSG:INFO: Board MKS-DLC32 V2.1]

[MSG:INFO: I2SO BCK:gpio.16 WS:gpio.17 DATA:gpio.21]

[MSG:INFO: SPI SCK:gpio.14 MOSI:gpio.13 MISO:gpio.12]

[MSG:INFO: SD Card cs_pin:gpio.15 detect:NO_PIN]

[MSG:INFO: Stepping:I2S_static Pulse:4us Dsbl Delay:0us Dir Delay:1us Idle Delay:0ms]

[MSG:INFO: Axis count 3]

[MSG:INFO: Shared stepper disable I2SO.0]

[MSG:INFO: Axis X (0.000,325.000)]

[MSG:INFO:   Motor0]

[MSG:INFO:     stepstick Step:I2SO.1 Dir:I2SO.2 Disable:NO_PIN]

[MSG:INFO:  X Neg Limit gpio.36]

[MSG:INFO: Axis Y (0.000,220.000)]

[MSG:INFO:   Motor0]

[MSG:INFO:     stepstick Step:I2SO.5 Dir:I2SO.6:low Disable:NO_PIN]

[MSG:INFO:  Y Neg Limit gpio.35]

[MSG:INFO: Axis Z (0.000,80.000)]

[MSG:INFO:   Motor0]

[MSG:INFO:     stepstick Step:I2SO.3 Dir:I2SO.4 Disable:NO_PIN]

[MSG:INFO:  Z Neg Limit gpio.34]

[MSG:INFO: macro0_pin gpio.33:low:pu]

[MSG:INFO: Kinematic system: Cartesian]

[MSG:INFO: Laser Ena:I2SO.7 Out:gpio.32 Freq:5000Hz Period:8191]

[MSG:INFO: Using spindle Laser]

[MSG:INFO: Probe Pin: gpio.22]

[MSG:INFO: STA SSID is not set]

[MSG:INFO: AP SSID FluidNC IP 192.168.0.1 mask 255.255.255.0 channel 1]

[MSG:INFO: AP started]

[MSG:INFO: WiFi on]

[MSG:INFO: Captive Portal Started]

[MSG:INFO: HTTP started on port 80]

[MSG:INFO: Telnet started on port 23]

User Interface Software

msftconnecttest.com

What happened?

Hello everyone!
I am trying to run a gcode file from the sd card plugged into the MKS DLC32 V2.1 board. I tried two different sd cards (1 GB and 32 GB), both formatted with SD Card Formatter, as suggested for windows users. I am able to upload the gcode file from the web gui, I can start it and, for random seconds, it works. Then it stops and if I click on the Refresh button it appears "No SD card". Then I have to reboot the board, connect to the FluidNC wifi and I can see, once again, the SD card content in the web gui.

I also tried to change the frequency to 10MHz us suggested here

#742

but I had same results.

I tested the same procedure also with previous releases of the FluidNC firmware (namely 3.5.1 and 3.6.1), but it does not change the results.
No problems sending longer or different gcode files over the serial with GCode sender or similar.

Other Information

Last FluidNC reales (3.6.7) flashed on the MKS board

@flavioprattico
Copy link
Author

flavioprattico commented Feb 17, 2023

Quick update. I tried with another 1GB sd card, formatted with SD Card Formatter, and it was not detected at all from the web gui.

I then decided to upload the original firmware (following link) from the MKS with their own uploading tool

https://github.com/makerbase-mks/MKS-DLC32/blob/main/firmware/TS24/CNC/Normal/Board_V2.0/V2.1.0_H24_20220511_01_N_CNC.bin

From their web gui and with all the 3 sd card (32, 1 and 1 GB) sd card previously used, I was able to send the same gcode several times with no errors.

This result suggests me that it is probably a configuration problem of the yaml file...I guess...

@MitchBradley
Copy link
Collaborator

One possibility is that we switched from the Arduino SDCard driver to the one in the Espressif ESP-IDF framework.

It will be difficult to debug this remotely, and without access to a card that fails. If you can send me a card that doesn't work I can investigate further.

@flavioprattico
Copy link
Author

In what release did you switch from Arduino to Espressif sd driver? I can try to flash that firmware and check if that is the problem.

No problem to send you a sd card that fails, you can send me your address via email to flavioprattico@gmail.com

Otherwise we can use Anydesk so you can control my computer. I also have FluidTerm and the Espressif IDF on my computer.

@MitchBradley
Copy link
Collaborator

The switch occurred after 3.4.4.

Remote control might work, but having the card in hand would be faster for me. Considering the severe time shortage I am up against, that is an important consideration.

@flavioprattico
Copy link
Author

I flashed the 3.4.4 but now no one of the three is recognized, it always appears "No SD Card".

Can you suggest me a compatible SD that I can buy in the meanwhile?

@MitchBradley
Copy link
Collaborator

MitchBradley commented Feb 18, 2023

I am starting to think that you might have a hardware problem on the DLC32 board. There have been numerous reports of different strange DLC32 behavior that could be explained by hardware quality problems - hardly surprising for something as inexpensive as DLC32.

I have two DLC32 v1.1 boards. I just spent two hours trying to get the first one of them to connect to serial. I thought that it was a problem with the CH340 driver caused by my recent upgrade to Windows 11, but that was wrong. When I tried an MKS Tinybee (also CH340) that worked. Then I dug out my other DLC32 board and it worked too.

I tested several old microSD cards - from Kingston, Adata, and SanDisk - with the working DLC32 v1.1. They all worked just fine. I used release firmware v3.6.7.

@flavioprattico
Copy link
Author

It would be really strange a hardware problem because, as I said before, the three SD cards work perfectly with the original firmware from MKS. Anyway, before shipping you one of the SD card, I am going to buy a new MKS DLC32 V2.1 board and test it to check if really is a hardware issue. I will let you know!

@flavioprattico
Copy link
Author

Finally I found the solution! Checking on a MKS repository on GitHub I found a fork of FluidNC. Inside I checked the yaml files and tested this one with the last release of FluidNC (namely 3.6.7)

https://github.com/makerbase-mks/FluidNC/blob/main/example_configs/MKS_DLC32_BASE.yaml

I did not check inside the differences with the official one in this repository, but it worked several times with all SD cards I had.

@flavioprattico
Copy link
Author

@MitchBradley what do you suggest, I have to open a pull request in order to add this yaml file?

@MitchBradley
Copy link
Collaborator

I am hesitant to assume that this is solved until we know exactly which change in the config file fixed it. I do not see any differences that should matter. Perhaps you could try smaller changes to discover the exact difference between working and failing.

@flavioprattico
Copy link
Author

Ok, I will do it!

@jeffjeffreyjeff
Copy link

Hi, I put these settings (from link above by flavioprattic) into a config for MKS CNC32 board and the SD card works on that board as well now. None of the settings I had found elsewhere, or from MKS directly worked.
spi:
miso_pin: gpio.12
mosi_pin: gpio.13
sck_pin: gpio.14

sdcard:
cs_pin: gpio.15
card_detect_pin: NO_PIN

The IO diagram for the board from MKS says CS is on IO25, but actually is is IO15.

@bdring
Copy link
Owner

bdring commented Mar 16, 2023

I think the FNC wiki page has it right.

http://wiki.fluidnc.com/en/hardware/3rd-party/MKS_DLC32

@jeffjeffreyjeff
Copy link

I think the FNC wiki page has it right.

http://wiki.fluidnc.com/en/hardware/3rd-party/MKS_DLC32

Yes, but there is no entry for CNC32 and the detect pin quoted for DLC32 does not seem to work on CNC32

@bdring
Copy link
Owner

bdring commented Mar 16, 2023

What is MKS CNC32? Do you have a link?

@jeffjeffreyjeff
Copy link

Hi, yes https://www.aliexpress.com/item/1005005084530034.html
I found the original software here: https://github.com/Macrobase-tech/CNC-Software.git
BTW great work with the software

@jeffjeffreyjeff
Copy link

MKS sent me this with the IO (supposedly) I'm still to check it out properly
CNC 32 IO

@bdring
Copy link
Owner

bdring commented Mar 16, 2023

Can we close this issue now? Sounds like this is an MKS problem.

We waste a lot of time supporting their stuff for them.

@MitchBradley
Copy link
Collaborator

Macrobase CNC32 is not the same as Makerbase DLC32. Note "macro" vs "maker". Not only did they ripoff most of the design, they also ripped off the name. What a nuisance. This stuff is so inexpensive because they rip off everybody including us developers

@flavioprattico
Copy link
Author

I guess the issue can be closed. Thanks for the support!

@bdring bdring closed this as completed Mar 17, 2023
@jeffjeffreyjeff
Copy link

Macrobase CNC32 is not the same as Makerbase DLC32. Note "macro" vs "maker". Not only did they ripoff most of the design, they also ripped off the name. What a nuisance. This stuff is so inexpensive because they rip off everybody including us developers

I bought both units from Macrobase Aliexpress store just to add to confusion. The DLC32 packed up after less than one hour of use, they are sending a replacement. The CNC32 still working.

@MitchBradley
Copy link
Collaborator

If you have not already done so, please consider donating to the FluidNC project to help defray some of our costs in supporting this cheap Chinese stuff.

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

No branches or pull requests

4 participants