Welcome! Log In Create A New Profile

Advanced

Stepper Motor Driver v2.3 - Makerbot out

Posted by thenoviceoof 
Stepper Motor Driver v2.3 - Makerbot out
February 07, 2010 03:51PM
It's been noted before in a different thread, but I figured that instead of letting it go even more off topic, I'd just create a new thread.

As of now, bare PCBs of the v2.3 stepper motor drivers are out of stock and discontinued by Makerbot. Their assembled driver boards seem to be merely out of stock, though, so I'm not sure what they're planning.

Getting the PCBs made by batchpcb is pretty expensive (relatively, according to the quick mental math in my head). The easydriver from sparkfun could work, but I'm not sure how the max/min switches on the 2.3 driver carry over to easydriver (mostly because I can't figure out how to open those .sch files, but I'm working on that). I don't have enough copper board to etch my own, and I'm not sure if it's double sided.

I've heard that someone is trying to set up a board store, but they're a bit overdue by now.

So, is there a cost-effective way of getting a stepper driver PCB that I'm overlooking?
Re: Stepper Motor Driver v2.3 - Makerbot out
February 07, 2010 04:26PM
I have successfully run steppers off these [www.pololu.com]

Triffid_Hunter has a great blog and he is using them, and will probably post here if he hasn't already (while I was typing) about the virtues of heat sinking them. from my limited experience with them that is the only disadvantage; the thermal dissipation is quite poor since it is a small form factor chip.
Re: Stepper Motor Driver v2.3 - Makerbot out
February 07, 2010 05:50PM
the optos have no interaction with the stepper board at all- they're simply passed through to the motherboard.

I'm considering adding a logic gate to the step lines on mine so even if my firmware spazzes out, it won't crash the head or anything. Remember that the stepper must be able to move away from home, so direction must be included in the logic.

As mfsamuel has noted, the A4983 needs heatsinking. I found that putting a video card cooler on top works beautifully, despite totally missing the thermal pad under the chip. Without a heatsink, expect no more than about 0.4A from them.


-----------------------------------------------
Wooden Mendel
Teacup Firmware
i found this "side step".
i think it can run 1.5 amps with out heat sinking. the pin out for driving is a little off from the makerbot motherboard. micro stepping down to 1/8. and only a few dollors more then buying from makerbot
Re: Stepper Motor Driver v2.3 - Makerbot out
February 08, 2010 11:38PM
yep that looks like it would work perfectly. It uses allegro's A3977 if you want to check out the datasheet. You may need to add a 5v regulator, as it seems to expect logic power provided to it and reprap stuff is designed so each board has its own regulator to mitigate noise related issues.


-----------------------------------------------
Wooden Mendel
Teacup Firmware
i am slowly working up what i am going to buy.
was planing on running power from an atx power supply trying to get away from 5v regulator all over the place,
and not planing on using the reprap stuff, just a Sanguino, atx power supply, 4 stepper drivers, 3 opto endstops. and need to find something to run the extruder

i was just reading thru the datasheat on the side step and it looks like the controls are inverted, is that easy to change in the fermwear?

i was thinking about using the stepper drivers from www.pololu.com, but i did not know if they needed any extra thing to get them running because it looks like there just brake out boards
Re: Stepper Motor Driver v2.3 - Makerbot out
February 09, 2010 12:23AM
So now the 2.3 stepper is off the market will reprap.org be moving to the next
makerbot stepper board?

Currently the reprap instructions deal with 2.3 only


regards

Stephen
Re: Stepper Motor Driver v2.3 - Makerbot out
February 09, 2010 01:23AM
longertoes, the A4983 carrier boards do everything. As supplied, they only need a heatsink and some wires attached. The A4983 is a whole stepper driver in one chip, and as such needs minimal support electronics. Check out my blog posts about them if you want, and the A4983 datasheet.

Inverted controls are easy to fix in firmware, but I don't think they are- step and dir are usually positive-asserted, and enable is usually negative-asserted


