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

Using And H-Bridge 2.5 Amp Motor Controller To Control Stepper Motors?

Ok...I am trying this again - hopefully someone can help me figure it out...

I have a few of these little stepper motors and was wondering if anyone could shed some light on compatibility with the 2.5 amp motor controller...or any other controller. Here is the data sheet;

http://www.nmbtc.com/pm-step-motors/engineering/pdf/Drive-Circuitry-and-Wiring.pdf

The motors are Pm355-048-snc9 versions - they are housed in an older polycom/sony pan/tilt camera mount. I was hoping that I might be able to use a single h-bridge to control them, but I am thinking thinking that I might need two h-bridges (if that is possible on one EZ-B board)- one for pan and one for tilt.

Please help me figure this out....I am stumped!

Thanks,
Wayne


ARC Pro

Upgrade to ARC Pro

Become a Synthiam ARC Pro subscriber to unleash the power of easy and powerful robot programming

#10  
Just to let everyone know...my little experiment was a success! But...and there is a caveat here - the motors that I was working with are 24v, and drained the power supply fairly quick. So, I am going to try and mod the pan/tilt unit on the sony/polycom unit to use some continuous rotation servos and reduction gears. I am sure that there are better stepper motor controllers for this particular application, but I was able to cobble things together...and it was super cool looking while it had power!

Thanks to all,

Wayne
#11  
I posted about this subject a couple of days ago also. My project will be using an linear actuating stepper motor. (screw through middle of motor). I will be using a "chopper" drive that will then require pulses be sent to it. I am waiting on the ezb4 to see if there is some way of generating pulses. The only other input the drive needs is "direction", in my case up or down. I'm really hoping to get some things together soon so I can start posting some pics. I am creating a large "bot". Wheelchair motors for the tracks, wheelchair motors for the shoulder joints,2 orion H bridges 1 for the shoulders 1 for the tracks. And a linear stepper to raise and lower the main body from the track base approximately 12 inches. Cant wait for the ezb4.

Chris
#12  
I know this is an old subject but I am trying anew... On my Sainsmart L293d motor shield I have figured out how to connect it to the motor - how to connect to the EZB V4? There are two 3pin connectors called servo 1 and 2 - maybe there? But where on the EZB?
User-inserted image
#13  
No, the servo connectors are cor driving two servos from an Arduino. Being an arduino shield, it is controlled through some number of the gpio pins (the long row of pins labeled 0 - 14) but which ones, and what signal they need you'll either need to find a data sheet or interpret an arduino sketch that is written for it to figure out what it is doing.

Also, at only 600ma per channel, this is not going to drive very powerful motors.

You need to match your controller to your motors, and steppers are not plug and play. You will need to do some scripting to make them work with most (all?) h-bridges.

Alan
#14  
Very interesting - the board was very inexpensive and suggested when I bought the stepper motor. The motor is a Kollmorgen P22NRXB so I will have to do more study of motor controller boards.
I am building a telescoping arm with a rack and pinion andxas thinking that driving the pinion with a stepper motor would be a simple command like clockwise 4000 counts.
Any recommendation on this telescopic control?
Thank you!
#15  
Check Jeremie's answer on the previous page of this thread. Describes how to use the ln298 with steppers (2.5 amp, which I think is a good choice for your motors - didn't read the spec sheet, just a description, but I think they are 2 amp).

Alan
#16  
Thank you! I have read Jeremie's thread on this and am motivated. Unfortunately, his link to myrobotlab doesn't work. I will order the l298 board but in the mean time where do I connect it to the EZB ?
Is there anyway to contact Jeremie for more specifics on how he did this?
#17  
This tutorial shows how to use the ln298 with brushed or brushless motors. It, together with the info from Jeremie should be enough information to pull it together for you. https://www.ez-robot.com/Tutorials/UserTutorials/130/1

More likely than not Jeremie will see this thread after the weekend and provide additional input.

Alan
#18  
@castlephelps "his link to myrobotlab doesn't work" You can always google it.....
PRO
Canada
#19  
Hi @Castlephelps,

First off, nice to meet to you!:)

The sainsmart L293 shield is a clone of adafruit's motor shield design and uses a 74HC595 shift register to control the L293 H-bridges. This cuts down on the amount of control signal pins needed but does complicate the process of sending the signals if you aren't familiar with shift registers.

