How to connect Stepper motor 6 wire with encoder 64 to arduino.

Hi to all.
I am little puzzled with servo motor
I need use this stepper motor with encoder with arduino.

Key specs at 12 V : 100 RPM and 300 mA free-run, 220 oz-in (16 kg-cm) and 5 A stall.
Black motor power gnd
Red motor power +12vcc
Blue Hall sensor Vcc (3.5 – 20 V) +5vcc
Green Hall sensor GND gnd
Yellow Hall sensor A output PWM (output 90 phase of B)
White Hall sensor B output PWM

i try to understand how to connect it without results..
ho can i set the speed, direction of rotation ??
I know i've to use a dual driver (2 motor), with current 5A (the stall motor max current), any cheap idea ?

Anyone could help me ?

This is NOT a stepper motor. It is a regular geared DC motor with an encoder attached to the motor shaft. I don't think it can be controlled like a stepper motor.

I suspect you need to drive it with a PWM output from the Arduino and a h-bridge with a suitable current rating. At the same time you will need code to detect ALL of the pulses from the Hall sensors if you are to keep track of the position of the motor shaft. You will need to consider how fast the motor shaft will turn and therefore the maximum possible number of pulses per second. You will also need to keep track of the phasing of the pulses to know which way the motor is turning so you know whether to count up or down.

I have no idea how easy it may be to make the motor stop at a specific step or whether it would stay at that position

What do you want to use the motor for? Unless it is a specific application where a regular stepper motor is inappropriate I would suggest replacing it with a regular stepper and a proper stepper motor driver.


Stepper motor? Its not a stepper motor.
Then you say "servo motor" - its not a servo motor.

Its a DC motor with an encoder strapped on the back, just as the datasheet says.

For reading the encoder with interrupts using pins 2 & 3:
Blue -> 5V
Green -> GND
Yellow -> pin 2 (pinMode INPUT_PULLUP)
White -> pin 3 (pinMode INPUT_PULLUP)

Motor shield (H-bridge) drives the red and black leads from a
suitable 12V supply. Probably want a beefy H-bridge if you want
full stall current capability, not a L298 or L293 based one.

Many thanks to all.

Ok it’s not a stepper motor and servo motor !

What do you want to use the motor for ? i’d like replicate the
Looking at the pictures, i found this kind of motor with encoder.
The results are amazing so i think to start with similar components.

I suspect you need to drive it with a PWM output from the Arduino and a h-bridge
ok for the h bridge connecting red and black wire.
But how can i drive it with a PWM output from the Arduino if yellow and white wire is an output ?

Something is still missing…

There is a bit of language confusion here.

The PWM signal from the Arduino to the h-bridge (to control the speed of the motor) is quite separate from the signals (which also seen to be called PWM) from the encoder to the Arduino.

You will have to read up about how to interpret the encoder signals - I have never used one.

Having looked briefly at the balanduino website it strikes me that you may need to get a bit of experience on easier stuff first.


Yes you're right.
I believe to have a "complete" vision now.
I'll have to use 2 pwd input on arduino board in order to read the encoder (motor rotation), and i'll use one pwm and a logic forward/reverse signal in order to control the driver.
The driver (h-brige based) will receive the pwm from arduino, the logic signal and the external power supply.

Thankyou for your answer, the problem it's not the complexity, but understand basic concepts.

Hi Niomix,

I am working exactly on the same project. and I am using these motors/Drivers:

So my question is, should I connect the Green/Blue wires to a Battery or to the same pins on my motor Driver that are marked (GND, VIN) located right under OUT1B pin?