By continuing to use this site, you agree to our use of cookies. Find out more
Forum sponsored by:
Forum sponsored by Forum House Ad Zone

Mach 4 and MB3

Help in understanding some basics

All Topics | Latest Posts

Search for:  in Thread Title in  
Steve Pavey02/01/2021 11:37:13
369 forum posts
41 photos

I’m trying to set up a cnc router (a clone of the one that John Ward made and documented on YouTube a couple of years ago), using Mach 4 and a MB3 breakout board.

I have a shed load of problems in understanding the setup in Mach 4. Can someone explain inputs and outputs - I have no idea whether to set them as active high or active low, and further confused with sink and source, and npn and pnp.

i’m sure there will be other questions once I have got my head around this..

Brian H02/01/2021 13:05:05
avatar
2312 forum posts
112 photos

Hello Steve and welcome. I'm afraid that I cannot help with you queries but hopefully someone else can.

Are you aware of;

**LINK**

?

Brian

Steve Pavey02/01/2021 14:06:14
369 forum posts
41 photos

Thanks Brian. Yes, I’ve been trawling through that forum, but I thought I’d ask here first - partly because I know there are some experts on here, and also because I feel that I’m more likely to get responses that are understandable and not written in geek-speak!

Joseph Noci 102/01/2021 14:30:50
1323 forum posts
1431 photos

Steve,

Active high implies when the signal is set, eg, Spindle turned ON, the driving or control signal is a HIGH voltage level = +5v on most cases on MACH3.

Low would then be inactive and OFF.

So, as to what you need, high or low, depends on the item being driven by the voltage.

Stepper motor drivers normally require that the STEP pulse signal be 'active high', that is, the signal is normally low, and pulses high for a short duration ( 1-5us) and then low again, and the stepper moves 1 step. Now a stepper control also normally has optically isolated inputs - you apply +5v to the +STEPIN pin on the controller, and you pull the -STEP IN pin to ground to step the motor. This causes current to flow in the opto, and is seem by the controller as the 'STEP HIGH PULSE' it wants.

To pull that pin low, one way of doing it is as follows -

Assuming your Breakout Board (BOB) has an NPN OPEN COLLECTOR output to drive the stepper controller -STEP pin -

Then set the STEP PIN on MACH 3 par port setup to ACTIVE HIGH. That signal then goes from the par port pin to the BOB, into the open collector driver. Now, when you apply a +ve voltage to a NPN transistor base, it turns ON, pulling the collector to the emitter, which will be connected to ground. So the Collector goes low, pulling the stepper controller -STEP pin to ground, and the stepper steps...

That configuration is the open collector current SINK ( sinking to ground)

To hopefully not confuse you further...

You could also use a PNP output to SOURCE current -

Set the MACH par port pin the ACTIVE LOW this time -

Connect that pin the a PNP output on the BOB.

Now, when the port pin goes LOW, a low voltage on the PNP transistor base will turn it on. But the transistor is connected differently - the EMITTER is connected to +5V, and the collector goes to the stepper controller +STEP PIN. The controller -STEP PIN is now connected to ground.

So when the PNP transistor turns on, the collector goes to +5V, applying this to the +STEP PIN and the motor steps..

2 different ways of doing the same things, one sinking current, one sourcing.

In the inputs - lets say you have a limit microswitch on an axis. You have connected on end of the switch to +5V. The other end goes to a port pin input. When the switch closes , +5v appears on the port pin. That is ACTIVE HIGH

I don't know the MB3 board, but that is an implementation where the signals are from that board via USB or ethernet9?) and not from a parallel port board. That does not change anything though - If you want to drive a relay, connect one end of the coil to +V, the other end to an NPN, Current SINK output on the board, and set the port bit active high - then when you set that pin high, the transistor turns on, the collector goes to ground, and the relay turns on..

Does that help at all?

Joe

Nick Hughes02/01/2021 15:18:01
avatar
307 forum posts
150 photos

Check out DazTheGaz on YouTube:- **LINK**

You are aware that the MB3 is not a Motion Controller, it's only a Breakout Board for the ESS Motion Controller?

Edited By Nick Hughes on 02/01/2021 15:21:47

Joseph Noci 102/01/2021 15:25:09
1323 forum posts
1431 photos

If what Nick says is correct, Steve, that setup won't work with MACH4 I think. Mach4 requires a dedicated motion controller, and perhaps with a breakout board to provide wiring points and protect the controller and PC.

Joe

Steve Pavey02/01/2021 19:14:13
369 forum posts
41 photos

Sorry, I wasn’t clear in my first post - yes I have an Ethernet Smoothstepper, with an MB3 b.o.b. It was just that the MB3 has been uppermost in my mind as it is the terminals on it that I’ve been staring at for the last few days! The ESS plugs straight into the MB3 with no ribbon cables needed, and is also powered by the MB3 with the right jumper settings (which I have set to do this).