-----------------------------------------------
Wooden Mendel
Teacup Firmware
ok for the A4983 i made this with tinycad


i am missing what should be done with the Rst and sleep lines, i should put a dip switch in there for micro stepping. i dont know if i did the enable right. is there anything ealse i should change to make it better?

but i did this in tiny cad so then i can use veecad to lay it all out on a strip board.

and thanks for the help
Re: Stepper Motor Driver v2.3 - Makerbot out
February 09, 2010 05:23PM
reset and sleep should be tied high (they're negative asserted), and enable already has a pull-down on the carrier board so pulling it up may not work so well unless you make sure it's a low value like 3k3 or something.

MS1,2,3 probably should have dip switches on them so you can adjust the microstepping. According to the A4983 datasheet, MS2 and 3 have pull-ups internal but MS1 doesn't.

PS: keep motor ground and logic ground separate if you can. They inevitably meet up somewhere, but try to keep control of where they do and make sure it's very low impedance.

If you check the board I made for mine a couple of blog posts ago, you'll notice decoupling capacitors all over the place. These are critically important with this board since high current, high bandwidth switching signals and sensitive logic are in very close proximity to each other.


-----------------------------------------------
Wooden Mendel
Teacup Firmware
hows this one look, added some capacitors, added switch's on the ms1-3 with a pull down on ms1. hooked SLP and RST to each other. and moved the logic to its own power line, and the steppers to there own line. i dont have any values on any of the resisters or capacitors. is this starting to look more like what you setup for your board Tiffid?

Re: Stepper Motor Driver v2.3 - Makerbot out
February 10, 2010 07:20AM
yep looking much better. I suggest pulling !RST and !SLEEP high with 1-10k, despite the fact that the carrier board already has a pull-up on !SLEEP (R3). Also, no need for any resistors between the switches and Vdd- better off pulling the lines down with them. MS2 and MS3 already have a 100k pull-down, but I'd use 1 to 10k to massively decrease the possibility of motor noise getting onto those pins.

As for the decoupling, one capacitor on each rail must be a 10-100nF ceramic, and the others can be ceramic or electrolytic or tantalum as you see fit. My board has a large electrolytic on the motor power in addition to the ceramics, and the 5v is decoupled only with ceramics. I don't think I need bulk storage on the 5v since the regulator is physically close.

The reason for the ceramic is that CMOS logic may take mere milliamps on average, but it takes them in short, sharp slurps of up to an ampere or more. The decoupling capacitor must hold the supply rail steady against this, and therefore must have low impedance at very high frequencies (GHz in some cases!). As far as I know, ceramics are best for radio frequency performance.

This is also the reason that the decoupling capacitor must be physically and electrically as close as possible- even 5mm of extra trace can have enough inductance to ruin the high frequency performance of the capacitor. In fact, I have a chip waiting to be played (THS6012) with that states in its datasheet that the decoupling capacitor must be within 2.5mm of the power pins!

With these carrier boards it's not nearly so critical since the board has some decoupling on it already, but as I keep saying you simply cannot afford to skimp on these things when high frequency, high current signals and logic are anywhere near each other.

Proper decoupling will also massively decrease the amount of electrical noise radiating from the power wires to the board. Since it can never be totally eliminated, try to keep the 5v power away from motor power as much as possible.

If you look at some of my recent photos closely, you will see that I've twisted my motor leads. Not sure how clear it is, but my method is to twist each pair for noise, then twist the pairs together for neatness. Twisted pairs cancel out the majority of radiated noise right at the cable since their currents are equal and opposite. And with all the microstepping, those wires will radiate a ton of noise.


-----------------------------------------------
Wooden Mendel
Teacup Firmware
Re: Stepper Motor Driver v2.3 - Makerbot out
February 10, 2010 10:47AM
I've been wondering about the state of the stepper motor driver as well. I've seen nothing to indicate that it's being replaced, but everything kind of points to it not being moved forward anymore. I've sent an email off to Zach Smith via RRRF to see if he can clear up the state of the board. I was considering doing a short production run for the sake of the community.
fixed the MS1-3 hopefully, and resisters for RDT and SLP to high. i all so added a bunch of extra stuff like component size and layout, but thats all in the background.
i think the only thing i am missing is 5v power regulator. which sounds like i should have.
the capactors i left in as voodoo was planing on once of each.


Re: Stepper Motor Driver v2.3 - Makerbot out
February 10, 2010 05:57PM
lovely! make it so smiling smiley


-----------------------------------------------
Wooden Mendel
Teacup Firmware
Re: Stepper Motor Driver v2.3 - Makerbot out
February 22, 2010 01:54PM
Depending on where you are planning taking this the microstep selection could be done a different way.

Say you were using a microcontroler that had spare IO pins, like (but not limited to) for example an Arduino Mega.

If you paralleld up all the step select lines and drove them from spare Digital IO lines you could select the micro step size on the fly.

This is perhaps less advantageous when actually printing but certainly for fast moves over long distances (head repositions ie GCoded fast moves) you could get some speed advantage and reduced CPU overhead by dropping the resolution for the duration of the move.

If you check out the Gecko Stepper Driver boards their newer versions use a clever method to switch resolutions (ie micto step size) as the frequency of the steps increases beyond what is sensible to track at full resolution.

Thoughts for what they are worth....


Necessity hopefully becomes the absentee parent of successfully invented children.
Re: Stepper Motor Driver v2.3 - Makerbot out
February 22, 2010 06:24PM
only problem is that the microstep logic switches step size at the crossover points, and the firmware has no notion of where these are- so you may have a few small steps before it changes to big steps, ruining your positional accuracy.

I think the A3977 has a home output which you could use to detect what point of its cycle it's in, but most stepper controllers have nothing similar.


-----------------------------------------------
Wooden Mendel
Teacup Firmware
Re: Stepper Motor Driver v2.3 - Makerbot out
February 24, 2010 06:40PM
I agree, you have to pulse count and do some modulo math. So using binary increments of microsteps per full step is a good move. 1,2,4,8 etc.

If you start in full step mode and step each axis one step. then everything will be on aligned on a ones step boundary.

Assume your position and resolution is always done at the microstep size then a full step is like doing a bunch of these microsteps in one go. Providing you always work your calculations in the microstep resolution then the full steps always happen modulo microsteps per step.

Half steps at half that value etc etc etc.

In reality you will be unlikely to be full steping when extruding only when doing fast moves. ie You would be running your processor flat out to make microsteps happen fast enough for you bot to move at a pace you could tollerate.

On micro-stepping, there is the question of do we want to micro step really, is perhaps quarter stepping sufficient for our needs really.

Micro stepping gives increased resolution at the expense of accuracy and repeatability. Often due to simple stiction you will be missing microsteps anyway and the spacing of the steps will not be what you think you are getting.

Best way to increase resolution is to gear down the drive from the motor, increasing torque as well. Eliminates stiction and ensures accuracy and repeatability.

Don't take my word for it, check out the wikipedia entries and other good documentation on micro-stepping.

Personally I wouldn't drive at less than quarter step.

I accept that there are a lot of folk looking for a cheap quick fix/magic bullet for increased resolution and won't be happy with (want to to accept) my view point.


Necessity hopefully becomes the absentee parent of successfully invented children.
Re: Stepper Motor Driver v2.3 - Makerbot out
February 24, 2010 08:02PM
my drivers provide 1/16th microstepping, and I've had my firmware putting out steps at up to 18KHz so far, which at 3200 microsteps/rev is about 300RPM. I'm really not sure I need to drop the microstep rate to achieve the speeds I need, as at this rate my steppers are starting to skip steps anyway.

I very much doubt that the official FiveD could achieve this rate however, what with doing floating point operations in interrupt context, and changing speed exponentially rather than linearly while accelerating.


-----------------------------------------------
Wooden Mendel
Teacup Firmware
Re: Stepper Motor Driver v2.3 - Makerbot out
February 24, 2010 08:50PM
aka siad
Micro stepping gives increased resolution at the expense of accuracy and repeatability. Often due to simple stiction you will be missing micro steps anyway and the spacing of the steps will not be what you think you are getting.

My reply.
Is this really true? I appreciate that an 1/8th micro step might not be exactly
an 1/8th of a step in degrees turned and so I can understand you thinking that
this small difference could cause a large error when multiplied by a large number of steps

But

My understanding is that 8 micro steps is EXACTLY the same as a full step in terms of distance travelled. Because at that exact moment the power inputs are the same. It does not matter if the motor spindle is dragged a full step or the rest of an 8th of a step. The positions will be identical at that point in time. So


You also said
Best way to increase resolution is to gear down the drive from the motor, increasing torque as well. Eliminates stiction and ensures accuracy and repeatability.

My reply
I understand the sentiment but I think this is also untrue. A full step gives you a jerky stop start motion at low speeds. Even if you gear the motor down to a smaller step you just get jerky smaller steps.

However having said all that I do appreciate that a full step geared down to an 1/8 step will be more accurate than a single 1/8 micro step and the motor will have to spin 8 times more quickly and hence give you a smoother run but at the expense of you maximum speed being reduced by 8. No free lunch here.

Micro stepping on the other hand uses a more sine like wave rather than the stop start of a full step as a result it gives you a smoother motion. Gives you perfect reliability and repeatability to a full step resolution and reasonable reliability and repeatability with micro step plus no speed decrease in top speed.

Regards

Stephen

P.s. There is nothing stopping you using both micro stepping and gearing if you don’t mind reducing your top speed

Edited 1 time(s). Last edit at 02/24/2010 08:56PM by stephen george.
Re: Stepper Motor Driver v2.3 - Makerbot out
February 25, 2010 03:39AM
Some years ago a group similar to this one designed a system for reading piano rolls.

This system used a stepper motor and pinch wheel to move the paper past an optical scanning head. Some systems were built which used an off the shelf scanning chip with an integrated stepper driver. This chip came in several flavors, the one we used was designed to connect directly to PC parallel ports. Others used USB. Because national semiconductor made the source available to the linux community to write drivers, the code is easy to access. This chip is in a lot of scanners by a popular manufacture.

Where this comes into topic, is this was the first use of micro-stepping I learned about. If one downloads the data sheet for the LM983x scanner driver chip[1] There are some pages explaining how micro-stepping works.

The interesting item buried in this unlikely place, is that the system always sets up the registers to time the motor control in micro-step units. Even when full stepping is requested.

The document is a bit obtuse, This chip works by setting up a lot of registers, as the chip can control almost any scanner. Setting these registers is not an easy task, as setting the wrong values can blow the stepper driver. For this reason, the sections about the stepper driver are quite clear describing the on chip dac to set the step voltages and how the chopper system works.

I have found this to be an excellent tutorial on micro-stepping. Just ignore all the stuff on driving the scanning arrays.


-julie
[1]LM983x
Re: Stepper Motor Driver v2.3 - Makerbot out
February 25, 2010 08:37AM
Stephen George

As I suggested in my earlier postings, the truth is often not what folk want to here and may be unpopular. Don't take my word for it look at the wikipedia entry for microstepping, it really is not a panacea and comes with health warnings.

[en.wikipedia.org]

When micro stepping the positioning is far from repeatable and perfect. Except under perfect conditions which are near impossible to replicate in the wild.

The position of each micro step is subject to being removed from it's ideal by the forces acting upon the motor. More so than in full and half step modes.

If you are stepping at say 1/16 the last microstep in a full step cycle is likely to be accurate and reasonably precise (perhaps even the 8th too) the rest vary depending on where they are in the cycle, how much stiction the drive train has and how much load it is currently encountering.

(as all the mechanisms are arguably imperfect load will very with position)

As stated in wikipedia, often you may have instructed 1 or more microsteps but the shaft wont have moved. Until you add up enough unmoved micro steps worth of force to overcome the stiction/load resistance. Ergo poor accuracy and repeatability.

Y'canny change the laws of physics jim.

Sheep

Thanks for the references I will have a read those. They may come in handy yet for some other musings.


All

In summary.

Stepper positioning is always optimistic as their is no actual feedback as to where exactly it is. You are always pulse counting whether you like it or not. At higher resolutions you count more pulses, with the control overhead that this entails.

Micro-stepping is a useful thing to have if you understand exactly what you are doing with it, what it's limitations are, and your benefits can be acheived despite those limitations. If you don't keep it simple.

TANSTAFL

Ask yourself, whilst micro stepping would be nice if I could guarantee it, do I actually really need my resolution enhanced to this degree ?

If your answer is yes and you feel confident you can guarantee the positioning, do it.

Don't be surprised though if you invoke micro-stepping on a religious basis and get something you do not expect.


Cheers

aka47


Necessity hopefully becomes the absentee parent of successfully invented children.
VDX
Re: Stepper Motor Driver v2.3 - Makerbot out
February 25, 2010 09:41AM
... microstepping is maybe a bit more complex than that winking smiley

It's highly depending on the mechanical setup, applied torques and the motor-layout.

My CNC-mill with 1.1Nm-torque-motors and 'normal' 5mm-per-turn-spindles runs with fullstep at 25 microns and with halfstep at 12.5 microns fairly repeatable (maybe 5-10 microns mechanical inaccuracy).

When i replace the halfstep-drivers with 1/256-microstepping drivers, then i can enhance the step-count per rev. (or 5mm travel) from 400 to 51200 (or theoretically 0.098 microns per step), what's maybe repeatable with 3 to 5 microns depending of the applied forces, lubrication and ambient temperature ...

But then i have some Berger-Lahr-motors and drivers with 3phases and around 6.5Nm torque and selectable 'normal' stepping with 200, 400, 500 and 1000 steps per rev. or when 1/10-microstepping, then all tenfold: 2000, 4000, 5000 and 10000 steps per rev.

This would be a resolution of 5 microns per step in 1000-mode, or 0.5 microns per step in 10000-mode ... the motor-specification tells me, that this motors will have an angular inaccuracy around +/- 0.1 degrees - and because of the much higher torque this results nearly unchanged in positioning inaccuracy around +/- 1.5 microns with the spindle.

When using the motors with 5:1 planetary gears, then the positioning accuracy goes 5 times finer, and the inaccuracy with the same setup will be reproducible maybe around 2micron due to mechanical 'elasticities' of the aluminium-frame.

Another main point influencing accuracy is the quality of the bearings - the 'normal' spindles, ball-screws and bearings in my CNC-mill have mechanical accuracies around 1-2 microns, so this will add to the repeatability too.

For really counting with the sub-micron accuracy of the B&L-microstepping motors i'm building a much stiffer cartesian frame with high quality-components from Star, which are stated <1 micron mechanical accuracy with the ball-screws and linear stages, much more stiffness than the CNC-mill-frame but only 200mm traveling range in X and Y.

So i can have the CNC-mill with 1/256-microstepping around 5 microns accurate, or the smaller but stiffer and more accurate mechanical setup with 'only' 1/10-microstepping with estimated 1 micron repeatability grinning smiley


Viktor
--------
Aufruf zum Projekt "Müll-freie Meere" - [reprap.org] -- Deutsche Facebook-Gruppe - [www.facebook.com]

Call for the project "garbage-free seas" - [reprap.org]
Sorry, only registered users may post in this forum.

Click here to login