14. Networking and communications

Assignments

Neil’s Assignment

(What Neil challenges us with)
individual assignment:
design, build, and connect wired or wireless node(s)
with network or bus addresses
group assignment:
send a message between two projects

Nueval Assignment

(What Local and Global Evaluators grade as pass-fail)

UNIT DESCRIPTION
Task: Embedded Networking and Communications

Group assignment:

Send a message between two projects Alan used his Squidward board to control stepper motors for a Urumbu-style machine. Cool!

Individual assignment:

design, build, and connect wired or wireless node(s) with network or bus addresses

LEARNING OUTCOMES
Unit progress 100% Complete
Task: Embedded Networking and Communications

Demonstrate workflows used in network design
100% Complete

Implement and interpret networking protocols and/or communication protocols
100% Complete

My Assignment Plan

I will make a ESP 32 board that control three stepper motors for the X Y & Z stepper motors on the Foam Crawler CNC Machine via WiFi or Bluetooth.

  1. Design ESP-32 based board in KiCad
  2. Mill the board
  3. Stuff the board
  4. Test and trouble shoot the board
  5. Program the board with FluidNC
  6. Configure FluidNC using my Foam Crawler Grbl documentation as a reference.
  7. Run test g-Code

Background

I have built several ESP32 based circuit boards so far. I have always dreamed of designing my own circuit board to control a CNC machine. Using a ESP32 and FluidNC will allow me to run my Foam Crawler CNC machine wireless via a web interface. I spent about 4 weeks studying various ESP32 control boards, so I could learn enough to select the features I wanted for my final project, but still be able to finish my project.

FluidNC

One of the coolest features of the ESP32 is it’s built in Bluetooth and wifi. This will allow streaming of g-code to my cnc machines with ant tablet, old android phone, or computer via the FluidNC web interface!

FluidNC a new CNC Firmware

Streaming G-code to ESP32 Grbl via Bluetooth

Pinouts

In order for my custom 3PakCNC board to work properly with FluidNC I needed to learn about what pinouts were best to use. ESP32 Pin Reference Furthermore I needed to see what pins did what funtions on a 3 axis Grbl control board. So I looked at Bart Dring’s ESP32 CNC Test PCB V4.1. Since this was my first time making my own CNC control board, I used this board as a reference for my 3PakCNC board design.

KiCad design


Here is an early version of the 3PakCNC board design.

The through hole mounting of the step stick sub boards was very annoying and blocked the number of traces that could pass through. I decided to add mounting holes for M3 screws and to round the corners of the board. A cut out dip was added to the top of the board to allow traces to get to the interior of the ESP32, but not block the antenna.

This is a late version of the board with text labels

Rivet Vias

I once again used Favorit Rivets as vias to make a double sided board. I used 1.0mm ID rivets:

ID OD +/- 0.03 mm Drill ⌀ Shaft L +/- 0.10 mm Head ⌀ +/- 0.15mm wall d +/- 10%
1.0mm 1.4mm 1.5mm 2.5mm 2.2mm 0.2mm

Each Rivet costs:

Order Code Description Price per 1k Price Each
700-028-2 Favorit RIVETS 1.0mm ID $52.50 0.525¢

I’m using 6 vias, so total cost is $3.15

CAM

I once again prepared my boards for CAM, by exporting SVG files from KiCad via File, Export, SVG… then selecting Copper layers: F.Cu, B.Cu, Edge.Cuts and then clicking Export. This exports a file called *-brg.svg with * being your KiCad project name. In my case 3PakCNC-brd.svg

Next cleaned them up in Inkscape. I used these steps as I have documented previously: clean-traces-in-inkscape.

The final SVG works well on many levels, including the fact that it can be viewed directly here and simply left click save as and you can use the file too!

3 Workpiece steps in Easel CAM F.Cu layer milling 1hr 16min! Longest board so far. Holes for vias, mounting and ESP32 heatsink Edge cuts, including clearance for antenna I overlay-ed the inkscape graphics over my KiCad board to make sure I didn’t delete any traces to be milled.

Milling

I milled a piece of scrap machinable wax into a base for mounting my circuit boards to. I used Suretape DF 65 tape. This tape works very well for holding down machinable wax and circuit boards. I printed on paper my board design life size, this allowed me to see where to avoid putting tape under through holes where the end mill would get gummed up cutting into tape. Double checking placement Work piece X postion Work piece Y postion I milled my board on a Inventables Carvey desktop CNC mill. This machine was kindly donated by Zach Kaplan of Inventables! I really like the ease of use, and lighting of the Carvey. Here are the tools I use for milling. Note rocket shaped air blaster, this thing is great for keeping my collets and tooling clean! This air rocket was a gift from my friend Walter. 0.25mm (0.0100”) Taper stub end mills for trace pocketing