I have made a small advance this afternoon, managing to get the led’s on my jog buttons to light up by configuring the inputs and outputs correctly. I have yet to make the jog buttons talk to the stepper motors though, and I feel another newbie question is about to be asked in the next day or so!

many thanks for the advice so far - especially the extensive write up by Joe, which I will try to digest this evening.

Steve Pavey02/01/2021 19:25:35
369 forum posts
41 photos

The setup so far (upside down for some strange reason only known to ME, as it displays the right way up everywhere else)

edit - now the right way up!

Edited By JasonB on 02/01/2021 19:29:24

Edited By Steve Pavey on 02/01/2021 19:38:32

Martin Connelly02/01/2021 20:14:03
avatar
2549 forum posts
235 photos

The stepper driver's documentation should show the connections required from the b.o.b.

Martin C

Steve Pavey02/01/2021 21:27:33
369 forum posts
41 photos

"The stepper driver's documentation should show the connections required from the b.o.b.

Martin C"

Oh how I wish that were so. I'm afraid that for someone new to all this the documentation is more a source of utter confusion and bewilderment than of help. If we take the steppers as an example, the drivers themselves seem quite straightforward to connect - four wires to the steppers themselves, and then a wire for each of Step, Direction and Ground to the breakout board. But the breakout board has a + and - for each Step and each Direction connection - and why is unexplained. At the moment I have connected these as I've shown, but with no confidence that I'm right.

And when it comes to configuring these in Mach 4, again there is a difference in how the steppers are labelled, and how they appear in the configuration windows.

screenshot 2021-01-02 at 21.07.32.jpg

I also have a niggling problem with the display, which I've ignored so far. The tool path window is a flickering green stripey mess. I'm hoping it isn't because the video card in the computer is not up to the job, as its new and bought specifically for this project. Or maybe it's because I haven't finished configuring Mach 4 yet??

86a1b5c9-b993-4953-a6a2-68ec3ce406f6.jpeg

Steve Pavey07/01/2021 12:43:05
369 forum posts
41 photos

Sorted the tool path display by installing a different video driver. Wiped Mach4 and reinstalled so I could start afresh by tackling one bit at a time. I have sorted out the stepper motors, along with the limit switches. Have also configured the limits switches as home switches, which seems to work, though I think I need one more dedicated home switch so I can make sure the gantry is automatically squared up correctly. The spindle is also working correctly using the analogue output of the ESS, so am now off to Halfords to collect some distilled water and antifreeze for the spindle cooling setup.

Josephs post above helped to demystify a lot of the Mach4 setup dialog boxes. Thanks.

Martin Connelly07/01/2021 15:55:35
avatar
2549 forum posts
235 photos

I'm happy to hear you have sorted out the wiring and toolpath issue. Just to add to the earlier comments:

This is the stepper drive's documentation G201X Stepper drive wiring

I think it is clear. The BOB connections are clearly labelled and I think you could use either the XD+ or the XD- and also the XS+ or XS- and it would make very little difference to the operation since Gecko don't say to use one or the other type of input. The ones that have a specific requirement tend to show it in the wiring diagrams which show pull up or pull down resistors. Section 5 of this manual shows what I am talking about Leadshine stepper driver manual

Martin C

Steve Pavey07/01/2021 22:01:24
369 forum posts
41 photos

Thank you Martin. Yes, the Gecko drive wiring is very straightforward. It’s the terminals on the breakout board that threw me, as there didn’t seem to be any understandable info on why they provide both + and - terminals for each connection. Anyway, I’ve just wired them all up to the + terminals, and they seem to be working fine. Now that I’ve read your explanation above I have managed to make a bit of sense of the MB3 documentation, so I’ll have a closer look tomorrow at what I’ve actually done to double check it is ok (all my notes and scribbles are in the workshop and I’m currently sitting next to a woodburner!)

Thanks again.

All Topics | Latest Posts

Please login to post a reply.

Magazine Locator

Want the latest issue of Model Engineer or Model Engineers' Workshop? Use our magazine locator links to find your nearest stockist!

Find Model Engineer & Model Engineers' Workshop

Sign up to our Newsletter

Sign up to our newsletter and get a free digital issue.

You can unsubscribe at anytime. View our privacy policy at www.mortons.co.uk/privacy

Latest Forum Posts
Support Our Partners
cowells
Sarik
MERIDIENNE EXHIBITIONS LTD
Subscription Offer

Latest "For Sale" Ads
Latest "Wanted" Ads
Get In Touch!

Do you want to contact the Model Engineer and Model Engineers' Workshop team?

You can contact us by phone, mail or email about the magazines including becoming a contributor, submitting reader's letters or making queries about articles. You can also get in touch about this website, advertising or other general issues.

Click THIS LINK for full contact details.

For subscription issues please see THIS LINK.

Digital Back Issues

Social Media online

'Like' us on Facebook
Follow us on Facebook

Follow us on Twitter
 Twitter Logo

Pin us on Pinterest

 

Donate

donate