Welcome to Synthiam!

The easiest way to program the most powerful robots. Use technologies by leading industry experts. ARC is a free-to-use robot programming software that makes servo automation, computer vision, autonomous navigation, and artificial intelligence easy.

Get Started
Asked — Edited

Would This Work With An EZ-B V4 And Arc?

Hi, Just wondering if EZ-B V4 and ARC would drive this  type of servo/ stepper?, >> link

Related Hardware EZ-B v4


Upgrade to ARC Pro

Harnessing the power of ARC Pro, your robot can be more than just a simple automated machine.

Sure would - any step motor will work fine with some additional hardware which I can get into later. But first, you'd want to know that a stepper motor does not provide positional feedback like a servo. That means it is easy to "go out of sync." Every time a stepper motor misses a step due to weight or forced feedback, it loses positioning. So they do operate differently than a servo.

If you're okay with that - I can direct you to what affordable hardware you'd need because a Stepper motor requires a stepper driver that provides the current.
@DJ, The specs on this stepper motor says it has an encoder.

Encoder Specification
Encoder Type: Optical Incremental
Driving Voltage : 4.5V to 5.5V
Output current : 20mA
Encoder Resolution: 1000PPR(4000CPR)
Output Signal : 2 Channels
Bore Diameter : 5mm
Output Frequency : 60MHz
Running Speed : 3600rpm
IP Protection: IP20

I've never used a stepper motor so I don't know if the encoder on this motor will give the feedback needed.
Oh, I didn't see that - the first time I've seen a stepper with a built-in encoder. What hardware would be used with a stepper + encoder? Does dimension engineering have anything for that?

I've come across the Tic polulu stepper USB stepper motor controllers, but I'm almost 100% certain there is no input for an encoder. Either way, ARC will support it, and I can help with that - but we'd first need to figure out what hardware can work with it.
#4   — Edited
I've used ARC in combination with an L298 H-Bridge (2A per channel) to drive steppers before. It would likely work in this case since the specs for the motor are:

Manufacturer Part Number: 17HM19-1684D-E1000
Motor Type: Bipolar Stepper
Step Angle: 0.9 deg
Holding Torque: 0.44Nm(62.32oz.in)
Rated Current/phase: 1.68A
Voltage: 2.80V
Phase Resistance: 1.65ohms

While it is possible, it's not an efficient use of ARC's communication to the EZ-B since you have to use a fairly high frequency to get any kind of speed out of the stepper. It would be better to find a dedicated stepper driver that can generate those fast signals for you.  A Slave Arduino or dedicated chip made for that purpose would be best suited for this application.

In order to use the encoder you'd need a 5V regulator to power it, and you could use the EZ-Bv4 + ARC to read the incoming signals but they are likely to be at a high frequency as well. A slave Arduino or dedicated encoder chip would be your best bet here are well.

Also remember that stepper motors usually don't have any gearing so once power is removed from the stepper (de-energized) the application (arm, leg, etc) will go limp.

This is bar none- the best value I've seen for driving multiple steppers. I used it in my Rock 'em Sock 'em live hack series for a little while.

User-inserted image

Thanks for the replys.    The closed loop stepper/servo  has a built in driver .      

This could be used directly with EZ-B ?

User-inserted image

video of a guy testing one   
#6   — Edited
Nice find. A stepper motor with driver board attached and an encoder. 

The attached driver board and encoder totally eliminates the need for extra hardware!

From the video it's totally clear that an Arduino with the right sketch can control this motor. 

Can an EZB and ARC control this guy alone? If so how to wire it and what commands need to be sent? I dont know. I feel that you would be better off using an Arduino as a slave to an EZB and letting the Arduino do the heavy work while letting the EZB and ARC monitor feedback (from the Arduino) and send the needed commands to the slave. The scripts in ARC to do this would be interesting.

This feels like a H-Bridge type of wiring between the driver board and EZB with enable, direction and PWM. However a feedback from the encoder would be needed. There is a skill now that lets the EZB do that. Again, I don't know if it is compatible with this kind of encoder, 
ARC Wheel Encoder Counter

I love this thread. If figured out this could open up a whole new way to move a robot.
That’s real great. Your need an arduino per stepper because the code is blocking. Which means only one stepper would be able to move at once. But that’s okay because they can use affordable arduinos like the pro micro or nano. I think the nano is the cheapest. Also the closed loop would require reading interrupt for positioning, and there’s a limited number of interrupts on a micro. 

No hbridge or anything needed. Very cool. 

the question would be how you’d like to control it from arc. You could do it like a servo with pwm, but it won’t be as high resolution. Might make more sense to accept a uart command to specify position. 

Very doable and wouldn’t take much effort at all:)
@DJ.  You said Your need an arduino per stepper because the code is blocking. Which means only one stepper would be able to move at once..   

Does this mean that AutoPosition couldn’t be used?
If you had an ardunio per stepper, Auto Position could be used

but I am confused by the post with the videos. The product page doesn’t show that there’s an included driver. The videos show steppers with included drivers.

