Arduino mega 2560 y drv8825

First, I wish to greet all the members of this forum and that these words are worth as presentation.
And, of course, I want to ask a little question I have:

How do I connect pololu driver with arduino mega 8825 2560r3?, I tested with the connection shown in pololu site
pololu.com/catalog/product/2132 and is not in any way.

To test, I loaded the program on the arduino:

int sleep = 11;
int reset = 10;
int direccion = 9;
int paso = 8;


void setup()
{       
  pinMode(sleep,OUTPUT);
  pinMode(reset,OUTPUT);
  pinMode(direccion,OUTPUT);
  pinMode(paso,OUTPUT);
  
  pinMode(12,OUTPUT);

  digitalWrite(sleep, HIGH);
  digitalWrite(reset, HIGH);
  digitalWrite(direccion, HIGH);
  
}



void loop() 
{
      digitalWrite(12, HIGH);
      digitalWrite(paso, HIGH);
      delay(100);
      digitalWrite(12, LOW);
      digitalWrite(paso, LOW);
      delay(100);
}

The pin 12 is to see me in a LED each program cycle …

Awaiting your instructions …
I tested the connection is:

A greeting.
P.D.: Sorry for the English, is the translator of google.

Hello.

When posting on the forum, please wrap blocks of code in [code] tags. I edited your post to do it.

Your hardware connections look fine except I would recommend putting a bulk (at least 50uF) electrolytic capacitor between VMOT & GND. Your code looks wrong. First, it is toggling pin 12, which is not connected to anything. Second, you put step (paso) on pin 8, but in hardware it is connected to pin 9.

- Ryan

Firstly, thank you for answering my question.
I use pin 12 for connecting it to a resistence and a led to see the cicles of work. Talking about the step and dir’s position, it was a drawing failure, I mean, they are connected to the pins that the program indicates

Okay, well I did not notice anything else that was incorrect. Can you please provide information about your power supply, the motor you are using, and pictures of your setup that show all your wiring and your solder connections? Also, have you set the current limiting?

- Ryan

No, I have not controlled the current limitation, engine is one taken from an epson printer, most specifically of the paper feeder, in terms of all wiring and soldering, I will try send it, although I haven’t seen cold welds or weird stuff. The capacitor between the motor power supply do I need?.

Thank you.

Please try to post some pictures.

Do you know the specs on your motor? What is the rated coil current and voltage or resistance? You need to set the current limiting so that it is not too high or low for your motor. If your motor has too high of a coil current, you might not be able to drive it with this driver anyway. What kind of power supply are you using?

A capacitor between motor power and ground will help condition the input voltage and current to be steadier and help mitigate the effect resistance and inductance in the power supply and power supply wires. It is strongly recommended.

You haven’t really described what is going wrong. What is happening and what are you expecting to happen?

- Ryan

Let’s see:
The motor is removed from a printer paper feeder epson, about the concrete specifications of the engine, I don’t know them. :frowning:
If the photos could help you, here you have them.
What I want to happen?, I want the motor to turns or moves itself at least a little, talking about the images of the installation, please, don’t laugh about them, it’s a domestical test. :smiley:




Thanks for the pictures, it gives me a much better sense for your setup. It would be good if you could take a picture of your setup as you have it with the Arduino and the stepper motor connected. For example, your current pictures leave me to guess whether you connect the ground of your Arduino to the ground of the stepper motor driver, and if you are connecting the logic voltage to RESET and nSLEEP. Your motor power wires are long, not very thick, and come from a spot on your console that does not look like it is intended to source a couple of amps.

When you power your system, does the rotor spin freely, or hold its position?

- Ryan

A post was split to a new topic: Controlling two stepper motors using the DRV8825 and an Arduino