While the sainsmart shield can drive some smaller steppers and DC gear motors, as Alan mentioned, the L298 is a better choice. It can handle higher voltages and current.

Feel free to ask questions on here @Castlephelps I'm always browsing the forums whenever I have a spare moment
#20  
Hi Jeremie!

I am very excited to make your acquaintance! My robot project started last Christmas when I received an EZ-B development kit / but I soon discovered that the components weren't beefy enough so now I have finalized my design and am now welding arms and wanting to drive a telescoping arm with large stepper motors and be able to control how rad and how fast the stepper drives a rack and pinion!
I ordered an l298 and can start playing with it after Thanksgiving! I'm sure I will have lots of questions!

Thanks again,
Castle
#21  
Hi Jeremie,
Ok I got my L298d and have it wired exactly as you recommend right down to the wire colors. I have a separate 5vdc power supply for the 298 as you can see in the photo. I connected to the EZ-B, opened an HBridge PWM Movement window but when I click on the arrows nothing happens - the motor does not turn any. What am I missing?

User-inserted image


User-inserted image
PRO
Canada
#22  
Welcome back @castlephelps!

So the H-bridge Movement Panel won't be able to control a stepper motor as it doesn't send stepping signals to the stepper motor. To make it "step" you will need to write a script.

Since you have the H-bridge enable pins connected to the ez-b you'll have to add those. Maybe just make them high for the moment.

Code:


Set(D5, ON) #enable pin 100% PWM
Set(D6, ON) #enable pin 100% PWM

:Start
Set(D1, OFF)
Set(D2, ON)
Set(D3, ON)
Set(D4, OFF)
Sleep(10)
Set(D1, OFF)
Set(D2, ON)
Set(D3, OFF)
Set(D4, ON)
Sleep(10)
Set(D1, ON)
Set(D2, OFF)
Set(D3, OFF)
Set(D4, ON)
Sleep(10)
Set(D1, ON)
Set(D2, OFF)
Set(D3, ON)
Set(D4, OFF)
Sleep(10)
Goto(Start)


Obviously the pins I have here may not match what you have hooked up, change the digital pin in the code accordingly:)
#23  
Way cool! Now to find the tutorial on adding code...

Thank you!
#24  

Quote:

Way cool! Now to find the tutorial on adding code...

Look for "Script" not "code" and you will find what you need.

Alan
PRO
Canada
#25  
Just uploaded a video example of driving a stepper motor with ARC, and ez-bv4, and a dual H-bridge.

#26  
And to make it reverse direction would you set the PWM pins as a negative speed or set the 1-4 pins the opposite sequence?

Also if you wanted the motor to move plus or minus 45 degrees and stop how would you tell the script that?

Thanks
PRO
Canada
#27  
Well I'll do you one better and attach my stepper project file for you. The project includes scripts for Fullstepping in the clockwise & counter clockwise directions and Half stepping in the clockwise & counter clockwise directions.

Stepper.EZB

The degrees in which you would like to move depends on the steps/degrees that your particular stepper moves. Hypothetically, say it's 1 step per degree, then 45 steps would be 45 degrees. Here would be an example of 45 degrees of movement:

Code:


REPEAT($y, 0, 44, 1)
$x = 10
Set(D1, ON)
Set(D3, OFF)
Set(D2, OFF)
Set(D4, ON)
Sleep($x)
Set(D1, OFF)
Set(D3, OFF)
Set(D2, ON)
Set(D4, ON)
Sleep($x)
Set(D1, OFF)
Set(D3, ON)
Set(D2, ON)
Set(D4, OFF)
Sleep($x)
Set(D1, ON)
Set(D3, ON)
Set(D2, OFF)
Set(D4, OFF)
Sleep($x)
ENDREPEAT


So this code sample will Repeat a fullstep sequence 45 times, here are what the values in the repeat loop represent:

0 = start value
44 = end value
1 = increment by 1

If the stepper seems to be skipping steps our moving backward at times you may have to change either the code or the stepper wires to be in the proper sequence or it might be moving too fast. If speed is the issue, just increase the $x value to slow the stepper down.