Go Down

Topic: Is the cnc shield for stepper motors v4 constructed incorrectly? (Read 15461 times) previous topic - next topic

matelot

New! A4988 3D Printer Stepper Motor Driver CNC Shield V4 for Arduino.
here
I purchased the above shield to use with a nano and 3 A4988's.
After many fruitless attempts to move from a blob board to the shield I took a carefull look at the tracks on the board.
The d2,d3 and d4 tracks from the nano go to the x,y and z direction pins of the A4988's.
The d5,d6 and d7 tracks go to the x,y and z step pins of the A4988's.
Surely this is the wrong way round. gcode uses d2 as a step and d5 as a direction.
see this.
My problem is
Am I the first to see this?
How is everyone else getting the units working? or aren't they?
Am I incorrect somehow?
I have cut the tracks and soldered wires so they are correct to my reckoning.
Now the direction does not alter on either of my A4988's, have I blown that part do you think?
 


keeper63

A couple of things:

1. Are you sure you have the A4988 boards correctly oriented? In other words, if they were put in place flipped around, would the pins vs function match?

2. Given that these boards are custom things from China, they very well could be made wrong, or maybe the CNC software they are using with the board uses a different pin spec?

3. Are you sure you are supposed to use GRBL with these boards? Again, maybe there is a custom Chinese software meant for loading on the Arduino per question 2?

4. Why bother altering the board? Just alter the pin numbers in the config file the 328p:

https://github.com/grbl/grbl/blob/master/grbl/cpu_map/cpu_map_atmega328p.h

5. It is likely that your alterations of the board has damaged something. Pull the A4988 boards from the carrier, and test them independently using a solderless breadboard and some jumpers.

Good luck. :)
I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

Robin2

I have cut the tracks and soldered wires
To answer the question in your title - It is now.

You can't seriously expect someone who is unfamiliar with the original board and who cannot see how you have mucked it up to give advice.

Just start over, buy another board and put it down to experience.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

rpt007

Quote
gcode uses d2 as a step and d5 as a direction
gcode is a machine language for CNC style machines to tell the machine to move the xyz-axis by the machine's post processor. It has nothing to do directly with step/dir pins.
This is done by setting up your hard- and software on the controller side, in your case: in the grbl settings as said in a previous post.
Before you ask:
Did you really read and understand How to use this forum ?
AND:
Do you have already some solution or is a part of the problem sitting in front of the screen?  :)

matelot

A couple of things:

1. Are you sure you have the A4988 boards correctly oriented? In other words, if they were put in place flipped around, would the pins vs function match?
I am sure they are correct

2. Given that these boards are custom things from China, they very well could be made wrong, or maybe the CNC software they are using with the board uses a different pin spec?
I think it has just been designed wrong but as I say later I was hoping someone else had purchased one.

3. Are you sure you are supposed to use GRBL with these boards? Again, maybe there is a custom Chinese software meant for loading on the Arduino per question 2?
It does clearly say in the info that A4988 boards and gcode are used.

4. Why bother altering the board? Just alter the pin numbers in the config file the 328p:

https://github.com/grbl/grbl/blob/master/grbl/cpu_map/cpu_map_atmega328p.h
I could do that but it wouldn't fix the boards that are for sale incorrectly.

5. It is likely that your alterations of the board has damaged something. Pull the A4988 boards from the carrier, and test them independently using a solderless breadboard and some jumpers.

Good luck. :)
I have moved the A4988 boards back and forth between a blob board and the shield but stopped checking running in both directions. The A4988 board is now on the blob board with the direction pin set for reverse running but still moves forward.
I did no alterations with the A4988 boards installed let alone with power on.



To answer the question in your title - It is now.
It was before.

You can't seriously expect someone who is unfamiliar with the original board and who cannot see how you have mucked it up to give advice.
No but I was serious expecting someone who had experience of this board to answer and not someone who is just looking for an excuse to complaining about something and I resent the 'mucked up' when you have no experience of the device or my ability.

Just start over, buy another board and put it down to experience.
Obviously buying another board would produce the same problem so this advice is down more to your lack of experience than mine.

gcode is a machine language for CNC style machines to tell the machine to move the xyz-axis by the machine's post processor. It has nothing to do directly with step/dir pins.
This is done by setting up your hard- and software on the controller side, in your case: in the grbl settings as said in a previous post.
I haven't tried cr0sh's advice about changing the pins as I am not at home at the moment . I could try that but it seems a shame if I purchase a board and have to alter my equipment to suit what is supposed to be a standard.

thanks for all the replies.

rpt007

I have a similar cheap Chinese board, being prepared for GRBL.
Mine has been working out of the box, so my respected Chinese source copied and interpreted the schematics correctly.

I agree with you rather altering / rewiring the tracks than modifying GRBL, as with the next GRBL update you have to do it again. Once fixed on the hardware side and you are set.

What exactly did you do to test the stepper direction as I did not clearly understand your answer on that and with what kind of software did you test?

