Show Posts
Pages: [1]
1  Using Arduino / Motors, Mechanics, and Power / Re: 2 Easydriver questions on: April 16, 2011, 01:51:26 pm
Thank you for your reply. I have seen this tutorial although I am still at a loss as to how to control the speed/RPMs of the motor
2  Using Arduino / Motors, Mechanics, and Power / 2 Easydriver questions on: April 10, 2011, 01:03:02 pm
Hello,

I have some low level experience building stepper motor based timelapse systems for photo and video work but just recently got my hands on the EasyDriver 4.4 board and am stoked with how simple it is to use and set up. I do have it running and basically doing what I want but am a bit confused on how to adjust a few elements.

My two questions are

The potentiometer on the EasyDriver board does not seem to affect the speed the motor is moving at. It doesn't seem to do anything at all really. Am I wrong in that I thought this is how you adjust the speed of the motor? What is going on?

Is there a simple explanation on how to write the sketch to move a stepper motor with the EasyDriver board anywhere? Referencing the Portugese tutorial that everyone points to, I do have it moving and can figure out a few things but am basically lost in the programming. The only real things I care about is how much it moves, the delay between moves, and adjusting the speed of the motor...

Thanks so much in advance!

BH
3  Forum 2005-2010 (read only) / Syntax & Programs / Newbie ?: Rrun stepper program just once? on: December 29, 2009, 11:38:30 pm
Total newbie here but making progress quickly... super stoked!

My problem is I am running a stepper motor to pull a trolley a certain distance so I need the "program" to only run once... From my searching, everyone says just put those commands into the "void setup" but when i move the "stepper.step(200)" command into the setup, the motor does nothing... in the void loop, it runs great, at a continuous rate and i am able to change the speed by changing the rpms in the code.

The code that runs properly (for ever) is:


#include <Stepper.h>

// change this to the number of steps on your motor
#define STEPS 200

// create an instance of the stepper class, specifying
// the number of steps of the motor and the pins it's
// attached to
Stepper stepper(STEPS, 00, 01, 02, 03);

void setup()
{
 
  pinMode(00, OUTPUT);
  pinMode(01, OUTPUT);
  pinMode(02, OUTPUT);
  pinMode(03, OUTPUT);
  
  stepper.setSpeed(50);
}

void loop()
{  
  stepper.step(50);
}



I've tried moving the stepper.step(50) command into the setup but again, the motor doesn't budge.

thanks in advance!

4  Forum 2005-2010 (read only) / Troubleshooting / Re: [Error] Classic protocol error, PARTLY SOLVED !!! on: December 26, 2009, 06:19:18 pm
has anyone else besides the original poster been able to get this to work? i'm having a hell of a time uploading a sketch to a Arduino Nano from a Macbook Pro running Snow Leopard. Getting the same error...

when i attempt your method I do not get any different results, although you mention letting go of the reset button when seeing one quick blink, where I get three blinks, never just one...
5  Forum 2005-2010 (read only) / Troubleshooting / Re: Programs do not seem to run but kinda do... on: December 29, 2009, 08:51:42 pm
ahh-ha... that makes sense on that front...

either way, the outputs seems to all be working except for 13, which is kinda funny since that's the one that is supposed to be used for testing... I am not too concerned at this point, I guess they just needed to be "kicked on" somehow and that must have happened..

now i need to get my stepper turning instead of just vibrating like crazy!
6  Forum 2005-2010 (read only) / Troubleshooting / Re: Programs do not seem to run but kinda do... on: December 29, 2009, 06:50:16 pm
thanks for your quick reply!

no dice... nothing with the built-in LEd or one plugged in.

Big Edit:

Alright, so i tried your code with all the different digital outputs... good news is they pretty much all seem to be working with the exception of digital outs 8.9 and 13...

for DI 13, the program loads fine but does nothing...

For DIs 8 & 9, when I got to upload the sketch it returns this error:
     error: invalid digit "8" in octal constan
7  Forum 2005-2010 (read only) / Troubleshooting / Programs do not seem to run but kinda do... on: December 29, 2009, 06:07:09 pm
Hello,

New to the Arduino world, exciting stuff!

I have a Diecemilia/328 board that does not seem to work properly and I am beginning to think it is fried but have a bit of hope.

- I can upload sketches to the board with no problems...

- The "blink" LED sketch does nothing with a built in LED or a plugged-in on

- Other sketches using output pins do not seem to work either

- I ran this "hello world"/serial test sketch found here: http://www.ladyada.net/learn/arduino/lesson4.html and it did work as it should (serial port returned "hello world" text)..

any ideas what's going on? outputs are fried?

thanks in advance!


update:

I just loaded this sketch and connected a potentiometer to digital input 0 and it worked so now I am thinking the digital outs are fried?

 The circuit:

 * potentiometer connected to analog pin 0.
   Center pin of the potentiometer goes to the analog pin.
   side pins of the potentiometer go to +5V and ground
 
 created over and over again
 by Tom Igoe and everyone who's ever used Arduino
 
 */
 
 void setup() {
  Serial.begin(9600);
 }
 
 void loop() {
  // read the analog input into a variable:
   int analogValue = analogRead(0);
   // print the result:
   Serial.println(analogValue);
   // wait 10 milliseconds for the analog-to-digital converter
   // to settle after the last reading:
   delay(10);
 }
