Analog inputs

Status
Not open for further replies.

What you are citing is an earlier section of AN907a. What I am suggesting can be found on the succeeding section on "Unipolar Microstepping" of the same application note. There is not much information in that note. Sense the current on each winding pair and calculate the PWM duty to adjust the current.

However, there is slight flaw in the circuit in fgure 23 of AN907a. I would not recommend putting freewheeling diodes because they slow down the current decay. Anyway, because of the bifilar windings, turning OFF one winding will cause the same voltage to appear on its winding pair in opposite direction.

Another method I know senses the combined current of all windings of the unipolar motor and adjusts the over-voltage drive to maintain this current. This way, only one PWM module is required.

And finally, I'd follow Nigel's suggestion to put a hardware over-current protection in case your PIC hangs and fails to limit the current.
 
Well people... I stand corrected.
Turns out the compartor is really slow. The movement of the motor is not smooth at all. I'm now thinking of using one pulse width modulation signal with a low duty cycle and have it connect to the 4 MOSFETs through 4
AND gates; one for each phase. When it's the turn of a certain phase, a ONE will be ANDed with the PWM and its MOSFET turned on. The comparator will be used for general protection, nothing else. That should work better, right??
 
The movement of the motor is not smooth at all.

This might not be due to the the way your circuit controls the current. However, I can also imagine it might not be right anyway.
 
Why not apply the over voltage/current, and just use PWM to control duty cycle. That way, you can run the fine line of maximum current and voltage.

Just that simple.

The resistor is best protection all around.

I'm pretty sure I've read a similar post on this topic in this forum.

I could be wrong, but that was a while back.

Good Luck.
 

I wouldn't use it for cycle-by-cycle. For one, the brush noise alone needs to be filtered out. Unnecessary transitions are not only unnecessary, they could overheat the MOSFET.

I'd put in a shunt resistor, pass that through a lowpass filter, and feed that to the ADC. ADC sees it's drawing too much current, we lower the duty cycle or shut it off.

What I'm trying to avoid is expecting to make a current mode PWM where the PWM period starts and then cuts off the cycle when either the PWM ON-time is reached or a certain threshold current is reached. We need to do this sometimes to prevent current from reaching saturation in a power inductor. Even if the comparator were fast enough, it takes a number of cycles to properly respond to an interrupt. Context may need saving, flags must be checked. If you're responding to another interrupt then it's not going to be able to service this time-critical one so you might not even be able to use interrupts for anything else. And responding to an interrupt thousands of times per sec can take up a lot of the processor's time.
 
HeHeHe Oznog it must be the new year as you quoted in this thread a stepper motor having brushes :twisted: :twisted: :twisted: Anyway mate I'm trying out an old 6 wire unipolar stepper motor thru a 4 speed gearbox to drive a 14" cast iron face plate for the cnc machine I'm making and I'm using a constant current kit I bought from Oatleys. This will put about 3 amp thru the stepper if needed and if I blow it up so be it I'm only testing. Once I know the current used I will know if I need to change a resistor to vary the current. Well what I'm saying is why bother to monitor the current thru a stepper motor when thru testing you can find it's stall limit. I'm testing old printer motors just to debug my cnc but for real work I know I'll need some decent steppermotors but here in Oz you can't find them so I will be calling on an American mate to help me out on decent motors. Anyway enough of me ranting :twisted:


Cheers Bryan
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…