Raspberry Pi 4B LinuxCNC: Wiring the Mesa 7I96S Ethernet Motion Control, Closed-Loop CL57T Stepper Driver, and Nema 23 Stepper Motor
This post documents the wiring of the Mesa 7I96S Ethernet motion control STEP/IO Step & Dir plus I/O card to the CL57T closed-loop stepper driver, which in turn controls the closed-loop Mema 23 stepper motor.
🐧 Index of the Complete Series.
![]() |
---|
Raspberry Pi 4B LinuxCNC: Wiring the Mesa 7I96S Ethernet Motion Control, Closed-Loop CL57T Stepper Driver, and Nema 23 Stepper Motor |
I am just an ordinary computer programmer and not trained in any of the electronic engineering disciplines. This LinuxCNC project is a learning process for me. This post is not meant to be a tutorial or instructional guide; it is my own documentation so I will not forget what I have learned.
I am not to be held responsible for any damages or injuries resulting from using the information presented in this post.
This post is a continuation of the previous posts in this series. Please refer to them for information on hardware mentioned in this post but not discussed here. We will only discuss hardware introduced in this post. First, we will describe the hardware. Next, we will discuss the wiring, illustrated with diagrams. Finally, we will review some background stories and referenced literature.
❶ I chose to use a closed-loop stepper motor driver and motor. The driver is a
CL57T.
The accompanying printed manual states it is version 4.1
(CL57T-V41).
I can’t find the PDF manual for version 4.1
, only for
version 4.0.
The stepper motor is a Mema 23 with a shaft diameter of 8mm.
I bought a single set of the CL57T-V41 Driver and Nema 23 Stepper Motor from the StepperOnline Australian eBay store. I still need another three sets. I’m feeling uneasy about not being able to get them when the time comes, so I am keeping my fingers crossed 😂.
Presently, I don’t yet have a proper power supply for this stepper motor. I’m using a DC 30V 10A Variable Bench Lab Power Supply for learning purposes. I was not sure if this power supply was appropriate, so I made an inquiry to StepperOnline and received a response the next day confirming that it is okay for testing purposes. After I received the set, I actually made another three technical inquiries, and the assistance I received was simply impressive.
❷ CL57T-V41 Driver, Nema 23, and Mesa 7I96S Connection
⓵ This StepperOnline page
Wiring Diagram for Closed-Loop Stepper Motor
shows how to wire a CL57T-V41 driver to a closed-loop Nema 23 stepper motor, power supply, and controller
:
![]() |
---|
CL57T-V41 to a Controller, a Nema 23 and Power Supply wiring diagram |
The controller
in the diagram can be a Raspberry Pi 4B or
the Mesa 7I96S STEP/IO Step & dir plus I/O card, among other devices.
I first learned how to control the driver and the stepper motor using the Raspberry Pi 4B and Python,
which we will briefly describe in a later section.
⓶ Page 12 of the Mesa 7I96S manual, section “STEP/DIR INTERFACE,” describes how to connect motor drivers to the 7I96S. I followed the instructions and presented my wiring to the forum for help. It turned out I did not get it correct. These two forum threads set me in the right direction:
The correct wiring is illustrated in the diagram below:
![]() |
---|
CL57T-V41 Closed-Loop Stepper Driver to Mesa 7I96S Channel 1 |
The image below shows a close-up of the wiring:
![]() |
---|
CL57T-V41 Closed-Loop Stepper Driver to Mesa 7I96S Channel 1 Close-Up |
The CL57T-V41 driver is connected to the Mesa 7I96S Step/Dir Channel 1
.
At the time of this writing, I have already got the Mesa Configuration Wizard application,
PnCconf,
to recognise this single stepper motor as the X-axis, and PnCconf
is able to run (tune) this stepper motor.
I plan to have two stepper motors for the Y-axis, wired to
Channel 2
and Channel 3
, respectively.
The Z-axis stepper motor is wired to Channel 4
, leaving
Channel 5
unused.
👉 Regarding the CL57T-V41 driver 5V/24V S3-Selector
switch, it must be set to 5V for the Mesa 7I96S, as illustrated in the photo below:
![]() |
---|
The CL57T-V41 driver 5V/24V S3-Selector Switch Set to 5V |
👉 Please note that when used with a Raspberry Pi 4B, the CL57T-V41 driver 5V/24V
S3-Selector
switch is also set to 5V.
In this section, I describe how I was led to the CL57T-V41 closed-loop driver, Nema 23, and Mesa 7I96S motion controller. Then, I briefly discuss my attempt to control the CL57T-V41 and Nema 23 using a Raspberry Pi 4B and Python.
⓵ When I first started researching stepper motors, I found this video on the MrPragmaticLee channel, Controlling Large Stepper Motor With Raspberry Pi, very helpful. Initially, I thought I would go with an open-loop stepper driver.
Further studies led me to this decisive video: DIY CNC 010 - Closed Loop NEMA Wiring and Mach3 Setup by thehardwareguy. After watching it, I made up my mind to go with the same closed-loop stepper driver and motor, which is the CL57T-V41 driver and Nema 23. I keep referring back to this video as I progress and need to carry out the next step. 🙏 For the electronics, I am going to adhere to his instructions to the letter.
Initially, I thought I would use the Mach3
application as well.
However, further research led me to
LinuxCNC, which,
according to forum posts, offers better performance. It is also free and can run on Raspberry Pi 4B and 5. The drawback is that there is no cheap LinuxCNC breakout board available. After some study, it became apparent that the Mesa 7I96S is the clear choice. Instead of paying for a Mach3
license, I decided to pay for the Mesa 7I96S card.
I already have a Raspberry Pi 4B. I ordered and received the CL57T-V41 Driver and Nema 23 Stepper Motor set toward the end of October 2024. (I had the Mesa 7I96S card on hand on 22/01/2025.)
⓶ After some more research and studies, as well as asking StepperOnline for help, I was able to get my Raspberry Pi 4B to run with the CL57T-V41 driver and Nema 23 stepper motor. The Description
section of my following video includes the complete Python code and other essential information:
The image below shows the wiring diagram used in the video:
![]() |
---|
Raspberry Pi 4B and the CL57T-V41 Closed-Loop Stepper Driver |
I also sought help from the forum to further my understanding of microstepping: Please help with Nema 23 closed loop CL57T-V41 driver Microstep Switches.
This video shows my first attempt with the CL57T-V41 driver, where I was not yet able to work out the microstepping: Raspberry Pi 4 Model B, CL57T Driver, Nema 23 Closed Loop Stepper Motor 3Nm (424.83oz.in)
I should have done a post on this subject, I thought about it… But it never eventuated. When I started this project in the second week of October 2024, everything was a bit chaotic. I frequently switched between researching hardware and software. I can’t clearly remember the exact sequence of what I have done.
❹ This post is documentation for myself so that I will not forget what I have done. I have taken great care in my learning process, and hopefully, there are not too many major errors and mistakes in my understanding. I document bits and pieces of my progress with this project in the hope that, if I ever get to successfully finish it, there will be a complete set of diagrams and steps that might help some future new starters in some way. I also believe that, being a non-professional in this area, the information I present can be easily related to by people on the same page.
If you happen to read this post, thank you for your time, and I hope I did not waste it. Stay safe, as always.
✿✿✿
Feature image source:
- https://commons.wikimedia.org/wiki/File:Debian_12_%28Bookworm%29_-_GNOME_desktop.png
- https://www.instructables.com/Easy-Raspberry-Pi-Based-ScreensaverSlideshow-for-E/
- https://store.mesanet.com/index.php?route=product/product&product_id=374
- https://forum.linuxcnc.org/show-your-stuff/32672-linuxcnc-logo?start=20#gallery-6