Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 10

In any electric motor, operation is based on simple electromagnetism.

A current-
carrying conductor generates a magnetic field; when this is then placed in an external
magnetic field, it will experience a force proportional to the current in the conductor,
and to the strength of the external magnetic field. As you are well aware of from
playing with magnets as a kid, opposite (North and South) polarities attract, while like
polarities (North and North, South and South) repel. The internal configuration of
a DC motor is designed to harness the magnetic interaction between a current-carrying
conductor and an external magnetic field to generate rotational motion.

Let's start by looking at a simple 2-pole DC electric motor (here red represents a


magnet or winding with a "North" polarization, while green represents a magnet or
winding with a "South" polarization).

Every DC motor has six basic parts -- axle, rotor (a.k.a., armature), stator,
commutator, field magnet(s), and brushes. In most common DC motors (and all
that BEAMers will see), the external magnetic field is produced by high-strength
permanent magnets1. The stator is the stationary part of the motor -- this includes the
motor casing, as well as two or more permanent magnet pole pieces. The rotor
(together with the axle and attached commutator) rotate with respect to the stator. The
rotor consists of windings (generally on a core), the windings being electrically
connected to the commutator. The above diagram shows a common motor layout --
with the rotor inside the stator (field) magnets.

The geometry of the brushes, commutator contacts, and rotor


windings are such that when power is applied, the polarities of
the energized winding and the stator magnet(s) are misaligned,
and the rotor will rotate until it is almost aligned with the stator's
field magnets. As the rotor reaches alignment, the brushes move
to the next commutator contacts, and energize the next winding.
Given our example two-pole motor, the rotation reverses the
direction of current through the rotor winding, leading to a "flip"
of the rotor's magnetic field, driving it to continue rotating.

In real life, though, DC motors will always have more than two


poles (three is a very common number). In particular, this avoids
"dead spots" in the commutator. You can imagine how with our
example two-pole motor, if the rotor is exactly at the middle of
its rotation (perfectly aligned with the field magnets), it will get
"stuck" there. Meanwhile, with a two-pole motor, there is a
moment where the commutator shorts out the power supply (i.e.,
both brushes touch both commutator contacts simultaneously).
This would be bad for the power supply, waste energy, and
damage motor components as well. Yet another disadvantage of
such a simple motor is that it would exhibit a high amount
of torque "ripple" (the amount of torque it could produce is
cyclic with the position of the rotor).

You'll notice a few things from this -- namely, one pole is fully energized at a time
(but two others are "partially" energized). As each brush transitions from one
commutator contact to the next, one coil's field will rapidly collapse, as the next coil's
field will rapidly charge up (this occurs within a few microsecond). We'll see more
about the effects of this later, but in the meantime you can see that this is a direct
result of the coil windings' series wiring:

There's probably no better way to see how an average DC motor is


put together, than by just opening one up. Unfortunately this is
tedious work, as well as requiring the destruction of a perfectly
good motor.

Luckily for you, I've gone ahead and done this in your stead. The
guts of a disassembled Mabuchi FF-030-PN motor (the same
model that Solarbotics sells) are available for you to seehere (on
10 lines / cm graph paper). This is a basic 3-pole DC motor, with 2
brushes and three commutator contacts.
The use of an iron core armature (as in the Mabuchi, above) is quite common, and has
a number of advantages2. First off, the iron core provides a strong, rigid support for
the windings -- a particularly important consideration for high-torque motors. The
core also conducts heat away from the rotor windings, allowing the motor to be driven
harder than might otherwise be the case. Iron core construction is also relatively
inexpensive compared with other construction types.

But iron core construction also has several disadvantages. The iron armature has a
relatively high inertia which limits motor acceleration. This construction also results
in high winding inductances which limit brush and commutator life.

In small motors, an alternative design is often used which features a 'coreless'


armature winding. This design depends upon the coil wire itself for structural
integrity. As a result, the armature is hollow, and the permanent magnet can be
mounted inside the rotor coil. Coreless DC motors have much lower
armature inductance than iron-core motors of comparable size, extending brush and
commutator life.

