Jump to content

SkySurveyBanner.jpg.21855908fce40597655603b6c9af720d.jpg

ARDUINO UNO R3 + ARDUINO MOTOR SHIELD R3 (GENUINE


ponytale

Recommended Posts

Here is my post regarding the Arduino rev 3 and motorshield rev 3 this is relativly new and there is little info out there for this shield,

so here is what i have found out so far. it has the ability to drive 2 dc motors independently OR a stepper Motor with 4 or 8 wires from 5v up to 12volts as absolute max 18v. the lateset arduino package 1.01 is required to drive it , this has the necessary drivers and software to modify sketches etc .

http://arduino.cc/en/Main/Software

I have a Nema 17 stepper with 1.8 degree steps and 6 wires , in my case the colours are standard Nema Colurs : Orange ,Blue , Yellow, Red ,and Black and White , Orange and Blue are one coil with White being Common , and Red and Yellow the other with Black being Common , it seems that Black and White can be ignored under most circumstances, so on the shield the Blue is B+ Orange B- Yellow is A+ Red A- put your power supply into Vin + and ground -neg 12volts or what your stepper requires . after installing the IDE,(Integrated develepment environment)you will be able to download a sketch ( script would be more apt) the sketches that come with this package are not relevent to this shield but can be modded to suit , the easiest way is to copy a sketch for this shield .

I can't upload the sketch ( .ino) file so email me if you need it !

i had a few hassles trying to edit or upload sketches until i found the editor is turned off by default ? go to file prefs in the IDE and untick "Use external editor"

you can then type in changes to your sketch such as speed and revs etc ,be aware it is absolutely a code and even spaces in the wrong place have an effect ,

there are tutorials in the arduino forums to guide you , however i found a sketch ,see next

mod points [attachment=71164:steppersketch r3uno.doc]

#include <Stepper.h>

const int stepsPerRevolution = 200; // change this to fit the number of steps per revolution

// for your motor

// initialize the stepper library on the motor shield

Stepper myStepper(stepsPerRevolution, 12,13);

// give the motor control pins names:

const int pwmA = 3;

const int pwmB = 11;

const int brakeA = 9;

const int brakeB = 8;

const int dirA = 12;

const int dirB = 13;

int x = 0;

void setup () {

Serial.begin(9600);

// set the PWM and brake pins so that the direction pins // can be used to control the motor:

pinMode(pwmA, OUTPUT);

pinMode(pwmB, OUTPUT);

pinMode(brakeA, OUTPUT);

pinMode(brakeB, OUTPUT);

digitalWrite(pwmA, HIGH);

digitalWrite(pwmB, HIGH);

digitalWrite(brakeA, LOW);

digitalWrite(brakeB, LOW);

// initialize the serial port:

Serial.begin(9600);

// set the motor speed (for multiple steps only):

myStepper.setSpeed(200);

} void loop () {

myStepper.step(200);

myStepper.step(-200);

delay(2000);

}

end above. include bracket

other links that are helpful

http://www.instructables.com/id/Arduino-Motor-Shield-Tutorial/

http://gibsonsystems.com/sblog/index.php?/archives/23-Arduino-Motor-Shield-R3.html

I hope this is useful to some one, who like me wants to automate their scope in one way or another , i will update from time to time as my knowledge expands

any help/ comments welcome .

steppersketch r3uno.doc

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. By using this site, you agree to our Terms of Use.