Designing my own 5-phase bipolar stepper driver - Page 1
Forum section: electronics / projects

author: DebboR
author_rank: Contributor
timestamp: December 30, 2012, 03:11:10 pm
content: Hello!Recently, I was given two Step Syn 103-7515-5042 stepper motors (don't google it, you won't find anything...). They have 10 wires (two per stepper coil), and with some research, I found out they are 5-phase bipolar steppers.They are rated for:1.4A at 3.22V0.72°/stepNEMA23Now, I thought I'd design my own 5 phase bipolar stepper driver using 5 H-bridges and an AVR. I already looked at the L298 and the DRV8844.I think the DRV8844 is a better choise for me, as it has a built-in 3.3V regulator to power my AVR.The only problem I have is limiting the current to maximum 1.4A. First, I thought of using a 3.3V supply so I don't need current limiting, but at this low voltage the H-bridge IC's won't work.I could use PWM, but then I have no idea where to put my current sensing resistors (because the polarity changes with the H-bridge), and that would require an AVR with 10 PWM channels.Maybe it will be better to use a power resistor in series with the stepper windings. I have a 15V power supply laying around somewhere that could be used with a 10 ohm - 15W power resistor in series with each coil so that we would get approx. 1.2A.What would you think I should do?DebboR

author: SeanB
author_rank: Super Contributor
timestamp: December 30, 2012, 03:29:46 pm
content: Current sensing is normally done in the negative lead of the H driver, they have a current sense output that carries motor current only. Current limit is also pretty common on them, you program the current limit either via a register or by a pin supplied with a current limiting voltage or current that is used internally to do linear limiting or to do an internal PWM of current through the high side switches.

author: DebboR
author_rank: Contributor
timestamp: December 30, 2012, 04:33:18 pm
content: Quote from: SeanB on December 30, 2012, 03:29:46 pmOk! Thanks for the info about the built-in current limiting. I discovered the DRV8844 doesn't have that feature, but the DRV8833 does.I just need to put the right resistor between the ISEN inputs and GND. For 1.4A, these should be 0.143 ohms. Is this even possible? I don't have resistors with that low value laying around... Should I just use a PCB trace of the correct lenght and width?Thanks,DebboR

author: SeanB
author_rank: Super Contributor
timestamp: December 30, 2012, 04:40:59 pm
content: PCB trace will work, but will have a poor tempco and limited regulation, but will be fine for a simple motor current regulator. Just make the trace large enough so that it can dissipate the heat and you will be fine. try not to make the trace too inductive, meander it but do not make loops of it.

author: DebboR
author_rank: Contributor
timestamp: December 30, 2012, 04:54:56 pm
content: Quote from: SeanB on December 30, 2012, 04:40:59 pmOk! Thanks... I used this:http://circuitcalculator.com/wordpress/2006/01/24/trace-resistance-calculator/to calculate the trace.If I get a 1 oz PCB (standard, I think?), then my trace should be around 40mm long when I use 5 mil width.Does this sound all right to you?DebboR

author: SeanB
author_rank: Super Contributor
timestamp: December 30, 2012, 05:06:16 pm
content: Longer and thicker will be better, just make a hairpin and it will have lowest inductance but will have improved heat dissipation. Do not place components under it but preferably have a clear area ( you can put leaded resistors and supply inductors there, just nothing low level that will take exception to fast edges coupled into them) around it. Decoupling caps will be ok for the driver there, leaded or not, on the other side of the board.

author: DebboR
author_rank: Contributor
timestamp: December 30, 2012, 05:08:56 pm
content: Quote from: SeanB on December 30, 2012, 05:06:16 pmOk! Thanks a lot for the advice... I will now start with the circuit / PCB design. I will let you guys know when the board is done!DebboR

author: Kremmen
author_rank: Super Contributor
timestamp: December 30, 2012, 08:33:38 pm
content: Sanyo Denki is one of the not-so-nice companies that documentation for their hardware is really difficult to find in some cases. Anyway, you obviously have one of their 5 phase steppers with all coil end brought out. That gives you possibilities in principle, though in practice you may end yp doint it the "normal way" anyway. 5 phase steppers as a rule are connected in pentagon, where the stator coils form a ring with taps between each coil. These taps are driven by half-bridges (not H-bridges) and there are 5 of them. There are two fundamental excitation sequences - full steps at 4ex and 5ex and half steps at 4-5ex. The excitation sequences are easily generated with a small CPLD but why not a MCU as well.Current limiting can be either complex or simple. The simple alternative is to measure the combined return current from all half bridges. The current is shared between (typically) 4 coils and assuming the coils are reasonably similar, there won't be big variations in individual coil currents.The low nominal coil voltage is what usually throws people. That only means that you get nominal current with that DC voltage, but it has little significance in actual usage. The coil inductance will resist current rampup and you need a significantly higher voltage to drive a useful current throug the coils at max working speeds. A rule of thumb is that your supply voltage should be 32 * sqrt(L) volts, where L = coil inductance in millihenries. At those voltage levels you do need a current limiting scheme to keep the coils from cooking at slow speeds, usually a pwm + setpoint vs actual current comparator.

author: DebboR
author_rank: Contributor
timestamp: December 30, 2012, 10:13:05 pm
content: Quote from: Kremmen on December 30, 2012, 08:33:38 pmI actually have 5-phase pentagon drivers laying around... I tried them (didn't work), but then I read somewhere else these could only be used in unipolar mode. My steppers are bipolar (thus they have 10 leads instead of 5), and they are internally completely different wired then the unipolar ones. Bipolat ones must have a full H-bridge across each winding (because after 1/2 of one turn, the polarity should change, elsewise, the motor will reverse).It would be nice if I could use my drivers (they have a lot of functions), but AFAIK they won't work in any possible way of connecting the bipolar steppers to it...DebboR

author: Kremmen
author_rank: Super Contributor
timestamp: December 30, 2012, 10:23:12 pm
content: Well, yes and no. The polarity needs to reverse, but to do that you do not need H-bridges at each node of the ring. Think about it for a moment an you will see:-current thorugh a coil can only run in the nominal + or - direction or not at all.-you can connect all coils individually to a H-bridge of its own and get this effect.-you can _also_ connect all coils in a pentagon, and connect each node to a half-bridge to get the same effect.The only thing you lose is that you cannot arbitrarily decide the current direction for each coil individually, regardless of the others. But this is not necessary anyway, because all sensible step sequences result in the equivalent pentagon/half bridge anyway.There might be a functional stepping sequence that cannot be implemented this way but i am willing to bet it is not significant.I am not quite sure why all coil ends of a 5 phase stepper are brought out, but it is _not_ to enable bipolar driving. That can be done equally well using half bridges.P.S. What drivers? If they are the Sanyo PMM8714 and PMM5301/5303 they should work if the motor is in pentagon.

author: DebboR
author_rank: Contributor
timestamp: December 30, 2012, 10:55:58 pm
content: Quote from: Kremmen on December 30, 2012, 10:23:12 pmOk, I think you're right, but I will still use the full H-bridge setup as it requires only 1 IC more (with the dual H-bridge DRV8833).Maybe I could try wiring them in pentagon later on, as the circuit won't change (only the software and motor wiring).DebboR

author: Kremmen
author_rank: Super Contributor
timestamp: December 30, 2012, 10:58:31 pm
content: Sure, it is your project to do as you please. Just wanted to make you aware of different alternatives.

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: December 30, 2012, 11:34:00 pm
content: This is a Sanyo hybrid to drive these - not a huge amount of info unfortunately :http://pdf.dzsc.com/PMM/PMM5301.pdfThere is a surprising amount inside these - see this vid where I repair one :

author: davew_nz
author_rank: Newbie
timestamp: January 02, 2013, 04:48:25 am
content: Hi DebboR,I also have a couple of Step-Syn 5-Phase motors that I have had for a while and have been looking a building a driver for them (I can buy one but where is the fun in that). I have the 103-7554 which is a 5-phase motor.I looked three options for driving the motor,1. SI7510 controler with SLA5073&SLA5074 driver2. PMM8714PT with PMM5301 driver (same as on the video from mikeselectricstuff)3. ATmel48 with 3 x L298NThe components for option 1 & 2 can be located atwww.utsource.netbut in the end I opted for the last option as I could source them locally.Now one guy who has already done this is Fana Akbarkan A.K.A. nastelroyhttp://nastelroy.wordpress.com/2008/11/20/5-phase-5-wire-motor-stepper-driver-pentagon/http://nastelroy.wordpress.com/2010/10/07/motor-stepper-driver-5-fasa-pentagon/use Google translate to get the English versionHe now sells built unitshttp://berselancar.com/shop/product_info.php/products_id/41/osCsid/18b3bb3c07091a492fe08713520dae23So I used Diptrace to knock out my own version (I would attach the Dip-trace file if I could work out how to on this board...)From Jones on Steppershttp://homepage.cs.uiowa.edu/~jones/step/types.html#multiphaseWith a 5-phase motor, there are 10 steps per repeat in the stepping cycle, as shown below:012345678901234567890Terminal 1 +++-----+++++-----++Terminal 2 --+++++-----+++++---Terminal 3 +-----+++++-----++++Terminal 4 +++++-----+++++-----Terminal 5 ----+++++-----+++++-time --->0 101101 100102 110103 010104 010115 010016 011017 001018 101019 101000 10110 repeatI have also done some work on Sine Wave multistepping after reading this paperhttp://www.europeanjournalofscientificresearch.com/ISSUES/EJSR_70_4_10.pdfHigh Performance Drive System Based on Five - Phase Stepping Motor under Nano Stepping ModeI have a prototype on the breadboard at the moment and am running it from an Arduino. The stepping runs great (following the LEDs) but the motor just won't budge.Wiring for Step-syn Phases are1 Blue2 Yellow3 Orange4 Red5 BlackA bit of a brain dump but hope it helps.Dave

author: DebboR
author_rank: Contributor
timestamp: January 02, 2013, 11:02:51 am
content: Quote from: davew_nz on January 02, 2013, 04:48:25 amHi!Thank you very much for posting this info. So, based on your cycle, the windings don't need to be reversed (-1)? You just connect the striped ones (one side of the winding) to GND and the non-striped to the controller? Then I could try it with the controllers I have laying around (Oriental CSD5807N 5-phase stepper driver). I'll connect some LED's to it to verify the sequence from it.I already tried connecting the steppers to them before, but I was leaving the central point (all the striped wires connected togeter) floating (it didn't work, just some random movements). Maybe it needs to be connected to GND. I'll try this ASAP and report back!If it doesn't work, I'll go with the AVR and 3 DRV8833's.DebboR

