Adruino Mega 2560 + Adafruit Motor Shield

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
mshameel
 
Posts: 3
Joined: Fri Oct 10, 2014 8:17 am

Adruino Mega 2560 + Adafruit Motor Shield

Post by mshameel »

Hello All,

I am beginner in using adruino. Recently I have purchased an adruino mega 2560. I am currently trying to operate a 12v stepper motor using the Adafruit motor shield. Most of the tutorials available online uses adruino uno to mount the shield on. I have the following questions:

1. Should the motor shield be mounted on to the adruino board itself. Can this be seperate. I dont have an easy access to soldering the header pins.
2. How should i mount the adafruit motor shield on to the adruino mega? As per the FAQ section at Adafruit the pins that are used on the adruino mega to communicate with the shield are digital pins 20 and 21. If I mount the shield exactly the same as that on adruino uno to that of adruino mega, the digital pins 20 and 21 are not connected. Please advise.
3. After realizing that adafruit library uses digital pin 20 and 21 to communicate to the motor shields SDA and SCL, I tried to connect these ports through a jumper wire. The stepper motor however does not move. I used the stepper test example given by adafruit.
http://s14.postimg.org/eyhvo63k1/photo.jpg
Please help

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

Re: Adruino Mega 2560 + Adafruit Motor Shield

Post by adafruit_support_bill »

1. Should the motor shield be mounted on to the adruino board itself. Can this be seperate. I dont have an easy access to soldering the header pins.
It can operate detached. You need connections for GND, 5v, SDA and SCL.
2. How should i mount the adafruit motor shield on to the adruino mega? As per the FAQ section at Adafruit the pins that are used on the adruino mega to communicate with the shield are digital pins 20 and 21. If I mount the shield exactly the same as that on adruino uno to that of adruino mega, the digital pins 20 and 21 are not connected. Please advise.
If it is an R3 MEGA, the SDA and SCL pins signals are also available on the header next to the AREF pin. If it is not an R# Mega, you will need jumpers from pins 20 and 21.
3. After realizing that adafruit library uses digital pin 20 and 21 to communicate to the motor shields SDA and SCL, I tried to connect these ports through a jumper wire. The stepper motor however does not move. I used the stepper test example given by adafruit.
In your photo, the green power led is not lit. This means there is no power to the motors. Please check your power supply. Make sure that the polarity is correct.

User avatar
mshameel
 
Posts: 3
Joined: Fri Oct 10, 2014 8:17 am

Re: Adruino Mega 2560 + Adafruit Motor Shield

Post by mshameel »

Thank you for the prompt reply. Please find further questions below :
Should the motor shield be mounted on to the adruino board itself. Can this be seperate. I dont have an easy access to soldering the header pins.

It can operate detached. You need connections for GND, 5v, SDA and SCL.
I have connected the 5v and gnd from adruino to the shield. When I now connect the adruino to pc via usb, it says the usb has exceeded voltage limit . voltage surge. What am i doing wrong here. I have also tried to connect the adruino directly to power via the usb, the adruino does not switch on! Also the motor still does not move.

Image
2. How should i mount the adafruit motor shield on to the adruino mega? As per the FAQ section at Adafruit the pins that are used on the adruino mega to communicate with the shield are digital pins 20 and 21. If I mount the shield exactly the same as that on adruino uno to that of adruino mega, the digital pins 20 and 21 are not connected. Please advise.

If it is an R3 MEGA, the SDA and SCL pins signals are also available on the header next to the AREF pin. If it is not an R# Mega, you will need jumpers from pins 20 and 21.
Noted. I have the Arduino Mega 2560 R3. however i have connected the shield using pin 20 and 21
3. After realizing that adafruit library uses digital pin 20 and 21 to communicate to the motor shields SDA and SCL, I tried to connect these ports through a jumper wire. The stepper motor however does not move. I used the stepper test example given by adafruit.

In your photo, the green power led is not lit. This means there is no power to the motors. Please check your power supply. Make sure that the polarity is correct.
The image I have posted without the power on. The LED lights up brightly when the power is switch on. I have previously short circuited my laptop using an standalone h-bridge. I am trying to be a little careful this time with power.

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

Re: Adruino Mega 2560 + Adafruit Motor Shield

Post by adafruit_support_bill »

When I now connect the adruino to pc via usb, it says the usb has exceeded voltage limit . voltage surge. What am i doing wrong here.
You have a short circuit somewhere. Post photos showing all your soldering to the shield.
Noted. I have the Arduino Mega 2560 R3. however i have connected the shield using pin 20 and 21
That is fine. The same signals are on both sets of pins.

User avatar
Franklin97355
 
Posts: 23939
Joined: Mon Apr 21, 2008 2:33 pm

Re: Adruino Mega 2560 + Adafruit Motor Shield

Post by Franklin97355 »

Are those jumpers soldered to the shield or just pushed through the holes into the breadboard?

User avatar
mshameel
 
Posts: 3
Joined: Fri Oct 10, 2014 8:17 am

Re: Adruino Mega 2560 + Adafruit Motor Shield

Post by mshameel »

the jumpers are not soldered on to the shield. its just plugged in. Please advise

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

Re: Adruino Mega 2560 + Adafruit Motor Shield

Post by adafruit_support_bill »

You need to solder your jumpers for reliable connection.

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

Return to “Arduino”