Show Posts
Pages: [1] 2
1  Using Arduino / Programming Questions / Re: <stepper.h> gives 1/4 steps on: July 16, 2013, 01:47:22 pm
Its definitely sounds like its quarter-stepping - have you measured the voltage on the MSn pins (and tested for shorts)?

Yes, I did check to make sure MSn were all grounded. The funny thing is I used AccelStepper.h, and used the same hardware setup,
there is no "1/4" issue. But back to Stepper.h library, same "1/4" issue again. Very confused... smiley-confuse
2  Using Arduino / Programming Questions / Re: <stepper.h> gives 1/4 steps on: July 16, 2013, 01:42:41 pm
If you disconnect MS1, MS2, and MS3, and use the default 1/16th stepping mode, and ask the motor to step 3200 times, how far does it rotate?

It still step 3200/4=800 times... smiley-confuse
3  Using Arduino / Programming Questions / Re: <stepper.h> gives 1/4 steps on: July 16, 2013, 12:32:29 am
That snippet of code is not near enough to solve your problem. The first thing that comes to my mind is that you have incorrectly defined the number of steps per revolution. Without being able to see how you have defined it, though, and without knowing anything about your motor, it's only a guess.

Post ALL of your code, and a link to your motor (NOT an e-bay ad), if you want more than sympathy. Which you can't get here, anyway.

Thanks for the reply! Here is all my code:

Code:
#include <Stepper.h>

Stepper stepper(200,3,2);

void setup()
{
}

void loop()
{
  stepper.setSpeed(30);
  stepper.step(200);
  delay(1000);
}

Here are the components I used with the above codes: (no ads here...)
1.Arduino Uno R3
2.motor: https://www.sparkfun.com/products/9238
3. Big Easy Driver (BED): https://www.sparkfun.com/products/10735

And I used full step mode (MS1, MS2, MS3 on BED connect to GND), I expected to have one revolution,
but the above codes only gave me 1/4 of a revolution, also the estimated speed is 1/4 of the expected value (30rpm);
Any advice on that? Thanks a lot!

4  Using Arduino / Programming Questions / <stepper.h> gives 1/4 steps on: July 12, 2013, 12:12:29 am
Hi ,