Feed Rates

Feed Rate For 0.0100” (0.25mm) dia Tapered Stub End Mill The calculated feed rate for my 0.0100” (0.25mm) dia Tapered Stub End Mill is:

0.0100” (0.25mm) dia - multiply your peak spindle RPM by 0.00328 with 20 IPM (500 mm/min) z-axis plunge rate.

12000 * 0.00328 = 40 IPM or 1000 mm/min

So Cut Settings for Easel are:

Manual: Feed rate = 1000 mm/min Plunge rate = 500 mm/min Depth per pass = 0.3 mm All other settings as default.

Ready to send g-code! Milling commences! Pockets around traces milled! I always completely mill out pockets around my traces for a few reasons. 1. I like how it looks 2. I have my own mill at home, so time is not an issue. 3. It’s less likely I’ll short traces to ground. Here I am using a print out from KiCad to make sure I didn’t miss any features on my traces, before I move ahead. Finished board with mounting and via holes and edge cut. Wow! I am really exited to have gotten to this point. It took me several years to learn about Grbl and designing my own CNC control board! From the start of my board design to this point took me about one month of work! Close up of board! This board is so big that I need a larger board vise to hold it!

Stuffing

Stuffing isn’t just for Turkey’s!

Interactive BOM

I used the BOM below to hand pick and place my components.

Above: Click image to access the HTML Interactive BOM (iBOM) generated by KiCad.

I printed the iBOM and out some clear double stick tape on it. Then I selected the components from my Stanley bins and my Digi-Key order and stuck them in the iBOM

Soldering

Then soldered everything on my board.

My new Rx prescription safety glasses with clip on magnifiers really help me see much better when working with small items.

Testing

I used the KiCad “Net Inspector” to highlight individual nets, for trouble shooting. I used my USB to serial programmer and plugged it into the FTDI header on my board.

Next I checked my board for shorts with a multi-meter. There were no shorts.

I jumped the 5vdc pin to the 3.3vdc regulator to power the ESP32 during programming. I need to add a jumper to switch between 12-27vdc and 5vdc in the future.

I powered up the FTDI cable with my USB hub and verified that 5v and 3.3vdc were present, they were and the measurements were 5.05 and 3.27vdc. I also felt the chips on the board to see if they were not hot, indicating a short or other issue.

I then ran a lsusb command to make sure I could see the USB to Serial converter, and I got the expected response: Bus 003 Device 006: ID 0403:6001 Future Technology Devices International, Ltd FT232 Serial (UART) IC

ESP32 Bootloader Mode

The ESP32 must be put in bootloader mode before uploading any type of code. With a FTDI Cable connected to provide power, put the ESP32 into bootloader mode by:

  1. Press and hold Switch 2 Program (GPIO0) hold though next step
  2. Clicking Reset button Switch 1
  3. Releasing the Switch 2 Program

Next I fired up the Arduino IDE and uploaded a hello world Serial ESP32 program.

void setup() {
   Serial.begin(115200);
}

void loop() {
   Serial.println("Hello World");
   delay(2000);
}

I uploaded the program above (after making sure Tools Board ESP32 Dev Module was selected) I then opened serial monitor in the ardunio ide to see the response from the ESP32. And I got!:

