Log in

View Full Version : Wiring an enable / disable switch for each driver



mbridge87
20-10-2020, 01:08 PM
Hey everyone,

I've been told it's really useful to add enable/disable switches for each driver on a motion control system but I don't understand how to wire this. I'd really appreciate some guidance.

Firstly here are the drivers I'm using:

3DM2283T - https://www.omc-stepperonline.com/digital-stepper-driver/digital-stepper-driver-2-1-11-7a-176-253vac-for-3-phase-nema-34-42-stepper-motor.html?sort=p.price&order=DESC

DM2282T - https://www.omc-stepperonline.com/digital-stepper-driver/digital-stepper-driver-0-5-8-2a-180-240vac-for-nema-34-42-stepper-motor.html?sort=p.price&order=DESC

DM542T - https://www.omc-stepperonline.com/digital-stepper-driver-10-42a-20-50vdc-for-nema-17-23-24-stepper-motor-dm542t.html?search=Digital%20Stepper%20Driver%201. 0-4.2A%2020-50VDC%20for%20Nema%2017%2C%2023%2C%2024%20Stepper% 20Motor

I'm using Mantis and have a very simple BOB (pictured).

29022

The switches and 5v PSU I've found are below although I'm not actually sure if these are appropriate.

Switches - https://uk.rs-online.com/web/p/rocker-switches/0419788/?fbclid=IwAR10r9fi5knSN71Jjksq7a6-82aUYohRjpYxPrRhqLa4yB0fFgwsdTc1zVE

PSU - https://www.cnc4you.co.uk/PSU-5V-2A-Power-Supply

I think that's everything and thanks in advance for any help

AndyUK
20-10-2020, 04:21 PM
Don't think I've ever seen manual enable / disable switches for each Axis - I'm not sure there would be a big use case, unless you wanted to manually position an axis for some reason without using Jog and with no care to machine home or soft limits.

What is commonly done is to wire the enable line up to the controller, so that it can enable the drive when sending it movement commands. I use this as part of my fault system - if one of the drivers or the Spindle has an error, the drives remain powered but are stopped in their tracks and disabled through the enable line. Is that what you're after?

mbridge87
20-10-2020, 08:14 PM
Hi Andy,

Thanks for the reply.

This is a good explanation for why it's a useful addition to a motion control system. This is an extract from an email chain between myself and the designer of the motion control software.

"Disable switches allow you to turn off a drive without affecting the
others. This is often needed for example if you stall a motor and need
to reset it, and don't want to lose position on the other motors, which
would happen if you turned off mains power. While a motor is disabled
you can manually move it to a home or reference position and then switch
it back on after zeroing the axis. This is typically quicker than
trying to jog it to the home and then rezero, not to mention if you have
software limits, you might not even be able to jog.

Also if you had to swap a cable you can do it again without affecting
the other drives..."

Does that make sense?

Neale
20-10-2020, 09:28 PM
To be honest, weirdest explanation of something that no-one ever installs that I have ever seen!

Much, much better than that is to spend the effort on fitting home switches. These let you reset the entire machine at startup and if something does go wrong during a cut. Chances of only one axis being in motion when a stall occurs is very low, so you've lost position anyway. With home switches, you can manually jog the cutter out of cut (or whatever you need to do), rehome the machine, then either start over with the machine following its original path, or skip through the gcode to an appropriate position and restart from there.

My first machine didn't have home switches and it was a nightmare to recover if something went wrong (and it did quite often on that machine...). Current machine has home switches and once experienced, it's something that you cannot do without. The idea of manually jogging or turning the motors or whatever for accurate rehoming is, to put it mildly, a bit fraught. If you have to do that, you might as well throw the work away and start again because getting accurate reregistration is going to be difficult. Not impossible, but you really don't want to have to do it.

And swapping cables during a cut? Really?

Sorry for sounding sceptical but that advice doesn't sound as if it's come from an experienced user. Just the idea of turning off mains power if an axis stalls is really off the wall.

I'm sure that others are going to jump in on this one!

AndyUK
20-10-2020, 10:10 PM
I'm with Neale on this one - but anyway, we haven't yet actually been helpful about your original question.

I don't think you need a separate 5V PSU to achieve this - it looks like you've got 5V and Gnd available from the breakout board, and as its a signal line it won't be drawing a large current to worry about. I'm sure a more electronicsy person can chime in and confirm or deny.

The switches also are quite overkill - I wouldn't expect the illumination to work on 5V DC at these currents as its designed for 240V AC, so you might be able to find yourself something simpler. End of the day though, they're switches so will function.

