Simple stepper motor drive study

Go To Last Post
39 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Greetings to all,

as a rookie i am working on a study project: trying to build a stepper motor drive.

In the hope of getting some good advices, hints (and well-deserved criticism) i attach the first draft of my schematic.

If you have a small spare time could you take a look on it, please?

With this home made board i'd like to drive a (relatively) small bipolar stepper motor in chopper mode.
Parameters: I = 2.5A, R = 0.6 Ohm (in parallel) U = 1.5V, L = 2.1mH
Expected maximum speed: 2000 steps/s

This project has absolutely no economical relevance (besides the fair amount of money i supported the local hobby electronics store with); i just simply want to study and hopefully understand the basic operation of the main functional blocks of such kind of circuitries.

Thank you very much in advance.
BR,
Menahem

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi

I had a quick peek in the schematic. Quite a complex setup, IMO. A block diagram would be helpfull. And maybe some description of how it is supposed to work, and why you designed it this way.
In the weekend I can have a closer look.

And in your signature, shouldn't that be Dr. S. Cooper ? ;)

A GIF is worth a thousend words   They are called Rosa, Sylvia, Tessa and Tina, You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Many, many thanks.

Quote:
Quite a complex setup, IMO. A block diagram would be helpfull. And maybe some description of how it is supposed to work

I am on to complete the missing info...

Quote:
and why you designed it this way.

I wish I know. :)

Quote:
And in your signature, shouldn't that be Dr. S. Cooper ?

Oh, of course, it should. And now it is. :lol:

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

My basic concept would be as the followings:

- Opto coupled inputs from uC to control the half bridges (X2, IC5..8 )
- Possibility of disabling the power stages externally (X3, IC9, IC4); switches the high sides only
- Powering: 8-15V for the power stages, stabilized 5V for the logic and for the CC internal voltage reference (trying to limit the current consumption in 50-70mA)
- External voltage reference for current control (X5, X6); basically to provide dynamic current control (e.g. hold current when the full torque is not necessary), and maybe in the future it could be used for some microstepping
- Untested, unsimulated timer blocks to prevent shoot-through (T9, T10, R25, C1, C2, ..., IC1, IC2); with the 470pF cap and 10k resistor i expect a ca. 5us dead time in the cross-switching of the high and low sides
- FET drivers made of npn bipolar transistors; to provide enough (logic level independent) gate-source voltage (i hope 400-500 Ohm is small enough for the maximum expected 10-20kHz switching frequency)
- Power MOSFETs (Q1..4); to produce enough smoke for the show (for me both ICs' parameters seem to be adequate, but...)
- Current feedbacks (R21,22 and R23,24); two 1/4Watt 1206 resistors in parallel may be safe enough at 2.5A
- Chopper control (IC10, IC3, R50, R51); i just hope that the low feedback signal level (max. 125mV) won't be killed by any strong noise.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ups, that cool head wanted to be ..8 and a )

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It is now. :wink: simply put a space between the 8 and the ) next time

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

and next time i should notice the edit button, too :)
Thank you, John.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I had a closer look.

You put a lot of effort in the design. Took measures to prevent overlapping of drive-pulses. And you did all that in HW.
But since we're here surrounded by AVRs, .... did you have a look at the AT90PWM3 f.i. ? Some AVRs are very well equipped to act as a stepper driver; the 90PWM3 is just the first one that comes to mind, but there are more AVRs that have deadtime registers in their Timer HW.

Life will be easier (after some magic smoke has gone) when you let the AVR take care of all that. ATXmega's may be a good choice as well .... Atmel improved a lot in that (relative new) family.

A GIF is worth a thousend words   They are called Rosa, Sylvia, Tessa and Tina, You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I couldn't find a datasheet of the LTV357T opto couplers. Those need to be quite fast if you want to chop the power stages.

The drive for the power-stages: the 470R may look quite low, impedance-wise, but I can tell you from experience that even a push-pull configuration has a hard time to drive the gates really fast. I recommend dedicated fet gate drivers if you want switch-times of less than 5 us.

Bedtime, ... defenitely :)

A GIF is worth a thousend words   They are called Rosa, Sylvia, Tessa and Tina, You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