Diagram courtesy of MicroMo

The coreless design also allows manufacturers to build smaller motors; meanwhile,
due to the lack of iron in their rotors, coreless motors are somewhat prone to
overheating. As a result, this design is generally used just in small, low-power
motors. BEAMers will most often see coreless DC motors in the form of pager
motors.
Motor
 Servos have small electric motors in them that provide power. The motor has a rotor with two attached
to it, one on either side. There are two magnets outside of the motor, also on either side. When current
flows through both coils, a magnetic field which turns the rotor so that they face the magnets. When the
coils pass their magnets, they get another pulse of electricity, pushing them towards the other magnet.
The rotor gets two strong pushes every rotation, which keep it turning. The motor is attached by gears to
the control wheel.
Control Wheel
 The control wheel is where the servo motor attaches to whatever control mechanism it is powering. It
usually can turn 90 degrees in either direction from the starting position for a total of 180 degrees of
movement. The control wheel uses a potentiometer to tell exactly how far it has turned and when to stop.
The potentiometer is a variable resistor, a device which creates electricity. As the motor turns, the
potentiometer creates more or less resistance. By measuring the potentiometer, the servo controller can
tell how far it has turned and send a signal to tell it when to stop.
Controlling the Servo
 Servo motors usually have three wires, two which provide power and one which provides a control
signal. The control signal uses pulse width modulation. It sends pulses of electricity to the servo every 20
milliseconds. The duration, or "width", of each pulse tells the motor what position to turn to. The motor has
control circuitry inside that sends signals to move into position and to stop once it gets there.

Read more: How a Servo Motor Works | eHow.com http://www.ehow.com/how-does_4970258_how-servo-motor-


works.html#ixzz0t5FGKrpI

How R.C. Servo Motors Work

A servo motor consists of several main parts, the motor and gearbox, a position sensor,
an error amplifier and motor driver and a circuit to decode the requested position. Figure
1 contains a block diagram of a typical servo motor unit.

The radio control receiver system (or other controller) generates a pulse of varying
length approximately every 20 milliseconds. The pulse is normally between 1 and 2
milliseconds long. The length of the pulse is used by the servo to determine the position
it should rotate to.
 
Figure 1. Servo Motor Block Diagram

Starting from the control pulse we will work though each part of the diagram and explain
how it all fits together. Once we have gone through how the servo works we will
investigate how the control pulses can be generated with a microcontroller.

Pulse width to voltage converter

The control pulse is feed to a pulse width to voltage converter. This circuit charges a
capacitor at a constant rate while the pulse is high. When the pulse goes low the charge
on the capacitor is fed to the output via a suitable buffer amplifier. This essentially
produces a voltage related to the length of the applied pulse.

The circuit is tuned to produce a useful voltage over a 1ms to 2ms period. The output
voltage is buffered and so does not decay significantly between control pulses so the
length of time between pulses is not critical.

Position Sensor

The current rotational position of the servo motor output shaft is read by a sensor. This
is normally a potentiometer (variable resistor) which produces a voltage that is related to
the absolute angle of the output shaft.

The position sensor then feeds its current value into the Error Amplifier which compares
the current position with the commanded position from the pulse width to voltage
converter.

Error Amplifier
The error amplifier is an operational amplifier with negative feedback. It will always try to
minimise the difference between the inverting (negative) and non-inverting (positive)
inputs by driving its output is the correct direction.

The output of the error amplifier is either a negative or positive voltage representing the
difference between its inputs. The greater the difference the greater the voltage.

The error amplifier output is used to drive the motor; If it is positive the motor will turn in
one direction, if negative the other. This allows the error amplifier to reduce the
difference between its inputs (thus closing the negative feedback loop) and so make the
servo go to the commanded position.

The servo normally contains a single integrated circuit and a hand full of discreet
components to implement the entire control system.

Controlling a Servo Motor with a Microcontroller

From the above we can determine that we need to generate a pulse approximately
every 20ms although the actual time between pulses is not critical. The pulse width
however must be accurate to ensure that we can accurately set the position of the
servo.

