[Grbl_Esp32 Issue#58] ESP32-WROOM + RAMPS 1.4 = TRUE

未分类 bolang 3个月前 (10-14) 36次浏览

Issue #58 | 状态: 已关闭 | 作者: Aggebitter | 创建时间: 2018-11-19


I’ve at the moment got it up and running on pcb prototyping board and a Arduino Mega prototyping shield attached to RAMPS 1.4 running.

My question is more what inputs/outputs defined would the community prefer ?
My setup is now (ESP32 pin# as default and external pullup when needed):

ESP32 -WROOM RAMPS 1.4
Stepper enable -> X,Y,Z-Enable
X-Dir -> X-Dir
X-Step -> X-Step
Y-Dir -> Y-Dir
Y-Step -> Y-Step
Z-Dir -> Z-Dir
Z-Step -> Z-Step
X-Limit <- X-Min Y-Limit <- Y-Min Z-Limit <- Z-Min Z-Probe <- Z-Max Spindel-En -> D10 (heater)
Spindel-Dir -> D9 (heater)
Spindel-PWM -> D8 (heater)
Flood -> Servo1
Mist -> Servo2
GBRL-Reset -> X-Max
Door -> Y-Max
Start <- Servo3 Hold <- Servo4 At the moment all Vcc is 3.3 but thinking of making all inputs 5V for easy integration for common limit switches // Agge


评论 (7)

#1 – gflaser-au 于 2018-11-19

The esp32 pins are very flexible, except the 4 input only pins, and the code allows you to redefine pins for alternative uses.

Generally, if you comment one pin function the pin can be used for something else.

Note some of the io pins are used to connect the the sd card, if enabled. (a seriously great feature!)

I believe all the esp32 io are 3.3v. ( stay with that)

See the cpu_map.h source file for definitions – customise it as needed for your application!


#2 – bdring 于 2018-11-19

@Aggebitter The only issues I see with your setup is Start and Hold are input only. Typically you don’t need max and min limits. You can use on switch for both ends of an axis.

It sounds like you are making a custom PCB to adapt the ESP32 to a RAMPS. Like @gflaser-au says, you should seriously consider adding an SD card socket to that. You could share pins with other functions and let the user decide whether to use it or not.


#3 – Aggebitter 于 2018-11-20

Thanx for the feedback, Yes I’ll will make a PCB that’s why I would like the feedback.
I used some of the pin definitions from https://github.com/CarlosGS/grblForCyclone

SD card is common used on AUX3 at the RAMPS side. I will rewire that part.
Are there any plans on “reserving” default pins for io expansion ?
I prefer an easy setup with a default pin arrangement as much as possible and when I got a “default” pin definition for RAMPS the next step is to make the IO 5V tolerant for a easy RAMPS setup


#4 – bdring 于 2018-11-20

The only pins I have “reserved” for expansion are GPIO22 (SCL) and GPIO21 (SDA). These are the default I2C pins in the Arduino wire library.

With that said, the ESP32 can map most peripherals to most pins.


#5 – Aggebitter 于 2018-11-21

My current pin assignment for the RAMPS board. The are two pins that would be set in my design.
“GBRL-Reset” What is the function for this pin ?
I don’t remember the states of the “EN” pin but isn’t that HIGH in running LOW reset ?

ESP32 -WROOM RAMPS 1.4
Stepper enable -> X,Y,Z-Enable
X-Dir -> X-Dir
X-Step -> X-Step
Y-Dir -> Y-Dir
Y-Step -> Y-Step
Z-Dir -> Z-Dir
Z-Step -> Z-Step
X-Limit <- X-Min Y-Limit <- Y-Min Z-Limit <- Z-Min Z-Probe <- Z-Max Hold <- X-Max Start <- Y-Max GBRL-Reset -> Servo4 ??

Spindel-PWM -> D8 (heater)
Flood -> D9 (heater)

CS -> AUX3 pin2
MISO <- AUX3 pin3 MOSI -> AUX3 pin4
SCK -> AUX3 pin5
SD_CD -> AUX3 pin6
SDA <> I2C pin3
SCL -> I2C pin4

EN <- Reset ??


#6 – bdring 于 2018-11-21

Grbl reset: Clears the planner. If you feed hold a job, there will be partial and full moves left in the planner. Grbl reset clears them out if you want to stop that job and not lose position. Most machines don’t use physical buttons for this.

Stepper enable is typically active low, but easily changed without recompile.


#7 – Aggebitter 于 2018-12-14

@bdring Take a look at the same stuff going on at with Marlin Hal:
https://github.com/simon-jouet/ESP32Controller
And the Hardware at:
https://github.com/vivian-ng/Hardware


原始Issue: https://github.com/bdring/Grbl_Esp32/issues/58

喜欢 (0)