Welcome to Our Community

Some features disabled for guests. Register Today.

Need Help with cnc Electronics

Discussion in 'General Electronics' started by Jack Kelley, Feb 23, 2020.

  1. Jack Kelley

    Builder

    Joined:
    Feb 23, 2020
    Messages:
    8
    Likes Received:
    0
    So I am trying to make a stepper motor spin and am not having any luck. These are the components.
    Power Supply- https://www.amazon.com/gp/product/B078RYFMQB/ref=ppx_yo_dt_b_asin_title_o01_s01?ie=UTF8&psc=1
    Stepper driver-https://www.amazon.com/gp/product/B07S64MBTR/ref=ppx_yo_dt_b_asin_title_o01_s00?ie=UTF8&psc=1
    Control board-https://www.amazon.com/gp/product/B0093Y897A/ref=ppx_yo_dt_b_asin_title_o00_s00?ie=UTF8&psc=1
    Motor-https://www.amazon.com/gp/product/B00PNEQKC0/ref=ppx_yo_dt_b_asin_title_o00_s00?ie=UTF8&psc=1
    I have put pictures down below and a wiring diagram. Both lights on the stepper driver are on which are the power and alarm so im guessing something is wired wrong.
    Any help would be greatly appreciated.
    [​IMG]

    [​IMG]
    [​IMG]
    [​IMG] https://lh3.googleusercontent.com/0...2OrdJnnmPxS86nWG8ob9PSuIQYHNwdw=w1238-h928-no
     
  2. Jack Kelley

    Builder

    Joined:
    Feb 23, 2020
    Messages:
    8
    Likes Received:
    0
    Also the dip switches on the driver are set to the lowest possible current
     
  3. Rick 2.0

    Rick 2.0 OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Dec 20, 2013
    Messages:
    2,893
    Likes Received:
    1,552
    The computer is what spins it. What routine are you using to make that happen?
     
  4. Jack Kelley

    Builder

    Joined:
    Feb 23, 2020
    Messages:
    8
    Likes Received:
    0
    I am using an old computer with a paralell port and mach 3 with a g0 x1 command, i have also tried jogging with the jog keys on the keyboard. I think my problem is with the wiring somehow, either the 5v connections are done wrong or the 36v connection to the stepper driver. It may be something else entirely
     
    #4 Jack Kelley, Feb 24, 2020
    Last edited: Feb 24, 2020
  5. Giarc

    Giarc OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Jan 24, 2015
    Messages:
    3,017
    Likes Received:
    1,682
    Here is a wiring diagram that works. I can't see yours because the links all appear broken. Are you certain you picked the right pairs of wires for the As and Bs? Both As have to be from the same coil and the same with the Bs.
    [​IMG]
     
    Jack Kelley likes this.
  6. Giarc

    Giarc OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Jan 24, 2015
    Messages:
    3,017
    Likes Received:
    1,682
    If you are not familiar with how to figure out which two wires are pairs, Rob does a good job explaining it in this recent ost in another thread. Blackbox conversion for Xcarve.
     
    Jack Kelley likes this.
  7. Rob Taylor

    Rob Taylor Master
    Builder

    Joined:
    Dec 15, 2013
    Messages:
    1,470
    Likes Received:
    749
    Yep. I also like StepperOnline motors and I have that same breakout for testing the mill before getting Mesa boards. Those should be fine. The TB6600s are variable, it is possible to get a bad one or have it die. For the price you can't beat them for basic stuff though (unless you have three die in a row, somehow... Then you shoulda got a DM542 ;) ).

    Are you definitely seeing 36V out of the PSU? Do you have the USB port plugged into the computer with a male-male cable? That's required to give the board 5V power (which components need 5v power and which get power over parallel, I'm not 100% sure off-hand).

    I assume you just plugged directly into the X-axis plug and broke it out to go into the driver. If you're using terminals, you'll need to tell Mach 3 which ones you're using for which pins. The terminals correspond directly to the parallel pins, it's just a breakout board and not a controller of any kind.

    @Giarc's diagram above, while intended for use with grbl, is exactly how you should have it wired, into the corresponding socket on the BoB. If you need to tell Mach 3 the difference between active high and active low (what you have here, ie. "pull to ground for step") on the stepper driver, I don't know. If the stepper driver can even take active low, I also don't know off-hand. Some are step-on-high only. Though for a single axis, that might not matter so much in terms of variable frequency pulse trains, since there's nothing to sync. @Batcrave might be able to help some with the Mach 3 side of things.
     
    Jack Kelley likes this.
  8. Jack Kelley

    Builder

    Joined:
    Feb 23, 2020
    Messages:
    8
    Likes Received:
    0
    @Giarc and @Rob Taylor , thank you both so much firstly. I believe I have the correct wires for the A and B pairs, I did it looking at the diagram that came with the motor but I will check manually when i get back. I will also check for 36 V as those both seem to be the most simple problems. Here is a wiring diagram, hopefully it shows up. The 5V connection is via a USB cable attached to a power strip and the power light is on on the BOB.
    upload_2020-2-25_10-35-6.png
     
  9. Jack Kelley

    Builder

    Joined:
    Feb 23, 2020
    Messages:
    8
    Likes Received:
    0
    So I had the wiring correct for the motors, tested by pairing the wires up together and turning the motor feeling the resistance.
    I tested voltage of a bunch of stuff
    Line in 115V
    At power supply ~32 V
    At stepper driver ~32 V
    BOB all motor ports and 5 V ports ~5V
    I have a feeling the problem is in the mach 3 settings but the fact that the alarm light on the stepper driver doesnt make sense to me.
     
  10. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    15,055
    Likes Received:
    4,313
    Disconnect the Enable wiring temporarily. If it starts working you need to invert the Enable signal in the config
     
  11. Jack Kelley

    Builder

    Joined:
    Feb 23, 2020
    Messages:
    8
    Likes Received:
    0
    @Peter Van Der Walt
    That worked!! Just one question. Is it usual for motors to run rougher when the mach 3 motor tuning setting of "Steps per" is lower. It was automatically set up as 2000 so i changed it to 200 as 200 steps per revolution and it seemed to run rougher. I tried 400 steps per and it ran smoother than 200
     
  12. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    15,055
    Likes Received:
    4,313
    More importantly, calibrate it to what the actual steps per mm should be. Smooth it out by setting up the microstepping jumpers though (1/8th is a good torque vs roughness compromise in most cases)
     
  13. Batcrave

    Batcrave Journeyman
    Builder

    Joined:
    Apr 20, 2018
    Messages:
    361
    Likes Received:
    166
    Assuming, of course, you're looking at the setting I think you're looking at (I'm fighting with a linux partition on that machine right now, so I can't run & check), that's "steps per unit" - which is meant to be translated as "steps per inch" (or "per mm", if you live in one of the 99% of other nations that use civilized & sensible measurements), rather than "steps per rotation". It shouldn't make a difference to how the motor actually runs, except that when you tell Mach 3 to move x inches at y IPM, it'll have a very different (by a factor of ten, in this case) idea of what "inch" means.

    As Peter pointed out, you'll need to calibrate that number based on your actual machine. You'd want to calculate a rough starting point based on thread pitch, microstep setting, and, yes, the 200-steps-per-rotation of the motor - for steps/inch it's (motor_steps * microstepping) / screw_lead_in_inches*. (or at least some calculation that looks vaguely like that. after spending all night discovering new profanities to hurl alternately at linux and the debates, my brain's pretty much used up. and math is hard.)

    Once you've got that starting point (and have your machine together & running), Mach 3 has an option on one of the screens (I think it's the mostly-green settings screen - maybe alt-4?) to help precisely calibrate the actual (rather than theoretical) figure, based on your physical machine. It'll try to move an axis x inches (or x mm), then ask you to measure how far it actually traveled & use that to determined the proper setting - although sometimes it takes a few iterations, depending on your machine's repeatability, the accuracy of your measurements, and your tolerance-to-patience ratio.


    -Bats
    (calculating steps-per-mm is left as an exercise to someone from a more civilized country and/or with a working brain)
     
    Peter Van Der Walt likes this.
  14. Medicnoel

    Medicnoel New
    Builder

    Joined:
    Mar 28, 2020
    Messages:
    4
    Likes Received:
    1
    Hi, I'm hoping the good people of this forum can help me. I have a Z-axis that is being very frustrating. I am almost complete novice with regards to code and electronics although have a basic knowledge of electricity and know how to work a multimeter etc. I'm basically a paramedic with a woodworking problem and during my off work times, try to relax with woodworking. This has not been a relaxing time.

    I have my machine all together and seemed to have it working, but while nearing the end of running my first simple code, the z- axis went crazy (buried itself into the piece, shuddering/vibrating not moving but I could twist it out of the piece by hand). Now I can't seem to get the bug out of it and I'm losing hairs.

    After doing a soft reset and unlock, I will go into the setup wizard and home the machine- no problems, continue through the setup wizard- no problems. Z-axis goes up and down just like X and Y (the only thing I notice is that all motors seem to only have holding torque when one of the motors is turning during jog in the wizard). When I finish and close the wizard the X and Y are fine and move normally. When I hit the -Z it starts shuddering/vibrating and not moving. I also get an error code $J=21G9125F200, alarm goes off and I get locked out.


    I have tried many different things including switching the Z/X drivers, fiddling with the Vref, adjusting the microsteps, changing the wiring on the motor, checking connections, basically everything I can think of with no result.

    Below is as much as I can say about my general setup. PLEASE HELP!!!

    -MedicNoel

    Workbee 1000mm x 1000mm Screw drive platform
    Hard limit switches on X+, Y+, Z+
    120/24v power supply
    Arduino uno with GRBL 1.1 (code was changed on line 3?? to disable spindle speed)
    cnc shield v3, set at 1/4 microstep
    DRV8825 stepper drivers, Vref set at 1.3v
    4x Nema 23 stepper motors
    • Step Angle:1.8°
    • Rated current:2.8A DC
    • Rated Voltage: 3.36V
    • Winding dc resistance(25℃):1.2Ω±10%
    • Winding inductance:2.3mH±20%
    • Holding torque:≥1.26N.m
    • Shaft diamater: 6.35mm or 1/4
    Using UGS 2.0 platform

    GRBL settings
    $0=10
    Step pulse time

    $1=25
    Step idle delay

    $2=0
    Step pulse invert

    $3=6
    Step direction invert

    $4=0
    Invert step enable pin

    $5=0
    Invert limit pins

    $6=0
    Invert probe pin

    $10=1
    Status report options

    $11=0.010
    Junction deviation

    $12=0.002
    Arc tolerance

    $13=0
    Report in inches

    $20=1
    Soft limits enable

    $21=1
    Hard limits enable

    $22=1
    Homing cycle enable

    $23=0
    Homing direction invert

    $24=25.000
    Homing locate feed rate

    $25=500.000
    Homing search seek rate

    $26=250
    Homing switch debounce delay

    $27=1.000
    Homing switch pull-off distance

    $30=1000
    Maximum spindle speed

    $31=0
    Minimum spindle speed

    $32=0
    Laser-mode enable

    $100=100.000
    X-axis travel resolution

    $101=100.000
    Y-axis travel resolution

    $102=100.000
    Z-axis travel resolution

    $110=500.000
    X-axis maximum rate

    $111=500.000
    Y-axis maximum rate

    $112=500.000
    Z-axis maximum rate

    $120=10.000
    X-axis acceleration

    $121=10.000
    Y-axis acceleration

    $122=10.000
    Z-axis acceleration

    $130=810.100
    X-axis maximum travel

    $131=740.100
    Y-axis maximum travel

    $132=51.100
    Z-axis maximum travel
     
  15. Gary Caruso

    Gary Caruso OpenBuilds Volunteer
    Staff Member Moderator Builder

    Joined:
    May 19, 2016
    Messages:
    1,193
    Likes Received:
    532
    $1=25
    Step idle delay

    Change this to 255 so the drives never power off the holding current.

    The stuttering and vibrating thing is most definitely a bad connection on the motor or broken intermittent wire, make sure no terminals are clamping the insulation.
    Cheers
    Gary
     
    #15 Gary Caruso, Mar 29, 2020
    Last edited by a moderator: Mar 29, 2020
  16. Medicnoel

    Medicnoel New
    Builder

    Joined:
    Mar 28, 2020
    Messages:
    4
    Likes Received:
    1
    My gosh! Sometimes the simplest answer is the least obvious. It seems that one of the wires was a bit loose and melted some of the plastic at the connection on the X-gantry (cable flex point). Makes sense why it stopped working half way through. I did check the motor connections with a multimeter previously but I guess it was just connected enough to show but not to handle the voltage when put through the line.

    Thanks so much!
     
    Peter Van Der Walt likes this.
  17. Jack Kelley

    Builder

    Joined:
    Feb 23, 2020
    Messages:
    8
    Likes Received:
    0
    Do stepper drivers like the TB6600 need fans blowing over the heat sinks? Im just running nema 17 motors at a max of 36 v 2 a
     
  18. Batcrave

    Batcrave Journeyman
    Builder

    Joined:
    Apr 20, 2018
    Messages:
    361
    Likes Received:
    166
    Loose connections on the steppers are a killer. Not only are they easy to overlook - resulting in weird intermittent problems when something moves - but the arc across the not-quite-in-contact contacts (which I imagine is what melted your plastic) is entirely capable of toasting the MOSFETS on your drivers at the same time.

    (I may have learned this the hard way)


    (maybe even more than once)

    Moral of the story: Make absolutely sure your stepper connections can't come loose. While I always thought it seemed like an awfully inelegant solution (not to mention terribly inconvenient, what with the number of times I seem to switch around connections), there's a very good reason OpenBuilds suggests strapping the connectors together with zipties in their wiring videos.


    -purp
    (Hey, Mark! The forum profanity filter is broken! It bleeps out mild curses like ' **** ' and ' **** ', but it doesn't do anything at all with a really nasty word like ' intermittent ' )
     
    Peter Van Der Walt likes this.
  19. Batcrave

    Batcrave Journeyman
    Builder

    Joined:
    Apr 20, 2018
    Messages:
    361
    Likes Received:
    166
    Someone who's actually experienced with the TB6600s should definitely be able to give you a more definite answer, but my rule of thumb - when I don't have advice, documentation, or an IR thermometer to fall back on - is that if a heatsink gets hot (rather than just warm) to the touch, it gets a fan. If it gets too hot to touch, it gets a bigger fan. If it's cool, it's cool.

    Not that it's always a great idea to go poking at heatsinks - once in a while they're even live - and the best course of action would usually be pulling up a datasheet on the chips in question to see what sort of temperatures they're happiest at, and then checking the heatsink with an IR/non-contact thermometer... but sometimes we have to make do with less than the best.

    ...or I suppose, if you're really desperate, you could even wait for a reply from someone who actually knows what they're talking about.


    -Bats
    (...is not that someone)
     
    Peter Van Der Walt likes this.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice