L298N Stepper Driver + Accelstepper

I'm trying to scale up a smaller project to use high torque stepper I had lying around for a CNC project but can't get it to work with Accelstepper library which is integral to the project.

The Easystepper's I had around had too low current rating so I grabbed a few of these.
http://www.ebay.com.au/itm/Dual-H-Bridge-L298N-DC-Stepper-Motor-Driver-Module-Controller-Board-for-Arduino-/261364656280?hash=item3cda8c2898

It will spin with this code

int IN1=0
int IN2=1
int IN3=2
int IN4=3
 
void setup()
{
 pinMode(IN1,OUTPUT);
 pinMode(IN2,OUTPUT);
 pinMode(IN3,OUTPUT);
 pinMode(IN4,OUTPUT);
}
void loop()
{/*In the way of 4 beats to drive the stepping motor,A group connected to motorA,B
 B group connected to motorB,Suppose A representing the forward current of A group,
 A- representing the reverse current of A group,B representing the forward current of B group,
 B- representing the reverse current of B group.
 this way run as follow:
 AB    A-B    A-B-   AB-
 or
 AB   AB-    A-B-   A-B
 */
 digitalWrite(IN1,LOW);
 digitalWrite(IN2,HIGH);
 digitalWrite(IN3,HIGH);
 digitalWrite(IN4,LOW);
 delay(10);
 digitalWrite(IN1,LOW);
 digitalWrite(IN2,HIGH);
 digitalWrite(IN3,LOW);
 digitalWrite(IN4,HIGH);
 delay(10);
 digitalWrite(IN1,HIGH);
 digitalWrite(IN2,LOW);
 digitalWrite(IN3,LOW);
 digitalWrite(IN4,HIGH);
 delay(10);
 digitalWrite(IN1,HIGH);
 digitalWrite(IN2,LOW);
 digitalWrite(IN3,HIGH);
 digitalWrite(IN4,LOW);
 delay(10);
}

But if I try setup with either of these, the stepper vibrates, but does not move.

AccelStepper stepper (AccelStepper::FULL4WIRE, IN1, IN2, IN3, IN4);  
OR
AccelStepper stepper (AccelStepper::HALF4WIRE, IN1, IN2, IN3, IN4);

Any ideas?

TijuanaKez:
Any ideas?

Maybe a BigEasydriver ?

Post a link to the datasheet for the stepper motor.
Give details of the motor power supply - volts and amps.

...R
Stepper Motor Basics

hmmm. yes, noticed that if I reduced the delay in the above working code, I start seeing similar behaviour so likely not enough current for this stepper.

NEMA-23 300Oz-in 3A/Phaze

Powering from a 6A 12V supply. I was naively feeding this supply both to VIN on arduino and to the L289N driver but it smelled like trouble (literally) so I'm guessing that's a bad idea.

I since noticed the L298N driver has a 5V out terminal from the regulator. Would powering the arduino from this be the answer?

Haven't a DC socket handy to test.

TijuanaKez:
NEMA-23 300Oz-in 3A/Phaze

I did ask you post a link to the datasheet. There will be other useful info such as the coil resistance.

If it draws 3 amps it probably has a low coil resistance which definitely means that you should use a specialized stepper driver. However the cheap ones such as the Pololu DRV8825 can't handle 3 amps and you will need a more expensive driver (Gecko or Leadshine, for example) or a motor that uses less than 2 amps.

The 12v power supply should be ok for the motor - although a higher voltage would probably be better.

...R

Thanks for the reply.
I attached what specs I thought would be useful in the previous post, but can't find a data sheet (eBay buy).
I've attached full spec sheet screenshot now.

I don't actually need the torque that this stepper can supply, I just need something to serve a purpose for shooting a video which has a deadline so I wanted to use what I have on hand. Can't wait for new stepper to ship and can't justify Gecko price for this purpose. I'm in Australia and local supplies are extremely limited, way overpriced, and shipping takes weeks.

It's to spin a platform on skateboard bearings with a person standing on it, but there is next to no friction. I can move it with the slightest touch with someone standing on it. It spins just fine with this stepper and the above posted manual code, and that's just powered only from the arduino via USB!
I just need the precision position/speed/acceleration that accelstepper provides and I've already coded for.

Is there a smart way to power this just enough to do the job without investing in overkill power units?

TijuanaKez:
Is there a smart way to power this just enough to do the job without investing in overkill power units?

If you want to use an L298 then I don't know enough about it to offer advice.

If you are using, for example, a BigEasydriver you may get sufficient torque from the motor within the current (Amps) limitation of the driver (say 1.5 amps). But this is very much "suck-it-and-see" territory.

...R

TijuanaKez:
hmmm. yes, noticed that if I reduced the delay in the above working code, I start seeing similar behaviour so likely not enough current for this stepper.

NEMA-23 300Oz-in 3A/Phaze

That motor requires a discrete MOSFET chopper driver, 3A is too much for
a DMOS chip. Gecko drive or something like that.

Single chip motor drivers use DMOS, not VMOS, so never have lower on-resistances
then about 0.25 ohm. VMOS (vertical current flow) is only available in discrete power MOSFETs,
where the on-resistance can be down to 0.001 ohms or less.

When driving a motor with winding resistance of an ohm or so you need H-bridge with significantly
less on-resistance than that - 0.05 ohms or less per device would be suggested here.

For a budget solution checkout the DRV8711 demo board: http://eu.mouser.com/ProductDetail/Texas-Instruments/BOOST-DRV8711/?qs=m1T3c8F5IUKBy%252brxKmOMbw%3D%3D&gclid=Cj0KEQjw3auuBRDj1LnQyLjy-4sBEiQAKPU_vY_fJ5BUntHjXoHwFj8kKFwpztqfIj5NsAQZ0EB7oyIaAuFI8P8HAQ

The DRV8711 is a chip that drives 8 external power MOSFETs to give 5A or more of stepper
drive without any heatsinking needed. It is quite complex to drive (needs SPI configuration) though

Ok now I'm stumped. I got hold of some new 2A steppers with the specs attached. They are physically MUCH smaller and lighter which only 45nM vs 300 and being rated at 2A and the driver 2A I assumed they would work.

I do notice though the phase resistance is still 1.1ohm, so does that mean I still need an expensive driver setup to use these?

Manufacturer Part Number 17HS16-2004S1
Step Angle 1.8°
Step Accuracy 5%
Holding Torque 45Ncm(63.7oz.in)
Rated Current/phase 2A
Phase Resistance 1.1ohms
Voltage 2.2V
Inductance 2.6mH±20%(1KHz)
Weight 350g

You should be able to drive those motors with a Pololu DRV8825 - but it will be close to its limit.

Have you figured out what torque you actually require ? (That is usually the first step in motor selection)

...R