Stepper Motor doenst work fine on Romeo

Hi Guys,

I'm new here and got a problem: My stepper motor wont work with the Romeo controller (the Romeo has an L298P controller included). When I start the sample script 'stepper_oneRevolution', the motor does turn clock- and counterclockwise, but with many interrupts and stops, it moves just not steady.

So after some experiments, i figured out, that the pins 4 and 7 doenst seem to work at all:

This would be how i expected it to work fine:

Stepper myStepper(stepsPerRevolution, 4,5,6,7);

And when i change pins 4 and 7 to some other numbers:

Stepper myStepper(stepsPerRevolution, 1,5,6,2);

it makes no difference, the motor works, but not steady.

So anybody some ideas or experience with the Romeo and stepper motors ?

greets Philipp

Get yourself some LEDs and resistors and hook them up to the pins. Do the LEDs light up in sequence? or do they skip around? You might need to slow down the speed to see how it is working.

Are you powering it from USB only? If so, you will not get enough current via USB to power the motor properly.

dropdeaddick: Are you powering it from USB only?

No its powered by a 12V battery of a screwdriver.

kf2qd: Get yourself some LEDs and resistors and hook them up to the pins. Do the LEDs light up in sequence? or do they skip around? You might need to slow down the speed to see how it is working.

Right now I dont have any LEDs, but I wired a DC Motor to the Pins:

Motor-Slot-1 (Pins 4,5): The Motor turns in one direction with breaks of 500ms Motor-Slot-2 (Pins 6,7): The Motor turn constantly in one direction but accelerates in the 500ms brake

Heres the sample code:

const int stepsPerRevolution = 200;

Stepper myStepper(stepsPerRevolution, 4,5,6,7);            

void setup() {
  myStepper.setSpeed(60);
}

void loop() {
  myStepper.step(stepsPerRevolution);
  delay(500);

  myStepper.step(-stepsPerRevolution);
  delay(500); 
}

Ok so I wired some LEDs to the motor pins, it runs like this:

www.youtube.com/watch?v=7W-5Vaef7CI

#include <Stepper.h>

const int stepsPerRevolution = 200;
Stepper myStepper(stepsPerRevolution, 4,5,6,7);            

void setup() {
  myStepper.setSpeed(2);
}

void loop() {
  myStepper.step(20);
  delay(2000);
}

What I dont understand is, why does the blue light keeps on shining during the pause ?
And the green light seems to pulsate, one bright blink, then one dark blink, is that normal for a stepper motor ?

Hope somebody can help me :slight_smile:

Ok I found out, why one of them gets power during the pause (i think its because the motor shouldt moove, like a break)..

I increased the power supply and testet some settings:

speed=200, 200 steps : the motor makes half a revolution quite nice but verry loud and it vibrates a lot speed=200, 400 steps: the motor makes one revolution and a bit speed=100, 400 steps: the motor turns the other way verry slowly and inconsequent

On the first to settings i thought, wow thats it, but it wouldnt have made any sense, speed 200 and 200 steps sould make one revolution. And the last setting told me again i failed :D

So what am I doing wrong ???