Which ones are you getting? With included drivers or without?
Sorry, don’t feel bad,  I’m constantly confused.   Anyway they will have drivers included.
Okay awesome. The reason I was asking is because if they didn’t have drivers, the amount of wiring would be an issue and it would make sense to use polulu tik usb boards

but if you’re will have the drivers, that means they can be driven by the cheapest and smallest ardunio that you can find. I’m thinking arduino nano or micro. One of those. 

once you tell me what stepper motor with embedded driver you’re getting, I can whip up a robot skill and some code for ya 

We can make them controlled all by a single serial wire. So each would have a unique id. That way wiring would be quite easy
#12   — Edited


I can whip up a robot skill and some code for ya. We can make them controlled all by a single serial wire. So each would have a unique id. That way wiring would be quite easy
Oh my. That would be awesome. I really want to get one of these motors and fit it into my B9 robot. I have several places where they would work perfectly.

I'm sure this is the motor we'd want to get:
Stepper motor with driver board. 

One thing I noticed and wonder about. It looks like the encoder is internal and signal is sent to the driver board.. I don't see anyway to tap into it to get feedback (Maybe the wires between the driver board and the motor?) It looks like it's there for the use for the driver board to keep the motor in step and give more accuracy when in closed loop mode. How would ARC know where the motor is on start up to give proper position commands?

It looks like we are looking at two different offerings of this motor. The first one the OP pointed to in their original post has no driver board. However it has two cords. One for power and one to tap into the encoder. The second has a driver board but no cord coming out to use the encoder. 
Motor - No driver board but has encoder 
Motor - With driver board but unsure how to tap into the internal encoder
Here's the specs on the pinouts on the motor with the driver board. Perhaps tapping into the encoder is on one of these headers?
User-inserted image
#13   — Edited
I learned and tested stepper motors a while a go with the Arduino
Bipolar Stepper Motors and Unipolar Stepper Motors

28BYJ-48 Unipolar Stepper with ULN2003 and the Bipolar Stepper with L298N H-Bridge

Is there a control in ARC to use stepper motors?
You can't ask if stepper motors work with ARC - because that question is too vague. The answer for things to work with ARC is always YES, but it depends on how custom you want to get. Because there is absolutely no standard for stepper motor drivers, it's impossible to be compatible with all stepper motors. That's like asking if ARC is compatible with "things." It's just too generic of a question.

The answer is YES if using a custom Movement Panel or a script combined with an Arduino, and you do it yourself. Again, you can build into ARC anything ever ever ever ever ever. You just have to do it yourself if it's not already supported directly. 

But if your question is for a Plug'n'Play solution, there is no such answer for stepper motors. It would help if you defined the question better, EZAng. It would help if you asked what stepper motor driver you will be using - because that's what matters. Again, the answer is YES to any stepper motor driver, but you'll most likely have to do it yourself.


1) the ideal Plug'n'Play solution would be to use the Polulu Tik that I continually mention in this thread. It is the complete stepper motor driver and will work with absolutely any stepper motor. The only issue is cost.

2) The second solution would be to use a stepper motor with an embedded driver combined with an Arduino. You need an Arduino because the stepper motor driver needs a continuous pulse instructing the motor coils to rotate the shaft. You "could" do it with an EZB directly, but that's a lot of processing for such a small job. Why would you want to use a 2.8ghz computer to send a pulse to a stepper motor when you could have a $3 Arduino do it? 

3) The last option is using an Arduino, a custom driver, and a stepper motor. This is what Jeremie mentioned above, but it's also a lot of work. You'd need A LOT of components for moving a single motor. So you end up with a shoebox full of components and a rat's nest of wires to drive a motor. In jeremie's case, that's all he needed, so it worked fine.
#15   — Edited
@EZAng, your question is 


28BYJ-48 Unipolar Stepper with ULN2003 and the Bipolar Stepper with L298N H-Bridge

You'll have to read my answer above because your question is still missing information. The L298 is useless without some way to instruct the steps. While you "could" send GPIO commands to move steps in ARC with a script, it doesn't make sense. You'd have to write a script that turns on and off digital ports on an EZB that will consume a bunch of CPUs on a computer. That's like using a sledgehammer on a thumbtack. 

Your question should be...


28BYJ-48 Unipolar Stepper with ULN2003 and the Bipolar Stepper with L298N H-Bridge and Arduino connected to ARC through an EZB UART or the PC USB

Then the answer is YES. You can write some custom firmware on the Arduino to control the hbridge. Then, you can use a script in ARC to send commands to the Arduino. It's work, but there's no other way around it.
#16   — Edited
I am not trying to waste your time or mine.

I was not asking a question, just stating what I used in the past.

I thought maybe I missed this.

I was just looking this up on your website.

I used the search, steppers motors
#17   — Edited
You're not wasting time.:) This thread is essential and understanding the question because the selection of motors and drivers will determine how and if there can be a Plug'n'Play solution. The challenge is what I stated above.

The main reason each stepper motor driver needs an Arduino is how it works. The stepper motor driver needs a "pulse" for every step. The micro on the Arduino needs to be pulsing gpio pins at an accurate, constant, and high rate. 