There is one strong advantage to your concept design.

Typically, a problem with stepper motor designs is missing steeps - especially where heavy loading and fast acceleration come into play.

Using a quadrature encoder, you can govern position based on encoder counts, rather then the number of pulses sent to the stepper motor.

This is important in some instances where, keeping an accurate mechanical position is an absolute must - such as CNC axis positioning. If a step or two is missed during rapid movement or heavy mechanical loading - not a problem - simply keep stepping until the encoder comes to the proper quadrature encoder count.

You can avoid reality, for a while.  But you can't avoid the consequences of reality! - C.W. Livingston

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

For some reason I think that 'chopper drive' and 'current mode' are somehow related. In the Old Days, they used to put a big wirewound resistor in series with the coil and hit it with about 3 times the coil voltage rating. I think the idea was to get a big current at turn on to get the thing moving, then when the magnetic field builds up, the resistor gets hot and current limits the coil. This was 'voltage mode'. But in current mode, you could blow right thru the resonance region and drive at 1000s of steps per sec, but I never have seen a schematic of a current mode driver. And I'm not sure what makes it a chopper drive. Just pwmming the coils when they are on?

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Greetings, Carl !

Menahem, a few more notes: check if the flyback-protection is adequate: the integrated diodes may not be beafy enough. You also need a large elctrolytic capacitor on the input of the voltage stabilizer to absorb energy generated by the steppermotor.

Do you have an oscilloscope ?

And if this is your first powerstage design, I suggest you explore the pittfalls on a simpler design, f.i. one p-ch fet, driven by a BC547 with 470R in the collector, base driven by an AVR via 15k

Also investigate what the influence of the motor-powersupply is on the switching time: you'll be surprised ! Or disappointed ... ;)

Have fun

PS Your biggest enemy in the output stages is Cdg, the capacitance between Drain and Gate. You'd expect Cgs, do you ? It's there .... but behaves predictable.

And hello to you too, Bob :)

A GIF is worth a thousend words   They are called Rosa, Sylvia, Tessa and Tina, You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

Last Edited: Fri. Sep 27, 2013 - 12:24 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Plons. Good to hear from you.

You can avoid reality, for a while.  But you can't avoid the consequences of reality! - C.W. Livingston

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Menahem, I googled "atmel application notes stepper"
Interesting results !

A GIF is worth a thousend words   They are called Rosa, Sylvia, Tessa and Tina, You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello Dear Gentlemen,

first of all let me thank you for your time and words.

Quote:
But since we're here surrounded by AVRs,

Oh, yes, that would be my aim: to learn and use them. But i am very new in the embedded world, and actually i've never worked with 8bit systems. (To be honest I just started to learn this science recently on a UC3C.)

Quote:
the LTV357T opto couplers... need to be quite fast if you want to chop the power stages.

Actually i'd like to trust the board with this task.
In this case a lower frequency of the uC control signals could be enough.
Quote:

The drive for the power-stages: ... I can tell you from experience that even a push-pull configuration has a hard time to drive the gates really fast.
i really worry about it.

Quote:
Using a quadrature encoder, you can govern position based on encoder counts, rather then the number of pulses sent to the stepper motor.

Closed loop control? That will be the next step.
Just one step at a time... :)

Quote:
check if the flyback-protection is adequate: the integrated diodes may not be beafy enough
Actually i have no idea how much current can flow through them when i switch the FET off. I am affraid i was wrong when i checked the diode parameters in the datasheet against the controlled forward current.

Quote:
You also need a large elctrolytic capacitor on the input of the voltage stabilizer to absorb energy generated by the steppermotor.
does it mean that my 220uF caps at the MOSFETs just won't do it? Or should I just add a dedicated one next to the input of the stab IC?

Quote:
Do you have an oscilloscope ?
And if this is your first powerstage design, I suggest you explore the pittfalls on a simpler design
This is my FIRST design. :) Yes, i purchased a toy scope and a power supply with current limiter; my cunning plan is to populate the panel gradually and measuring the sub-systems one by one.