8  Forum 2005-2010 (read only) / Interfacing / Re: Arduino/L298 schematic on: December 26, 2009, 01:47:53 pm
ahhh... so by "motor" you mean "coil"? ie. the two coils to the motor?

so i am understanding that output 1 & 2 go to one coil, output 3 & 4 go to the other, input 1 & 2 & Enable A control the first coil and Input 3 & 4 & Enable B control the other coil.... and to drive the motor in direction A I would program the digital outputs on the arduino connected to inputs 1/2/3/4/Enable A/B to high/low/high/low/high/high... does this sound right?

happy holidays!
9  Forum 2005-2010 (read only) / Interfacing / Re: Arduino/L298 schematic on: December 23, 2009, 11:42:38 pm
haha, i've been reading non-stop for the past 48-hours.. someone shoulda told me this stuff was complicated!

yeah, i have since learned about that and realized i was on the wrong track completely but what originally made me think that was the dude who said

"l298 allows you to control 2 motors.

So for Motor 1:

Output 1 & output 2 to motor
Input 1 & 2 & enable A to arduino.

Enable A has to be high for motor to work
If input 1 is high and 2 is low, motor will go one way.
If input 2 is high and 1 is low, motor will go other way.

hope this help"


on the previous page... i am confused as to what he meant since he only mentioned two wires (output 1 and 2) to the motor... any idea what he meant? i will be getting a easydriver board soon but would still like to get this working with the L298N


and as always, thanks so much for the help!
10  Forum 2005-2010 (read only) / Interfacing / Re: Arduino/L298 schematic on: December 22, 2009, 07:10:28 pm
wow! thanks so much for your replys guys...

you are right, my motor (the one in the diagram i linked to) does have four wires... i am guessing that each pair in the diagram correspond to a direction (?) so i just need to pick one pair (i only need the motor to go in one direction), say, red and green, and connect these to output 1 and 2 ... is this correct?

the controller board you linked to... how would i use that? in between the L298N and the arduino? it says "Connect a 4-wire stepper motor and a microcontroller ", would the microcontroller be the arduino or the L298N? read more on that page... it would be instead of the L298N, seems super easy and made exactly for the purpose...

still seems like people are making it work with the arduino and L298N boards....hmmm...

i am open to all ideas...

again thank you so much for the help...
11  Forum 2005-2010 (read only) / Interfacing / Re: Arduino/L298 schematic on: December 22, 2009, 03:47:04 pm
newbie to all this here... trying to build a simple stepper motor pulley system for a camera... based on this guy's setup....  canon-hf100.blogspot.com/2009/07/diy-camera-motion-control_09.html

anyways, not sure how i ended up at this point but right now, i am working with an Ardunio Nano, an L298N IC chip and a 12v stepper motor (sparkfun.com/datasheets/Robotics/SM-42BYG011-25.pdf )

what i am confused about is which wires to connect on the motor side... you say Output 1 & output 2 to motor but to which motor wires? also, how does the motor get power? am i supposed to hook the Motor V+ Supply from the L298N to one of the motor wires?

thanks in advance for all your help...
12  Forum 2005-2010 (read only) / Interfacing / Re: Help with running a Stepper Motor with L293D IC on: December 29, 2009, 10:38:21 pm
well, I got it working... there were some bad connections to the motor and only one coil was energizing...

thanks anyways...
13  Forum 2005-2010 (read only) / Interfacing / Help with running a Stepper Motor with L293D IC on: December 29, 2009, 05:01:00 pm
Hello,

I have been having a heck of a time getting this simple stepper motor script to run the motor. We have the bi-polar stepper motor ( http://www.sparkfun.com/datasheets/Robotics/SM-42BYG011-25.pdf ) connected to the L293D controller chip in this fashion: http://arduino.cc/en/Reference/StepperBipolarCircuit (4-pin setup) and when it all gets plugged in, the motor shakes pretty hard, and kinda does some random turning back and forth (very hard to describe)... it also seems to do a few steps in any direction I start to force it to go...

I have tried all the combos of the motor wired, thinking I had those connected in the wrong order...

Anyone have any suggestions?

I have tried the two following sketches with the same results:

1:

#include <Stepper.h>
Stepper stepper = Stepper(85, 2,3,4,5);

void setup()
{
  // set the speed of the motor to 30 RPMs
  stepper.setSpeed(30);

}
 
  void loop(){
  
   stepper.step(9000);
  }


2.


/*
 * MotorKnob
 *
 * A stepper motor follows the turns of a potentiometer
 * (or other sensor) on analog input 0.
 *
 * http://www.arduino.cc/en/Reference/Stepper
 */

#include <Stepper.h>

// change this to the number of steps on your motor
#define STEPS 100

// create an instance of the stepper class, specifying
// the number of steps of the motor and the pins it's
// attached to
Stepper stepper(STEPS, 8, 9, 10, 11);

// the previous reading from the analog input
int previous = 0;

void setup()
{
  // set the speed of the motor to 30 RPMs
  stepper.setSpeed(30);
}

void loop()
{
  // get the sensor value
 // int val = analogRead(0);

  // move a number of steps equal to the change in the
  // sensor reading
  stepper.step(500);

  // remember the previous value of the sensor
 // previous = val;
}
Pages: [1]