But when you order Arduino ATTiny or nana or micro from places like Alibaba, they're $3 each. So it's not a big deal. 

However, if you're adding an encoder to the stepper motor, that is where things get a little more challenging. It's still possible, but the Arduino _needs_ to have two hardware interrupts. That means the gpio pins can interrupt the main execution of code when the gpio state changes. This allows the micro to count the encoder ticks.

So no matter how you look at it, you need an Arduino or some other microcontroller. It makes sense to use an Arduino, but if you find a cheaper microchip pic or something, it will work if you can write the code yourself - but Arduino has existing libraries and such to use.
I'm curious about the application of this stepper motor idea because in most cases stepper motors do not require any kind of encoding. You just send it the predictable and measureable "steps" and watch it go to it's intended position, that's the beauty of steppers. Look at Camera rigs, CNC machines, 3D printers, laser cutters. They all use limit switches or break beam sensors to detect the end of travel without the need for encoding.

If steppers are being used for wheels/tracks, I would discourage it because steppers are only have high torque at high voltages. High voltages means more batteries or a larger power supply. IMHO DC gear motors would be much more effective for a mobile robot.

Some hardware advice, it doesn't matter what electronic solution you use, every solution that uses stepper motors is going to have a lot of wires, cable management will be important. This is why many machines use wire loom, wire ways, wire tracks or cables carriers to manage the wires.
I’m guessing they want to use them in exchange for servos. That’s why the encoders would come in handy as a fail safe. And the encoder value could be saved for the next time it starts up in the same position. 

Even cnc or 3D printers need a limit switch for calibration. But there’s not a lot of weight in a 3D printer so they don’t go out of alignment easily. 

im sure high end cnc machines use encoders to ensure they don’t go out of alignment from the weight.
#20   — Edited
Is 3dGuy trying to build a high-end CNC machine? I assumed it was a curiosity about the idea of being able to do it.

Even the high-end CNC-style machines that I've used, Professional laser cutters, use break beam sensors or limit switches to find the home position and re-calibrate its position.

Now that I think of it I have seen encoder strips used on Epilog lasers so some closed-loop feedback is used in enterprise solutions. But we are talking about $25K+ machines here. Is 3dGuy building this kind of machine?

*Edit: Usually closed-loop feedback with steppers is used to correct belt slippage on high-speed precision applications, like raster engraving with a laser cutter or high-speed pick and placing.
I’m guessing he wants to replace servos in the inmoov with something more reliable and more torque. Doesn’t look like steppers with encoders cost much different and they need the arduino anyway. So if I whip up a firmware, id make the encoders work for feedback like smart servos
#22   — Edited
I like the idea of having the ability to control a stepper, with encoder feedback, via UART in ARC (EZ-B or PC) and am 100% behind it.

I just know that with steppers you're not going to get more torque than servos, that's not what they are designed for. They don't have gears (well...a minority do) and they are built for speed and precision. In order to get the needed torque, high voltages and huge stepper motors are needed. Form factor also becomes a big issue at that point.

*Edit: Heat from stepper motors is also something to keep in mind if you are using them in 3D printed applications, some can get hot enough to melt the plastic.
Hmmm well that’s something I didn’t know about the gears. 

Maybe an alternative option are geared dc motor assemblies with built in encoders. Then you could turn any of them into a servo immediately


an alternative option are geared dc motor assemblies with built in encoders. Then you could turn any of them into a servo immediately
I've uses many of these 12 volt DC motors with built in encoders. ServoCity has them in many speeds. I've turned turned them into servos like JD mentions or sent uart commands. However I had to use a Sabertooth motor driver with a Kangaroo daughterboard to do it the uart way. 

60 RPM HD Premium Planetary Gear Motor w/Encoder
User-inserted image
#25   — Edited
This morning I used a 28BYJ-48 Unipolar Stepper with ULN2003 and the stepper library or AccelStepper library for 2 of them and Bipolar Stepper with L298N H-Bridge (with potentiometer) with the Arduino, yes it did need the libraries 

Hey Dave
hope this is not too far off topic, but

I use the 416 RPM Premium Planetary Gear Motor from ServoCity

Voltage (Nominal) 12V

Voltage Range (Recommended) 3V - 12V
My EZB controller with 7.4V runs it well with the L298N Motor Driver Controller Board


 User-inserted image
EzAng, ServoCity has a wonder assortment of all kinds of motors. I've used many of them.
#27   — Edited
I whipped this up: https://synthiam.com/Support/Skills/Servo/Stepper-Servo?id=21134 

It essentially turns up to 127 stepper motors into servos.

I haven't tested it because I have no stepper motors with me. But in theory, it should work, albeit requiring some tweaks for speed and acceleration. I ordered a few cheap steppers, and I'll wire them up to a nano when they get here next week to make any necessary changes. But, it will work with any stepper motor. 

That robot skill and respective Arduino firmware will work with any stepper motor driver you can throw at it.

After considering Jeremie's feedback, he's right about the encoder. I'm not sure what the point of the encoder is unless expecting the stepper to fail to move. If the stepper fails to move, there are many more significant problems. However, a simple limit switch to recalibrate the position is easy enough done.