drive multiple heavy duty stepper motors


12 posts
by saranga2000 » Sun Feb 10, 2013 7:08 am
Hi,

I want to make a CNC m/c driven by up to 4 to 6 heavy duty 24v steppers(xyz axes +tool changers).

Is there a detailed tutorial (schematic, part numbers) to help make stepper motor drivers controlled by a raspberry pi? Preferably via I2C, to leave some gpio pins free for other purposes. External power is must as they need to be heavy duty steppers.
If there isn't 1 tutorial, pointing me to multiple part tutorials ( making stepper drivers enabling/driving thru i2c, driving via external power ) would help.
TIA
Vinod
Posts: 12
Joined: Fri Dec 14, 2012 3:42 pm
by mayannaise » Tue Feb 19, 2013 3:27 pm
Hi there,
glad to see someone out there with some initiative - designing something useful for the PI.
I am doing almost the same thing (making a 3d printer).
I would recommend using "EasyDriver" (http://proto-pic.co.uk/easydriver-stepper-motor-driver/) which costs only £10.
It can be used to control almost any stepper motor - 4,6,8 wire; bipolar/unipolar etc.
Half-stepping, full-stepping, micro-stepping are all compatible.
Just pulse EasyDriver and the stepper will move forward another step.
I'd recommend soldering SJ2 closed so it will accept a 3.3v pulse (handy, huh?).
Hope this helps, and good luck with your project.
Posts: 3
Joined: Tue Feb 19, 2013 3:04 pm
by photomankc » Tue Feb 19, 2013 5:49 pm
I keep pointing people to this one for stepper projects:
https://solarbotics.com/product/50863/

It can handle that voltage and can take movement commands via SPI. Trouble would be CNC cutting implies coordinated motion that's difficult to get from 3 or four drivers that share a bus.
Posts: 62
Joined: Fri Aug 24, 2012 12:58 pm
by saranga2000 » Wed Feb 20, 2013 2:32 pm
Thanks mayannaise & photomankc for your reply.
To your pointers to easydriver & L6740 breakout, I had looked at online information on it and its more powerful v2 ( big easy driver) - https://www.sparkfun.com/products/10735. The main issue I saw was
1. they can drive a max of 2A per phase - a decently capable stepper( 46Kg-cm -NEMA 34) I looked at runs at 4.2A per phase.
2. The latter is quite expensive, when compared to the price of the RPi itself. I am sure the price is warranted given the number of features, it still does not fit my needs.

Is it hard to build your own stepper motor driver to custom specifications? I am a complete newbie to electronics, RPi is my first attempt, but I think I can pick up what I need to learn given the extremely helpful RPi community & Youtube University.
The closest I came to seeing a coherent write up that explained a lot of what I was looking for was http://www.imagesco.com/articles/picstepper/04.html .

Would greatly appreciate any detailed pointers, or your steps in building a stepper motor driver ( for driving a 4A+ per phase unit, and if possible 110VAC and/or 24VDC )- & through it a heavy duty CNC /3D printer in detail.

Thanks
Posts: 12
Joined: Fri Dec 14, 2012 3:42 pm
by Ravenous » Wed Feb 20, 2013 3:17 pm
saranga2000 wrote:46Kg-cm -NEMA 34

This isn't a hobbyist project - these are quite expensive, when compared to the price of the RPi itself, as you say.

Reality check :o I suggest you have a look at a CNC mill someone else has built, and find out what motors they used. Then find out what the bits cost. I'm sure it'll be a lot more than you were expecting...
Posts: 1226
Joined: Fri Feb 24, 2012 1:01 pm
Location: UK
by photomankc » Wed Feb 20, 2013 4:28 pm
I have built my own CNC milling machine from a manual BF-25 mill. I'll tell you right now that building your own stepper drivers to handle 4, 5, or 6A current levels is not easy or cheap. I went down that road for a while and by the time you have torn your hair out and smoked a few parts the cost of a decent commercial driver board will be money well spent. Once you get into driving those currents there is not a lot of integrated help on the market. You will have to build it from components and that is not really a beginner-level electronics project.

Don't want to be a negative Nancy here but honestly, if the intention is to ever have a mill that actually makes things, trying to build a stepper driver by hand for NEMA23 or better steppers is how many projects end up in the trash bin.

Edit to add: The whole project easily cost 1.5x my original estimate of $2000 and took 6x the amount of time I thought it would. If I ever get another mill it will be a Tormach or a NovaKon turn-key because I will not be doing that project a second time.
Posts: 62
Joined: Fri Aug 24, 2012 12:58 pm
by saranga2000 » Thu Feb 21, 2013 6:16 am
Thanks Ravenous & photomankc for your replies.

I guess its a good thing I reached out here and got your feedback, before I started purchasing parts.

Btw, Ravenous, the Nema34 is listed for US$90 on an online site, and the other axes can be of lesser torque. So the sum total I thought shouldn't cost more than US$1000 max pessimistic estimate. Using linear sliders, and carpentering parts.

Also, photomankc, shouldn't the circuit I pointed to earlier (http://www.imagesco.com/articles/picstepper/04.html ) be able to handle 4A per phase loads as is? The datasheet for the TIP120 - seems to indicate continuous collector current of 5A. (http://www.datasheetcatalog.com/datashe ... P120.shtml)
Posts: 12
Joined: Fri Dec 14, 2012 3:42 pm
by Ravenous » Thu Feb 21, 2013 12:29 pm
Ah, well if you need only one of those monsters then things should be simpler. Successive stages of the machine could run from smaller steppers. (I am just guessing, but maybe you could start with the two smallest stages and see if you can make an X-Y machine of some sort. Then with that experience you'll be ready to take on a bigger stepper & controller for the next axis.)

Your budget sounds more realistic than I guessed too. With a machine of this sort you could use the raspi but I'm sure it'll be the cheapest thing on the whole final system :)

Bytheway though the circuit should work (given power, heatsink, etc.) you might want to look at the Linux CNC people (there is a forum out there somewhere) and see if microstepping will be needed too. Photoman mentioned co-ordinated motion, this is probably what he meant - if you're cutting metal or even hardwood, you probably want the motions to be very slow and controlled to reduce vibration & chatter. Not that I know anything about that sort of cutting.

At university I was once shown around an engine plant and saw a three-axis stepper driven thing somebody had built for them as a custom job. It was phenomenally expensive - mostly design/consultancy fees I suppose, but being the nineties it seemed pretty high tech. It wasn't even cutting - it was just pushing platinum (!) wires into wax forms for investment castings...
Posts: 1226
Joined: Fri Feb 24, 2012 1:01 pm
Location: UK
by photomankc » Fri Feb 22, 2013 6:26 am
It might be a bit easier to give some advise if you indicate what the machine would be doing? What it would be built from? Is it cutting wax, cutting plastic, cutting wood or metal, engraving, makeing PCBs, something else? All would have different expectations.

The circuit you linked is a very basic drive that would give you only the most "it moves" basic motion that's possible. The right transistors or MOSFETS would handle the current.... that is correct.

Almost all commercial drives are capable of much better microstepping motion which creates more fluid movement and cuts down on the resonance issues that steppers suffer from. They also permit the use of much higher voltage because they 'chop' the current to prevent the coils from overheating but the high voltage allows the coils to saturate faster. Thus you can turn the motor faster than you can at low voltage.

As a practical example my machine runs on 48V and 5A despite a motor voltage rating of something like 5 or 6V. The drives are micro-stepping at 8 microsteps per physical motor step. The result is smooth motion, clean cuts in aluminum and 200in/minute rapid rates. If I cut the voltage to 24V the rapid speed drops to under 100, past that the motors stall because the drives can not get current into the coils completely before it is time to change it all up for the next step pulse. Lower the voltage to the motors rated voltage and all the machine would be good for would be warming up the room.

If I drop to full or 1/2 step operation instead of 8 micro-step then the motors sound awful at cutting speeds of around 8 to 14in/min and in aluminum that is where I spend a lot of time. The cuts look like crap because the motors are not moving smoothly and they can stall out from their own resonance when the conditions all conspire just right.

This is why I say that in the scheme of things, the $50 to $60 per axis cost for even a basic commercial driver like the Keling 6050 is just money well spent. For anything but the most trivial uses, a home-grown full/half step driver built by hand is likely to just be a paper-weight. Without knowing what you want this machine to do though I could be over complicating things. It the forces are low or the work area is small then maybe you'd get by with simple home-built stuff.
Posts: 62
Joined: Fri Aug 24, 2012 12:58 pm
by saranga2000 » Sat Feb 23, 2013 1:52 pm
Thanks photomankc, Ravenous for your replies.

To be honest, I don't have any specific use case for the CNC I was thinking of making. My only motivations are:
1. Build a CNC using RPI: stumbled on a lot of DIY CNC videos, articles on servos/steppers etc and its fascinating.
2. It not be a toy: that I make and keep aside after playing with it for a few days after bldg it.

Photomankc: do you have a blog where you have described bldg your 2500$ CNC, including parts etc. The main reason I thought of bldg my own stepper driver are:
1. I live in India , don't have easy access to spark fun, maplin, amzn,RadioShack etc, its usually easier to build things from parts myself or i d end up paying high prices ( import duty etc)
2. Its more fun, but more importantly if something goes wrong I have depth to fix it.

Re: micro stepping , the same article I pointed to, shows how to use a stepper IC ucn5804, to make things simple.http://www.imagesco.com/articles/picstepper/06.html . if I put tip120 after the if, shldnt I be able to drive 5a motors and get all complex features like micro stepping ?

Also, if some one could point out two things it would be extremely helpful:
1. How to use external power to drive the load ckt? For eg. The stepper or even a simple led- specifically, do the gnd of external power and the RPI/pic gnd need to be connected? If yes, do I need to put a high resistor between the stepper/led and RPI/pic gnd so that the high load voltage/current doesn't fry the pi? A simple ckt dia would be very helpful.
2. The enema 34 stepper I saw online was AC driven. How to drive an AC load ckt with a smaller DC logic ckt?
TIA
Posts: 12
Joined: Fri Dec 14, 2012 3:42 pm
by LinuxGuru » Sun Feb 24, 2013 11:28 pm
I have comparable objective, albeit only 3 step motors, 2 heavy duty and one small 5V or so.
However, customized acceleration / deceleration required to avoid jerky movement.

There are several comparable products fit into purpose:
L6470 dSpin Motion Controller (2 x 1.5A motors)
http://altelectronics.co.uk/shop/arduin ... od_84.html

Sparkfun L6470 Stepper Driver Breakout
https://www.sparkfun.com/products/10859

Polulu DRV8825 Stepper Motor Driver Carrier, High Current (md20a)
http://www.pololu.com/catalog/product/2132

Powerlolu Stepper Motor Driver up to 10A + EasyDriver
https://grrf.de/en/catalog/baugruppen/p ... rup-to-10a

All of them seem to require Arduino but I don't think its a big issue to make it work with RaspberryPi, the last is not so good for direct control of step motors due to latency issues (please correct me if I'm wrong here).

Any suggestion(s) are greatly appreciated.
Posts: 14
Joined: Thu Mar 08, 2012 7:27 pm
by marcinose » Thu May 23, 2013 10:05 pm
Appears that the Powerlolu is the only open source answer on this one.
Posts: 1
Joined: Thu May 23, 2013 9:59 pm