Mach 4 and MB3

Advert

Mach 4 and MB3

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #516947
    Steve Pavey
    Participant
      @stevepavey65865

      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..

      Advert
      #15316
      Steve Pavey
      Participant
        @stevepavey65865

        Help in understanding some basics

        #516973
        Brian H
        Participant
          @brianh50089

          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

          #516986
          Steve Pavey
          Participant
            @stevepavey65865

            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!

            #516993
            Joseph Noci 1
            Participant
              @josephnoci1

              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

              #517006
              Nick Hughes
              Participant
                @nickhughes97026

                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

                #517008
                Joseph Noci 1
                Participant
                  @josephnoci1

                  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

                  #517064
                  Steve Pavey
                  Participant
                    @stevepavey65865

                    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.

                    #517068
                    Steve Pavey
                    Participant
                      @stevepavey65865

                      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

                      #517083
                      Martin Connelly
                      Participant
                        @martinconnelly55370

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

                        Martin C

                        #517099
                        Steve Pavey
                        Participant
                          @stevepavey65865

                          "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

                          #518148
                          Steve Pavey
                          Participant
                            @stevepavey65865

                            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.

                            #518174
                            Martin Connelly
                            Participant
                              @martinconnelly55370

                              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

                              #518279
                              Steve Pavey
                              Participant
                                @stevepavey65865

                                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.

                              Viewing 14 posts - 1 through 14 (of 14 total)
                              • Please log in to reply to this topic. Registering is free and easy using the links on the menu at the top of this page.

                              Advert

                              Latest Replies

                              Viewing 25 topics - 1 through 25 (of 25 total)
                              Viewing 25 topics - 1 through 25 (of 25 total)

                              View full reply list.

                              Advert

                              Newsletter Sign-up