author: Kremmen
author_rank: Super Contributor
timestamp: January 02, 2013, 12:28:22 pm
content: One more time: in this scheme the coil voltages ARE reversed in due time. Please imagine a coil between each line of "Termnal" in the +/- list and you will se that the coil polarity changes accordingly to the direction of + and - signs. That is exactly what i tried to explain earlier. Using full H-bridges is a waste and bad design. Unless for some curious reason you really need to drive each coil completely in isolation.And connecting the coils in a star with one end of all coils together will _NOT_ work. They need to be in a _pentagon_.

author: DebboR
author_rank: Contributor
timestamp: January 02, 2013, 11:34:32 pm
content: Quote from: Kremmen on January 02, 2013, 12:28:22 pmOk, I think I got it now. You are indeed correct about the polarity change, and most likely I will implement this in the future, as it won't take a design change (just wiring). I already have ordered 6 DRV8833's, so I will make two boards with each 3 DRV's, so I can do anything I like with the steppers and polarity with just a software change. These boards aren't meant for sale (just personal use), so the extra driver per board isn't a big deal.With 6 H-bridges, these boards can pretty much drive all steppers at 1A a coil.I'll make (and post) the design asap here.DebboR

author: davew_nz
author_rank: Newbie
timestamp: January 02, 2013, 11:47:39 pm
content: Hi DebboRI agree with Kremmen on this after trying both.I am using 1/2 bridges for each terminal (4 leads on one L298N and 1 lead on the second L298N)http://homepage.cs.uiowa.edu/~jones/step/types.html#multiphaseshows three types of wiring.The diagram on the right shows the 10 wire / 10 terminal full bridge option, I wouldn't bother with that oneThe middle diagram shows the Star layout with one wire from each coil joined, I couldn't get that to work at allThe Left diagram is the Pentagon layout that I have almost got to run,To connect 10 wire stepper to 5 phases the wiring sequence for the Step-syn motors is as follows (as far as I can tell) ;terminal 1 Red & Blue Stripe (Phase 1)terminal 2 Yellow & Red Stripe (Phase 4)terminal 3 Black & Yellow Stripe (Phase 2)terminal 4 Orange & Black Stripe (Phase 5)terminal 5 Blue & Orange Stripe (Phase 3)With the motor wired like this I can feel that the spindle firm up but it still doesn't move. I thing that my motor side PSU is too small.Kremmen can you please advise me here?The motor is printed as 0.6 A and I have a 14v 600mA power pack, but think that is it not moving due to 3 phases active will draw 1.8 A which the power pack can't supply (I am now assuming this 0.6A is per Phase). I have a 12v 5A power pack but will need to get a new connector for it.ThanksDave

