Closed mstfyghm closed 1 year ago
Show photos and a schematic of your hardware.
Show photos and a schematic of your hardware.
Thanks for your attention. My hardware is based on "D1 mini ESP32". I have used pins 34 & 35 as X and Y limit switch inputs and obviously they need external pull-up resistors. The limit switches are configured as N.O. and drive PC817 optocoupler LEDs. MMC is directly connected to the ESP32 according to config.yaml content:
Our tests show the SD code works fine. The primary developers of FluidNC do not have time to help with DIY hardware. Maybe others in the community can help.
Our tests show the SD code works fine. The primary developers of FluidNC do not have time to help with DIY hardware. Maybe others in the community can help.
OK. I understand. Thanks for your great work on developing fluidNC. v3.4.4 still works fine for me. I like to learn how to contribute to FluidNC but I couldn't find any documentation about GRBL and fluidnc and their coding structure.
@mstfyghm i have the same Problem, you can go up to Version 3.6.1. This works for my hardware....
It's a software problem. The MMC and SD protocols are somewhat different. Earlier versions of FluidNC used the Arduino Framework SD driver, which supports both the MMC and SD protocol variants. We switched to the ESP-IDF driver, which only works with SD. MMC cards are pretty rare these days.
The ESP-IDF driver only supports MMC cards in the native multi-data-line mode, not in SPI mode. Perhaps you could switch to an SD card using one of these shields They plug right on top of a D1 mini. Both of my production shop FluidNC controllers use D1 Mini with a shield like that.
This is the stack that powers my production router. Bottom is a custom "Gecko Blaster" board that brings the ESP32 pins over to a parallel port and has a USB-B connector to bring in 5V. Next is a D1 Mini, then the SD shield, and finally an OLED shield.
The shield uses the "standard" SPI GPIOs 18,19,23 cs 5, same as your config, so in principle it should be plug and play.
Thanks @MitchBradley . and what is the max size for sd card?
See this wiki page regarding the SD card setup and limitations.
The shield uses the "standard" SPI GPIOs 18,19,23 cs 5, same as your config, so in principle it should be plug and play.
The card you see in the photo has 16 contacts, apart from the 3 contacts of the power supply ( 5v 3.3v GND ), what is the connection to the other 4 contacts (18, 19, 23, 5 ) I searched but did not find the pinouts of the card. Thanks
That shield stacks on top of a D1 Mini board. The reason I recommended it is because the OP showed a picture of his setup which has a D1 Mini ESP32 with jumper wires soldered onto the contacts of an MMC card. Since he already has a D1 Mini, that shield would be completely plug and play in his system, using the standard SPI and SD CS pins.
spi: miso_pin: gpio.19 mosi_pin: gpio.23 sck_pin: gpio.18
sdcard: cs_pin: gpio.5
The pin number labels on the shield - like D1 and D2 - do not correspond to ESP32 GPIO numbers. The reason is because the D1 Mini started out as an ESP8266 thing and the pin numbers are for the ESP8266 world. Then someone shoehorned an ESP32 into that form factor, sort of. The CPU module is wider to accommodate two extra rows of 8 pins, but the inner rows of pins are the same distance apart as for the original ESP8266 D1 Mini, so the shields still work, although they cannot access the extra ESP32 pins. To find the correspondence between the shield pin numbers and the ESP32 GPIOs, you just have to look at the layouts and match them up.
Bottom side of ESP32 Mini:
Top side of original ESP8266 D1 Mini
Note that the ESP32 Mini designers arranged the pinout so that the pins commonly used for UART, SPI and I2C line up on both versions, despite the fact that their GPIO numbers are different.
I found these by searching for "D1 Mini pinout" and "ESP32 Mini pinout"
If you are not using a Mini, there is nothing special about this shield. Any breakout without extra circuitry would work the same.
Does this card work? https://nettigo.eu/products/module-with-microsd-card-reader-shield-for-wemos-d1-mini
That is the same product as what I have been talking about. I am closing this ticket now because the OP has been silent for some time and there is no more to say. @sotchrys - if you need help with SD, make a ticket with the relevant info about your machine. Asking questions on this ticket without the context about your machine is distracting and hard for us to answer.
Controller Board
I made it myself using ESP32-WROOM32. I used an old 256MB mmc.
Help From Board Vendor
Machine Description
My machin is a CO2 laser cnc that has DM542E stepper drivers.
Input Circuits
No response
Configuration file
Startup Messages
User Interface Software
WebUI
What happened?
My mmc is connected to ESP32 physically but webUI shows that there is no sdcard connected. When I press the "Refresh" button on WebUI, following message appears:
[MSG:ERR: sdmmc_card_init failed code 0x106]
As I mentioned in hardware description, I used an old 256MB mmc and everything was OK before v3.6.3.Other Information
No response