Welcome to Our Community

Some features disabled for guests. Register Today.

Sainsmart TB6560 and Protoneer CNC Hat

Discussion in 'Motors' started by gstprecision, Dec 5, 2018.

  1. gstprecision

    Builder

    Joined:
    Nov 2, 2018
    Messages:
    20
    Likes Received:
    2
    I am trying to figure this one out but cannot find any relevant info online.

    I bought the TB6560 from Sainsmart, see link:
    Single-Axis CNC Stepper Motor Driver Controller, TB6560

    I have a RPI protoneer CNC Hat v2.60 with external stepper driver boards. What I am trying to figure out is the connection from the CNC Hat to the TB6560.

    I have pin Dir, STP, EN, GND on the CNC Hat and I have STP, DIR, EN, +5V on the TB6560. How is it supposed to be connected?

    Thanks
    GST
     
  2. Rick 2.0

    Rick 2.0 OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Dec 20, 2013
    Messages:
    2,892
    Likes Received:
    1,551
  3. gstprecision

    Builder

    Joined:
    Nov 2, 2018
    Messages:
    20
    Likes Received:
    2
    Thanks Rick. I did check that page before. My question is more related to the TB6560 and the 5v pin.

    Thx
    GST
     
  4. Rick 2.0

    Rick 2.0 OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Dec 20, 2013
    Messages:
    2,892
    Likes Received:
    1,551
    Sorry, didn't pick up on that nuance. o_O
     
  5. Rob Taylor

    Rob Taylor Master
    Builder

    Joined:
    Dec 15, 2013
    Messages:
    1,470
    Likes Received:
    749
    Ingore the GND on the board, send the driver +5V from another pin. If it wants a common high, that probably means it's going to step on low. grbl has a setting for this, $2 - step port invert mask. You'll have to see if your software has a corresponding option.
     
    Kyo likes this.
  6. gstprecision

    Builder

    Joined:
    Nov 2, 2018
    Messages:
    20
    Likes Received:
    2
    Thanks Rob, I will be running 3 stepper, would it be a better idea to have a dedicated 5v power supply just for that, or the 5v from the HAT will be enough to supply the 3 stepper driver?

    Thanks
    GST
     
  7. Rob Taylor

    Rob Taylor Master
    Builder

    Joined:
    Dec 15, 2013
    Messages:
    1,470
    Likes Received:
    749
    You need a common reference (usually it is ground) that the two boards share. It's not for power, just for logic comparison; it'll pull a few milliamps at most.
     
  8. gstprecision

    Builder

    Joined:
    Nov 2, 2018
    Messages:
    20
    Likes Received:
    2
    Perfect. There is a 5v pin (No other wire soldered on it) on the PiCNC, I will solder a wire to that and send the signal to all 3 stepper.

    GST
     
  9. gstprecision

    Builder

    Joined:
    Nov 2, 2018
    Messages:
    20
    Likes Received:
    2
    Just been doing some reading and not sure if that would apply to this situation. Will I also have to do some changes to GRBL in the CNC Hat? I read that sometimes the $2 and $4 have to be changed for certain stepper driver configuration.

    I am very new to all of this and know very little about grbl and programming , any help is appreciated.

    Thx
    GST
     
  10. Rob Taylor

    Rob Taylor Master
    Builder

    Joined:
    Dec 15, 2013
    Messages:
    1,470
    Likes Received:
    749
    I have no idea how it works on RasPi, never even looked at it, I use Arduino. Re-read my original comment carefully, that would be the reasoning if you do need to change those settings (and I believe you would). You have to change a bunch of settings in grbl to get up and running anyway, the wiki has all the details on it: gnea/grbl (Again, I don't know if this applies to your situation)

    You'll have to get up to speed quite fast- the g-code that CAM packages spit out is frequently unsuitable for hitting Cycle Start on, and you have to know how and why to adapt it to what you want to do. Lots of programming and adjusting grbl!
     
  11. gstprecision

    Builder

    Joined:
    Nov 2, 2018
    Messages:
    20
    Likes Received:
    2
    It is definitely a steep learning curve....LOL. I find it challenging and it motivates me to learn new things.

    The Protoneer Hat is running an Arduino chip. I will do some research on the Protoneer forum and see if I could find something there about the GRBL programming of the unit. I also asked there about this particular problem and am waiting some answer.

    GST
     
  12. gstprecision

    Builder

    Joined:
    Nov 2, 2018
    Messages:
    20
    Likes Received:
    2
    Got a reply from the manufacturer and it went like that:

    The signal interface of our single axis stepper driver is DIR, STEP, EN,+5V. The +5V is the common terminal. Therefore, it doesn't compatible with your controller.

    I believe there might still be hope but I am not knoledgeable enough to figure this one out by myslelf.
     
  13. Giarc

    Giarc OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Jan 24, 2015
    Messages:
    3,013
    Likes Received:
    1,679
    Kyo likes this.
  14. gstprecision

    Builder

    Joined:
    Nov 2, 2018
    Messages:
    20
    Likes Received:
    2
    Thanks I did read this thread. I believe this is the solution I am looking for . I sent Kyo a message and hopefully he can confirm I should not use the EN pin and it will be fine.
     
  15. Kyo

    Kyo Veteran
    Staff Member Builder Resident Builder

    Joined:
    Feb 27, 2014
    Messages:
    673
    Likes Received:
    702
    Hey gst, just got your msg. @Rob Taylor and @Giarc are correct. Ignore the GND terminal on the protoneer screw terminals. and bring out a 5V+ pin for the drivers.

    Wiring would be as follows for each axis.
    Protoneer : Driver
    --------------------------
    Step pin : Step pin
    Dir pin : Dir pin
    EN pin : EN pin

    I would bring the common 5V+ from the protoneer board to a screw terminal then break it out to each axis driver 5V+ pin to keep the wiring clean. Not all drivers need the enable pin connected; for example with the DQ542MA drivers from OB, the enable pin is really more of a disable pin. Not having any Sainsmart TB6560 drivers to test or play around with I can not say for certain if it requires the enable pin to be connected. You could ask @Metalguru If I recall from his post "Here" he is or was running TB6560 drivers and would be able to offer more experienced help with these drivers.

    As Rob was saying the logic level of all of the pins used by the drivers can be inverted (logic Low or High) as required by your driver with the following grbl settings..

    Step Pin $2
    Dir Pin $3
    EN Pin $4

    The GRBL configuration page "Here" covers this pretty well and gives you the required setting values to use.
     
  16. gstprecision

    Builder

    Joined:
    Nov 2, 2018
    Messages:
    20
    Likes Received:
    2
    Thanks everyone for all the guidance. I am fairly new at building my own machine so I am careful when it comes to electronics as I don’t want to short anything.

    Hope to get everything running in the next few days.

    Cheers
    GST
     
  17. Metalguru

    Metalguru Veteran
    Builder

    Joined:
    Dec 29, 2015
    Messages:
    752
    Likes Received:
    548
    Personally, I like to use the Enable pin with the 6560's because this is what triggers the low current standby mode that keeps the motors locked in place without overheating. If you don't use the enable, this locked rotor mode on the drivers won't work, or it will be full motor current which will quickly overheat the motors. Simply wire up all enable terminals on all the drivers to D8 on the Arduino.

    Note that with these drivers, and most others, the "Enable" is a misnomer. As Kyo said, it works more like a "Disable" A high on this pin is enabled, and the driver has it's own pullup so it defaults to enabled if the pin is not connected. You will need to change $4 in the GRBL config to be a "1" to invert the enable signal. Also, disable the enable timeout by setting $2 to 255. Look at the GRBL Wiki for more information on these two settings.

    If you are using lead screw drive, 20% current for locked rotor (disabled) will prevent movement and the motors will be cool as a cucumber. If you have a belt drive machine, probably use 50% current setting on the dip switches, a belt drive system is easier to move, so you need more current to ensure it stays put.

    MG
     

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