From: HC on 16 Feb 2010 18:57 Hello, all. I'm trying to build my first stepper motor controller and I have two questions. In trying to learn about stepper motors and controllers I read the document AN907 from Microchip among other documents and sites: http://ww1.microchip.com/downloads/en/AppNotes/00907a.pdf In that document the author writes about current limiting a stepper motor that is purposefully driven at a voltage that is higher than its designed voltage in order to get the current up more quickly (overcoming the inductance of the coils) and then using current limiting to prevent the motor from being run at higher than maximum current. Several methods are discussed including PWM and using a current-sense resistor. I think I understand the reasons why a current-sense resistor is not ideal (cost and heat dissipation). PWM sounds great and I've used a PWM circuit for controlling the speed of a DC motor in the past. However, let's say the motor is rated at 5V and I choose to drive it with 10V so I'd need to limit the duty cycle to 50%, what happens when the winding is first energized? Let's say that I'm using a frequency of 31kHz or so, it seems that, when the winding is first energized, the voltage may need to be applied longer than the 50% pulse to get the current to the maximum the motor is rated at, and then run it at the 50% duty cycle once the current is at the maximum. If you look at the document you will see that Figure 21 shows a longer-than target pulse at the beginning of the power cycle and then short pulses (lower duty cycle) to maintain the target maximum current in the winding. Therefore, I must conclude that the circuit is requiring some kind of current detection in the winding. And if I rely soley on calculated duty cycle for the PWM, obviously I would have to be careful of the duration of the pulses (50% duty cycle at 0.5 hertz would give 1 second of full power to the winding, so pulse duration can impact the current across the motor). That said, it would seem that a way to monitor the current in the winding would be important. So the first question is: what method would be best to measure the current in the motor windings considering that I am using a PIC (I have several to choose from including the PIC16F630, PIC16F684, PIC16F54, and some PIC16F84's) to control the motor? My test motor is a 6-wire unipolar and I intend to power the common junctions with positive voltage and just switch the negative with a MOSFET (I have some TIP41C's I will try). I am good with the PWM control but I am not sure how to handle limiting the current. At present I'm just running the motor on its rated voltage. The second quesiton is, as I eventually use larger motors, how do I properly choose the protection diodes I will use in parallel with the windings? I have some 1N4148's but they seem small. I also have several larger ones like 1N4004 and other, similar part numbers. Thanks in advance. --HC
From: Rich Webb on 16 Feb 2010 20:12 On Tue, 16 Feb 2010 15:57:04 -0800 (PST), HC <hboothe(a)gte.net> wrote: >Hello, all. I'm trying to build my first stepper motor controller and >I have two questions. In trying to learn about stepper motors and >controllers I read the document AN907 from Microchip among other >documents and sites: http://ww1.microchip.com/downloads/en/AppNotes/00907a.pdf > >In that document the author writes about current limiting a stepper >motor that is purposefully driven at a voltage that is higher than its >designed voltage in order to get the current up more quickly >(overcoming the inductance of the coils) and then using current >limiting to prevent the motor from being run at higher than maximum >current. Several methods are discussed including PWM and using a >current-sense resistor. [snippety snip] Take a look at the discussion over at http://www.cs.uiowa.edu/~jones/step/ for some recommendations. -- Rich Webb Norfolk, VA
From: HC on 16 Feb 2010 21:55 On Feb 16, 7:12 pm, Rich Webb <bbew...(a)mapson.nozirev.ten> wrote: > On Tue, 16 Feb 2010 15:57:04 -0800 (PST), HC <hboo...(a)gte.net> wrote: > >Hello, all. I'm trying to build my first stepper motor controller and > >I have two questions. In trying to learn about stepper motors and > >controllers I read the document AN907 from Microchip among other > >documents and sites:http://ww1.microchip.com/downloads/en/AppNotes/00907a.pdf > > >In that document the author writes about current limiting a stepper > >motor that is purposefully driven at a voltage that is higher than its > >designed voltage in order to get the current up more quickly > >(overcoming the inductance of the coils) and then using current > >limiting to prevent the motor from being run at higher than maximum > >current. Several methods are discussed including PWM and using a > >current-sense resistor. > > [snippety snip] > > Take a look at the discussion over athttp://www.cs.uiowa.edu/~jones/step/for some recommendations. > > -- > Rich Webb Norfolk, VA Rich, thank you for your time and response. I am looking over the information at that site. It will take some time as there appears to be a lot there. I will read through all that and see where I am, but it appears, after only a cursory look, to address my main concern about current limiting PWM controllers. Thank you again. --HC
From: Bob Masta on 17 Feb 2010 08:19 On Tue, 16 Feb 2010 15:57:04 -0800 (PST), HC <hboothe(a)gte.net> wrote: >Hello, all. I'm trying to build my first stepper motor controller and >I have two questions. In trying to learn about stepper motors and >controllers I read the document AN907 from Microchip among other >documents and sites: http://ww1.microchip.com/downloads/en/AppNotes/00907a.pdf > >In that document the author writes about current limiting a stepper >motor that is purposefully driven at a voltage that is higher than its >designed voltage in order to get the current up more quickly >(overcoming the inductance of the coils) and then using current >limiting to prevent the motor from being run at higher than maximum >current. Several methods are discussed including PWM and using a >current-sense resistor. > >I think I understand the reasons why a current-sense resistor is not >ideal (cost and heat dissipation). PWM sounds great and I've used a >PWM circuit for controlling the speed of a DC motor in the past. >However, let's say the motor is rated at 5V and I choose to drive it >with 10V so I'd need to limit the duty cycle to 50%, what happens when >the winding is first energized? I'm no stepper motor guru, but I think the above is suspect. If you double the voltage (on a purely resistive load, at least) the power dissipation is *squared*. The equivalent duty cycle to maintain the same dissipation would thus be only 25%, not 50%. But that's what you'd want the long-term average to be. Presumably, you would get much higher instantaneous power when starting up, which would then taper off to something like 25%. Or am I missing something here? Best regards, Bob Masta DAQARTA v5.00 Data AcQuisition And Real-Time Analysis www.daqarta.com Scope, Spectrum, Spectrogram, Sound Level Meter Frequency Counter, FREE Signal Generator Pitch Track, Pitch-to-MIDI DaqMusic - FREE MUSIC, Forever! (Some assembly required) Science (and fun!) with your sound card!
From: John Fields on 17 Feb 2010 10:19
On Wed, 17 Feb 2010 13:19:04 GMT, N0Spam(a)daqarta.com (Bob Masta) wrote: >On Tue, 16 Feb 2010 15:57:04 -0800 (PST), HC ><hboothe(a)gte.net> wrote: > >>Hello, all. I'm trying to build my first stepper motor controller and >>I have two questions. In trying to learn about stepper motors and >>controllers I read the document AN907 from Microchip among other >>documents and sites: http://ww1.microchip.com/downloads/en/AppNotes/00907a.pdf >> >>In that document the author writes about current limiting a stepper >>motor that is purposefully driven at a voltage that is higher than its >>designed voltage in order to get the current up more quickly >>(overcoming the inductance of the coils) and then using current >>limiting to prevent the motor from being run at higher than maximum >>current. Several methods are discussed including PWM and using a >>current-sense resistor. >> >>I think I understand the reasons why a current-sense resistor is not >>ideal (cost and heat dissipation). PWM sounds great and I've used a >>PWM circuit for controlling the speed of a DC motor in the past. >>However, let's say the motor is rated at 5V and I choose to drive it >>with 10V so I'd need to limit the duty cycle to 50%, what happens when >>the winding is first energized? > >I'm no stepper motor guru, but I think the above >is suspect. If you double the voltage (on a >purely resistive load, at least) the power >dissipation is *squared*. --- A slip of the tongue, I'm sure, but since: P2 = P1 (E2/E1)�, doubling the voltage across the load will cause the dissipation to just quadruple, not square. JF |