Adafruit Motor Shield v2.3 for UNO: DC motor not running

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
tomere
 
Posts: 7
Joined: Sun Dec 09, 2018 6:14 pm

Adafruit Motor Shield v2.3 for UNO: DC motor not running

Post by tomere »

Hi,
I've been trying to run a DC motor using the example code of the Adafruit Motor Shield v2.3 library (with Arduino UNO R3).
The motor is a 4.5W , 12v DC motor.
I'm using an external power supply of 12v / 3A (the power jumper is in place on the shield) .
I've connected the motor to the M1 input as in the tutorial and all I can here is a week high pitch sound, and the motor is not running.
I've tried changing the input to M2 and changing the speed to all kind of values between 10 and 200 and it didn't make a difference.
Also tried to change the motor to another one with similar features, but the problem persists.

I should also mention that I am able to (separately) operate a stepper motor using this shield on the same UNO.
I don't know what is wrong ....

The code:

Code: Select all

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

// Create the motor shield object with the default I2C address
Adafruit_MotorShield AFMS = Adafruit_MotorShield(); 

// Select which 'port' M1, M2, M3 or M4. In this case, M1
Adafruit_DCMotor *myMotor = 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(1000);  // create with the default frequency 1.6KHz
  myMotor->setSpeed(250);
}

void loop() {
  myMotor->run(FORWARD);
  delay(1000);
}

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Adafruit Motor Shield v2.3 for UNO: DC motor not runnin

Post by adafruit_support_bill »

To help diagnose the problem, please post the following:
* The electrical specifications for the motors you are using.
* The code you are using to test.
* Photos showing your soldering and connections.

User avatar
tomere
 
Posts: 7
Joined: Sun Dec 09, 2018 6:14 pm

Re: Adafruit Motor Shield v2.3 for UNO: DC motor not runnin

Post by tomere »

adafruit_support_bill wrote:To help diagnose the problem, please post the following:
* The electrical specifications for the motors you are using.
* The code you are using to test.
* Photos showing your soldering and connections.
Hi Bill,
The electric spec of the motor is as mentioned: 12v DC motor (water pump), runs on 4.5W (0.375 A).
The code that i'm using is also attached in the post.

As for the requested photo, see attached.
Regards,
Tomer
The system connected
The system connected
IMG_20181210_232005.jpg (431.24 KiB) Viewed 256 times

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Adafruit Motor Shield v2.3 for UNO: DC motor not runnin

Post by adafruit_support_bill »

What is the current rating of the power supply you are using? Dies the green LED on the shield dim when attempting to run the motor?

Check the polarity of your connections. Some pump motors are designed to only run in one direction.

User avatar
tomere
 
Posts: 7
Joined: Sun Dec 09, 2018 6:14 pm

Re: Adafruit Motor Shield v2.3 for UNO: DC motor not runnin

Post by tomere »

Hi Bill,
The current rating is 3.5 A over 12V dc power.
There might be a very slight dim when attempting to run motor.
How could I reverse the polarity? would changing the pump direction from 'FORWARD' to 'BACKWARD' do the trick?
If so - then I have already tried it and it didn't work.

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Adafruit Motor Shield v2.3 for UNO: DC motor not runnin

Post by adafruit_support_bill »

Does the motor run if you power it directly from the power supply?

With the motor connected and the code attempting to run it, measure the voltage at the motor screw terminals on the shield.

Then take the same measurement with the motor disconnected.

User avatar
tomere
 
Posts: 7
Joined: Sun Dec 09, 2018 6:14 pm

Re: Adafruit Motor Shield v2.3 for UNO: DC motor not runnin

Post by tomere »

Hi Bill,
Yes, the motor runs smoothly if I power it directly from the power supply.
I need to get my hands on a multimeter first.
Will do and update then.

User avatar
tomere
 
Posts: 7
Joined: Sun Dec 09, 2018 6:14 pm

Re: Adafruit Motor Shield v2.3 for UNO: DC motor not runnin

Post by tomere »

adafruit_support_bill wrote:Does the motor run if you power it directly from the power supply?

With the motor connected and the code attempting to run it, measure the voltage at the motor screw terminals on the shield.

Then take the same measurement with the motor disconnected.
Hi Bill,
With the motor connected i measured 11.04 V
With the motor disconnected i measured 11.16 V

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Adafruit Motor Shield v2.3 for UNO: DC motor not runnin

Post by adafruit_support_bill »

That's odd. If there is voltage at the motor terminals, the motor is getting power. Is there any twitch or other signs of attempting to move when you power it up via the shield?

User avatar
tomere
 
Posts: 7
Joined: Sun Dec 09, 2018 6:14 pm

Re: Adafruit Motor Shield v2.3 for UNO: DC motor not runnin

Post by tomere »

adafruit_support_bill wrote:That's odd. If there is voltage at the motor terminals, the motor is getting power. Is there any twitch or other signs of attempting to move when you power it up via the shield?
Yes, i can hear an initial twitch (implying the pump is trying to run), then a high pitch sound is herd (all while the pump is connected to the shield).

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Adafruit Motor Shield v2.3 for UNO: DC motor not runnin

Post by adafruit_support_bill »

The high-pitch sound would be the 1.6KHz PWM. Try increasing the motor speed to the max: 255.

User avatar
tomere
 
Posts: 7
Joined: Sun Dec 09, 2018 6:14 pm

Re: Adafruit Motor Shield v2.3 for UNO: DC motor not runnin

Post by tomere »

I've tried that with no success...
I think I might just give up and use a relay to operate the motor with an external circuit.
One question though - can I connect an external RTC module such as DS3231 to the shield?
I know the shield uses the SDA and SCL pins and this RTC module also connects to it...

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Adafruit Motor Shield v2.3 for UNO: DC motor not runnin

Post by adafruit_support_bill »

Yes, you can connect an RTC. The i2c bus is designed to be shared. As long as the devices have unique i2c addresses, they can share the same bus.
https://learn.adafruit.com/i2c-addresses/the-list

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”