This project,a bar code
reader stepper motor circuit from 1989, shows how to make a bar code
reader that uses a stepper motor as the mirror oscillation system.
A drive circuit excites a stepper motor. A current steering network
alternately conducts current through first one and then the other of a set of
AC windings. A regulated current source excites the DC windings of the stepper
motor such that magnitude of the resultant vector due to the current in the
motor is substantially constant in time.
1. Field of the Design
The present design relates generally to stepper motor drive circuits and, more particularly, to a circuit and a method for driving a stepper motor in an oscillating mode that is useful as the scan element in a bar-code laser scanner.
2. Prior Art
Bar-code laser scanners have employed stepper motors as scanning elements. A scanning mirror attaches to the shaft of the stepper motor and, as the stepper motor oscillates about the axis of its shaft, the scanning mirror intercepts an incident laser beam and scans it back-and-forth across a bar code.
Such a scheme requires some sort of drive circuit to cause the stepper motor to oscillate or reciprocate about its axis. Known drive circuits have suffered in that they scanned the laser beam spot at different speeds at the extreme ends of the scan than at the center of the scan, that scanning speed varied from one extreme of the scan to the other, and that scan speed varied from the forward direction to the reverse direction. These speed variations may be referred to as variations in the scan-speed profile.
Bar-code laser scanners receive the laser light reflected from the bar code, convert the reflected laser light into an analog signal, and convert the analog signal into a usable digital value indicative of the bar code. This interpretation of the returned signal requires a decode algorithm. The variations in the scan-speed profile may require more scans to yield a proper interpretation by the decode algorithm.
It is therefore desirable to have a stepper motor driven by a circuit that creates a substantially more constant higher net torque on the permanent magnet rotor of the stepper motor, which yields a more constant, symmetric scan-speed profile in both forward and reverse directions. It is also desirable to have a stepper motor driven in a constant scan-speed profile at all points in the scan.
It is often desirable to use a bar-code laser scanner in a portable, battery-operated scanning system. Such a scanner should therefore minimize power-drain on the battery and known systems have drawn an undesirably large amount of power from their power sources. It is therefore also desirable to reduce the power drain of the stepper motor.
The present design provides an electrical circuit that drives a stepper
motor. The circuit impresses a time varying signal, derived from an alternating
current waveform, across the AC and DC windings of the stepper motor. In this
way, the magnitude of the resultant vector due to the total current in the
windings of the motor (and thus the torque developed) remains substantially
constant with time. As used herein, "substantially constant" means that the
resultant vector varies only slightly with time, in a preferred embodiment no
more than approximately 1.2%.
FIGS. 1, 2, and 3 illustrate the basis of the present design. As shown in
FIG. 1, the drive circuit excites the windings A-D of a unipolar stepper motor.
A set of currents iA (t) and iB (t) alternately excites a
set of windings A and B. Another current iC (t) excites what would
normally be a DC winding C of the unipolar stepper motor. If the current
iC (t) excites the entire DC winding, the amplitude of iC
(t) can be halved. In the present design, if only windings A, B and C are used,
the sum of the currents iA (t), iB (t), and iC
(t) remains a constant with time. If all windings A-D are used, the total
current in the motor will be a time varying waveform, but the magnitude of the
resultant vector will substantially be a constant, as described below with
respect to FIG. 2. FIG. 1 illustrates the present design embodied in a unipolar
stepper motor but other motors, such as bipolar motors, can be used.
As shown in FIG. 2, the resultant vector for any moment in time is given by
The scan angle of 18° is merely shown as illustrative. Other scan angles are, of course, possible, depending on the desired application. As shown in FIG. 2, the length of the vector R(t) is nearly constant in time.
FIG. 3 illustrates a preferred set of current waveforms iA (t), iB (t), iC (t). These currents may be generated by any manner known in the art. However, the sum of the currents in the windings, It, is constant.
The use of a time-varying current to generate the centering torque provides a nearly constant resultant vector over a scan interval. Using equation (3) and normalized values (unity amplitude) for ic (t) and iA (t), maximum variation in the magnitude of R(t) occurs where ic (t) and iA (t) are equal (i.e., 0.5). Using these values for the currents in equation (3) yields 0.988; that is, the resultant vector varies in magnitude by no more than approximately 1.2% over a scan interval.
The numerical terms in equation (3), 0.95 and 0.31, result from the choice of the 18° scan angle. The 0.95 term is the cosine of 18° and 0.31 is the sine of 18°, the scan angle. However, even a 30° scan angle (cosine 30°=0.866; sine 30°=0.5) results in a maximum variation in the magnitude of the resultant vector of only 3.4% in using the present design. Those of skill in the bar-code scanning art will recognize that they can choose an angle of scan within the tolerances of the variation in scan torque for proper scanner decode operation.
View larger image here.
FIG. 4 depicts a preferred embodiment of the present design. The basic element for generating the drive waveforms is depicted as a current source i(t). Table 1 lists preferred circuit element values. As used herein, the term "current source" refers to any appropriate means of generating the proper current waveforms in the motor windings.
A pair of transistors Q1 and Q2 alternately conduct current through a set of AC windings A and 8 of a stepper motor M1. The transistors Q1 and Q2 form a current steering network to steer i(t) between the windings A and B. Thus, only one of the AC windings of the stepper motor M1 is excited at a time. Exciting winding A causes the rotor of the stepper motor M1 to move to the left of center and exciting winding 8 causes the rotor to move to the right. The desired triangle wave voltage is generated by the current source i(t). The frequency and amplitude of i(t) are selected to provide the desired scan-speed profile.
A set of waveforms V1 (t) and V2 (t) act as clocks to alternately switch on the transistors Q1 and Q2. The clocks V1 (t) and V2 (t) thus alternately switch the current i(t) between the windings A and B. This develops the waveforms iA (t) and iB (t) shown in FIG. 3.
An amplifier U1 and a pair of transistors R2 and R3 invert and halve the signal from the current source i(t). A reference voltage, Vref, at the non-inverting input of U1 provides the proper DC offset correction voltage, shown as A in FIG. 3. The amplifier U1, a transistor Q3 and resistors R3 and R4 form a regulated current source to drive the DC winding of the stepper motor M1.
The drive circuit may preferably include a motor fail detector. A circuit to detect motor failure is comprised of resistors R7, R8, R9, and R10, a capacitor C6, and an amplifier U2. The voltage across the DC winding consists of three components: an ohmic drop (triangle wave), a transformer induced voltage from the AC winding, and a speed electromotive force (emf) due to interaction with the permanent magnet rotor. The circuitry subtracts out the ohmic drop. The remaining DC voltage is blocked by a capacitor C8. The remaining speed emf plus transformer voltage is amplified in the amplifier U2. Motor failure is detected by monitoring the speed emf and detecting when it falls below a preset threshold set by a resistor R14.
Although the design has been described with reference to specific embodiments, these embodiments should not be construed as limiting the scope of the design. It will be clear to those skilled in the art with the benefit of this disclosure that certain modifications can be made without deviating from the spirit of the design.
R1 12.1 (1%)
R2 100K (1%)
R3 49.9K (1%)
R4 12.1 (1%)
R7 10K (1%)
R8 100K (1%)
R13 1 M
Claim Your: Useful
"Arduino Software Guide"
Click here for more project ideas.
How to make a Pulse Rate Sensor using a simple single opamp circuit with an Arduino and a few other components.
74HC595 : How to add nearly unlimited outputs to any microcontoller.
How to use the MAX6675 and an Arduino to measure temperatures from 0°C to 1024°C with two components: A chip - the MAX6675, and a Sensor: - a type-K thermocouple.