NOTHING! :(

Let’s check that the buttons work and that the 3v is on the power pin of the ESP32.

3.29vdc was getting to pin 2 of the esp 32. Let’s check buttons.

Well what do you know! The Reset button for some reason did not have a trace that connected to ground in KiCad. I’m wondering if this had to do with the fact that I started with a copy of another project and then modified that project for this board. I’m not sure. So I added a jumper from the switch to GND to fix the issue.

I then put the board in programming mode, and tried uploading the hello world Serial ESP32 program above again. The program uploaded. I opened serial monitor and pressed the reset button to run the program… and got:

```rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:1 load:0x3fff0030,len:1324 ho 0 tail 12 room 4 load:0x40078000,len:13508 load:0x40080400,len:3604 entry 0x400805f0 Hello World Hello World Hello World Hello World Hello World Hello World Hello World Hello World Hello World Hello World

Brownout detector was trigg⸮⸮⸮⸮~```

Awesome, I fixed my board! This was one of the shorter trouble shooting sessions I’ve had! Next time I’ll design the whole board from scratch in KiCad! “The Brownout detector was trigg⸮⸮⸮⸮~” in the above hello world, was because I powered down the board mid program.

Ok let’s see if I can load up something more complex, like FluidNC! But first I need to take a nap, I’ve been up since 3:30am and it’s now 4:22pm!

Setting Stepper Current

before connecting stepper motors it’s a good idea to set current limits on the stepper drivers. In my case I have 8825 polou compatible drivers with potentiometer adjustment. I found this site whcih explined the process very well: DRV8825 Adjust Stepper Current

The driver boards have 100mOhm resistance so the following formula applies”

Imot = 2 * Vref Or Vref = Imot / 2

Note the DRV8825 driver boards I’m using have a max of 2.2A, so on my X & Y stepper motors they will be slightly under powered

So

Stepper 100mΩ Divider Target Amps Vref
NEMA 28 X&Y Axes KL23H251-28-4A 2 2.2 A 1.1 V
NEMA 17 Z Axis SM42HT47-1684B 2 1.68 A 0.84 V

Micro Stepping

Z 2x Y 4x X 4x

Jumpers

Axis MODE0 MODE1 MODE2 Microstep Resolution Z High Low Low Half step X&Y Low High Low 1/4 step

FluidNC

Next I went to the FluidNC Wiki to learn how to upload the firmware to my board.

I followed the instructions at: https://github.com/bdring/FluidNC/wiki/FluidNC-Compiling to install the latest pre-compiled version of FluidNC.

Here are my actual steps I took on Linux Mint beyond what is explained on the wiki above:

  1. Put the ESP32 in programming mode by holding the PRG button, double click the RST button and then release the PRG button.
  2. Open a terminal window in the same directory of the unzipped files
  3. Since this is the first time programming this board, run the command: sh install-fs.sh
  4. Note: You may need to put the ESP32 in programming mode again during the step above when “Connecting........__” appears
  5. I then uploaded the WiFi firmware with the command sh install-wifi.sh
  6. Note: You may need to put the ESP32 in programming mode again during the step above when “Connecting........__” appears
  7. I then followed the instructions on the wiki

See the FAQ to learn more about the Connecting .........._..... issue.

At the completion of the sh install-wifi.sh command the following trailer code was displayed and the board entered FluidNC terminal:

Starting fluidterm
--- Fluidterm on /dev/ttyUSB0  115200,8,N,1 ---
--- Quit: Ctrl+] or Ctrl+Q | Upload: Ctrl+U | Reset: Ctrl+R ---

[MSG:INFO: FluidNC v3.4.7]
[MSG:INFO: Compiled with ESP32 SDK:v4.4.1-1-gb8050b365e]
[MSG:INFO: Local filesystem type is SPIFFS]
[MSG:WARN: Cannot open configuration file:config.yaml]
[MSG:INFO: Using default configuration]
[MSG:INFO: Axes: using defaults]
[MSG:INFO: Machine Default (Test Drive)]
[MSG:INFO: Board None]
[MSG:INFO: SPI not defined]
[MSG:INFO: Stepping:RMT Pulse:4us Dsbl Delay:0us Dir Delay:0us Idle Delay:255ms]
[MSG:INFO: Axis count 3]
[MSG:INFO: Axis X (-1000.000,0.000)]
[MSG:INFO: Axis Y (-1000.000,0.000)]
[MSG:INFO: Axis Z (-1000.000,0.000)]
[MSG:INFO: Kinematic system: Cartesian]
[MSG:INFO: Using spindle NoSpindle]
[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]

Grbl 3.4 [FluidNC v3.4.7 (wifi) '$' for help]
[MSG:INFO: '$H'|'$X' to unlock]

Next I was able to talk to it, using $ commands:

  1. $ displays the command list
  2. $S displays the current parameters and there S commands to set them.

FluidTerm

FluidTerm or FluidNC terminal is run by issuing the command sh fluidterm.sh this brings you into FluidNC terminal where you can configure your board and then save those parameters.

Next I wanted to connect to my boards webui. To do this I read FluidNC Wifi and Bluetooth Setup

In FluidTerm I entered the command: $STA Which gave the following report back:

