Motor driver
Contents
kinds of motor drivers
There are many kinds of motor drivers:
- servo motor controller
- stepper motor controller
- DC motor controller ("brushed")
- AC motor controller ("brushless")
- ... (todo: fill in the other kinds) ...
A DC motor controller that is 'reversible' generally uses an 'H bridge'. This 'H-bridge' uses four output drivers in a configuration that resembles an H where the load is the cross bar in the middle. The lines on either side of the load (the downward strokes in the H) represent a series connection of a pull-up driver and a pull-down driver. This allows each terminal of the load to be connected to either the positive supply rail, or the negative supply rail. This allows a positive, negative or zero voltage difference across the load. This load voltage is then utilized to provide the desired control required of the motor. The various combinations can give a 'forwards' torque on a DC motor, a 'backwards' torque on the same motor, can allow the motor to free-wheel (without any applied torque) or can provide a locking of the motor such that it resists any attempt to rotate it.
A single phase AC motor is generally driven in the same way as a DC motor, however instead of operating the motor drive as a constant DC voltage (in either the 'forward' or 'reverse' direction) the AC motor is driven by an approximation to a sinewave. This approximation is created using the H bridge and driving it with a PWM input such that both the positive and negative voltage periods are the same. This is normally achieved either using a sawtooth waveform compared against a sine wave reference, or is done using a lookup table in a microcontroller.
A similar method is used to drive multiphase (3-phase) AC motors, however instead of just using an H bridge, only a half H bridge is used per phase (3 half-bridges). Each phases half bridge is then driven in the same manner as for the single phase motor, with a phase difference between the phases as appropriate.
Most stepper motor controllers uses 2 independent H bridges (4 half-bridges) for the 2 independent coils of a stepper motor. Each possible state (one bridge driving current one way, the other way, or free-floating) of both bridges gives 4 "full steps", 4 "half-steps" between the full steps. The "microstepping" motor controllers use PWM to gradually change in a sine-wave-like manner from adjacent full-steps and half-steps.
((fill in more details here...))
noise control
Many motors make sparks when the brushes make or break contact. This causes causes lots of electrical noise ("brush noise"). Your TV-watching neighbors won't be happy if you allow this noise to leak out.
"Sparks emit RF energy from DC to daylight as I was once told by an EMC expert." -- HydraRaptor: "DC to daylight". More details: HydraRaptor: "GM3 motor suppressor"
current sense
Often people want to measure the current going through the motor.
See current sense for several different techniques.
tolerance against software bugs
Some motor controller circuits are such that, if the software accidentally sets the "wrong" pins hi or lo, you get a short circuit through the output drivers. This will generally cause a high current to flow, due to the low on state resistance of the output drivers, which may destroy other electronic components before finally blowing the supply fuse.
Other motor controller circuits are such that, if the software accidentally sets the "wrong" pins hi or lo, the worst that could happen is the motor spins the wrong way. These circuits are designed so that, no matter what the inputs, it is impossible to get a short circuit through the output drivers. Between "one branch on" and "the other branch on", there is a minimum "blanking time" which has "both branches off". This guarantees that we never have "both branches on" (short circuit).
Guess which type of design I prefer?
external links
A random collection of semi-related links (please prune out the irrelevant ones):
- GoBox: a group designing motor driver electronics, a charge controller to optimize getting energy from a variety of energy sources (MTTP solar, wind, water, etc.), and related devices. "The designs and programs are released under a Hardware Open Source License."
- H-Bridge by Bob Blick
- the Open Source Motor Controller Project
- LiniStepper $30 each; Open Source! Circuit Diagram, PCB (Board) Layout, and PIC Software all available. Nice photos of the LiniStepper at http://www.piclist.com/techref/io/stepper/linistep/lini_bld.htm .
- "Design of a High Current Bipolar Stepper Motor Driver"
- H-Bridge Fundamentals An in-depth article on the design of Mosfet H-Bridges
- PMinMO.com Open Source circuits and information on stepper motor controllers] -- in particular, "PMinMO: Stepper Driver Information"
- ePanorama ePanorama Motor Control page
- "Electronic Design of DC Motor Drives" has detailed schematics and PCB layout for a system that has a PC send commands through the serial port to a Microchip PICmicro, which does PWM control of 2 H bridges. Each half-bridge uses a IRF9530N (100V 14A pfet plus flyback diode) and a IRF530 (IRF530NPBF: 100V 17A nfet plus flyback diode), driven by a small transistor inverter based on a BD135 npn, for a total of 12 discrete transistors.
- OpenServo wiki -- developing a digital servo motor that accepts "Go to position X" commands and also more complex curves, and returns actual servo position, speed, voltage and power consumption.
- MOSFETs and MOSFET drivers
- L297 stepper motor controller + L298 dual full-bridge driver: for driving one (4-wire) bipolar stepper motor (2 A); direction and step inputs; half-stepping; on-chip PWM chopper limits current. external diodes are required (preferably Shottky). (Both chips come in through-hole and SMT versions)
- L298 dual full-bridge driver can also be used to drive 2 independent DC motors (2 A each); external diodes are required (preferably Shottky). L293D is similar, but only rated up to 1 A, 36 V.
- SparkFun: EasyDriver v3 Stepper Motor Driver based on A3967 microstepping driver chip; up to 750mA, 30 V.
- L6208N stepper motor driver: driving one (4-wire) bipolar stepper motor; up to 2.8 A, 52 V. direction and step inputs. PWM current control; includes internal diodes. over-current and thermal protection. half-stepping. MC3479 stepper motor drive is similar, but only rated up to 350 mA, 16 V.
- Nanotec sells microstepping stepper motor driver chips (the IMT-901, IMT-902, and IMT-903) and assembled stepper motor driver modules.
- Reprap: Arduino has a long side-thread on various motor driver chips.
- lots of stepper motor driver chips
- Critical Velocity sells DC motor speed controllers and stepper motor controllers.
- Geckodrive sells DC motor speed controllers and stepper motor controllers.
- PICStep stepper motor driver -- schematic, PCB, parts list, firmware, etc. (based on PIC16F628A)
- AVR2313 stepper motor driver schematic, PCB, parts list, firmware, etc.
- Unipolar Stepper Motor Driver (74194) (uses a SN74LS194 - Bidirectional Universal Shift Register, not a CPU)
- Simple L297/298 Based Stepper Motor Driver
- Galil in motion: motor tutorials -- anything useful here?
- Mesa Electronics sells "motion control cards" including "a single axis 100W smart servo motor controller on a 2"x2" PCB."
- H bridge oscillators (used to drive isolated power transformers, electroluminescent panels, CCFLs, etc.): "DC-AC inverter targets electroluminescent applications" 1997 describes the Sipex SP4425 IC which converts a low input DC voltage ( 1.1 V to 3.0 V ) to a high output H bridge square wave (400 Hz, 150 V typ.) (Is the Sipex SP4425 still being manufactured, or is there some other IC which obsoletes it?). Maxim MAX4990 high-voltage DC-AC converter for driving electroluminescent (EL) lamps: +2.4V to +5.5V input range; up to 250V peak-to-peak output voltage ... many CCFL controllers use a full H bridge ... the Maxim MAX256 has a built-in full H bridge ... the Maxim MAX5069 can be used to build full-bridge switching power supplies ... and some Class D audio amplifiers use full H bridges ...
- A bunch of H bridge motor driver circuits are on the Red Rock Energy web page. They are designed to control the motor that tilts solar panels towards the sun.
- "Motor Drives and Audio Amplifiers" by Dennis L Feucht
- "circuit for changing direction with a DC motor"
A3977
Using the A3977 microstepping driver chip from Allegro:
- "Keith’s Stepper Motor Controller Board"
- "A3977 Microstepping Stepper Motor Driver Prototype PCB" / THSTEP25 Microstepping Stepper Motor Driver (sells bare PCB board; schematic on web site)
- "Tero's A3977 stepper driver" (schematics and layout files)
- "PMinMO: A3977 Stepper Driver Board"
- "another A3977-based board." at http://microstepping.com/ .
astronomy
astronomy telescopes use motor drivers:
- scope drive webring: a selection of Websites that display procedures to equip amateur telescopes with homemade computerized drive systems
- "scopedrive" for automating telescopes
robots
Robots use motor drivers.
- Glendale robotics club (Glendale CA)
- "H bridges" by David Cook at the ROBOT ROOM(TM)
- "A Second Generation Speed Controller" by Chuck McManis. Can handle 200 amps continuously. Uses two PIC16F628 chips driving sixteen IRF1010E FETs: "(I like to call it a "two way SMP microkernel with serial cluster interconnect" as that sounds better than "a couple of PICs with their serial ports wired together" :-)"
self-balancing personal transportation systems
- Main Article: vehicle
Self-balancing personal transportation systems use motor drivers:
- Project Emanual: The Almost Self Balancing 2 Wheeled Electric Skateboard (uses a PIC16F73 microcontroller; source code for the balancing algorithm in PIC assembler can be downloaded there)
- The Electric Unicycle
generator
(This doesn't have much to do with motor drivers -- is there a better page for electric power generation tips?)
- performance axial flux discussion group develops axial flux motors and alternators
- Alternator and Generator Comparison for Wind Power
- Windstuffnow discusses DIYS wind power
- Otherpower discusses wind turbine construction, generating electricity from firewood, etc.
further reading
- "Brushed DC Motor Drive Circuits" on the Microchip wiki.