L298 H-bridge With 23HS-104 MK2 Stepper motor

Hello This is my first post in this forum. =D

Today I just managed to transform my new L298 from a h-bridge to a toasting machine... In other words I destroyed it.

Link to L298 card: LSON L298N Stepper Motor Driver Module - Red (5~35V) - Free shipping - DealExtreme

I have never tried to control steppers before, and the topic about steppers was a lot to take in for a guy that was a bit to eager to try out my new equipment.

So I just tried to connect my <23HS-104 MK2 2.0A stepper> with the coils in serial... hoped that pulled the least current, to be honest I do not know. maybe I did my mistake here.

I was also a bit to eager to figure out all the code for myself straight away, so I modified some code I found online to fit my purpose.

Is there any obvious fault here??
Or do I need to supply more information?

Motor wiring:
Out1 - RED
Out2 - YELLOW
Out3 - BLACK
Out4 - ORANGE

RED/White to YELLOW/White
ORANGE/White to BLACK/White

INPUT VOLTAGE TO MOTOR 24VDC

The code I used:

#include <Stepper.h>
int clockwise= 6;
int anticlockwise= 7;
int steps =200;
int enable=8;
Stepper motor(steps, 2,3,4,5);

void setup() {
pinMode(clockwise,INPUT);
pinMode(anticlockwise,INPUT);
pinMode(enable,OUTPUT);
Serial.begin(9600);
}

void loop() {
int Speed = analogRead(A0);
int RPM = map(Speed, 0, 1023, 0, 100);
int forward = digitalRead(clockwise);
int reverse = digitalRead(anticlockwise);
digitalWrite(enable,LOW);
if(forward == 1 && reverse == 0 && RPM > 5){
digitalWrite(enable,HIGH);
motor.step(1);
motor.setSpeed(RPM);
delay(10);
}
if(reverse == 1 && forward == 0 && RPM > 5){
digitalWrite(enable,HIGH);
motor.step(-1);
motor.setSpeed(RPM);
delay(10);
}
delay(5);
// Serial.println(“Speed of motor is “);
Serial.print("Motor Speed is: ");
Serial.println(RPM);
}

Best regards
PatrickG

The data on that motor is sketchy - it says 8 wire but doesn't say if the 1.1 ohm rating is
one winding or two in parallel. If its one winding then you have 2.2 ohm 2.0A motor,
which means using a proper current-controlling stepper driver, not voltage-controlled
H-bridge pair. If two in parallel that would mean in series it would be 4.4 ohm 1A, but
still that's inappropriate for voltage control from a L298.

What power supply did you use though? Above 7V you'll overdrive the motor, you'll
probably overcurrent the L298 anyway...

Anyway, you learnt the hard way that a low-impedance stepper motor is not designed
to run from a DC motor controller... What you really needed was a stepper driver
(current controlling chopper-driver) rated for that current level, and run from 24V or more.
The little single-chip versions peg-out around 1.5A (forced air cooling is useful), and
beyond that industrial stepper controls are the option.

Or if high speed operation isn't needed (low impedance bipolar motors are all about
speed of rotation BTW), then a 12V unipolar stepper would have been a possible
choice.

Perhaps you could try using something like a DRV8825 or A4988 board and run at
slightly lower current to reduce the heat dissipation to managable limits.

The voltage I used was 48VDC, so you say that the motor only needs around 7V? No wonder it blew up.

I know there is a lot better alternatives out there to drive this stepper, but I'm trying to reconstruct the circuit that originally drove it, and I'm closing in.. I hope.

But I guess my big fault was that voltage. Is it as easy as using omhs law to calculate motor voltage...
if the motor can pull 2A and the winding is 2.2ohm, should I use 4.4V?

Thanks for the tips! I will maybe try those in my next project, after I get this to work :wink:

Hi,
This might help, the motor is in this document.

Tom.... :slight_smile:

Just found these;

http://docs-asia.electrocomponents.com/webdocs/0739/0900766b807394bd.pdf
This sheet also show how it can be connected;
http://docs-asia.electrocomponents.com/webdocs/137b/0900766b8137bb01.pdf

datasheet.pdf (41.1 KB)

You may find something useful in stepper motor basics

It would be very normal to drive a stepper motor with a 48v power supply - but you do need to use a specialized stepper driver that can handle the current required by the motor and can limit the current to prevent damage to the motor. Also, make sure your stepper driver can deal with a 48v supply - the smaller ones (such as Pololu DRV8825) are limited to 45v or maybe 35v.

...R

Thank you everyone for your good comments!

Tom: these was the documents I used to connect it. but I'm still unsure witch connection that would work best. due to my limited knowledge on this topic.

But do anyone know how to use the components I have at hand to make this work?
Should I use a lower voltage, should I put the coils in parallel instead of in series?
I have not used the wire.h library before, so was there something obvious wrong in my code?

The sense pins on the chip is not easily accessible, but maybe I can use these to limit the circuit so it does not happen again?

Best regards
PatrickG