$Report/Status=1 $Sta/SSID= $Sta/Password=** $Sta/IPMode=DHCP $Sta/IP=0.0.0.0 $Sta/Gateway=0.0.0.0 $Sta/Netmask=0.0.0.0

Next I tried the $AP command which returned:

$AP/SSID=FluidNC $AP/Password=** $AP/IP=192.168.0.1 $AP/Channel=1

** covers the default password which is 12345678

So I went and connected via WiFi to FluidNC, supposedly this should end up with the launch of a webui. But that didn’t happen. I needed to change the IP since 192.168.0.1 was the same as my WiFi router.

I wanted to setup my board to work on my WiFi network, so I issued the following commands

$AP/SSID=MTekFluidNC $AP/IP=192.168.0.242 $AP/Channel=3 $WiFi/Mode=AP

$Sta/SSID=242_2G $Sta/Password=your_wifi_router_password $Sta/IPMode=DHCP $Sta/IP=192.168.0.242 $Sta/Gateway=192.168.0.1 $Sta/Netmask=255.255.255.0

I then ran a $AP and $STA commands and the board echoed back:

$AP/SSID=MTekFluidNC $AP/Password=** $AP/IP=192.168.0.242 $AP/Channel=3

$Report/Status=1 $Sta/SSID=242_2G $Sta/Password=** $Sta/IPMode=DHCP $Sta/IP=192.168.0.242 $Sta/Gateway=192.168.0.1 $Sta/Netmask=255.255.255.0

I then pressed Ctrl+] to exit fluid terminal.

FluidTerm works well for initial setup, but it was slow going.

WebUI

Time to try webui for FluidNC! I rebooted my board, and on my laptop shut down wired networking and connected to MTekFluidNC via WiFi. Then I went to the ip address I assigned earlier 192.168.0.242

And bam! the WebUI appeared! Cool

SHORT fries board!

Well I had a bad stepper driver module with a short in it, and it fried my regulator and ESP32 chip! Frack! Here is a thermal image that I realized later was telling me what was going on :(

3PakCNC Version 2!

I decided to re-design the 3PakCNC board. I needed to make some correction and changes anyway, my micro sd card slot was upside down, many of my capcitors were very far from what they should filter. I also used way too large of a voltage regulator, with a 3amp output. I think this led to my parts being fried with high current, rather that just heating up a bit and shutting down. I will use a 1.5A regulator this time.

KiCad EDA

Schematic

PCB Design

CAD Files

Following are the SVG files I used to mill my board: Right click and save to use these files to mill your own 3PakCNCv2 board.

CAM

Milling

Stuffing

Rivet Vias

Dan peened these rivets a little too hard, almost cutting through the copper cladding.

Testing

Soldering

Walter says, “How can we use scrap around us? How can we use the scrap around us!” Thinking this way I thought how can I scrap fab. I used the flags that I usually throw out from small crimp connectors to create a solderable trace jumper!

Interactive BOM v2

I used the BOM below to hand pick and place my components.

Above: Click image to access the HTML Interactive BOM (iBOM) generated by KiCad.

FluidNC Settings

Next I went to the FluidNC Wiki to learn how to upload the firmware to my board.

I followed the instructions at: https://github.com/bdring/FluidNC/wiki/FluidNC-Compiling to install the latest pre-compiled version of FluidNC.

Here are my actual steps I took on linux mint beyond what is explained on the wiki above:

  1. Put the ESP32 in programming mode by holding the PRG button, double click the RST button and then release the PRG button.
  2. Open a terminal window in the same directory of the unzipped files
  3. Since this is the first time programming this board, run the command: sh install-fs.sh
  4. Note: You may need to put the ESP32 in programming mode again during the step above when “Connecting........__” appears
  5. I then uploaded the wifi firmware with the command sh install-wifi.sh
  6. Note: You may need to put the ESP32 in programming mode again during the step above when “Connecting........__” appears
  7. I then followed the instructions on the wiki

See the FAQ to learn more about the Connecting .........._..... issue.

At the completion of the sh install-wifi.sh command the following trailer code was displayed and the board entered FluidNC terminal:

Starting fluidterm
--- Fluidterm on /dev/ttyUSB0  115200,8,N,1 ---
--- Quit: Ctrl+] or Ctrl+Q | Upload: Ctrl+U | Reset: Ctrl+R ---

