Stepper motor controller

Thread Starter

samik

Joined Nov 9, 2009
20
Hi all,
I am using a Slo-Syn stepper motor ( Model no M 062 FD 03, 6 lead unipolar stepper motor, 1.8 degree step angle) with the rating 5.3 Volts and 1.6 amps. The purpose of using the motor is to rotate the arm ( shown in attachment model.jpg ) at 1.8 degrees per step ( starting from the middle the arm should rotate 1.8 degree clockwise and stop there for few mins then again rotate 1.8 degrees). The weight of the arm is 0.27 kg ( 9.52 oz)and its center of mass is 4 inches from motor axis. So the torque is 38 oz inch approximately. The minimum holding torque for M 062 FD 03 is 100 oz inch as per specification.

Now, I used the circuit shown in stepper.gif. The part list is as follows
R1, R2 ,R3, R4 4 200 ohm Resistor
Q1, Q2, Q3, Q4 4 IRLU8721 MOSFETs
U1 1 4070 CMOS XOR Integrated Circuit
U2 1 4027 CMOS Flip-Flop
S1 1 SPDT Switch .

I used a breadboard and have connected the motor common terminals to a 5v,1 amp terminal on the breadboard. And to the logic gates I am supplying 9 v instead of 12 v.
Since I need to send exactly one pulse each time, I am using matlab to create an analogue output which is a square wave varying between +5 v and - 5v with frequency 1 hz . This output from A/D board is connected to 'step' terminal of flip flop.
Now the problem is my motor was rotating exactly one step with a lighter load ( i found that with higher frequency ,say 100 hz it rotates without any hiccups but at lower pulse frequency it was getting stuck after few steps).but now with the arm attached,it is behaving erratically. Sometimes it just vibrate at one position when pulse is given to the circuit. I am not sure what is the source of error.
Do I need to supply exactly 1.6 amps to the motor? If so how can I do that? I will appreciate any help.
Thanks
Samik
 

Attachments

SgtWookie

Joined Jul 17, 2007
22,210
I am using matlab to create an analogue output which is a square wave varying between +5 v and - 5v with frequency 1 hz . This output from A/D board is connected to 'step' terminal of flip flop.
This is a big problem. Since your CMOS ICs have a Vdd of 9v and GND for the Vss pins, you are going below ground (not permitted) and not high enough.

Your logic input must vary between 0v and 9v, and the transition should be very quick.

[eta]
Also, you do not show 0.1uF caps across the power and ground pins for the 4070 and 4027 IC's - they need to be there, or you will have problems.
 
Last edited:

Thread Starter

samik

Joined Nov 9, 2009
20
Will it be ok if I use 5v for Vdd and the same for logic inputs? I just checked the circuit with 9 v Vdd for CMOS IC and 5 v for logic input( pulse from a function generator with low level at 0 v). The motor is turning but very erratically ( like clockwise then anticlockwise). Is the mismatch of logic input voltage the reason behind it? I set the pulse width in the function generator as 100 microsecond and frequency 1 hz.
 

SgtWookie

Joined Jul 17, 2007
22,210
Will it be ok if I use 5v for Vdd and the same for logic inputs? I just checked the circuit with 9 v Vdd for CMOS IC and 5 v for logic input( pulse from a function generator with low level at 0 v). The motor is turning but very erratically ( like clockwise then anticlockwise). Is the mismatch of logic input voltage the reason behind it? I set the pulse width in the function generator as 100 microsecond and frequency 1 hz.
No. You need your logic input to stay between the power rails that you are using for your logic IC's. So, you need the output from your ADC to be either 0v or 9v.

If necessary, you could use a transistor with a couple of resistors and a diode to make the input logic level compatible.

See the attached circuit and simulation.
 

Attachments

SgtWookie

Joined Jul 17, 2007
22,210
What is the reason for adding 0.1 uF capacitors?
ALL single-supply IC's require at least one 0.1uF (100nF) bypass capacitor from +V to ground. Many require more than one bypass capacitor.

Dual-supply IC's require at least one from ground to +V, and one from ground to -V. Trying to "get by" without them is usually disastrous.
 

SgtWookie

Joined Jul 17, 2007
22,210
You also need a small bypass cap (metal poly or ceramic) and a relatively large electrolytic cap from ground to the +V supply of your stepper motor. You also need fast recovery or Zener diodes with a breakdown of >5v across each coil of your stepper motor.
 

Thread Starter

samik

Joined Nov 9, 2009
20
You also need a small bypass cap (metal poly or ceramic) and a relatively large electrolytic cap from ground to the +V supply of your stepper motor. You also need fast recovery or Zener diodes with a breakdown of >5v across each coil of your stepper motor.
Sgtwookie, if I have got it right then the small capacitor will be in between ground and one of the +v terminal of the motor and the large cap will be between ground and the other +v terminal.

Can you kindly give the specification for the capacitors and the diodes, so that I can purchase them.
Thanks
Samik
 

hobby16

