Stepper motors

Advert

Stepper motors

Viewing 25 posts - 1 through 25 (of 30 total)
  • Author
    Posts
  • #555425
    Steve Pavey
    Participant
      @stevepavey65865

      I've spent the last few months putting a laser cnc together and have just got to the stage of testing the stepper motors.

      The Y axis (Nema 17, 2 amp) one works perfectly – smooth, quiet and cool – so at least I know I can wire one up correctly.
      The Z axis (Nema 23, 3 amp) one is smooth and quiet, but gets pretty hot – too hot to comfortably touch after about ten minutes. If I set the current lower then it doesn't rotate.
      The X axis motor (Nema 23, 2.3 amp series, or 4.2 amp parallel) is very noisy, especially when starting and stopping, and it also seems to randomly make its own mind up on which direction it goes in. I have tried every current setting, and, since this one has 8 wires, I have also tried both series and parallel wiring configurations.

      The motor drivers are DM542's and the controller is a Ruida 6445G. The testing so far has been with the arrow keys on the controller (not ready for g-code yet, and the laser tube isn't installed).

      The Z axis motor is not going to be used much, unlike a cnc router or mill its only used to set the bed height at the start of a job, but it will be sitting there getting hot because of the holding torque, so I'd like to sort it out if possible.
      The X axis motor is more of a problem as it will be constantly on the move, so it would be nice if it was reasonably quiet, and important that it moves in the direction its told to!
      Any ideas?

      Advert
      #15361
      Steve Pavey
      Participant
        @stevepavey65865

        Difficulty setting up to run smoothly

        #555428
        Martin Kyte
        Participant
          @martinkyte99762

          Have a look at SW4. Should be set to OFF for standstill current reduction.

          It's section 7 in the data sheet just after Dynamic Current Setting.

          regards Martin

          #555436
          Keith Petley
          Participant
            @keithpetley53472

            Check that the X motor coils are wired correctly. Sounds like one pair may be wired so that they oppose each other rather than work together. Try just one winding out of each pair and see if it improves things – then add the second winding of each pair.

            Keith

            #555440
            Steve Pavey
            Participant
              @stevepavey65865

              Martin – I’m pretty sure that I have got sw4 set correctly but I will check to make sure.
              Keith – Also worth me checking this again, but I hadn’t thought of just using one set of coils – I’ll try that tomorrow morning. Fortunately it’s connected up with Wago terminals, so very easy to change.

              #555495
              Ronald Morrison
              Participant
                @ronaldmorrison29248

                The power of the stepper motors is a product of voltage and amperage while the heating is just amperage. If possible increase the voltage and the amperage requirement will go down.

                #555503
                Andrew Tinsley
                Participant
                  @andrewtinsley63637

                  Ronald, if you increase the voltage the current will increase and thus make things even worse!

                  Andrew.

                  #555508
                  John Haine
                  Participant
                    @johnhaine32865

                    No, the driver regulates the current irrespective of voltage. Are the currents you quote the ones given on the motors? If so they are the maximum not the recommended operating level. As as been suggested check the sense of the windings in series or parallel. I use the same drivers on my CNC mill at currents of around 1 amp for X and y and 2 amps for z iirc.

                    #555531
                    Steve Pavey
                    Participant
                      @stevepavey65865

                      I’ve had another play about this afternoon. First I removed the Z stepper (the one that was overheating) – I’ll sort it out later.
                      next to the X axis, and I tried Keith’s suggestion of just wiring one coil from each pair, but it made no difference – still the same vibration on starting and stopping, and still the random choice of direction at each start. I then swopped to a 4 wire Nema17 motor, (same as on the working Y axis) and the vibration problem is still there. Then a swop of the X and Y motor leads, and the problem is transferred from the X to the Y motor, so it looks to me as though the problem lies with the motor driver.
                      I can’t see the reply now, but yesterday the first response suggested that the DM542 was not the best – maybe the next step is to buy a new driver for the problem axis.

                      Re the overheating Z motor, there is no provision for adjusting voltage. The dip switch settings adjust the current and the microstepping, except for sw4 as mentioned. Clearly it’s overheating because the holding current is too high, but changing the current setting either results in a motor that doesn’t spin, or doesn’t affect the overheating. Maybe two new drivers are needed.

                      #555534
                      Steve Pavey
                      Participant
                        @stevepavey65865
                        Posted by John Haine on 24/07/2021 13:57:10:

                        No, the driver regulates the current irrespective of voltage. Are the currents you quote the ones given on the motors? If so they are the maximum not the recommended operating level. As as been suggested check the sense of the windings in series or parallel. I use the same drivers on my CNC mill at currents of around 1 amp for X and y and 2 amps for z iirc.

                        John – I’ve just digested your post. I set the current as suggested on the datasheet. Maybe I need to have another go at trying lower current settings. I have also been wondering about the polarity of each of the four windings, and whether the datasheet shows the correct colour codes. I’m not sure how I can test for this.

                        #555542
                        John Haine
                        Participant
                          @johnhaine32865

                          Have you checked the axes for friction?

                          #555545
                          Steve Pavey
                          Participant
                            @stevepavey65865

                            Only the Y axis is connected up at the moment (and that’s the one that’s working fine). Being a laser cnc there is very little load on the motors though, even with all the pulleys and toothed belts fitted.

                            Edited By Steve Pavey on 24/07/2021 20:58:25

                            #555578
                            John Haine
                            Participant
                              @johnhaine32865

                              Actually I'm using the 2M542 drivers which are very similar. I have 6 of them, 4 on the mill (XYZA) and 2 on lathe, and found they behave exactly as expected.

                              The odd behaviour of the motor that can't make up its mind may hold a clue. One cause of that may be that the pulse and direction signals going to its driver have the wrong timing. If the active edge of pulse changes state at the same time as the direction the driver may get confused about which direction it should go in. The controller should have the ability to change this as a configuration option, or the driver. Look in the manual for the position of the jumpers J1 and J3. Does the controller work in "pulse/direction" or "CW/CCW" modes?

                              #555622
                              Ronald Morrison
                              Participant
                                @ronaldmorrison29248
                                Posted by Andrew Tinsley on 24/07/2021 13:15:51:

                                Ronald, if you increase the voltage the current will increase and thus make things even worse!

                                Andrew.

                                The driver I use allows me to change the amount of current which it regulates. By increasing the voltage I was able to reduce the current and still get the same power to the motor. That reduced the heating of the motor and the heating of the driver chip which was cutting out due to overheating.

                                #555631
                                Steve Pavey
                                Participant
                                  @stevepavey65865

                                  John – thanks, I will have a look at the jumpers. I recall seeing a setting on the Ruida setup menu to change from Pul/dir to cw/ccw mode, and also to change from leading to trailing edge. I assume that these controller settings have to match the jumper settings?

                                  I’m still a bit puzzled by the talk of changing the voltage – I can’t see how this is done without changing the power supply (mines a 24v Meanwell model).

                                  #555649
                                  John Haine
                                  Participant
                                    @johnhaine32865

                                    No need to change voltage! 24v should be fine.

                                    #555714
                                    Steve Pavey
                                    Participant
                                      @stevepavey65865

                                      A small bit of progress – in a fit of frustration at my own inability (!) I decided to remove the wiring to the steppers and drivers completely and start from scratch. The result is now three steppers that run smoothly and don’t seem to get hot. I have no idea what I rectified by rewiring which is slightly annoying, but I’m pretty sure it was a daft mistake on my part.

                                      But I still have problems with the X axis motor not knowing which way to turn, and it hasn’t been solved by substituting a different stepper motor. I have checked the jumpers in the driver – actually no jumpers are fitted to the pins, so it is set to Pul/Dir and active on leading edge. I configured the Ruida controller with these same settings.

                                      I did wonder if the datasheet for the motor has incorrect colours described for the 8 wires, although when I substituted a four wire stepper it exhibited the same behaviour. Another possibility might be some sort of electrical interference, although the cable to the this stepper is the only one that is shielded.

                                      #555735
                                      Martin Connelly
                                      Participant
                                        @martinconnelly55370

                                        There is a possibility that the voltages being supplied to the enable, pulse and direction connections on the driver board are not going high enough. Some time back TTL chips used 0 and 5 volt signals. When newer technology was introduced (CMOS I think) the voltages were changed to 0 and 3.6 volts. Some computer parallel port were only supplying the 3.6v levels and caused problems with equipment that was expecting 5v. There is a possibility of something similar happening here and the voltage being supplied is not quite enough to switch the state of the direction circuit 100% of the time.

                                        There is also the possibility that the voltage levels are not being pulled down to 0v completely as well. What would be ideal is using an oscilloscope to look at the voltage levels and add a pull up or pull down resistor if this was the case. Another option is to add a chip between the transmitter and receiver to clean up the signals. A digital voltmeter on the direction line should be sufficient to see what is happening to the voltages since the direction voltage is not usually pulsing unlike the step signals.

                                        Some details here may be slightly out since I am writing this from memory but it is what I think needs looking at.

                                        Martin C

                                        #555749
                                        John Haine
                                        Participant
                                          @johnhaine32865

                                          I can't find the documentation for the controller Steve is using online but there is a connection diagram showing the interface to the stepper drivers with a +5V line, which implies that it's using standard 5V levels. Actually the original CMOS levels were 0 and 5V (or Vcc at any rate, usually 5V), it was TTL that had a 5V supply but the logic levels were a bit lower because of using bipolar transistors. Later CMOS reduced the supply to 3.6V to reduce power consumption and that led to the problem with the PC parallel port. However the controller Steve is using is a dedicated design not using a PC. Still worth checking the logic levels in the documentation though.

                                          #555751
                                          John Haine
                                          Participant
                                            @johnhaine32865

                                            Try changing the pulse signal to trailing edge active on the controller. It may be that if the edges on pulse and direction are coincident it can't make up its mind.

                                            #555761
                                            John Haine
                                            Participant
                                              @johnhaine32865

                                              Driver data sheet says that direction signal needs to be stable at least 5 microseconds before active pulse edge.

                                              #555788
                                              Steve Pavey
                                              Participant
                                                @stevepavey65865

                                                This is proving to be a bit of a learning curve – I bought a little ds212 oscilloscope a few months ago which I haven’t used, until today that is. I hooked it up to the DIR and +5v terminals on the output of the controller, 5en used the controller keypad to run the X stepper left and right. The DIR signal is absolutely consistent – high in one direction and low in the other, irrespective of which way the stepper decides to turn**. I also looked at the PULSE signal and it displays a reasonably good square wave. I’m afraid I am not good enough with an oscilloscope to actually measure the voltage, but it’s clearly enough to run the stepper.

                                                the other thing I wanted to do was to hook both up at the same time to see what the time relationship of the PUL and DIR signals was, but something didn’t like me doing that as the stepper didn’t run with both channels connected – maybe something to do with the internal resistance of the oscilloscope?? (Way out of my depth here, so I just disconnected it). I tested the DIR output with a multimeter and it was 4.8v which seems ok. I don’t think I would get a meaningful result doing the same on the PUL output.

                                                I have tried setting both leading and trailing edge active in the controller software, without any difference to the random behaviour, so I’m not that much further forward, except I’m a bit happier that the controller is not at fault.

                                                ** To me this suggests that the stepper motor coils are not connected correctly, though I have checked many times that the wiring conforms to the supplied datasheet – https://cnc4you.co.uk/resources/Stepper%20Motor%20Nema%2023%2057HS82-3008B%202.2Nm.pdf

                                                The Ruida user manual is at https://variometrum.hu/pdf/rdc6442g.pdf, though it’s a bit light on details related to configuration.

                                                #555809
                                                SillyOldDuffer
                                                Moderator
                                                  @sillyoldduffer

                                                  Baffling symptoms Steve!

                                                  Can you post photos of the wiring and your circuit diagram?

                                                  The misbehaviour of the oscilloscope may be a clue. As the oscilloscope's input impedance is about 1Megaohm, no way should measuring DIR and PUL together with it cause a problem. I wonder if the DM542 is wired correctly, because getting a pair the wrong way round would cause the symptoms. Note also the measurements are always taken relative to Ground, never between DIR+ and DIR- and Co.

                                                  The diagram in the manual is confusing because it shows the wiring done with shielded twisted pair, with the wires crossing over.

                                                  dm542.jpg

                                                  If the Controller is common-anode, PUL+, DIR+, and ENA+ must all be connected to Vcc (ie +ve)

                                                  If the Controller is common-cathode, PUL-, DIR-, and ENA- must all be connected to Ground (ie -ve)

                                                  What's not allowed is a mixture. Triple check the connections. A quick look at the Ruida manual suggests it's Open Collector, ie. Common Anode – Figure 3 applies, not Fig 4.

                                                  Dave

                                                  #555817
                                                  John Haine
                                                  Participant
                                                    @johnhaine32865

                                                    Just to be pedantic, the PNP signals are also open collector though common cathode (i.e. common cathode)!

                                                    #555822
                                                    Steve Pavey
                                                    Participant
                                                      @stevepavey65865

                                                      Two things that I find mildly annoying – posts that ask questions but the final solution is never posted, and idiots who can’t admit when they’ve been really stupid.
                                                      So in order not to be guilty of both at once, and very red-faced, I think it’s confession time. I have some 4 pin plugs and sockets connecting the steppers back to the control cabinet. I had made such a neat job of these connections – all with heat shrink and numbered labels etc – that I left these alone yesterday when I did the rewiring. It turns out that one of the conductors wasn’t actually soldered onto the terminal, instead the tinned end of the wire had stabbed itself into the plastic and missed the terminal by about half a millimetre. Having melted itself into the plastic it survived my normal tug test, and once covered with heat shrink was out of sight.

                                                      A quick test once it was soldered up correctly and it works perfectly.

                                                      So, my sincere apologies for wasting everyone’s time – the only silver lining is that it was actually everyone’s responses that forced my brain to eventually work out where the problem might lie – ie that one of the coils wasn’t getting a signal. Actually, another silver lining is that I have at last used the little oscilloscope that I bought as a bit of an impulse purchase a couple of months ago.

                                                      Many thanks for everyone’s help.blush

                                                      479e900a-bf58-4880-bfab-02c28b959cea.jpeg

                                                    Viewing 25 posts - 1 through 25 (of 30 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