PDA

View Full Version : Connecting UNO R3 AVR Module / Arduino CNC Shield to TB6600 for Nema23 stepper motors



DaveZ
18-06-2019, 08:43 PM
25939

Hi
First post, a noob as far as electronics is concerned.
I've made a desktop CNC engraver from mild steel plate and aluminium for engraving soft metals.
The design is a larger version of that made by Myfordboy, a modified Banggood.
Chinese linear bearings, 500 watt spindle.
Will show when I have it working.
Will show construction if people are interested.

Problem
I've got a UNO R3
Connected an Arduino Shield on top
I have 4 wire ribbons connected to the XYZ pins (headers?)

I need ( I think) to connect 4 wire ribbons to the signal side of TB6600 driver
I can find no info on what the 4 pins represent for the XYZ headers.
I've loaded a pic at beginning of post which I presume will load

So what do each wire on the ribbon represent starting from the the letter X, Y or Z


Thanks in advance DaveZ

links
https://www.banggood.com/HANPOSE-TB6600-Stepper-Motor-Driver-4A-DC9-42V-For-Nema-17-or-23-or-34-Stepper-Motor-CNC-Engraving-Machine-p-1415418.html?rmmds=search&cur_warehouse=CN

https://ooznest.co.uk/product/arduino-cnc-shield/
(https://ooznest.co.uk/product/arduino-cnc-shield/)

DaveL
19-06-2019, 09:39 AM
I built a small CNC and used an Arduino with the CNC shield, it is meant to be used with small daughter boards plugged into it that have the motor drivers on them. If you are using external driver units then you don't need the CNC shield, the headers you have cables on in the picture would be connected directly to the stepper motors.

Sent from my Lenovo YT3-X50F using Tapatalk

AndyUK
19-06-2019, 10:40 AM
My understanding of your situation is that you have a CNC shield which is effectively acting as a breakout board for the arduino GPIO pins.

The CNC shield can either have small driver chips attached (like in this instructable link (https://www.instructables.com/id/3020-CNC-Arduino-GRBL-CNC-Shield-V3/)) or you can connect to external stepper motor drivers, like you seem to be trying.

In your case, I'd expect the external drivers to be connecting to the XYZ Step / Dir pins on the left hand side of the shield, rather than the pins that you show them connected to. I think the ones you've got them wired to are the output for the motor driver chips which would go directly to the stepper motors - but without a pinout diagram its hard to say.

The drivers should have STEP or PULSE + and -, DIR + and -. Those are the four pins you want to connect to your shield.


To understand why, you need to have a grasp of how we turn G Code into Stepper motor movements. The first stage is to translate the Gcode command into a direction and a number of pulses for the motor (there are many pulses per turn - it depends on the motor, but typically 200). This is what your arduino is doing. The CNC shield is simply moving the output of the arduino from Pin N to a helpful location for you to plug into. You then need a stepper driver which turns these pulses and directions into currents which go through the two coils in the stepper motor which cause it to move in one direction or the other. The confusing bit here is that your CNC shield can accept small chips which do this job, but you're not using them!

A_Camera
19-06-2019, 12:19 PM
25939

Hi
First post, a noob as far as electronics is concerned.
I've made a desktop CNC engraver from mild steel plate and aluminium for engraving soft metals.
The design is a larger version of that made by Myfordboy, a modified Banggood.
Chinese linear bearings, 500 watt spindle.
Will show when I have it working.
Will show construction if people are interested.

Problem
I've got a UNO R3
Connected an Arduino Shield on top
I have 4 wire ribbons connected to the XYZ pins (headers?)

I need ( I think) to connect 4 wire ribbons to the signal side of TB6600 driver
I can find no info on what the 4 pins represent for the XYZ headers.
I've loaded a pic at beginning of post which I presume will load

So what do each wire on the ribbon represent starting from the the letter X, Y or Z


Thanks in advance DaveZ

links
https://www.banggood.com/HANPOSE-TB6600-Stepper-Motor-Driver-4A-DC9-42V-For-Nema-17-or-23-or-34-Stepper-Motor-CNC-Engraving-Machine-p-1415418.html?rmmds=search&cur_warehouse=CN

https://ooznest.co.uk/product/arduino-cnc-shield/
(https://ooznest.co.uk/product/arduino-cnc-shield/)

The ribbon cables you have connected are for the motor. The stepper shield is made for the A4988 stepper drivers, and if you want to replace those drivers with something else then you need to connect your drivers instead of the A4988, i.e. wire the driver signals STEP, DIR and EN and of course GND from the stepper shield to the new drivers.The motors must then be connected to your new drivers and not to the stepper shield. Also remember that the new drivers must be connected to the motor power supply, not the stepper shield. I made a quick picture, hope it makes it clear for you.

25940

DaveZ
19-06-2019, 01:45 PM
Hi Dave, thanks for the quick reply. I thought as much after 3 days googling. I can find a wiring diagram for Uno and TB6600.

DaveZ
19-06-2019, 01:51 PM
Hi Andy
Can I experiment with each pin on the shield connecting to the stepper drivers.? To find which is which. (without blowing board up) I presume pin out diagram relates to shield. I've looked everywhere for one.

DaveZ
19-06-2019, 02:09 PM
Here's a pdf the shield supplier sent me. Not exactly the same but..... https://jtechphotonics.com/Downloads/GRBL_Controller/Instruction_Manual_GRBL_Controller_V1_2.pdf

AndyUK
19-06-2019, 02:12 PM
Hi Andy
Can I experiment with each pin on the shield connecting to the stepper drivers.? To find which is which. (without blowing board up) I presume pin out diagram relates to shield. I've looked everywhere for one.

Shouldn't need to experiment - everything should be relatively simple. I've drawn a basic diagram to give you an idea. Note that the colours of the wires mean nothing in my drawing, its just whatever colour I picked in paint.


First - be careful about the power supply + and - to the driver. Make sure you get them the right way around, else bye bye driver.
Second, Identify the pairs of wires from the stepper. It has four wires in two pairs. Use a multimeter in continuity mode to determine which wires are connected.
Connect one pair of the motor wires to A+ and A- on the stepper driver. The other to B+ and B-.
Next, connect DIR+ on the driver to X DIR on the shield
Repeat for PUL/STEP + to STEP + on the CNC Shield
Connect ENA+ to ENABLE or EN on the CNC Shield
Connect ENA-, PUL/STEP- and DIR- to Gnd on the CNC Shield
TEST!


Note there is no power supply connection to the CNC Shield - this is intentional. I'm expecting the CNC shield to be powered by the arduino power or USB.

25941

DaveZ
19-06-2019, 02:56 PM
Hi Andy
Thanks for the warnings
I've identified the pairs using a multi
I had connected power supply to the shield, I will undo
I had noted that the usb could supply power as well
Currently putting together the base axis, a few teething problems
After that I'll download the arduino stuff onto a computer.
Perhaps I'll power up each axis at a time......
Will report back in a week or so.

Vengyamy
01-01-2020, 01:22 AM
Good evening my friend, you have the diagram of the connection of the three axes

Froggie
14-09-2021, 02:15 AM
Hey so are the EN/Ground shared between all drivers ? in like parallel ?
Just wondering i just saw this looking to do the same thing for my cnc hard to find wiring for external drivers on the shield





Shouldn't need to experiment - everything should be relatively simple. I've drawn a basic diagram to give you an idea. Note that the colours of the wires mean nothing in my drawing, its just whatever colour I picked in paint.


First - be careful about the power supply + and - to the driver. Make sure you get them the right way around, else bye bye driver.
Second, Identify the pairs of wires from the stepper. It has four wires in two pairs. Use a multimeter in continuity mode to determine which wires are connected.
Connect one pair of the motor wires to A+ and A- on the stepper driver. The other to B+ and B-.
Next, connect DIR+ on the driver to X DIR on the shield
Repeat for PUL/STEP + to STEP + on the CNC Shield
Connect ENA+ to ENABLE or EN on the CNC Shield
Connect ENA-, PUL/STEP- and DIR- to Gnd on the CNC Shield
TEST!


Note there is no power supply connection to the CNC Shield - this is intentional. I'm expecting the CNC shield to be powered by the arduino power or USB.

25941

AndyUK
14-09-2021, 09:33 AM
Hey so are the EN/Ground shared between all drivers ? in like parallel ?
Just wondering i just saw this looking to do the same thing for my cnc hard to find wiring for external drivers on the shield

Yes. Although in most cases you can just leave enable+ and enable- disconnected and the driver will still work; they tend to be programmed by default to have an enabled low behavior. I reprogrammed mine to swap that so it requires an active signal to enable the driver.