[MSG:INFO: FluidNC v3.4.7]
[MSG:INFO: Compiled with ESP32 SDK:v4.4.1-1-gb8050b365e]
[MSG:INFO: Local filesystem type is SPIFFS]
[MSG:WARN: Cannot open configuration file:config.yaml]
[MSG:INFO: Using default configuration]
[MSG:INFO: Axes: using defaults]
[MSG:INFO: Machine Default (Test Drive)]
[MSG:INFO: Board None]
[MSG:INFO: SPI not defined]
[MSG:INFO: Stepping:RMT Pulse:4us Dsbl Delay:0us Dir Delay:0us Idle Delay:255ms]
[MSG:INFO: Axis count 3]
[MSG:INFO: Axis X (-1000.000,0.000)]
[MSG:INFO: Axis Y (-1000.000,0.000)]
[MSG:INFO: Axis Z (-1000.000,0.000)]
[MSG:INFO: Kinematic system: Cartesian]
[MSG:INFO: Using spindle NoSpindle]
[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]

Grbl 3.4 [FluidNC v3.4.7 (wifi) '$' for help]
[MSG:INFO: '$H'|'$X' to unlock]

Next I was able to talk to it, using $ commands: 1. $ displays the command list 2. $S displays the current parameters and there S commands to set them.

FluidTerm

FluidTerm or FluidNC terminal is run by issuing the command sh fluidterm.sh this brings you into FluidNC terminal where you can configure your board and then save those parameters.

Next I wanted to connect to my boards webui. To do this I read FluidNC Wifi and Bluetooth Setup

In FluidTerm I entered the command: $STA Which gave the following report back:

$Report/Status=1 $Sta/SSID= $Sta/Password=** $Sta/IPMode=DHCP $Sta/IP=0.0.0.0 $Sta/Gateway=0.0.0.0 $Sta/Netmask=0.0.0.0

Next I tried the $AP command which returned:

$AP/SSID=FluidNC $AP/Password=** $AP/IP=192.168.0.1 $AP/Channel=1

** covers the default password which is 12345678

So I went and connected via WiFi to FluidNC, suposedly this should end up with the launch of a webui. But that didn’t happen. I needed to change the IP since 192.168.0.1 was the same as my WiFi router.

I wanted to setup my board to work on my wifi network, so I issued the following commands

$AP/SSID=MTekFluidNC $AP/IP=192.168.0.242 $AP/Channel=3 $WiFi/Mode=AP

$Sta/SSID=242_2G $Sta/Password=your_wifi_router_password $Sta/IPMode=DHCP $Sta/IP=192.168.0.242 $Sta/Gateway=192.168.0.1 $Sta/Netmask=255.255.255.0

I then ran a $AP and $STA commands and the board echoed back:

$AP/SSID=MTekFluidNC $AP/Password=** $AP/IP=192.168.0.242 $AP/Channel=3

$Report/Status=1 $Sta/SSID=242_2G $Sta/Password=** $Sta/IPMode=DHCP $Sta/IP=192.168.0.242 $Sta/Gateway=192.168.0.1 $Sta/Netmask=255.255.255.0

I then pressed Ctrl+x to exit fluid terminal.

FluidTerm works well for initial setup, but it was slow going.

WebUI

Time to try webui for FluidNC! I rebooted my board, and on my laptop shut down wired networking and connected to MTekFluidNC via WiFi. Then I went to the ip address I assigned earlier 192.168.0.242

And bam! the WebUI appeared! Cool

Foam Crawler Configuration

GRBL ESP32 Settings Chart

Label Value Help
$0 3 Step pulse, microseconds
$1 250 Step idle delay, milliseconds
$2 0 Step port invert, mask
$3 0 Direction port invert, mask
$4 0 Step enable invert, boolean
$5 1 Limit pins invert, boolean
$6 0 Probe pin invert, boolean
$10 1 Status report, mask
$11 0.01 Junction deviation, mm
$12 0.002 Arc tolerance, mm
$13 0 Report inches, boolean
$20 0 Soft limits, boolean
$21 0 Hard limits, boolean
$22 0 Homing cycle, boolean
$23 3 Homing dir invert, mask
$24 200 Homing feed, mm/min
$25 2000 Homing seek, mm/min
$26 250 Homing debounce, milliseconds
$27 1 Homing pull-off, mm
$30 10000 Max spindle speed, RPM
$31 0 Min spindle speed, RPM
$32 0 Laser mode, boolean
$N1
$N0
$100 13.333 X steps/mm
$101 5.899 Y steps/mm
$102 50 Z steps/mm
$110 8000 X Max rate, mm/min
$111 8000 Y Max rate, mm/min
$112 4000 Z Max rate, mm/min
$120 3000 X Acceleration, mm/sec^2
$121 3000 Y Acceleration, mm/sec^2
$122 200 Z Acceleration, mm/sec^2
$130 610 X Max travel, mm
$131 1220 Y Max travel, mm
$132 35 Z Max travel, mm

