Problem: Mystery stepper and L298 works, but only when inputs driven like LEDs

Status
Not open for further replies.

unabee

New member
Hello,

I'm trying to run a 5-wire unistepper motor (with unconnected hall sensors x2 - not trying those yet) . Its out of a vintage tape machine I'm trying to make run as part of an art project. it says Siemens 15v-30v on it and a date code. It may have had a sticker on it years ago with a model, but that is gone. I have no more information on the motor. End to end, the coils measure 55 ohms. The space is very small for the motor or Id just replace it with something with more documentation. What fun would that be, anyway?

Trying to simplify the interface and prove the motor works, I hooked it up to a L298n board I had (the common red one with the 5v reg onboard) and I can get it to step by manually sequentially applying ~5v to each input of the l298 board.

Excited by the progress, I tried to hook it up to the Teensy (2 ++) I have kicking around, and Running it with the built-in stepper example (single rotation) in Arduino IDE, but no effect (no ticking, jitter, stepping, chatter, lockup...nothing)

I then thought to run it with code i found and changed a little for an LED chaser, and that does make it step sequentially a full rotation, but this is no way to run an actual motor in a useful capacity. And the motor gets more warm than i think is right.

Obviously I don't know enough about a lot of this, but what is the difference that allows the LED sketch to run, but not the stepper sketch? I can measure it, I see voltage on the Teensy pins . With stepper code it shows (phases?) pin 8: 0v-2.5v, Pin 9: 2.5v-5v, pin 10: 0v-2.5v, Pin 11: 2.5v-5v as it steps (I did just measure that with a setting to low RPM and a voltage meter, not a scope - so don't hold me to those figures). and 0-5v sequentially as an LED chaser.

What else do I need to understand between these methods that I'm missing? I've read through countless examples, but my variable is this weird motor. Does the impedance pose an issue? a full 0-5v swing on the input of the 298 ?

Oh, I did try connecting the center tap of the motor coils to 15v and gnd and it does make it run with more torque in the LED chaser mode. It makes no difference when running it with stepper code.

Motor is being run with a separate PSU than the Teensy.

Apologies if i left anything out, I didnt want to overload the post with useless details and red herrings. I have attached the code i used as the LED chaser. The Stepper code i used is the bone stock example in the IDE. I have tried manipulating the variables in the code, but they yielded no interesting results.

Thank you for your time

Code:
int pinsCount=4;                        // declaring the integer variable pinsCount
int pins[] = {8,9,10,11};          // declaring the array pins[]
 
void setup() {                
  for (int i=0; i<pinsCount; i=i+1){    // counting the variable i from 0 to 9
    pinMode(pins[i], OUTPUT);            // initialising the pin at index i of the array of pins as OUTPUT
  }
}
 
void loop() {
  for (int i=0; i<pinsCount; i=i+1){    // chasing right
    digitalWrite(pins[i], HIGH);         // switching the LED at index i on
    delay(100);                          // stopping the program for 100 milliseconds
    digitalWrite(pins[i], LOW);          // switching the LED at index i off



a pic of the l298
L298N_motor_driver_Tronixlabs_Australia__60967.1416453242.1280.1280.png
 
Status
Not open for further replies.
Back
Top