Controlling stepper motor with 2 wires

Hello guys,I have disassembled some old cd drives and have 3 motors.I dont know if they are stepper but when I use stepper.h library it can controll it.But now when I want to controll it over easydrive Im stuck how to connect them to easydrive.

So is there way to connect 2 wires dc motor to 4 wires easydrive ?
Thank you for your time :slight_smile:

A stepper motor has at least 4 wires (bipolar type); a unipolar stepper has 5, 6 or 8 wires.
So your motors are DC motors.

I can't imagine you can control them with stepper.h library.

The Servo library outputs PWM from about 3 to 12% duty cycle, so you are putting 5V times 0.03 = 0.15 to 5V times 0.12 = 0.6V on the motor.
You can connect the motor to EasyDriver terminals OUT1A & OUT1B but you probably need an external power supply with correct voltage and current capability.

EDIT: OOPS, doesn't look like Easy Driver supports DC motors?

doesn't look like Easy Driver supports DC motors?

Easy Driver and Big Easy Driver are for steppers only.

Here's an L298 board I've used in a couple of projects, seems to work well (for the past 6 months anyway). :slight_smile:

rpt007:
A stepper motor has at least 4 wires (bipolar type); a unipolar stepper has 5, 6 or 8 wires.
So your motors are DC motors.

I can't imagine you can control them with stepper.h library.

I have used this code and motor was moving.Would DC motor move with this kind of code ?

#include <Stepper.h>

const int stepsPerRevolution = 200;
Stepper myStepper(stepsPerRevolution, 6,3);

void setup() {
// set the speed at 6 rpm:
myStepper.setSpeed(6);
// initialize the serial port:
Serial.begin(9600);

Serial.println("clockwise");
myStepper.step(stepsPerRevolution);

Serial.println("anti");
myStepper.step(-stepsPerRevolution);
}

outsider:
Here's an L298 board I've used in a couple of projects, seems to work well (for the past 6 months anyway). :slight_smile:

Amazon.com

Have you used it with grbl firmware ? All fine ?

I have used this code and motor was moving.Would DC motor move with this kind of code ?

I am a bit confused:

  • You say that you used the code and the motor was moving - ok: which motor? which driver?
  • then, if the motor was moving - why are you asking a sentence later if a DC motor moves with this kind of code?

-> So: what motor (how many wires) did you connect and drive with the stepper.h code? How did you wire it, did you use a driver (big easy?)

I think you throw a lot of very different things into one pot:

  • you told us, your motors have 2 wires - these are DC motors
  • a DC motor can't be seriously driven by a stepper driver
  • Easy driver is built for steppers only
  • you are asking for grbl firmware -> the L298 driver can drive two DC motors -> this is no stepper driver!
  • grbl is meant for controlling stepper motors (normally used as CNC controller) and expects G-Code as input to drive the motors

It would be more efficient if you would tell us exactly what your plan is and what you think you have already to start your project; otherwise it is a Q & A game.

Im sorry for confusion :frowning:

I am a bit confused:

  • You say that you used the code and the motor was moving - ok: which motor? which driver?
  • then, if the motor was moving - why are you asking a sentence later if a DC motor moves with this kind of code?

-> So: what motor (how many wires) did you connect and drive with the stepper.h code? How did you wire it, did you use a driver (big easy?)

So I have arduino uno,arduino pins 6,3 connected to H bridge(L293D).
Im asking cuz Im not sure that if motor move with this code is clear sign that motors are stepper.