author: davew_nz
author_rank: Newbie
timestamp: January 03, 2013, 02:15:08 am
content: Hi DebboRI have attached my DipTrace file on my 5 Phase Stepper using the L298N. This was my first go with using Diptrace and is a work in progress (pre-beta...) so I am open to suggestions.Uses 3 x L298N so is designed to drive 2x steppers with 1/2 bridges.Dave

author: DebboR
author_rank: Contributor
timestamp: January 03, 2013, 03:08:36 pm
content: Hi all!I'm back with a little status-update. I got the motor running now with the CSD5807N drivers. It is wired in pentagon with the wire pairs provided by davew_nz. It turns pretty smooth, but I got one little problem with the driver.It is only rated up to 0.75A, which is too little to get the motor past 1 rev a second (500 steps/second). On the driver, there is a 670ohm powerresistor, which I beleive is used for current measuring by reading the voltage across it. Would it be possible to solder in another resistor so I can boost the maximum current to approx 1.4A? I know there is a variant of this driver (the CSD5814N) that is capable of currents up to 1.6A.When I run the motor for approx 15 minutes, the heatsink doesn't even get warm at all. I think the 1.4A shouldn't be a hughe problem...Let me know!DebboR

author: Kremmen
author_rank: Super Contributor
timestamp: January 03, 2013, 03:20:39 pm
content: Quote from: davew_nz on January 02, 2013, 11:47:39 pmOK since you ask.As a rule, the values indicated in the motor type plate or data sheet are DC values. So the 0.6 amp figure would be max coil current for each coil individually. Depending on the excitation scheme you need 3 or 4 times this current to be available. What is more, you need plenty more voltage than the DC value resulting from the type plate info. A critical piece of infrmation is the coil inductance as that and the supply voltage will determine the slope of current rise vs time for the coils. At any speed, you need significant voltage to ramp up the current anywhere near nominal during the brief switching period when the coil is active. A rule of thumb says the supply voltage should be 32 times the square root of the coil inductance in millihenries. But that is just a rule of thumb, the value really depends also on the pwm scheme used to drive the coils.A nice solution is to use an oscillator, RS flipflop and comparator to detect when the current exceeds the limit value and reset the flipflop. The next oscillator pulse sets it again and the cycle repeats. The output of the flipflop is AND-ed either with the enable signal or the high switch signal, depending on how you want the currents to circulate in the bridge and coil. Anyway the end result is to limit overcurrent to the level set by the comparator reference value. In a more sophisticated driver this reference can be set to different values based on whether the motor is accelerating (high value), maintaining speed (nominal value) or holding position (lowered value). That way you can suck every inch-ounce or Ncm of torq from the motor without burning it.As to your power supply; it will not be enough to supply the motor properly, but the motor should definitely move with that voltage. If you use a low pulse frequency so as not to leave the motor behind, it should step nearly normally. Only it will probably not speed up nor definitely develop much of torque.Quote from: davew_nz on January 03, 2013, 02:15:08 amIn your text in the first quoted part, you outline a pentagon connection. However, this schematic documents a 10-output solution with 10 half-bridges. That is 5 too many since just 5 half-bridges will do it.When the coils are connected in a pentagon, there are 5 "terminals" just as you have listed above. When each of these terminals is connected to a half-bridge, you have your circuit. Now the half-bridge can connect that terminal either to rail or ground. The next bridge can do the same for the other end of a coil. So you can have at most 4 coils excited at any one point in time and that is enough. Running through the excitation cycle outlined in a previous message in this thread is straightforward with this circuit.I attached a schematic that outlines the oscillator based current limiting. Parts of the schematic have been removed so it won't be functional as such and not directly suitable for you anyway. The motor driven by this circuit is a very big stepper, not really used any more in this age of AC servos. But it is a 5 phase stepper and works when connected to pentagon.Edit: typos