I’ll use the chart above to transfer settings to FluidNC

Configure

Upon startup of the FluidNC WebUI the following appears in the Commands window of the FluidNC WebUI:

$/axes/x/max_travel_mm
$/axes/x/homing/mpos_mm
$/axes/x/homing/positive_direction
$/axes/y/max_travel_mm
$/axes/y/homing/mpos_mm
$/axes/y/homing/positive_direction
$G
$/axes/x/max_travel_mm=1000.000
ok
$/axes/x/homing/mpos_mm=0.000
ok
$/axes/x/homing/positive_direction=true
ok
$/axes/y/max_travel_mm=1000.000
ok
$/axes/y/homing/mpos_mm=0.000
ok
$/axes/y/homing/positive_direction=true
ok
[GC:G0 G54 G17 G21 G90 G94 M5 M9 T0 F0 S0]
ok
<Alarm|MPos:0.000,0.000,0.000|FS:0,0|WCO:0.000,0.000,0.000>
<Alarm|MPos:0.000,0.000,0.000|FS:0,0|Ov:100,100,100>
<Alarm|MPos:0.000,0.000,0.000|FS:0,0>

Next I clicked the “clear alarm” bell button in the GRBL window of the ESP3D for FluidNC WebUI

the following then appears in the Commands window of the FluidNC WebUI:

$X
[MSG:INFO: Caution: Unlocked]
ok

Next I went to the FluidNC tab, and then selected the Config Items button. And used the GRBL ESP32 Settings Chart to setup the config box items. You will need to customize these settings for your machine as well.

Troubleshooting

A weird thing was happening, from the FluidNCWebUI in chrome, I first cleared the alarms by clicking the bell icon to enable the steppers. Then I tried jogging X, Y and Z. However, whenever I sent a command to move any axis the steppers would jerk and nothing would happen. Then I noticed that the steppers would enable a few seconds after the jog completed and the current would spike on my lab power supply. During a long jog travel of the X axis, I tried spinning the x stepper shaft and it turned easily, then when the move stopped the stepper would activate and I could no longer turn the shaft. I also noted a very low current draw when jog commands were in progress. It seemed like the steppers were being disabled during jog moves.

I decided to post this issue on the fluidNC Discord channel:

FluidNC Discord

I posted my issue on fluidnc_help thread of the FluidNC Discord. Here is the dialog:

MTek (They/He) — Today at 6:44 PM I’m getting a weird response on the new board I designed. When I run a jog command the steppers disable themselves instead of enable themselves. I can spin the stepper shafts by hand, then when the jog commands stop the steppers lock again.`

daxliniere — Today at 6:50 PM Sounds like you need to invert the signal between ESP32 and your stepper drivers. MTek (They/He) — Today at 6:51 PM Thanks! I was looking for a config setting to do that, but can’t find it 😦

daxliniere — Today at 6:52 PM Add :low after the pin. e.g. Change shared_stepper_disable_pin: I2SO.0 to shared_stepper_disable_pin: I2SO.0:low

I went to my config.yaml file and searched for shared_stepper_disable_pin: and found

axes:
  shared_stepper_disable_pin: gpio.13:low

I changed this line to

shared_stepper_disable_pin: gpio.13

And my board started moving all the stepper motors via the FluidNCWebUI! Amazing! Thanks daxliniere!

Hero Shot

Success! After 8 weeks of work and two complete versions of my board the steppers are now working! I almost cried when things worked. This is by far one of the most complex electronic projects I have ever done. I think I may be hooked!

Here is a video of the stepper motors moving and tuned up for the Foam Crawler CNC Machine:

Wow! I just built my own cnc control from scratch! Now I can use this board to control my final project Foam Crawler CNC machine!

Design Files and code

KiCad FluidNC

Notes for future projects

ESP32 FabKit

Eventually I will make my own version of a ESP32 devkit module, called the “ESP32 FabKit Module” it will be simpler than espressif’s devkit and will use serial programming to simplify the module.

FabStick

I will also make my own silent step stick stepper motor driver boards. I will add these sub-boards to the 3PakCNC v2 motherboard.

Back to Home Page