Hey BGB!
Hrmmm, I think we are still on different pages.... IF your goal is to drive NEMA17 motors inexpensively then DIY drivers are NOT the right way to go...have a look-see @ these:
http://www.ebay.com/itm/StepStick-A...982?pt=LH_DefaultDomain_0&hash=item3383fcade6
http://www.ebay.com/itm/Geeetech-St...566?pt=LH_DefaultDomain_0&hash=item4ad81535b6
first one apparently can't drive the full per-phase current for the motors I have.
the latter could work though.
I can debate the cost, since I am still using reasonably cheap transistors for driving it (probably not using $2 worth of parts). not like I am throwing MOSFETs at the problem or something... (rather, using Darlingtons).
The second link being a "pin-compatible upgrade" over the popular A4998....I have a fair number of both, the DRV8825 is definitely a better chip than the A4998, but both are much better than anything you could DIY for the same $$. Using the DRV8825 @ 24V I can get ~2400rpm from most NEMA17's I have played with....@ 12V about the best I can do is ~1600rpm.....Using a Gecko driver I can typically get >3000rpm, but I don't know that I would ever spend the $$ for a Gecko to drive Nema17's.....
All modern, Commercially available stepper drivers are "constant current" drivers.....Because the change in current in the coil is by definition limited by the inductance of the stepper coils (L = di/dt), at any given RPM a much higher voltage is required to drive a stepper than its "nominal Voltage"......The drive voltage for a stepper is typically determined by the following formula:
Code:
32 * (Inductance ^1/2) = Optimal Drive Voltage
Example:
32 * (5mH ^1/2) = 71.55V
32 * (2mH ^ 1/2) = 45.25V
32 * (0.8mH ^ 1/2) = 28.62V
I have never seen a "proof" of this formula, but it is widely accepted industry wide as a "good compromise or starting place" between stepper performance/driver complexity/cost/efficiency.....Millions of examples of systems that function very well with both higher and lower voltages than suggested by the formula....the primary mitigating factor is higher-rpm Torque requirements.....(side note: many DIY 3D printers use timing belts for linear motion....these require relatively low RPM so typical belt driven 3D printers function just fine with almost any NEMA17 operated @ 12Vdc....but when lead screws are used the loss of torque at high RPM can become a real issue...causing "missed steps", "Locked Steppers" etc, etc .....Just FYI).
for driving the tool head-assembly in my CNC, I have ended up in initial tests using a fairly low RPM, as the stepper was having a hard time moving it all that fast/well.
I lowered it onto a scale (using an empty coffee can as an intermediate), tool head assembly is approx 17 lbs (8.5kg). was not able to accurately measure the torque needed to drive the gear (values too small to measure), but it is in the "rather stiff to drive with fingers" territory. also seem to be dealing with a fair bit of friction in a lot of this (was fine-tuning this).
current total reduction Z is about 32:1 (2:1 from motor to the nut, and 16:1 due to the all-thread).
tool head movement is slow but probably useable. in the code, it was running at approx 50% duty cycle.
my dad had the random suggestion of using two parallel steppers to drive the tool head assembly (from opposite sides). may also consider this.
XY should be faster as the table assembly is lighter, but may need to be kept slow enough to handle whatever I put on the table (say, a chunk of steel or similar).
Most "Stepper Drivers" are a mixture of analog and digital circuits that take two (or three) inputs from the controller...."Step" and "Direction" (The third input that many have is an "Enable" input). Typical Stepper Drivers operate in "Micro-Steps"....some (like the Gecko Drivers) are "fixed" (and this is a real misnomer) while others (like both the A4998 and DRV8825) are "user Selectable"....I won't go into the theory of uStepping (there is plenty of information available...) but suffice it to say that there are advantages to it. The Gecko Drivers are fairly unique in that they have built-in logic that "varies" the uStepping based on the input step rate.....again, w/o going into the "how", the reason this is advantageous is that at low RPM the "smoothest" operation might occur @ say 64 uSteps per Step but at higher RPM the motor might perform much better at 8 uSteps/Step and at even higher RPM it might perform best in half or full step mode.....but a "standard controller" can't "switch uStep rates" on the fly.....The way the Gecko works from the controller's perspective: it always requires 10uSteps per Step.....internally it uses logic to determine which "step mode" it should be in...as the time between step pulses decreases, it "combines steps"...as the time between steps increases, it "expands steps" into multiple uSteps......Of course the position of the rotor always represents the number of steps "it should have moved @ 10 uSteps per Step".....
ok.
Building a DIY servo and driver is fairly straight forward....But controlling it requires a highly sophisticated and fairly specialized type of closed loop controller.....The a fore mentioned K-Flop is exactly such a controller....it combines an FPGA and a DSP that allows mixed signal control of both steppers and servos in a user-defined combination of Open or Closed Loop....It also comes with an open-source PC application interface that I prefer to the more common Mach3/4.....But, from what I am reading in your posts, I don't think you are quite there yet, though I will tell you I wouldn't generally consider using anything else for the machines I build/built (with the exception being a 3D printer where I am going to at least start with the ever-popular Reprap firmware for the Arduino based controller.....too much work has gone into making this the "easy" route for me to ignore it, lol) Anyway, if you are building a NEMA-17 based system I would strongly urge you to stick with steppers.....use readily available (and CHEAP!) 3D printer drivers like the A4998 or DRV8825 and perhaps even think about using one of the Arduino controllers if you are on a limited budget.....might take a bit of fiddling to get it to do exactly what you want, but that is true of any controller.....I wouldn't feel comfortable connecting an Arduino to my Medium Format Router....The gantry weighs in @ ~150lbs and the drive system will throw it around at 1500ipm if the controller "lets loose".....I am not saying an Arduino Controller can't be functionally equivalent to a K-Flop....but I have a LOT of experience AND confidence in the K-Flop....a 3kW spindle spun up to 24krpm even moving at a modest 600ipm can do more damage in a second than I care to fix, so the $320 price of the K-Flop is a small price to me for the confidence I get with it, LOL. For a first-build NEMA-17 based machine I think you would be very happy "borrowing" from the 3D printer revolution....
well, with the stuff I am using, I am making stuff work at least...
in retrospect, maybe should have got some NEMA-23's, but meh, it works...
FWIW, my tool-head only spins at about 700 RPM max, so shouldn't be too insane. may need to run it a bit slower depending on what it is cutting (and the size of the endmill, ...).