Go Down

Topic: L298N (Read 559 times) previous topic - next topic

roddy826

Hi all,

I have read many post regarding L298N + stepper + arduino and I am still lost... =(

I have several hydrid-stepper-actuators  http://www.haydonkerk.com/LinearActuatorProducts/StepperMotorLinearActuators/LinearActuatorsHybrid/Size23LinearActuator/tabid/82/Default.aspx and so far I am not able to use them because I am totally lost.

This is my current wiring (I'm using sparkfun's L298N breakout board):

OUT1 -> Stepper wire 1 (red)
VS     -> power supply (5V, 3A in my case)
ENA   -> 5v (arduino)
GND  -> GND (all GND tied together)
CSA  ->  GND
OUT2 -> Stepper wire 2 (red-white)
IN1    -> Digital pin 2
IN2   -> Digital pin 3
VLS   -> 5v (arduino)
ENB   -> 5v (arduino)
OUT3 -> Stepper wire 3 (green)
CSB  ->  GND
IN3   -> Digital pin 4
IN4   -> Digital pin 5
OUT4 -> Stepper wire 4 (green-white)

I know that if:
   Input1 = input2 : motor should stop .
   Input1 =/ input 2: motor should turn on way or the other.

what I don't know is:

1.Which pins should go to PWM? (I assume all the inputs...)
2.A simple code to move CW, CCW and STOP. (the one that I wrote did nothing)
3. How do I count steps
4. Where to put the diode

Thanks,


Rod

Grumpy_Mike

Quote
I know that if:
   Input1 = input2 : motor should stop .
   Input1 =/ input 2: motor should turn on way or the other.

No you don't know this because it is wrong. It only applies to DC motors, you have a stepping motor.
You have to apply a stepping sequence to get the motor to move.
Please post the code you have tried (use the # icon)

Go Up