PWM modules

Many microcontrollers are equipped with PWM generators and most people initially
consider using these to generate the control signals. Unfortunately they are not really
suitable.

The problem is that we need a relatively accurate short pulse then a long delay; and
generally you only have one PWM generator share between several servos which
would require switching components outside the microcontroller and complicate the
hardware.

The PWM generator is designed to generate an accurate pulse between 0% and 100%
duty cycle, but we need something in the order of 5% to 10% duty cycle (1ms/20ms to
2ms/20ms). If a typical PWM generator is 8 or 10 bits say, then we can only use a small
fraction of the bits to generate the pulse width we need and so we loose a lot of
accuracy.

Timers

A more beneficial approach can be implemented with simple timers and software
interrupts. The key is realising that we can run a timer at a faster rate and do a single
servo at a time, followed by the next and the next etc. Each of the outputs is driven in
turn for its required time and then turned off. Once all outputs have been driven, the
cycle repeats.

This approach is demonstrated in the PIC servo controller project.

The timer is configured so that we have plenty of accuracy over the 1 to 2 millisecond
pulse time. Each servo pin is driven high in turn and the timer configured to interrupt the
processor when the pulse should be finished. The interrupt routine then drives the
output low.

For simplicity, the output pins can be arranged on a single port and the value zero
(0x00) written to the port to turn off all pins at once so that the interrupt routine does not
need to know which servo output is currently active.

After the pulse has ended, the microprocessor sets up the next pulse and begins the
process again.

Limit Switches' Purpose


 Limit switches, regardless of their final purpose, can only perform two functions. The switches either
activate (turn on) or deactivate (turn off) an electrical circuit. Some of these switches are used in industry,
and others are utilized for common household appliances. Most limit switches that are used for the home
 remain hidden from the user, so at times when something activates or deactivates, it can be a mystery.
Limit Switches in the Home
 Open the refrigerator and the light comes on. Close the door and the light should go off. That small
light switch is actually a limit switch at work. It limits the time the light is on so it is not operating when the
door is closed. When the laundry washing machine is under the agitation cycle and you open the top lid,
the agitator stops it motion. The switch is hidden from view but the cycle appears to stop. The limit switch
that sets just under the top frame cover, removes the "control" voltage from the circuit and stops the
washing machine in mid cycle. This type of use for a limit switch is known as a safety limit.
Big Industrial Machines
 People and equipment that are placed in an industrial setting are kept safe by the operation of limit
switches. Limit switches generally shut a machine "off" when an action exceeds its travel or position. In
other words, if a robot malfunctions, the limit switch will shut down the power to the movement control
circuit in much the same way the washing machine stops moving when you open the lid. When you hear
the "beep-beep" of a large truck moving backwards, a limit switch was energized when the driver shifted
that vehicle into reverse. This action caused electrical power to go to the back-up beeper horn in order to
warn people of the action.
Types of Limit Switches
 Limits come in a variety of sizes and shapes, from the size of a loaf of bread to ones so small it may
take a magnifying glass to see where to connect the wires. Many limit switches are simple contacts that
become electrically conductive in the same way as when you turn on the light switch in the home. Others
types of limit switches are called optical proximity switches or magnetic proximity switches. Optical
proximity switches utilize two different components. One component shoots an infrared light beam to a
receiver mounted at a straight distance away. Much like the television remote does to change the
channel. If that light beam is broken, the optical proximity limit switch will open, "turn off" or close "turn on"
a circuit to switch the electrical power. A magnetic proximity limit switch is a singular device that will also
turn on or turn off when it comes close to a piece of metal. Regardless of the types or sizes of limit
switches, these devices can only accomplish a task of activation or deactivation.

Read more: How Does a Limit Switch Work? | eHow.com http://www.ehow.com/how-does_4924572_limit-switch-


work.html#ixzz0t5GDMa5p

A current sensor is a device that detects electrical current (AC or DC) in a wire, and generates a signal
proportional to it.

