I have the Adafruit Motor Shield and I have a stepper motor. I am very confused as to how to wire it up. I have a 12V DC power supply to power the shield and I connected both ends of the stepper to M3 and M4.
Any way I can get code to turn the stepper? I also keep getting this error every time I try uploading the Adafruit example code :
avrdude: stk500_getsync(): not in sync: resp=0x30
My AFMotor.h file is in the correct place… Help!
Where did you connect the power (12v) ?
It sounds like you are saying your motor only has two leads ?
How many wires from the stepper ?
I connected the 12V to the Arduino Due itself however the USB powers the Arduino and the 12V external power is used for the motor shield.
The stepper has 4 leads (which I am also unsure which are used for which).
I found some data-sheets online for my specific motor though, take a look:
and page 10 in this PDF: http://cnc25.free.fr/documentation/moteurs%20pap/pap_nmb.pdf
Look at the schematic
Attached is the datasheet and user manual for motor shield.
LOOK AT PHOTO ON PAGE 24 OF STEPPER MOTOR CONNECTIONS
The pin in the middle of the 5 pins is a ground .
ZOOM IN on photo. You’ll see the ground in the middle is not used for a stepper motor.
DID YOU CHANGE THE NAME OF THE LIBRARY FOLDER TO “Adafruit_Motor_Shield” ?
The motor power supply should go to motor power connector.
adafruit-motor-shield.pdf (3.15 MB)
I changed the name of the folder...
My stepper has these wires: yellow, red, blue, and orange -> which ones go to M3 and which ones go to M4?
Although the code says "Done uploading", there is still orange text that says : avrdude: stk500_getsync(): not in sync: resp=0x30
Also, would this mean I would have to take apart the 12v connector and put the wires straight into the screw terminals on the motor shield? The green power light on the shield turns on when I plug the 12v into the arduino.
I read that if you the jumper (on the Arduino) for USB and you have the jumper on the shield, the 12v will go straight to the shield and not power the Arduino (because the USB is powering the Arduino)
Look at my last post. The photo on page 24 of the datasheet for the motor shield shows how to connect the stepper.
Zoom in on the photo.
You have to connect the motor power supply to the power connector on the shield. There is no alternative. I don't care what led comes on where. It has to be connected that way, period.
Since those wires are color coded differently, any idea of what wires to connect where since I have red, orange, yellow, and blue?
According to another data sheet for this stepper, red + yellow go together, and blue + yellow go together. Does it matter what screw terminal either of them go into?
TAKE A CLOSER LOOK AT THE DIAGRAM ON PAGE 10 YOU MENTIONED. SEE WHERE IT SAYS "WINDING DIAGRAM " ?
BLACK AND WHITE ARE THE RETURNS (Power)
RED & YELLOW are one phase
BLUE & ORANGE (NOT YELLOW) are the other phase
BOTH THE BLACK & WHITE SHOULD GO TO THE MOTOR POWER (+12v)(not ground)
The motor shield completes the path to ground for each winding.
What kind of 12V power supply ? (current rating ,brand ?)
Did you close all instances of the IDE after changing the folder name ?
Did you use "File\Examples\Adafruit Motor shield\Examples\AFMotor_Multistepper" ?
As a side note, none of my code, even a simple LED blinking, works on my Arduino...
I keep getting the message: avrdude: stk500_getsync(): not in sync: resp=0x30
My 12V power supply model: LTE12W-S2, Output: 12Vdc/1A Max: 12W
You know which board you have set up in the boards.txt file ?
Not sure what that is…
I found the boards.txt file but it seems to be a long link to a Google code site
What link should I put there for my Arduino Duemilanove?
Attached is a copy of my boards.txt file.
DON’T GET IT MIXED UP WITH YOURS. Put it somewhere else.
The boaards.txt file is not a link. If you look closely it says "see " (don’t worry about that . Look at the file I attached. I added the CR & LF.
It looks like one line but that’s because the formating.doesn’t have any carraige returns or line feeds so it appears to be one really long line that never ends.
Locate the ORIGINAL boards.txt FILE
Make a copy of the file and save the copy in completely different folder, preferably a different drive.
RENAME the ORIGINAL FILE “Boards_ORIGINAL.txt”
Now open the copy of the file.
Click Edit\Select All
Click Edit\Copy (leave this file just like it is for now and proceed to next step)
Open Microsoft Word
Put the cursor in the middle of the page. Right click \paste
Go the upper right corner of screen and select "Style select\change style\select Word 2003
Click the Select\Editing button just to the right of the “Style Select”
Click Select Editing\Select All to highlight all the text.
Another way to do that is just put the mouse cursor over the text and do a Control-A on the keyboard.
The text will be highlighted.
right mouse click \copy (another way to do this is Control-C on keyboard.)
Go back to Notepad file and put the mouse cursor over the highlighted text right mouse click=paste.
Close the file (remember, this is the COPY of the original.
Open Windows explorer and click the copy of the file (the same one you just closed) to highlight it.
Right mouse click -copy
With Window Explorer locate the original file in C:\Program Files (on 64 bit systems it’s C:\Program Files(x86)
With Window Explorer locate the original file in C:\Program Files\Arduino\Hardware\Arduino
Highlight the “Arduino” folder the original file is in.
Right mouse click \PASTE (to paste the copy of the file you modified into the folder containing the renamed original file.
You may be prompted for administrator permission or to confirm . Click yes or ok to confirm and proceed with saving the file.
Now you can read the file.
Confirm that he file you just saved has the same info for your uC (the Duemilonove)
boards.txt (16.4 KB)