Should be as simple as ENABLE - wired directly to GND, and +5V via switch to ENABLE+. Hopefully one of those electronics boffins will tell you if you need a pull-down resistor or not. You may need to tell the drive that you want to use the ENABLE signal, most of them ignore it by default so that people can leave them disconnected. Your stepper driver manual should give some details on this.

Doddy
20-10-2020, 11:40 PM
Each stepper driver I've disassembled (okay, all three of them) have had a cheap, slow opto-isolator input for the enable line, with a series resistor around 270R that's set up by default for 5V switching. So, yeah, as Andy says, apply +5V/0V to the EN+/EN- inputs to disable the stepper driver (/axis).

As both Neale and Andy say, though, unusual and specific wiring choice.

Also, as Andy says, those switches incorporate a neon indicator which won't work at these low voltages, rather 220VAC.

mbridge87
21-10-2020, 08:25 AM
Thanks for the replies. Please bear in mind I'm very new to this but perhaps the confusion as to the usefulness of these switches is the difference between a CNC machine using multiple linear axis' (XYZ) vs the motion control machine I am building to control a video camera.

I am only using one linear axis which acts as a slider. All other axis are rotational motors which are used to control; focus, zoom, pan of camera, tilt of camera. Then there is another motor which is used for a large rotating table. Finally, I'd have two other optional motors (8 in total) which I could use for other tasks, things like; moving a piece of the set, moving a product, throwing liquids. Motion control video can get very complex but it's quite different compared with CNC machines although the components are generally the same.

Given the above, I'm not sure, although again I could be wrong, that home or limit switches would even work. I can see how they'd work on a linear axis but not on the others. That may be due to my lack of knowledge though. As such, maybe this is where these on/off switches come in handy? Maybe...

AndyUK
21-10-2020, 04:58 PM
That makes a lot more sense.

Limit switches are never a bad idea if you can make them work for you; I would hate to see a motor destroying a camera focus mechanism by trying to power it through an endstop for example.

Looking forward to seeing the results and more details about the project! :)

m_c
21-10-2020, 07:14 PM
I've just realised why Mantis sounded familiar.
I wouldn't worry about adding limit switches or home switches, as any kit used should be able to resist a stepper motor stalling.

I've got no idea how Mantis interfaces the BoB with the KFlop, but there are pins on the KFlop that should be able to control the enables directly.
If you're unsure, it's probably best to post over on the Dynomotion forum, as the man who designed the KFlop will give you a definitive answer.

And for those wondering what Mantis is - https://www.bfg-motion.com/index.php?p=1_4
It's essentially just a computer program connected to a KFlop that lets you control 8 axes simultaneously. It's not really anything that complex, just a nice bundled package that's pretty easy to use, aimed at photography/filmography purposes so you can repeat scenes.

mbridge87
22-10-2020, 08:04 AM
Thanks for the reply. Apologies this was not clear from the beginning, clearly caused a little confusion.

I'll check out the Dynomotion forum. Cheers

Kitwn
23-10-2020, 06:09 AM
This video is from an old Timescapes.org forum buddy of mine known online as DISPLACEMENT1 who builds camera moco rigs for animation based in Manchester. Chat on that forum has dried up but there's a ton of useful stuff still hiding in the archive and you may be able to contact him via the Vimeo page for the video if you want to chat with someone who has experience with the kind of gear you are building.

https://vimeo.com/177889250

elf
09-11-2021, 11:36 PM
The system (https://github.com/elfren/RoseEngine_SpindleAndAxis) I use on my rose engine enables and disables steppers to allow positioning the cutter on X and Z axes and also locking the spindle. The sliderest is positioned on a flat table instead of traditional ways, so home position isn't very meaningful. Disabling the stepper on an axis makes it easy to move either axis quickly. The firmware started as a way to control my macro panorama camera system. The movements required for a cnc mill and a camera system are very similar (if you ignore the spindle :smug:). If you want to create a more precise movement system, investigate using an MPG (https://www.amazon.com/Generator-Controller-Encoderr-Pendant-TM1474-100BSL5/dp/B01E6VTZHC/ref=asc_df_B01E6VTZHC/?tag=hyprod-20&linkCode=df0&hvadid=416926770444&hvpos=&hvnetw=g&hvrand=12066663044356440134&hvpone=&hvptwo=&hvqmt=&hvdev=c&hvdvcmdl=&hvlocint=&hvlocphy=9033277&hvtargid=pla-914752227065&psc=1&tag=&ref=&adgrpid=96633964929&hvpone=&hvptwo=&hvadid=416926770444&hvpos=&hvnetw=g&hvrand=12066663044356440134&hvqmt=&hvdev=c&hvdvcmdl=&hvlocint=&hvlocphy=9033277&hvtargid=pla-914752227065)to control the individual axes.