An electric motor converts electrical energy into mechanical energy. The reverse process that of converting mechanical energy into electrical energy is accomplished by a generator or dynamo. Traction motors used on locomotives often perform both tasks if the locomotive is equipped with dynamic brakes. Electric motors are found in household appliances such as fans, refrigerators, washing machines, pool pumps and fan-forced ovens. Most electric motors work by electromagnetism, but motors based on other electromechanical phenomena, such as electrostatic forces and the piezoelectric effect, also exist. The fundamental principle upon which electromagnetic motors are based is that there is a mechanical force on any current-carrying wire contained within a magnetic field. The force is described by the Lorentz force law and is perpendicular to both the wire and the magnetic field. Most magnetic motors are rotary, but linear motors also exist. In a rotary motor, the rotating part (usually on the inside) is called the rotor, and the stationary part is called the stator. The rotor rotates because the wires and magnetic field are arranged so that a torque is developed about the rotor's axis. The motor contains electromagnets that are wound on a frame. Though this frame is often called the armature, that term is often erroneously applied. Correctly, the armature is that part of the motor across which the input voltage is supplied. Depending upon the design of the machine, either the rotor or the stator can serve as the armature.
A DC motor is designed to run on DC electric power. Two examples of pure DC designs are Michael Faraday's homopolar motor (which is uncommon), and the ball bearing motor, which is (so far) a novelty. By far the most common DC motor types are the brushed and brushless types, which use internal and external commutation respectively to create an oscillating AC current from the DC source -- so they are not purely DC machines in a strict sense. DC hobby motors can be applied to movement and locomotion. Specifications of most DC motors show high revolutions per minute (rpm) and low torque. Gearboxes can be attached to motors to increase their torque while reducing the rpm. The gearbox usually specifies a ratio that describes the rpm in to the rpm out. For instance, a DC motor with an rpm of 8000 is connected to a 1000:1 gearbox. What is the output rpm? 8000 rpm/1000 8 rpm. The torque of the motor is substantially increased. We could estimate that the torque will increase by the same value the rpm decreased. In reality, no conversion is 100 percent efficient; there always will be efficiency losses. Some DC motors, called gearhead motors, are built with a gearbox attached.
DC motor H-bridge
When one wants to control (turn on or off) the DC motor via a simple circuit or digital signal. In addition, one would also like to be able to reverse the motor's direction. An H-bridge fulfills these requirements. It should be understood that the term "DC motor" refers to stand- alone DC motors as well as motors connected to gearbox motors as well as gearhead motors. The H-bridge is made up of four transistors. [Some hobbyist use metal-oxide-semiconductor field-effect transistors (MOSFETs).] Some H-bridge designers use a combination of PNP and NPN transistors. In each case, the transistor acts like a simple switch. When switches SW1 and SW4 are closed, the motor rotates in one direction. When switches SW2 and SW3 are closed, the motor rotates in the opposite direction. By using the switches properly, we can reverse the current direction to the motor, which in turn reverses the motor's shaft rotation.
H-bridge using switches
H-bridge using transistors
How does a motor turn?
We take a battery; hook the positive side to one side of wer DC motor. Then we connect the negative side of the battery to the other motor lead. The motor spins forward. If we swap the battery leads the motor spins in reverse.
Now lets say we want a Micro Controller Unit (MCU) to control the motor, how would we do it? Well, for starters, get a device that would act like a solid state switch, a transistor, and hook it up the motor.
NOTE: If we connect up these relay circuits, remember to put a diode across the coil of the relay. This will keep the spike voltage (back EMF), coming out of the coil of the relay, from getting into the MCU and damaging it. The anode, which is the arrow side of the diode, should connect to ground. The bar, which is the Cathode side of the diode, should connect to the coil where the MCU connects to the relay.
If we connect this circuit to a small hobby motor we can control the motor with a processor (MCU, etc.) Applying a logical one, (+12 Volts in our example) to point A causes the motor to turn forward. Applying a logical zero, (ground) causes the motor to stop turning (to coast and stop).
Hook the motor up in this fashion and the circuit turns the motor in reverse when we apply a logical one (+12Volts) to point B. Apply a logical zero, which is usually a ground, causes the motor to stop spinning.
If we hook up these circuits we can only get the motor to stop or turn in one direction, forward for the first circuit or reverse for the second circuit.
We can also pulse the motor control line, (A or B) on and off. This powers the motor in short burst and gets varying degrees of torque, which usually translates into variable motor speed.
But if we want to be able to control the motor in both forward and reverse with a processor, we will need more circuitry. We will need an H-Bridge. Notice the "H"-looking configuration in the next graphic. Relays configured in this fashion make an H-Bridge. The "high side drivers" are the relays that control the positive voltage to the motor. This is called sourcing current.
The "low side drivers" are the relays that control the negative voltage to sink current to the motor. "Sinking current" is the term for connecting the circuit to the negative side of the power supply, which is usually ground.
So, we turn on the upper left and lower right circuits, and power flows through the motor forward, i.e.: 1 to A, 0 to B, 0 to C, and 1 to D.
Then for reverse we turn on the upper right and lower left circuits and power flows through the motor in reverse, i.e.: 0 to A, 1 to B, 1 to C, and 0 to D.
CAUTION: We should be careful not to turn on both circuits on one side or the other, or we have a direct short which will destroy our circuit; Example: A and C or B and D both high (logical 1).
The H-bridge controls the on and off function as well as the direction of DC motors. The function of the H-bridge can be enhanced by using PWM to control the speed of the motor. When the PWM signal is high, the motor is on; when low, the motor is off. Since the signal turns the motor on and off very quickly, the voltage delivered to the motor becomes an average of the time on versus the time period of the cycle (T-on/T- period). The greater the on time, the higher the average voltage. The average voltage (VDC steady-state) is always less than the voltage delivered (Vcc). PWM essentially controls the motor speed. Motors are inductive loads. When current is switched on and off, a transient voltage is generated in the (motor) windings that can damage the solid-state components used in the H-bridge. This transient voltage can be controlled by using a snubber diode bridged across each transistor.
The snubber diode dissipates the transient voltage by creating a voltage path directly to ground for the transient voltage. This effectively protects the semiconductor the diode is bridged over. The snubber diodes should be rated to handle the normal current the motor typically draws.
Pulse-width modulation for H-bridge
Transistor H-bridge with diode protection
We can better control our motor by using transistors or Field Effect Transistors (FETs).
Most of what we have discussed about the relays H-Bridge is true of these circuits. We don't need diodes that were across the relay coils now. We should use diodes across our transistors though. See the following diagram showing how they are connected.
These solid state circuits provide power and ground connections to the motor, as did the relay circuits. The high side drivers need to be current "sources" which is what PNP transistors and P-channel FETs are good at. The low side drivers need to be current "sinks" which is what NPN transistors and N-channel FETs are good at.
If we turn on the two upper circuits, the motor resists turning, so we effectively have a breaking mechanism. The same is true if we turn on both of the lower circuits. This is because the motor is a generator and when it turns it generates a voltage. If the terminals of the motor are connected (shorted), then the voltage generated counteracts the motors freedom to turn. It is as if we are applying a similar but opposite voltage to the one generated by the motor being turned, it acts like a brake. To be nice to our transistors, we should add diodes to catch the back voltage that is generated by the motor's coil when the power is switched on and off. This flyback voltage can be many times higher than the supply voltage! If we don't use diodes, we could burn out our transistors.
Transistors, being a semiconductor device, will have some resistance, which causes them to get hot when conducting much current. This is called not being able to sink or source very much power, i.e.: Not able to provide much current from ground or from plus voltage.
Mosfets are much more efficient, they can provide much more current and not get as hot. They usually have the flyback diodes built in so we don't need the diodes anymore. This helps guard against flyback voltage frying our MCU.
To use Mosfets in an H-Bridge, we need P-Channel Mosfets on top because they can "source" power, and N-Channel Mosfets on the bottom because then can "sink" power. N-Channel Mosfets are much cheaper than P-Channel Mosfets, but N-Channel Mosfets used to source power require about 7 volts more than the supply voltage, to turn on. As a result, some people manage to use N-Channel Mosfets, on top of the H-Bridge, by using cleaver circuits to overcome the breakdown voltage.
It is important that the four quadrants of the H-Bridgecircuits be turned on and off properly. When there is a path between the positive and ground side of the H-Bridge, other than through the motor, a condition exists called "shoot through". This is basically a direct short of the power supply and can cause semiconductors to become ballistic, in circuits with large currents flowing. There are H-bridge chips available that are much easier, and safer, to use than designing our own H-Bridge circuit.
The L 293 has 2 H-Bridges, can provide about 1 amp to each and occasional peak loads to 2 amps. Motors typically controlled with this controller are near the size of a 35 mm film plastic canister.
The L298 has 2 h-bridges on board, can handle 1amp and peak current draws to about 3amps. We often see motors between the size a of 35 mm film plastic canister and a coke can, driven by this type H-Bridge. The LMD18200 has one h-bridge on board, can handle about 2 or 3 amps and can handle a peak of about 6 amps. This H-Bridge chip can usually handle an average motor about the size of a coke. There are several more commercially designed H-Bridge chips as well.
Related Online Articles:
- Power Supply of Mobiles
- Making Motors & Drives
- Uninterruptible Power Supplie (UPS) - Common Topologies
- Battery Management in UPS Systems
- Voltage Collapse in Power Systems
- Batteries: Electron activity in Chemical Reactions
- Stator Voltage Control of Induction Motors
- Single - Phase Induction Motors
- Battery Construction
- Bio Batteries