Joined Aug 30, 2010
30
Is the mismatch of logic input voltage the reason behind it? I set the pulse width in the function generator as 100 microsecond and frequency 1 hz.
You must add a flywheel diode between collector and 12V for each transistor otherwise you'll have huge voltage overshoot after each phase switch-off that may wreak the digital stage havoc.
Then solve the level translation problem (if you don't have a double trace oscilloscope, generate a pulse every 10s and check with a voltmeter that the 4 phases are on sequentially, beware, your circuit a "full step drive" type, ie 2 phases on at each step).

And finally, since the stepper is erratic only when loaded, the problem is probably step missing: if the sequence is 1-2-3-4 but because of load, step 2 & 3 for example are missing, you are have 1-4 which is part of a reverse sequence (1-4-3-2). You can also have overstepping espcially at stop order : the stepper does more steps than ordered because of inertia. The two can conspire to make your stepper more a vibrator than a rotator. It's completlely natural given the simplicity of your design. The root of the problem is that:
- you need to have high torque to overcome load inertia and avoid missing steps at rotation start-up
- to have high torque, you must have high current. But as the winding is inductive, you need high voltage to reach rapidly high currents
- if you have high voltage, you need to monitor the current in order not to grill the stepper.

In stepper motor control ICs, voltages are much higher (up to 42V for example in printers) and currents are monitored so the torque (proportional to current) is much better controlled to avoid step missing. You don't have any such control scheme so the problem may be here (or maybe not, we'll only know once the wiring is correct).
 

Thread Starter

samik

Joined Nov 9, 2009
20
- if you have high voltage, you need to monitor the current in order not to grill the stepper.

.
The motor rating is 1.6 amps. How much overshoot in current I can have to ensure safe operation. Also how to implement the "monitoring of the current", do i need to use a circuit breaker ?
 

beenthere

Joined Apr 20, 2004
15,819
If this is accurate -
with the rating 5.3 Volts and 1.6 amps.
- then connecting to 12 VDC is going to cause the motors to overheat. A 4.2 ohm 5 watt resistor (4 ohms will probably be as close as you can get) needs to be in series with each motor to limit the current to 1.6 amps.
 

hobby16

Joined Aug 30, 2010
30
The motor rating is 1.6 amps. How much overshoot in current I can have to ensure safe operation. Also how to implement the "monitoring of the current", do i need to use a circuit breaker ?
Motor windings are inductances, so at high switch rates (high speed), the current is reduced. Another way to reduce current is to switch on <100% of the period. To determine current, a simple shunt & voltage detection is used.
You can't do that with your circuit but all those schemes are implemented in a stepper motor controller IC. Anyway, 12V supply to a 5.6V stepper motor is already too much at no speed and the motor should be hot !
Maybe you should read some doc on the subject to know all about current control. Google for some controller documentation, for example :
UDN2917
LB1946
LB1845
 

Thread Starter

samik

Joined Nov 9, 2009
20
Maybe you should read some doc on the subject to know all about current control. Google for some controller documentation, for example :
UDN2917
LB1946
LB1845
Will this controllers be sufficient to drive my motor ( 5.3 v,1.6 amps ) without any other circuit? If so I will be happy to purchase them
 

SgtWookie

Joined Jul 17, 2007
22,210
Sgtwookie, if I have got it right then the small capacitor will be in between ground and one of the +v terminal of the motor and the large cap will be between ground and the other +v terminal.
No. Both of the motors' +V (center tap) connections go to +V; so both of the caps will be connected from that point to ground.

Can you kindly give the specification for the capacitors and the diodes, so that I can purchase them.
Thanks
Samik
Use a metalized poly film or ceramic 0.1uF (100nF) cap across each of the IC's and the motor +V connection. Also connect a 1,000 uF polarized aluminum electrolytic cap (or a pair of 470uF, or 4-5 220uF caps) rated 16v or higher across the +V of the motor and GND.

Any of the MBR3x0 (where x=2,3,4,5,6) would be a reasonable choice for the diodes.
You might also use 1N5818 or 1N5819 Schottky diodes, or other fast-recovery or Schottky diodes rated for at least 1A continuous current.

The 1N400x and 1N5400x standard rectifier diodes have a very slow recovery. If you will not be stepping the motors very fast, this won't be an issue. However, if you try to step them fast, standard diodes will cripple your top speed.
 

Thread Starter

samik

Joined Nov 9, 2009
20
Maybe you should start by reading this; http://www.cs.uiowa.edu/~jones/step/
It will give you a better idea on the stepper motor and its control.

One of these would be a fast way of doing what you want; http://cgi.ebay.com/Stepper-Motor-Speed-Pulse-Controller-Driver-Board-/330466168195?pt=LH_DefaultDomain_0&hash=item4cf1518d83
shortbus thanks for sending the link of this product. I hope this board is exact solution for my purpose. In the mean time I will incorporate all the components as suggested by sgtwookie.
 

Thread Starter

samik

Joined Nov 9, 2009
20
I want to thank all the moderators for providing me prompt help. The stepper motor is working now after incorporating the modifications.
Once again thanks
samik
 
Top