0

Motor Shield V2.3 No V Output on DC ports
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Motor Shield V2.3 No V Output on DC ports

by sebastian2992 on Fri Jul 05, 2019 1:36 pm

Hello,

I'm trying to run a DC motor with my Motor Shield V2.3, I try copy the code that AdaFruit page provide and the example on the libraries. But nothing work to output voltage on the DC motor connection ports. With that code the shield is outputting voltage on the servo pins only.

Can't find somebody with the same problem.
I try on Arduino UNO, and Arduino Mega (No Luck)

Attached the code that the library provide.





Code: Select all | TOGGLE FULL SIZE
[
/*
This is a test sketch for the Adafruit assembled Motor Shield for Arduino v2
It won't work with v1.x motor shields! Only for the v2's with built in PWM
control

For use with the Adafruit Motor Shield v2
---->   http://www.adafruit.com/products/1438
*/

#include <Wire.h>
#include <Adafruit_MotorShield.h>

// Create the motor shield object with the default I2C address
Adafruit_MotorShield AFMS = Adafruit_MotorShield();
// Or, create it with a different I2C address (say for stacking)
// Adafruit_MotorShield AFMS = Adafruit_MotorShield(0x61);

// Select which 'port' M1, M2, M3 or M4. In this case, M1
Adafruit_DCMotor *myMotor = AFMS.getMotor(1);
// You can also make another motor on port M2
//Adafruit_DCMotor *myOtherMotor = AFMS.getMotor(2);

void setup() {
  Serial.begin(9600);           // set up Serial library at 9600 bps
  Serial.println("Adafruit Motorshield v2 - DC Motor test!");

  AFMS.begin();  // create with the default frequency 1.6KHz
  //AFMS.begin(1000);  // OR with a different frequency, say 1KHz
 
  // Set the speed to start, from 0 (off) to 255 (max speed)
  myMotor->setSpeed(150);
  myMotor->run(FORWARD);
  // turn on motor
  myMotor->run(RELEASE);
}

void loop() {
  uint8_t i;
 
  Serial.print("tick");

  myMotor->run(FORWARD);
  for (i=0; i<255; i++) {
    myMotor->setSpeed(i); 
    delay(10);
  }
  for (i=255; i!=0; i--) {
    myMotor->setSpeed(i); 
    delay(10);
  }
 
  Serial.print("tock");

  myMotor->run(BACKWARD);
  for (i=0; i<255; i++) {
    myMotor->setSpeed(i); 
    delay(10);
  }
  for (i=255; i!=0; i--) {
    myMotor->setSpeed(i); 
    delay(10);
  }

  Serial.print("tech");
  myMotor->run(RELEASE);
  delay(1000);
}]
Last edited by adafruit_support_bill on Fri Jul 05, 2019 1:56 pm, edited 1 time in total.
Reason: please use [code] tags when posting code to the forums.

sebastian2992
 
Posts: 7
Joined: Fri Jul 05, 2019 1:20 pm

Re: Motor Shield V2.3 No V Output on DC ports

by adafruit_support_bill on Fri Jul 05, 2019 1:57 pm

Please post some photos showing your soldering and connections to the shield.

Also please post specs for the motor and power supply you are using.

adafruit_support_bill
 
Posts: 74337
Joined: Sat Feb 07, 2009 10:11 am

Re: Motor Shield V2.3 No V Output on DC ports

by sebastian2992 on Wed Jul 10, 2019 8:38 am

Good Morning,

I try two different power supplies
- EV3A-500W (Connected directly to the shield)
- regular 12vDC 1A (connected to the arduino with the jumper on the shield)

soldering A (1).jpg
soldering A (1).jpg (940.68 KiB) Viewed 216 times

soldering B.jpg
soldering B.jpg (773.04 KiB) Viewed 216 times

sebastian2992
 
Posts: 7
Joined: Fri Jul 05, 2019 1:20 pm

Re: Motor Shield V2.3 No V Output on DC ports

by sebastian2992 on Wed Jul 10, 2019 10:06 am

This is the power supply

IMG-5938.JPG
IMG-5938.JPG (683.22 KiB) Viewed 213 times

sebastian2992
 
Posts: 7
Joined: Fri Jul 05, 2019 1:20 pm

Re: Motor Shield V2.3 No V Output on DC ports

by adafruit_support_bill on Wed Jul 10, 2019 10:26 am

Please post the specs for the motor you are attempting to run.

Does the green power LED on the shield light up?

adafruit_support_bill
 
Posts: 74337
Joined: Sat Feb 07, 2009 10:11 am

Re: Motor Shield V2.3 No V Output on DC ports

by sebastian2992 on Wed Jul 10, 2019 10:56 am

I don't have the specs of the motor but tried connecting the same motor on the servo pins that are outputting 5V each and the motor run.

Yes the LED light's up

sebastian2992
 
Posts: 7
Joined: Fri Jul 05, 2019 1:20 pm

Re: Motor Shield V2.3 No V Output on DC ports

by adafruit_support_bill on Wed Jul 10, 2019 11:09 am

If you run the i2c scanner code, what is the output? https://playground.arduino.cc/Main/I2cScanner/

adafruit_support_bill
 
Posts: 74337
Joined: Sat Feb 07, 2009 10:11 am

Re: Motor Shield V2.3 No V Output on DC ports

by sebastian2992 on Wed Jul 10, 2019 11:33 am

0x60
0x70

sebastian2992
 
Posts: 7
Joined: Fri Jul 05, 2019 1:20 pm

Re: Motor Shield V2.3 No V Output on DC ports

by adafruit_support_bill on Wed Jul 10, 2019 12:45 pm

OK. So the controller chip is responding.

Please post photos that show how you have the motor connected.

adafruit_support_bill
 
Posts: 74337
Joined: Sat Feb 07, 2009 10:11 am

Re: Motor Shield V2.3 No V Output on DC ports

by sebastian2992 on Wed Jul 10, 2019 1:20 pm

ok, so I try a servo motor with pin 3 and 4 and the board is working. but still nothing on pin 1 or 2

sebastian2992
 
Posts: 7
Joined: Fri Jul 05, 2019 1:20 pm

Re: Motor Shield V2.3 No V Output on DC ports

by adafruit_support_bill on Wed Jul 10, 2019 2:38 pm

ok, so I try a servo motor with pin 3 and 4 and the board is working.

The code is for a DC motor. Not a servo motor.
And port 3 and port 4 are two different DC motor ports. Your code is only creating one motor.

It would be a lot easier to diagnose problems if you would provide ALL of the information and photos requested.

We need to know what kind of motors you are using and we need to see how you are actually connecting them.

adafruit_support_bill
 
Posts: 74337
Joined: Sat Feb 07, 2009 10:11 am

Re: Motor Shield V2.3 No V Output on DC ports

by sebastian2992 on Wed Jul 10, 2019 3:08 pm

sorry about that I jut change the port number on the dc test code from 1 to 4 and it started to work with the dc motor (forget about the servo statement)

IMG-5943.JPG
IMG-5943.JPG (918.76 KiB) Viewed 164 times

sebastian2992
 
Posts: 7
Joined: Fri Jul 05, 2019 1:20 pm

Re: Motor Shield V2.3 No V Output on DC ports

by adafruit_support_bill on Wed Jul 10, 2019 3:31 pm

Good to hear it is working. Thanks for the update.

adafruit_support_bill
 
Posts: 74337
Joined: Sat Feb 07, 2009 10:11 am

Please be positive and constructive with your questions and comments.