Before you ask:
Did you really read and understand How to use this forum ?
AND:
Do you have already some solution or is a part of the problem sitting in front of the screen?  :)

Robin2

No but I was serious expecting someone who had experience of this board to answer and not someone who is just looking for an excuse to complaining about something and I resent the 'mucked up' when you have no experience of the device or my ability.
I will stick with my observation until you produce some evidence of ability. I based my comments on what I inferred from the combination of the title of your Thread and the actions you claimed to have taken. The combination did not suggest "experience" to me. If I have something (hardware or software) I don't understand I do not change it until I do understand why a change is needed.

On the basis of Reply #5 I will also stick with my earlier advice.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

Menneset

I just ordered the same board, I have seen comments left by reviewers that referred to a change which had to be made to GRBL config to get it to work properly. I assume this is that change. I agree a hardware solution would be better than a software one. Thanks for letting me know where to look.

lanis1201



1.  it "step" and "dir" is different. so, you must be change pin define.
please in source code folder , looking for cpu_map.h (grbl 1.1f)
(grbl 0.9J  : grbl-master\grbl\cpu_map\cpu_map_atmega328p.h)

#define X_STEP_BIT      5  // Uno Digital Pin 2
#define Y_STEP_BIT      6  // Uno Digital Pin 3
#define Z_STEP_BIT      7  // Uno Digital Pin 4
#define X_DIRECTION_BIT   2  // Uno Digital Pin 5
#define Y_DIRECTION_BIT   3  // Uno Digital Pin 6
#define Z_DIRECTION_BIT   4  // Uno Digital Pin 7

2. about  MS1 MS2 MS3 jumper ,the circuit is wrong,
   you can remove jumper first,You do not need it anymore,Trust me.
3. try to short circuit (green line)

grbl 0.9j download

good luck to you!

manuel1


kakemanx

You probably have sorted this allready, but if not have a look here, maby this is Your solution:

https://www.youtube.com/watch?v=1UKY1_hOipQ

Paul_KD7HB

gcode is a machine language for CNC style machines to tell the machine to move the xyz-axis by the machine's post processor. It has nothing to do directly with step/dir pins.
This is done by setting up your hard- and software on the controller side, in your case: in the grbl settings as said in a previous post.
Actually GRBL is Pcode or Pseudo code. Not machine code.

Paul

nikki81

Can any body confirm that lanis1201 ms1,2,3 Jumper fix is needed ?

Thanks

onirakkiss

Not like he had done this.
His schematic is not correct. You have to cut all connections between the 3 connected Jumper pins and Ground on both sides of the jumper pins and at both sides of the board and rewire all the ground together. Then connect the 3 connected Jumper pins to 5V.
Grbl v0.9 with variable spindle PWM ENABLED set the speed over 1000 if u want to use it as on vs off: (NOTE: The Z-limit and the spindle enable pin are swapped! )
If u have to use different Microsteps:

MS1 MS2 MS3 Microstep Resolution Excitation Mode
L       L       L         Full Step                 2 Phase
H      L       L         Half Step               1-2 Phase
L      H       L       Quarter Step           W1-2 Phase
H      H       L        Eighth Step           2W1-2 Phase
H      H       H      Sixteenth Step        4W1-2 Phase

(source: https://www.pololu.com/file/0J450/a4988_DMOS_microstepping_driver_with_translator.pdf )


Attached pictures of my modified board in my handibot. (it is not a beauty, I know )

gururajkashikar



1.  it "step" and "dir" is different. so, you must be change pin define.
please in source code folder , looking for cpu_map.h (grbl 1.1f)
(grbl 0.9J  : grbl-master\grbl\cpu_map\cpu_map_atmega328p.h)

#define X_STEP_BIT      5  // Uno Digital Pin 2
#define Y_STEP_BIT      6  // Uno Digital Pin 3
#define Z_STEP_BIT      7  // Uno Digital Pin 4
#define X_DIRECTION_BIT   2  // Uno Digital Pin 5
#define Y_DIRECTION_BIT   3  // Uno Digital Pin 6
#define Z_DIRECTION_BIT   4  // Uno Digital Pin 7

2. about  MS1 MS2 MS3 jumper ,the circuit is wrong,
   you can remove jumper first,You do not need it anymore,Trust me.
3. try to short circuit (green line)

grbl 0.9j download

good luck to you!

I connected the 5v pin to the M0, M1 and M2, the Micro Stepping Mode of DRV8825 driver board as shown in the above picture. The AM1117 (5V reg on Arduino Nano board) was burnt as soon as I switched ON the power to Nano CNC Shield.  :(

Looks like we need to add pull up/series resistors (10K) instead of directly connecting Mode pins to 5V supply.

Also another point to note here is, if Mode pins of DRV8825 are pulled high,it will be programmed to provide 1/32 resolution and for A4988's it would be 1/16 steps.

The idea given here looks to be good as we can still program micro stepping using jumper instead of hard coding it 1/32 steps resolution.

Thought to share if its useful for someone.

Regards,
Guru


Go Up