The sensed current and the output signal can be:

 AC current input,
 analog output, which duplicates the wave shape of the sensed current
 bipolar output, which duplicates the wave shape of the sensed current
 unipolar output, which is proportional to the average or RMS value of the sensed current
 DC current input,
 unipolar, with a unipolar output, which duplicates the wave shape of the sensed current
 digital output, which switches when the sensed current exceeds a certain threshold

A metal detector is a device which responds to metal that may not be readily apparent.

The simplest form of a metal detector consists of an oscillator producing an alternating current that
passes through a coil producing an alternating magnetic field. If a piece of electrically conductive metal is
close to the coil, eddy currents will be induced in the metal, and this produces an alternating magnetic
field of its own. If another coil is used to measure the magnetic field (acting as a magnetometer), the
change in the magnetic field due to the metallic object can be detected.

The first industrial metal detectors were developed in the 1960s and were used extensively for mining and
other industrial applications. Uses include de-mining (the detection of land mines), the detection of
weapons such as knives and guns, especially in airport security, geophysical prospecting, archaeology
and treasure hunting. Metal detectors are also used to detect foreign bodies in food, and in
the construction industryto detect steel reinforcing bars in concrete and pipes and wires buried in walls
and floors.

A gas detector is a device which detects the presence of various gases within an area, usually as part of
a safety system. This type of equipment is used to detect a gas leak and interface with a control system
so a process can be automatically shut down. A gas detector can also sound an alarm to operators in the
area where the leak is occurring, giving them the opportunity to leave the area. This type of device is
important owing to the fact that there are many gases that can be harmful to organic life, such
as humans or animals.

Gas detectors can be used to detect combustible, flammable and toxic gases as well


as oxygen depletion. This type of device is used widely in industry and can found in a variety of locations
such as on oil rigs, to monitor manufacture processes and emerging technologies such as photovoltaic.
They may also be used in firefighting.

Gas detectors are usually battery operated. They transmit warnings via a series of audible and visible
signals such as alarms and flashing lights, (sometimes using LED technology), when dangerous levels of
gas vapors are detected. As detectors measure a gas concentration, the sensor responds to a calibration
gas, which serves as the reference point or scale. As a sensor’s detection exceeds a preset alarm level,
the alarm or signal will be activated. As units, gas detectors are produced as portable or stationary
devices. Originally, detectors were produced to detect a single gas, but modern units may detect several
toxic or combustible gases, or even a combination of both types. [1]

A leaf sensor is a phytometric device (measurement of plant physiological processes [1]) that measures
water loss or the water deficit stress (WDS) in plants[2] by real-time monitoring the moisture level in plant
leaves. The first leaf sensor was developed by LeafSens, an Israeli company who were granted a US
patent for a mechanical leaf thickness sensing device in 2001. [3] LeafSen has made strides incorporating
their leaf sensory technology into citrus orchards in Israel. [4] A solid state smart leaf sensor technology
was developed by the University of Colorado at Boulder for NASA in 2007. It was designed to help
monitor and control agricultural water demand.[5] AgriHouse received a National Science Foundation
(NSF) STTR grant in conjuction with the University of Colorado to further develop the solid state leaf
sensor technology for precision irrigation control in 2007. [6]
A flow sensor is a device for sensing the rate of fluid flow. Typically a flow sensor is the sensing element
used in a flow meter, or flow logger, to record the flow of fluids. As is true for all sensors, absolute
accuracy of a measurement requires a functionality for calibration.

There are various kinds of flow sensors and flow meters, including some that have a vane that is pushed
by the fluid, and can drive a rotary potentiometer, or similar device.

Other flow sensors are based on sensors which measure the transfer of heat caused by the moving
medium. This principle is common for microsensors to measure flow.

Flow meters are related to devices called velocimeters that measure velocity of fluids flowing through
them. Laser-based interferometry is often used for air flow measurement, but for liquids, it is often easier
to measure the flow. Another approach is Doppler-based methods for flow measurement. Hall effect
sensors may also be used, on a flapper valve, or vane, to sense the position of the vane, as displaced by
fluid flow.

You might also like