I’m an engineering student designing a 6-axis CNC controller for my milling machine (2.2kW spindle, 24k RPM). This is my first PCB design, and I’ve spent time cleaning up the schematic and layout based on initial feedback.
Project Specs:
MCU: ESP32-S3 (FluidNC).
I/O: MCP23017 via I2C for extra axes and limit switches.
Isolation: TLP281-4 optocouplers for all Step/Dir signals.
Power: 24V input with an LM2596 buck converter for 5V/3.3V rails.
Specific Questions:
Optocouplers: I initially used 2.2k resistors for 3.3V logic, but I’m worried about speed. I’m considering 470 ohm instead for better switching performance at high RPM. Thoughts?
EMF Noise: With a 2.2kW spindle, is my grounding strategy for the ESP32 sufficient?
USB Block: I’ve corrected the CH340C VCC connection to the +5V rail. Does the decoupling look okay?
TLP281 has a Toff time of 40 uS at 5V. That puts a hard limit of 25 kHz on any signal though it’s likely lower than that if driving at 3.3V. You might be able to get better performance if you play with the pullup resistor. Most stepper drivers support up to at least 200 kHz. In comparison an Arduino running Grbl is limited to about 30 kHz which is generally considered insufficient by the CNC crowd.
A lot of stepper drivers work better with 5V inputs.
BTW, the schematic you posted is so low rez I can’t get much from it.
Thank you for the advice, I’ll definitely check that! As a new user, I wasn’t able to upload a PDF of the schematic, so I apologize for the low quality. I will repost a high-resolution version (PDF) very soon.
The opto-coupler’s output is a BJT, so when it is driven into saturation the turn-off time is heavily governed by how quickly minority charge carriers in the base region are removed. To speed up this process, you can use a lower value for the collector resistance and/or reduce the internal LED drive current by increasing the 2.2k resistor value.
@phil_from_seattle gave you the datasheet value of 45ms for turn-off time, and while turn-off time is the most critical parameter for switching speed, it’s important to know that this value is just a “typical" value and is valid only for certain circuit configuration (as I explained above).
If you really need high-speed communication, perhaps a better solution is to use an opto-coupler designed for high speed operation.