Show Posts
Pages: [1]
1  Using Arduino / Programming Questions / Re: Stepper behaving strangely - unexpected steps on: February 27, 2013, 07:40:06 am
I changed the link to the datasheet hosted by someone else. Check it again.

Quote
I'd use a motor shield by someone that knew what they were talking about.

The HBridge I'm using is listed in the official Arduino documentation on this site. I think we're all screwed if the official guys don't know what they're talking about!

http://arduino.cc/en/Reference/StepperBipolarCircuit   I'm using the Four Pin schematic
2  Using Arduino / Programming Questions / Re: Stepper behaving strangely - unexpected steps on: February 27, 2013, 07:31:10 am
I'm using this H-Bridge http://www.datasheetcatalog.org/datasheets/320/500427_DS.pdf as suggested by this circuit on the Arduino site http://arduino.cc/en/Reference/StepperBipolarCircuit

This is the stepper I'm using  http://www.circuitspecialists.com/nema_14_stepping_motor_35byg101.html

I can't provide a schematic at the moment, but I'm pretty sure I have the following connections according to the schematic. However, I did switch the wiring around just to make sure it was hooked up properly and when I did this it would just step back and forth, so I'm pretty sure I have it wired correctly.

This is the output I have to my stepper according to the links I provided

Pin Out: Wire color of stepper (check the link)
1Y:Red
2Y:Black
3Y:White
4Y:Yellow

What would you suggest trying with the stepper library? I'm not familiar with it.
3  Using Arduino / Programming Questions / Re: Stepper behaving strangely - unexpected steps on: February 27, 2013, 12:22:14 am
Changing it to 1 only makes it record  faster and does not change the output to the serial monitor, even when the button is pressed.

The stepper is moving, but it's not showing up in the serial monitor.
4  Using Arduino / Programming Questions / Re: Stepper behaving strangely - unexpected steps on: February 27, 2013, 12:10:05 am
I'm assuming you mean delay(1000). It displays the same exact thing, just slower and nothing happens when I press the button (n the serial monitor). My stepper moves, but it doesn't display that in the serial monitor.
5  Using Arduino / Programming Questions / Re: Stepper behaving strangely - unexpected steps on: February 26, 2013, 11:56:28 pm
That's what I did, also had to add Serial.begin(9600) to get it to display.
6  Using Arduino / Programming Questions / Re: Stepper behaving strangely - unexpected steps on: February 26, 2013, 11:28:24 pm
Thanks, as you can see I'm new to Arduino.

Anyway, this is what it spit out upon powering up without even pressing the button.

Code:
lginning
loop beginning
loop beginning
loop beginning
loop beginning
loop beginning
loop beginning
loop beginning
loop beginning
loop beginning
loop beginning
loop beginning
loop beginning
loop beginning
loop beginning
loop beginning
loop b######s##############s######  //this keeps on going as long as there's power, I cut the rest off

Pressing the button doesn't seem to do anything differently. None of that stuff that you suggested to add is displayed.
7  Using Arduino / Programming Questions / Re: Stepper behaving strangely - unexpected steps on: February 26, 2013, 11:19:20 pm
Where does the serial print get recorded? I don't see anything being displayed in the window.
8  Using Arduino / Programming Questions / Re: Stepper behaving strangely - unexpected steps on: February 26, 2013, 11:05:57 pm
I must have accidentally removed it when changing the motor_placement variable. I put it back in, still have the issue.
9  Using Arduino / Programming Questions / Re: Stepper behaving strangely - unexpected steps on: February 26, 2013, 10:53:45 pm
Darwoon, I changed it so it's no longer static and made it a global. Still jumping back a step!
10  Using Arduino / Programming Questions / Stepper behaving strangely - unexpected steps on: February 26, 2013, 10:40:14 pm
I'm using a push button to control a 4 wire bipolar stepper. Maybe I'm slightly misunderstanding how steppers work (I watched this series )

The problem - My stepper goes back (counter-clockwise) one step in the following scenarios. I only want it to step clockwise

1. Upon powering up it occasionally jumps backwards one step. I'm assuming this is just due to the resting position from the last time it had power, and when it gets power it's aligning with the polarity of it's present state.

2. Pressing the button for the first time upon powering up it always jumps back one step (even if it jumps back from the "polarity alignment"). After this, it no longer jumps back when pressing the button.

Can you guys spot anything wrong with my code?

Code:
int move;
int motorPin2 = 10;
int motorPin3 = 11;
int motorPin4 = 12;
int motorPin1 = 13;
int motor_placement = 0;

void setup() {
  pinMode(motorPin1, OUTPUT);
  pinMode(motorPin2, OUTPUT);
  pinMode(motorPin3, OUTPUT);
  pinMode(motorPin4, OUTPUT);
  
  //button
  pinMode(8, INPUT);
}

void loop() {

  move = digitalRead(9);
  if(move==HIGH) {
  
    if(motor_placement == 0){
      digitalWrite(motorPin1, HIGH);
      digitalWrite(motorPin2, LOW);
      digitalWrite(motorPin3, LOW);
      digitalWrite(motorPin4, LOW);
    }
   if(motor_placement == 1){
      digitalWrite(motorPin1, LOW);
      digitalWrite(motorPin2, HIGH);
      digitalWrite(motorPin3, LOW);
      digitalWrite(motorPin4, LOW);
    }
   if(motor_placement == 2){
      digitalWrite(motorPin1, LOW);
      digitalWrite(motorPin2, LOW);
      digitalWrite(motorPin3, HIGH);
      digitalWrite(motorPin4, LOW);
   }
   if(motor_placement == 3){
      digitalWrite(motorPin1,LOW);
      digitalWrite(motorPin2, LOW);
      digitalWrite(motorPin3, LOW);
      digitalWrite(motorPin4, HIGH);
    }
    if(motor_placement <= 2){
      motor_placement++;
    }
    else{
     motor_placement = 0;
    }
  
    delay(100);
  }
}

11  Using Arduino / LEDs and Multiplexing / Re: Moving digital input wire causes signal (wire isn't connected to anything) on: January 30, 2013, 10:11:59 pm
Thanks, I just had my roommate take a look at it (he's a computer engineer), and he knew exactly what you were talking about. I didn't have it set as a pull-down resistor, so my room mate swapped it for me and now it works perfectly. Thanks for the tip.
12  Using Arduino / LEDs and Multiplexing / Moving digital input wire causes signal (wire isn't connected to anything) on: January 30, 2013, 09:22:12 pm
I'm new to Arduino and seem to be having a strange situation. I set digital pin 8 on my uno for input, and when I have a wire inserted into it (other end isn't even connected to anything), it's sending a signal when I move the wire.

Is my Arduino defective or is this something that I'm just completely unaware of? The bottom of the Arduino is sitting on a piece of rubber so I know there's nothing below it to conduct to. Like I said, the other end of the wire isn't even attached to anything. Simply wiggling the wire causes it to send a signal as if the bottom is grounding. It does this for any of the inputs I set it to.

So, is this normal or am I just not aware of how inputs actually function?
Pages: [1]