Duad VNH5019

Hi!!

I am undertaking a project which is currently difficult to move because I’m in big trouble on the bridge in H.

I have umaVNH5019.
I can not follow the Datasheet bridge so resorted to forum

I want to control the motors but without being on schedule for now do not want to get into that part.

What I did I called the two engines means did the 5V and GND on that blue sheet.

Ate here think I’m okay.

Then I went to another part of the board where I have some jumpers and connected the GND and VDD.
Then I saw in the datashhet M1EN not bind the methyl M1NA to 5V, the methyl oM1NB GND.OK he is on the run up to maximum speed here also nothing special

But when I located the second engine to stop it myself first.

Someone I know it could give an explanation in a video one Portuguese.

Or else can give me a code that Do the one thing that really easy one between a value potentiometer connected the two engines.

Hi!!!
I wonder why it is not possible to connect two motors in this simultaneous bridge h VNH5019

code:

# include "DualVNH5019MotorShield.h"
/ / Configure the library with pins remapped for single-channel operation
/ / This lets the single engine be controlled as if it were "motor 1"
DualVNH5019MotorShield md (2, 7, 6, A0, 2, 7, 12, A1);
void setup ()
{
md.init ();
/ / Remaining setup code goes here

}
void loop ()
{
/ / Loops endlessly; main loop goes here
/ / The Following code is a simple example:
md.setM1Speed ​​(400) / / single-channel full-speed motor "forward"
md.setM2Speed ​​(400) / / single-channel motor stop (coast)
}

Does any link botched

Hello.

Can you clarify what you are asking? You might find this sample code from the Arduino library for the Pololu Dual VNH5019 Motor Driver Shield useful:

github.com/pololu/Dual-VNH5019-Motor-Shield

#include "DualVNH5019MotorShield.h"

DualVNH5019MotorShield md;

void stopIfFault()
{
  if (md.getM1Fault())
  {
    Serial.println("M1 fault");
    while(1);
  }
  if (md.getM2Fault())
  {
    Serial.println("M2 fault");
    while(1);
  }
}

void setup()
{
  Serial.begin(115200);
  Serial.println("Dual VNH5019 Motor Shield");
  md.init();
}

void loop()
{
  for (int i = 0; i <= 400; i++)
  {
    md.setM1Speed(i);
    stopIfFault();
    if (i%200 == 100)
    {
      Serial.print("M1 current: ");
      Serial.println(md.getM1CurrentMilliamps());
    }
    delay(2);
  }
  
  for (int i = 400; i >= -400; i--)
  {
    md.setM1Speed(i);
    stopIfFault();
    if (i%200 == 100)
    {
      Serial.print("M1 current: ");
      Serial.println(md.getM1CurrentMilliamps());
    }
    delay(2);
  }
  
  for (int i = -400; i <= 0; i++)
  {
    md.setM1Speed(i);
    stopIfFault();
    if (i%200 == 100)
    {
      Serial.print("M1 current: ");
      Serial.println(md.getM1CurrentMilliamps());
    }
    delay(2);
  }

  for (int i = 0; i <= 400; i++)
  {
    md.setM2Speed(i);
    stopIfFault();
    if (i%200 == 100)
    {
      Serial.print("M2 current: ");
      Serial.println(md.getM2CurrentMilliamps());
    }
    delay(2);
  }
  
  for (int i = 400; i >= -400; i--)
  {
    md.setM2Speed(i);
    stopIfFault();
    if (i%200 == 100)
    {
      Serial.print("M2 current: ");
      Serial.println(md.getM2CurrentMilliamps());
    }
    delay(2);
  }
  
  for (int i = -400; i <= 0; i++)
  {
    md.setM2Speed(i);
    stopIfFault();
    if (i%200 == 100)
    {
      Serial.print("M2 current: ");
      Serial.println(md.getM2CurrentMilliamps());
    }
    delay(2);
  }
}

- Jeremy

Helllo.

But not this code gets me to run two engines at the same time.

Thanks jeremy!! :smiley: