584,861 active members*
4,843 visitors online*
Register for free
Login
IndustryArena Forum > OpenSource CNC Design Center > Arduino > Testing Basic Arduino motor wiring for new build, without breakout board
Results 1 to 8 of 8
  1. #1
    Join Date
    Apr 2023
    Posts
    12

    Question Testing Basic Arduino motor wiring for new build, without breakout board

    I'm having SO much trouble just getting UGS just to move x and y motors correctly, connected direct to Uno..

    Brand new build - NO Breakout board yet - just motor drivers connected directly to pins on Uno.
    I know most people use breakout boards, I'm just trying to test to get 2x stepper motors moving correctly when connected directly to the Uno (just in testing, for now. Breakout board will come later).

    Here is my setup
    New Arduino Uno (original, not clone).
    DM542T stepper drivers connected to Nema 23 motors from stepperonline.
    Fresh install of GRBL 1.1f - nothing modified. All standard settings from base install.

    My testing:
    I connect Uno as per below:

    Uno Pin 2 - X-axis DM542T - Step+
    Uno Pin 5 - X-axis DM542T - Direction+
    Uno Pin GND - X-axis DM542T - Step-, direction-, Enable-

    All good - x-axis motor moves clockwise and anti-clockwise when jogging X-axis in UGS platform.

    So, then I also connect:
    Uno Pin 3 - Y-axis DM542T Step+
    Uno Pin 6 - Y-axis DM542T Direction+
    Uno Pin GND - X-axis DM542T Step-, Direction-, Enable- and Y-axis DM542T Step-, Direction-, Enable-

    Now when I jog x-axis forwards in UGS, BOTH X and Y axis rotate clockwise (Y shouldn't be moving).
    When I jog x-axis backwards in UGS, the x motor reverses direction, but the y-motor keeps going clockwise. (x axis moving ok, Y shouldn't be moving)
    When I jog y-axis either forwards or backwards in UGS, no motor movement at all.

    Connecting Z-axis to pins 4,7 for step and direction, no movement at all on z-axis motor - can't control from UGS.

    So I can get x-axis to behave, but Y moves with x when it shouldn't, and nothing moves when I try to jog Y, or Z in UGS.

    I've checked wiring 100 times, and used shielded cables. Connecting pin 8 to enable+ on either/both drivers makes no difference.
    I don't understand what I'm missing.

  2. #2
    Join Date
    Apr 2023
    Posts
    12

    Re: Testing Basic Arduino motor wiring for new build, without breakout board

    Wiring as per attached.

  3. #3
    Join Date
    Apr 2023
    Posts
    12

    Re: Testing Basic Arduino motor wiring for new build, without breakout board

    so, after a week of tearing my hair out, and not understanding what was going wrong---- Arduino just released an updated version of their IDE, and my pc prompted me to install the update. So I did, and then just for laughs, I re-downloaded GRBL 0.9 - it worked first time! So I re-downloaded GRBL1.1h again, and tried that, and it ALSO works fine, on all 3 axis motors now direct connected as per diagram above.

    I didn't change anything at all. I didn't touch any of the wiring - I simply updated the Arduino IDE, and re-downloaded GRBL from Github, and everything is running as it should.

    I've no idea if that makes any sense to anyone, whatsoever (it sure doesn't make even a bit of sense to me), but maybe there's some lesson there for someone else who gets stuck in the same hell hole this had me in.

  4. #4
    Join Date
    Mar 2015
    Posts
    409

    Re: Testing Basic Arduino motor wiring for new build, without breakout board

    Grbl 1.1f is the latest & stable version and running flawless on thousands of uno's.
    Updating the IDE should make no difference, grbl doesn't use any of the Arduino library's. The only thing that could be changed by the IDE are the default compiler options. However, that is not done recently. Read this for more information https://www.elektormagazine.com/labs...r-smaller-code
    By uploading 0.9 and than 1.1f, the eeprom of the Uno would be erased and grbl starts with the default settings. That could have had some influence but I doubt it would explain your problems.

    If the wiring has not changed, a bad or loose connector/wiring/socket could explain these problems.
    I am not sure how much current the step/dir/enable this driver needs. The enable pin is shared and could cause some troubles. This driver is probably enabled if enable is not connected.
    The wiring of the driver power supply and the stepper wires can also cause a lot of problems.
    Also connect each driver by its own power cables (no daisy chain) straight from the power supply.

    If the problem returns, try X,Y,Z by just connecting X stepper, only the step signal.
    If that works, add the Y stepper, only the step signal.
    If that works, add the Z stepper, only the step signal.
    Proceed by adding the direction pins and finally by adding the enable pins.


    I am glad you have got it working.

  5. #5
    Join Date
    Apr 2023
    Posts
    12

    Re: Testing Basic Arduino motor wiring for new build, without breakout board

    Thanks for the suggestions. It sure was a bizarre one! I was worried I wasn't understanding something, and had overlooked something really basic, and whilst I totally agree - the Arduino IDE update should make no difference whatsoever, that's the only change I made (followed by about the 100th reinstall of GRBL) and everything started to behave properly.
    Anyway, at least my wiring logic wasn't fundamentally flawed, and my tests showed I was on the right track, so now I have a breakout board on order to go with a new Teensy 4.1, and will run grblHAL, so that should be interesting.
    The only thing I don't quite understand fully now is the function of the Enable Pin. My drivers work fine without them connected, and then adding that connection changes nothing, so I'm a bit lost as to what the purpose of that is, unless it's just my driver/stepper combination that don't need it, but others do??
    The BOB I'm getting has a connection for the Enable Pin to the driver, so I might try leaving that disconnected initially and see what happens. I've bought lots of 4-core shielded cable so I can always connect it if it is required.

  6. #6
    Join Date
    Mar 2015
    Posts
    409

    Re: Testing Basic Arduino motor wiring for new build, without breakout board

    Quote Originally Posted by Timbernut View Post
    The only thing I don't quite understand fully now is the function of the Enable Pin. My drivers work fine without them connected, and then adding that connection changes nothing, so I'm a bit lost as to what the purpose of that is, unless it's just my driver/stepper combination that don't need it, but others do??
    If the driver is enabled, the motor can't be turned by hand. An enabled stepper motor can get hot when it is not turning. For that, most drivers have an option (switch) to reduce the current when not running (hold current). My Lichuan servo will lose position (very slowly) when it is not enabled all the time. So I keep the servo enabled to avoid losing position but at a very low torque so I can turn it a bit by hand.

    GrblHAL, Teensy and BOB, this board is probably made/designed by Phil Barret. He makes decent hardware so that should work good.

  7. #7
    Join Date
    Apr 2023
    Posts
    12

    Re: Testing Basic Arduino motor wiring for new build, without breakout board

    Yes you are right. I have ordered that BOB from Phil. I'm in Australia, so I'm not sure how long it will take to get here from the US, but hopefully not a huge wait. I've still got other parts coming from China so it's a slow build. I've been testing parts as they arrive to make sure I understand how it all goes together (hence the playing with the arduino and no BOB), so I was a bit worried when I thought I understood steppers/drivers/power/arduino combination but couldn't make it work, and didn't know where I was going wrong. Now it's a matter of waiting for more parts, including the BOB, and then putting them together.

  8. #8
    Join Date
    May 2004
    Posts
    210

    Re: Testing Basic Arduino motor wiring for new build, without breakout board

    For what it's worth, I'm that phil. I actually have 2 boards, the teensy based one referred to above and a brand new one, PicoCNC, based on the Rasp Pi. The PicoCNC board is very cost competitive to an Uno or Mega plus CNC shield.

    And, shipping to Aus takes about 10-14 days.

Similar Threads

  1. Breakout Board Wiring
    By Pmccourt in forum DIY CNC Router Table Machines
    Replies: 5
    Last Post: 06-09-2019, 06:12 PM
  2. c11 breakout board wiring. Motor won't turn. Need help please!
    By frank1979 in forum DNC Problems and Solutions
    Replies: 14
    Last Post: 10-11-2013, 10:56 PM
  3. Replies: 1
    Last Post: 07-20-2013, 01:01 PM
  4. Free Mach3 Breakout Board in Exchange For Field Testing Its Plug-in
    By frankee in forum Mach Wizards, Macros, & Addons
    Replies: 7
    Last Post: 03-16-2013, 10:12 PM
  5. Arduino and commercial Breakout Board
    By Kvirre in forum Controller & Computer Solutions
    Replies: 3
    Last Post: 05-10-2011, 07:08 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •