Welcome! Log In Create A New Profile

Advanced

Control 4 steppers with Arduino Uno/Due and CNC Shield

Posted by viktor80 
Control 4 steppers with Arduino Uno/Due and CNC Shield
September 19, 2018 05:44PM
I'm using this bipolar stepper with A4988 driver on CNC Shield Expansion Board with Arduino Due or Uno micro controller


I'm trying to figure out, how to control 4 steppers on CNC shield, if 3 is:

const int stepPin1 = 2; // x-stp // stepper 1
const int dirPin1 = 5; // x-dir

const int stepPin2 = 3; // y-stp // stepper 2
const int dirPin12 = 6; // y-dir

const int stepPin3 = 4; // z-stp // stepper 3
const int dirPin3 = 7; // z-dir

But what is `a-step/dir` pins `stepPin4` and `dirPin4` for stepper 4 by this scheme ? Seems like 8-13 pins used for other purpose


Also I'm wondering, what should I use for Arduino Due or Uno, in case if I need separate control for 8 stepper motors at the same time.

I found Mega Shield-GRBL 1.1 Arduino CNC Shield also RAMPS 1.4 RepRap Mega Pololu Shield Board and RepRap Arduino-Due Driver Shield but it is only for 6 drivers, and except for the last, I'm not sure, if it is compatible with Arduino Due

Any advice, guide of example would be very helpful
Re: Control 4 steppers with Arduino Uno/Due and CNC Shield
September 19, 2018 08:52PM
That board is not for a 3d printer... no mosfets, no temperature input.

In saying that, Take a look at the jumpers directly above the power plug.



A is not connected to anything by default but can be jumpered to be in parallel with X,Y,Z or the spindle
So for independent control jumper SpinEnable to A-Step (D12)and SpinDir to A-Dir (D13)
So this becomes

const int stepPin4 = 12; // a-stp // stepper 4
const int dirPin4 = 13; // a-dir

re 8 steppers
I wouldn't even try on a 8 bit controller... to slow.
If your trying to move something massive, use larger steppers not more. And better stepper drivers.

Edited 3 time(s). Last edit at 09/19/2018 09:05PM by Dust.
Re: Control 4 steppers with Arduino Uno/Due and CNC Shield
September 20, 2018 05:12AM
Hello,

I don't use this board for printer. In my project assembly, I'm using bipolar steppers to get fast and short movement in range of 60º or 40º degree to accelerate mechanical part mass 60-180g, with sending of 5-7 messages per second from control application to Arduino Uno or Due micro controller with A4988 driver on CNC Shield

With Arduino Uno, my connection is:

1. jumper reset and sleep together
2. VDD to Arduino 3.3v or 5v
3. GND to Arduino GND (GND near VDD)
4. 1A and 1B to stepper coil 1 black/green wire
5. 2A and 2B to stepper coil 2 red/blue wire
6. VMOT to power source (9v battery + term)
7. GRD to power source (9v battery - term)

I've checked 2 power adapters, both with 9 and 12 V. I've tried use it with as well as with breadboard, this way:



and connection with CNC shield by parallel pins, maybe this is incorrect, I don't know why, but in both cases, motor does not moves.



I'm using DC Jack for adapter to stepper, back pin connected to the center pin plus, front pin is ground according to adapter -C+, the third leg is not used, I do not even know its purpose, maybe I did something wrong way

Edited 4 time(s). Last edit at 09/20/2018 06:07AM by viktor80.
Re: Control 4 steppers with Arduino Uno/Due and CNC Shield
September 20, 2018 06:59AM
On the breadboard the enable line to the stepper driver is not pulled low, so it is not enabled.

Same with the Shield EN and GND need to be connected with jumpers, or you can connect EN to the controller an turn it on with software
Re: Control 4 steppers with Arduino Uno/Due and CNC Shield
September 20, 2018 07:51AM
Quote
Dust
On the breadboard the enable line to the stepper driver is not pulled low, so it is not enabled.

Same with the Shield EN and GND need to be connected with jumpers, or you can connect EN to the controller an turn it on with software

Well,

thank you for your answer,

control works well with Arduino Uno, 12V power adapter and breadboard with driver

I want move it with command from C#

Problem 1:

It is not constantly working loaded code, but stepper motor becomes extremely hot very quickly

What could be the reason of this?

Problem 2:

Still can't move it with CNC shield, here is my connection:



Edited 5 time(s). Last edit at 09/20/2018 08:59AM by viktor80.
Re: Control 4 steppers with Arduino Uno/Due and CNC Shield
September 20, 2018 12:34PM
re problem 1:
You need to limit the current. You need to adjust the vref potentiometer to match your stepper motors
NB do not use a metal screwdriver to adjust these, you will short them and kill the stepper module
Use a plastic screwdriver or make a wooden screwdriver from a wooden toothpick.
Your steppers are 0.6 amp per phase.
see [reprap.org]


re problem 2:
steppers are not plugged in there, that is 4 digital signals X_step, A_step,A_dir, X_dir. This for if you wanted A axis to mirror X axis, you would put jumpers over X_step, A_step and A_dir, X_dir
Stepper need to be plugged into the pins you highlighted in yellow above.


NB you alre also running the steppers in full step mode. This is very jerky (and loud)
You should put the stepper into a microstepping mode with the 3 jumpers under each stepper driver.



Edited 8 time(s). Last edit at 09/20/2018 12:59PM by Dust.
Sorry, only registered users may post in this forum.

Click here to login