Quote:
I googled "atmel application notes stepper"
Interesting results
I got a lot of great articles mainly related to control topics. (At this time i cannot see that far, first let me build something to be controlled :) ) Which one did you suggest particularly?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

carl wrote this :

Quote:
This is important in some instances where, keeping an accurate mechanical position is an absolute must - such as CNC axis positioning. If a step or two is missed during rapid movement or heavy mechanical loading - not a problem - simply keep stepping until the encoder comes to the proper quadrature encoder count.

It's ok as an error check, but there are something wrong in the setup if you need to use count from an encoder rather than steps to the stepper. (real problems if X Y (Z) gets misaligned)
If you want to base the control on an encoder use a PM motor it will have a better and more smooth torque.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It's OK to use an encoder ( in some instances ) however DO NOT use error condition to try to speed up the motor.
It will fail.
Stepper torque dies as speed goes up so more missed steps on the way.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I will say no, if you want to push it to the limit, let the controller run on the feed back currents phase. (and that way you will know if you miss a step)
And if you have BIG fast changes in load you still could have problems, but that will normally be an error, or YOU pushed it to hard.

add:

Quote:
Stepper torque dies as speed goes up so more missed steps on the way.

that is why you use PM motors :)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

http://www.atmel.com/images/doc4... for basics
www.atmel.com/images/doc4214.pdf more high tech ;)

Toy-scope ? Can you be a bit more specific ? 20 MHz, dual channel ?

The 220uF (C11 and C13) are a good start, but it wouldn't hurt to put a 1000uF close to the regulator. Better safe than sorry.

If this is all new to you, buy some extra IRF7313/14. You'll probably need them. And even when you're not new to this, it's a good plan to order some more anyway.

If you limit the max current through the stepper windings to 2A, the integrated diodes should do the job.

How are you going to test this all ? Breadboard ? (hope not)

A GIF is worth a thousend words   They are called Rosa, Sylvia, Tessa and Tina, You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

https://www.sparkfun.com/product... see schematic ... it's always good to see how fellow designers did it
https://www.google.nl/search?q=a... lots of goodies to be found here as well

A GIF is worth a thousend words   They are called Rosa, Sylvia, Tessa and Tina, You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thank you for the links. This red beauty on Sparkfun is really impressive. However all her knowledge is hidden beneath a black case. :)

Quote:
Toy-scope
OWON PDS5022S 2 channels, 25MHz (i mean toy-scope for you, experts, but more than enough for me)

1000uF? Uhh, that's a tough one cap
(i have to find a place for it on my little board)

Quote:
IRF7313/14
i've purchased 10 pieces from each of them

Quote:
Breadboard ? (hope not)
now i am trying to fabricate a small pcb; and i just had a strong feeling about that i should ask your opinion before starting to etch funny but totally useless curves into the copper. :)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
However all her knowledge is hidden beneath a black case.
Very true, takes out all the joy of exploration :)

That's not a toy ! It's not high end but a decent scope IMO.
FWIW, I have been very happy with my old Philips dual trace 50MHz for many many years.

You can put the 1000uF off the board, on the edge. And when you find that it's not necessary ....

Give the drains of the output fets some extra copper as "heatsink" and watch the high current paths: short and keep them together.

A GIF is worth a thousend words   They are called Rosa, Sylvia, Tessa and Tina, You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Plons wrote:
Give the drains of the output fets some extra copper as "heatsink" and watch the high current paths: short and keep them together.
Actually, both the source and drain power pathways should have a good bit of copper - the terminal blocks or connectors bringing out the phase lines should be wide, as well.

I mention the above because I've designed quite a few systems using Gecko stepper motor drives and the source & drain power pathways are a source of failure, as are the connecting terminals.

Actually, a good many industrial PCB's I've worked on over the years, the power pathways are a common source of failure - not the components, themselves.

You can avoid reality, for a while.  But you can't avoid the consequences of reality! - C.W. Livingston

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So whats the BestPractice/RuleOfThumb when doing power? 1)Use 2oz thickness 2)Use 1.4" width 3) use vias between planes etc?

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well, as I only make PCBs at home, I use 2 oz. copper clad and make the traces as wide as possible.

