0

Adafruit Motor Shield v2.3 for UNO: DC motor not running
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

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

by tomere on Sun Dec 09, 2018 6:28 pm

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 | TOGGLE FULL SIZE
#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);
}

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

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

by adafruit_support_bill on Sun Dec 09, 2018 8:13 pm

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.

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

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

by tomere on Mon Dec 10, 2018 5:33 pm

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

IMG_20181210_232005.jpg
The system connected
IMG_20181210_232005.jpg (431.24 KiB) Viewed 123 times

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

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

by adafruit_support_bill on Mon Dec 10, 2018 6:15 pm

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.

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

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

by tomere on Sat Dec 15, 2018 1:11 pm

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.

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

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

by adafruit_support_bill on Sat Dec 15, 2018 1:56 pm

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.

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

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

by tomere on Sat Dec 15, 2018 3:01 pm

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.

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

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

by tomere on Tue Dec 25, 2018 2:32 pm

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

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

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

by adafruit_support_bill on Tue Dec 25, 2018 3:20 pm

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?

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

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

by tomere on Wed Dec 26, 2018 3:00 am

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).

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

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

by adafruit_support_bill on Wed Dec 26, 2018 7:46 am

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

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

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

by tomere on Tue Jan 01, 2019 5:35 pm

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...

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

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

by adafruit_support_bill on Tue Jan 01, 2019 8:07 pm

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

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

Please be positive and constructive with your questions and comments.