I was using Arduino Uno R3 + Big Easy Driver + <stepper.h>, part of my code is as simple as: (I didn't include the void and loop, etc.)
Code:
stepper.setSpeed(30);
  stepper.step(1000);

However, when I actually measured the speed and steps, the motor moves about 1/4 value that I asked it to do.
By that I mean it only gives 30/4=7.5rpm, 1000/4=250steps.

Has anyone had this issue before? Is it software or hardware? Thanks! By the way, I was using the full step mode, not microstepping.

Best,
Sonia
5  Using Arduino / Programming Questions / Re: The same sketch worked before but not now on: June 19, 2013, 04:42:51 pm
I think I got it figured out! It's because the battery I used for powering the driver was running out. Though LED on the driver was on, the battery is below the trigger voltage, I believe is 7V, I switched to another battery, everything back to normal. I post it here in case anyone else has the same problem. Thanks anyway!
6  Using Arduino / Programming Questions / The same sketch worked before but not now [solved] on: June 19, 2013, 04:15:53 pm
Hi All,

I used a simple code + Arduino Uno R3 + Big Easy Driver to control my stepper motor. Here is my code:
Code:
#include <Stepper.h>
Stepper stepper(20,3,2);

void setup()
{
  
  
}

void loop()
{
  stepper.setSpeed(150);
  stepper.step(240);
  delay(1000);
  stepper.setSpeed(150);
  stepper.step(-240);
  delay(1000);
}

This code worked well yesterday. But I re-tested it today, I got no luck. Everything else is kept exactly the same. I checked the connection, it's good. I tried out several motors, but none of them responded. I tried out another drive Easy Driver, nope. I even tried out the "Blink" code, this code worked! And all the sketches were uploaded successfully...

Anyone experienced this "unreliable" situation before? Thanks!

Best,
Sonia
7  Using Arduino / Microcontrollers / Re: Arduino Uno R3 PWM signal measure on: June 07, 2013, 03:47:18 pm
Stepper, I am not sure how to describe how that operates.  I believe the controller sends pulses to the stepper, and every pulse moves it along some number of degrees. Even less sure how you would monitor that - bring the pulses into an interrrupt and count them? Check the timing of when they come, when some time has passed with to pulses call it done?

Can I use oscilloscope to catch PWM? 
8  Using Arduino / Microcontrollers / Arduino Uno R3 PWM signal measure on: June 07, 2013, 02:51:31 pm
Hi all,

I am using a Arduino sketch (the built-it <Stepper.h>)+ Arduino Uno R3 + Big Easy Driver (BED) to control a stepper motor. I connect Arduino DIGITAL(PWM~) pin 2 and pin 3, seperately to BED "STEP" and "DIR" pins, and everything works fine.

As a beginner, my understanding of what Uno does is it sends PWM to BED, am I understanding this correctly?
If I understand right, is there a way to measure the PWM signal?

I am thinking of calculating the angular position and speed directly from PWM. (I know a laser tachometer would do it, just exploring the possibilities of more accurate measurement)

Any suggestions? Thanks!

Best,
Sonia
9  Using Arduino / Programming Questions / Re: same code works with one motor, but not with another one on: May 01, 2013, 04:22:04 pm
Sorry, I missed part of the codes, here is the codes I used:

Code:
#include <Stepper.h>
Stepper stepper(200,3,2);

void setup()
{
  stepper.setSpeed(300);
  stepper.step(1000);
  delay(1000);
  stepper.setSpeed(300);
  stepper.step(-1000);
}
void loop()
{
 
}
10  Using Arduino / Programming Questions / same code works with one motor, but not with another one on: May 01, 2013, 04:19:11 pm
I have been trying to use an Arduino Uno R3, a Big Easy Driver (BED), to control a stepper motor. I have two motor candidates:

1.https://www.sparkfun.com/products/9238
2.http://www.micromo.com/Data/Sites/1/Datasheets/Stepper%20Motors/adm1220_pcs.pdf
Type V2

I used this code:
Code:
#include <Stepper.h>
Stepper stepper(200,3,2);

void setup()
{
  stepper.setSpeed(300);
  stepper.step(1000);
  delay(1000);
  stepper.setSpeed(300);
  stepper.step(-1000);

It worked with the 1st motor (Sparkfun motor), but the same code didn't work with 2nd motor (ADM-1220-V2). Pins, connections were kept the same. I did adjust the current on BED, but when I realized the 2nd motor didn't work, I adjusted the current back to what I used for the 1st motor, but still got nothing moves.

Btw, I don't think I got BED broken, cuz when it was powered, I observed the indicator light was on.

Any advise? Thanks!

Sonia
11  Using Arduino / Programming Questions / Re: Basic Arduino Setup codes issues on: April 16, 2013, 11:58:12 am

@Sonia_L
Double and triple check your wiring. Make sure motor wires A,B,C,D are connected correctly to the EasyDriver A,B,C,D outputs (as well as checking all the other connections). Make sure the connections are good.
[/quote]

I was actually using Big Easy Driver, but it makes sense that I may have a bad connection somewhere. Thanks~
12  Using Arduino / Programming Questions / Re: simple stepper codes didn't work on: April 16, 2013, 11:53:17 am
To change direction you have to change the direction pin not give a negitave number of steps.

It sounds like your driving it too fast and the motor is skipping pulses.

Thanks! Yes, I tried to slow it down to 5 rpms, and it gave me a full revolution as expected.
And I am working on the direction pin code.
13  Using Arduino / Programming Questions / Re: simple stepper codes didn't work on: April 16, 2013, 11:51:37 am
Try using the AccelStepper library,
Is you easy driver in full step mode or micro step.

Thanks! It's driven in full step, but when I lower the speed to 5 rpms, I can get the full revolution as expected.
14  Using Arduino / Programming Questions / Re: avrdude: stk500_getsync(): not in sync: resp=0x00 on: April 16, 2013, 10:59:41 am
I've had this problem before. My Arduino Uno R3 didn't talk to computer if I unplugged USB before closing Arduino IDE. But if I tried first close Arduino IDE, then unplugged USB a few times, the serial connection was back on again. Would that help?
15  Using Arduino / Programming Questions / Re: Basic Arduino Setup codes issues on: April 16, 2013, 10:50:09 am
To see the motor actually move longer, change delay(1); to delay(1000); 

Thanks! I tried delay(1000), still didn't work. I even tried a piece of code that worked yesterday, but this time I got no luck on that one too...
Pages: [1] 2