Adding Reverse Spindle rotation to AvidCNC & Mach 4

Really grateful for these instructions. I finally have an electrician coming next week to do a panel upgrade and put in a 240V plug for my spindle, so I can hopefully get to this soon.

Just curious, what’s driving you guys’ interest in reverse rotation? Mine is in cutting solid wood with the grain.

Many thanks for the feedback. One of the problems with trying to reverse engineer a working system is missing the details of how you got there. Totally forgot about reprogramming the VFD. I will update the document. Glad things are working for you.

Hi Stephen, as mentioned above, this thread started from a desire/requirement to use left-hand cutting bits. Line boring bits are often LH

I did this a few days ago so I could try out a RapidChange ATC. I pretty much did the same wiring as already shown, but instead of controlling the ESS pin in an M4 macro, i just defined is as the mach4 reverse function and then M4 will work as-is w/o making a special macro.

Here’s the documentation.

1 Like

Very nice implimentation. Cleaner than having to have an extra macro. Would have to dig back through my screen set code to see if my Reverse/Forward buttons would still work without the flags set in my M4 macro.

Thanks Jim. I’ve used a relay module as well. Jumper set on port 3 of the ESS to provide +5V to P3-pin 24 which is where I’ve taken the module power.

For neatness, one of these little breakout boards mounts to a DIN rail and (in may case) can be connected to the empty port. 3 on the ESS - https://www.amazon.com/Davitu-Terminals-Interface-Connector-Breakout/dp/B087C3NBYC/ref=sr_1_7?crid=HOUAXNUJMHI0&keywords=IDC26P+DIN+Rail+Module&qid=1706086464&sprefix=idc26+male+header+breakout+board%2Caps%2C330&sr=8-7

Just have to be careful as Warp9 number their pins differently to the standard, so the breakout board pin labels aren’t correct.

yep, both M3 and M4 from the MDI (I haven’t run a file yet) will toggle the spindle on button.

Ya, that causes a lot of confusion. Thats why I like the little breakout board AVID did for the laser. They silkscreened the actual port numbers (and the grounds) on the pins, and brought out the whole port, so its a lot easier to keep them straight.

Ok, Hope this is the final(ish) update. Using Jim’s suggestion I have removed the need for the external M4, M5, and M30 macros. Fussed a bit with the screen and have updated the document to reflect the current setting for the ESS pins. Be aware that Jim and I have similar implementations but the wiring and pin configurations are subtly different. If you are using my setup follow the attached documentation carefully. Enjoy!
ScreenOverview.pdf (6.0 MB)

Files.zip (3.2 MB)

AVID Mach 4 Hardware_Software Setup.pdf (4.3 MB)

K. Some housekeeping to do… I think.

@jjneeb - On your slide 3, “Main Control Box” section, you have the relay COM connected to pin 11 of the control cable. I think this should be pin 8. (I know that you actually pick up the DCM signal from P34 of the CRP850 breakout board rather than the control cable, but your diagram had me puzzling over why you were using the analogue 10Vref - which is what’s on pin 11!)

@barunita - I’m not sure if you’ve tried the revised setup without your custom macros, but I don’t think it will work. This is because you and Jim are approaching the FWD/REV signals slightly differently.
You’re taking the ‘Spindle On’ signal, and using the relay to either send this to the FWD or REV input on the VFD.
Jim is leaving the ‘Spindle on’ circuit alone (apart from changing its name to Spindle FWD), and then creating a completely different circuit for REV which is activated by Mach4’s built-in M4.

I think the two circuits look like this:

The other difference (I think) is that @barunita is using p1-17 to directly energise the relay coil, whereas @jjneeb is using a relay module, so P3-5 triggers the module rather than directly energising the coil.

I’ve used a module, tried both techniques, and both work although I think you do need the custom macros for @barunita 's. I’ve now set it up using Jim’s wiring.
My module takes it’s 5V and Gnd from pins 26 and 25 of port 3 (remember to set jumper JP4 on the ESS to provide the 5V to P3-26), and I’ve configure P3-2 as my signal pin.

I can issue an M3 and M4 in the MDI and get forward and reverse, so #cheering

Thanks to both of you for the input :wave:

Hi @jjneeb !
Awesome work, well documented. Any feedback on RapidChange ATC? I would like to give it a try too.

As noted, Jim and I have used different relay configurations. I have fully tested mine without the M4, M5, and M30 macros and it works. Look carefully at the ESS pin configuration and you will see there is a difference there too.

I use “most” of Jim’s pin configuration. Spindle Reverse is now configured to energize the relay.

Deleted the photos/entries I posted at the beginning of the thread that are now out of date. They no longer matched reality and might have lead to confusion.

Glad this has been helpful.

Good catch, that was a documetation error (late night line drawing). I have updated the slides. Thanks for looking htem over in detail.

I haven’t received it yet. I will be testing some macros from them and getting ready for testing in the meanwhile. I will post some videos as I go through it.

A word of caution on driving relay coils directly with ESS port pins, vs. using a powered module.

The ESS pins are spec’d at about 32mA so the coil draw would have to be less than that. Second, a relay coil can kick back some really nasty noise spikes when they are turned off that can damage the I/O driver on the board. So these little relay modules are nice because they have a built in driver to buffer the current so the load to the ESS is only a couple of mA, and kickback diodes for the voltage spikes. Some also have an LED so you can see when they are activated. The other nice thing is they usually have nice screw terminals to make wiring easier. Then only downside is you have to provide one more connection for power.

Good feedback on noise and current draw. Digging around in my VFD box I found that I have actually used an isolation relay😳. Exactly the same as the one Jim specs in his writeup. Will have to see where it gets its power from. I will update my drawings when I have some time.

I seem to remember something about the last 10% of a job takes 90% of the time…

Updated the ScreenOverview document in the previous post and have added the CNCDepot document for anyone setting up an ATC with their instructions. Also added a better schematic of what I actually have in my machine.

Great minds think alike Jim. Mine is just is not as great as it used to be :wink:
Had forgotten what was used in my setup and actually had taken spikes and current draw into consideration. Thanks again for pointing out the problems with the original diagram I had posted.


Here’s an STL file to 3D-print a DIN rail mount for the relay module. I’ve included threaded M3 holes and a bit of a standoff as my modules have quite prominent soldered pins on the bottom.
I printed it in PLA on it’s side, 20% infill, brim, no supports.
It needs to be slid onto the DIN rail, and locks with another M3 screw.

DIN_Mount_Relay_Module.stl (2.0 MB)

Made minor updates to screen and M6 macro in the zip file above Files.zip

Utility tab is now more export/import friendly

Hi all, thank’s for your work, very helpfull and impressive !
Do you know if th RapidChange ATC come with all the Mach4 Macros or are you planning to create your own ?
How do you manage the spindle speed requirement 1200 to 1500 rpm ?