But of late, I'm seeing a combination of thick copper, wide traces and areas where there are many holes in stead of one or two plated thru holes.

You can avoid reality, for a while.  But you can't avoid the consequences of reality! - C.W. Livingston

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
Give the drains of the output fets some extra copper as "heatsink" and watch the high current paths: short and keep them together.

Quote:
Actually, both the source and drain power pathways should have a good bit of copper - the terminal blocks or connectors bringing out the phase lines should be wide, as well.

Quote:
Well, as I only make PCBs at home, I use 2 oz. copper clad and make the traces as wide as possible.

Reading your posts i hardly dare to show my poor pcb layout. I suspect i've managed to brake all design rules.

Moreover in the local electronics store i can purchase thin (0.5 or 0.8mm) panels with random copper width only: on a lucky day i may get 1 oz. panels, otherwise only 1/2oz. (i even cannot measure it).

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

At first glance, I see nothing poor about your PCB layout. Really, your PCB looks no different than any of mine, except that I really strive hard to do everything on a single side. But that is only a personal goal - not a mandate.

I've made more PCBs that I could possibly remember, over the past 40 years. One thing I've observed is that, no matter how hard I strive to make the "Perfect " PCB, there is always something I find that I could have improved upon - ALWAYS! But with each PCB, the process is further refined and then... I find something else that I could have done better. And this isn't only the case for PCB design. I find that there is rarely the perfect circuit.

While in the design process, I might think I've come up with the finest wizbang thingie ever. But in hind-sight, there is always something that I could have done to improve personal understanding, the concept, the circuit, the PCB layout, the assembly process, etc...

You can avoid reality, for a while.  But you can't avoid the consequences of reality! - C.W. Livingston

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Plons wrote:
That's not a toy ! It's not high end but a decent scope IMO.
FWIW, I have been very happy with my old Philips dual trace 50MHz for many many years.
Yes, its technical parameters are quite enough for any challenge i'd like to face in my life; but when you touch its knobs and buttons you don't feel that it will serve you well for many years. Nevertheless don't get me wrong i am absolutely satisfied with it and i got it for a fair price.

Plons wrote:
You can put the 1000uF off the board, on the edge. And when you find that it's not necessary ....
No, no, i'll find a good place for it; with such a cap on them boards look much, much cooler. :)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Dear Carl,

thank you for your encouragement, but i know i really do not earn your kind words. While you may write chinese poems, i am just trying to copy that funny hieroglyphs like a little boy. :)

Quote:
One thing I've observed is that, no matter how hard I strive to make the "Perfect " PCB, there is always something I find that I could have improved upon...
One of my colleagues says about code optimization: you can stop doing it but never finish. -
Now I think it is more true for pcb design.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You can always solder a thick wire on top of a high current track to make it less prone to fusing.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If you fear about to many errors you could place some 0 ohm resistors in the signal way. (and perhaps thru holes). Then it's easier to make small changes.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ignoramus wrote:
You can always solder a thick wire on top of a high current track to make it less prone to fusing.
I find "solder wick" can be very effective also to increase the current handling capacity.

Ross McKenzie ValuSoft Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ross just recently I saw an article on embeded wire multilayer structure.

Apparently boards are now being designed and made with just this kind of enhancement. tracks are cut from thick plate and positioned within multilayer layup.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ignoramus wrote:
Ross just recently I saw an article on embeded wire multilayer structure.

Apparently boards are now being designed and made with just this kind of enhancement. tracks are cut from thick plate and positioned within multilayer layup.

Do you have a link? Would like to read that one too.

Cheers,

Ross

Ross McKenzie ValuSoft Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

double post

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ross,

the usual disclaimers.. still fighting with the church mouse over crumbs of wax ( no commercial affiliations )

http://www.we-online.com/web/en/...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Very interesting. Thanks.

Ross McKenzie ValuSoft Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

normal you solve that problem by solder the hole power trace.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Solder or no solder has been measured and discussed here.

http://www.eevblog.com/forum/blo...

A thin layer of 60/40 solder produced a 15% reduction in resistance. A thick layer produced about 50% reduction.

Cheers,

Ross

Ross McKenzie ValuSoft Melbourne Australia