author: Kremmen
author_rank: Super Contributor
timestamp: January 03, 2013, 03:23:09 pm
content: Quote from: DebboR on January 03, 2013, 03:08:36 pm670 ohms (680?) is too high for a sense resistor. At most those are 1 or 2 ohms, and usually much lower. Make sure it actually is the sense resistor. If you have a schematic that might illuminate.

author: davew_nz
author_rank: Newbie
timestamp: January 03, 2013, 07:48:24 pm
content: Hi KremmenThanks for the info, I will digest it over the next day or so."In your text in the first quoted part, you outline a pentagon connection. However, this schematic documents a 10-output solution with 10 half-bridges. That is 5 too many since just 5 half-bridges will do it."Thanks for reminding me, the schematic was my first pass when I like DebboR was thinking I needed all 10 wires. I will alter it to either be 5-output to support 1 x 5wire 5phase motor or leave it as 10-output by alter it to support 2x steppers.I appreciate your knowledge and assistance in helping.DebboR, glad to see that those wire pairs do work...Dave

author: Kremmen
author_rank: Super Contributor
timestamp: January 03, 2013, 08:40:29 pm
content: De nada.

author: dandumit
author_rank: Contributor
timestamp: April 01, 2015, 12:57:01 pm
content: Hello All,I need to retrofit an old pick and place machine that has this kind of stepper motors.I cannot load the page for microstepping :http://www.europeanjournalofscientificresearch.com/ISSUES/EJSR_70_4_10.pdfCould someone share an working schematic and a pseudo code (At least) how to drive bridges ?Kind regards,Daniel

author: dandumit
author_rank: Contributor
timestamp: April 01, 2015, 01:18:18 pm
content: And one more question :Please have a look on pictures at address :http://www.st.com/web/en/catalog/apps/SE413/AS382/AC905First 2 ones are like you have implemented.Meaning that you are using a 1/2 from a H bridge to drive each corner of pentagon/star.I consider that this is not best situation since all HBRidges are measuring the current on low side of bridge trough a resistor.If you have 10 wires out of motor I think that best solution it's to use 3'rd model of stepper configuration and this one gives you the option to apply correct micro-stepping.Next big question : what are the current levels for microstepping a 5 phase motor ?Kind Regards,Daniel

author: dandumit
author_rank: Contributor
timestamp: April 04, 2015, 12:18:13 pm
content: quite explanatory paper :http://inter-eng.upm.ro/2012/files/proceedings/papers/paper62.pdf

author: Yansi
author_rank: Super Contributor
timestamp: April 04, 2015, 12:46:05 pm
content: hmm.. a little thought: Why five H-bridges? Connect the winding into pentagon (like induction motor in delta) and drive that using five halfbridges. Less hardware, probably the same result.See this:http://www.orientalmotor.com/technology/articles/2phase-v-5phase.html