Google+ Followers

Sunday, January 19, 2014

41. Let’s Get into Motion – with Motors

Firstly we’ll have a little physics lesson.  Moving electrical charge and magnetic fields interact with each other.  All conductors are full of charged particles (free electrons) which, when moving in an electric current, generate an electro-magnetic field.  

This field presents itself in two components, described as electrostatic and magnetic fields.  The electrostatic field surrounds each charged particle (electron) and the magnetic field wraps around the wire as shown below:
Thanks to for the images.

Magnetic fields have direction, for example from the N pole of one magnet to the S pole of another magnet.  The direction of the magnetic field around the wire with a current I flowing, with velocity v, is as shown above where the field is represented as a series of concentric lines. In fact there are no lines, just a steadily decreasing strength, B, as you move further from the wire (ie as the radius r increases).  

In a straight wire with a current flowing (don’t forget that the conventional current is said to flow in the direction opposite to the flow of electrons), the direction of the magnetic field generated can be determined as above from the right-hand rule, where the right hand’s thumb represents the direction of conventional current, and the fingers are pointing towards the magnetic field's direction.  

If that current-carrying wire is now placed in a strong magnetic field, between the N and S poles of a permanent magnet, the wire’s magnetic field interacts with the permanent magnet’s magnetic field (like poles repel and opposite poles attract) so that there is a resulting force which will be big enough to move the wire: 

Thanks to for the image.

If the current-carrying wire and the strong magnetic field are arranged as in the above diagram, the movement can be harnessed as rotary motion, and we have a simple motor.  Notice that the commutator is split into two halves and the direct current is applied by brushes in contact on either side.  By the time the part of the rotating wire which is experiencing an upward force, has moved through 180 degrees, the current in the wire loop will have reversed, and the other magnetic pole will exert a downward force, enabling continued rotation.  The direction of the force on the wire can be determined using the left hand rule:
Thanks to for the image.
DC Motors
Direct Current motors as described above have two wires, power and GND, and they rotate continuously (quite fast) as long as power is supplied.  Their speed in revolutions per minute (rpm) is high, as in computer cooling fans, or the wheels of model cars.  The speed of rotation can be controlled in an analogue fashion by varying the supply voltage, and also more usually in a digital fashion by pulsating the 5V supply on and off, using Pulse Width Modulation (PWM).  We came across PWM before for controlling the brightness of LEDs. See Post 15. Programming the ATTiny85 with the BreadboArduino 

The PWM of LEDs made use of the eye’s Persistence of Vision (POV) where the jerky flashing isn’t noticed, while the apparent brightness depends on the duty cycle of the PWM.  In the case of DC motors, the jerky motion produced by PWM is not noticed because the motion is smoothed by the angular momentum of the spinning motor/wheel system. 

For example, if the duty cycle is 50 per cent, the speed of rotation will be at half of the maximum available at 100 per cent duty cycle.  Model DC motors used for robotics projects are normally the brushed type and the one shown below has wire coils wound around an iron rotor giving rise to three electromagnets, which exert forces on the permanent magnet’s N and S poles. 

You can see the brushes which make contact with the rotating commutator.  The rotating part is called the rotor and the non-rotating part is called the stator.

Thanks to for the image.

Servo Motors
Servos are more complicated, but basically consist of a DC motor, a set of gears, a control circuit and a position sensor (ie a potentiometer with rotating wiper).  Here’s one which has been stripped down to show the works:

Thanks to for the image.

Servos are not usually used for continuous rotation as with the simple DC motor described previously.  The position of the rotor can be precisely controlled and they are used for tasks where the angular position of the rotor needs to be known reliably, for example, the segments of a robot’s arm.  Servos usually have three wires, power, GND and control.  The power is supplied continuously, and the servo’s circuit regulates the current drawn by the load on the motor. 

Servos’ angle of rotation is usually within a restricted range of less than 180 degrees, and is used for forward and backward motion within that range.  The control signal they receive determines what angle the rotor is to turn through.  When the position sensor determines the position reached, the motor stops. 

This control signal is a Pulse Width Modulation signal.  While the rotation speed of a DC motor is controlled by PWM, it is the position in degrees that is dictated by PWM in the servo.  Here are some control pulse sequences used for servos:

Thanks to for the image.

A minimum pulse width of 1 millisecond, repeated every 20 ms, keeps the rotor at the zero degrees position.  If the pulse width is increased to 1.5 ms, the rotor rotates to the 90 degree position, and if the pulse width is increased to 2 ms, the rotation would be through 180 degrees.  These pulse widths, repeated every 20 ms, represent duty cycle values of 5 per cent, 7.5 per cent and 10 per cent respectively.  The repeating signal every 20 ms tells the servo to stay in that position until the duty cycle changes.  Servos are quite ‘torquey’  - while the gear train reduces the rotation speed, at the same time it increases the torque.  Torque is a way of describing the ‘strength’ of the servo – how much work it can do, and servos come with a torque rating.

Stepper Motors
Stepper motors are also employed for precision work, but in such things as printers, where many rotations are required, while still maintaining accuracy of position.
A 2-phase unipolar, permanent magnet type stepper motor, with a rotor step angle of 90 degrees.
The direction of rotation can be reversed by reversing the sequences of activating the wires shown.
Thanks to for the animation.
The construction of stepper motors is different from servos.  As can be seen above, they employ multiple ‘toothed’ electromagnets and they are brushless.  An external microcontroller calculates the combination of electromagnets to be energised.  

In the diagram above, the bar magnet rotor gets ‘stuck’ between two of the electromagnet’s teeth – S pole stuck between (attracted to) two N poles, and at the other end, its N pole stuck between two S poles.  When the electromagnets change, the bar magnet's N pole will be repelled or 'kicked' by an N pole (and simultaneously its S pole will be kicked by a S pole) and will be shifted into the next step, and so on in a clockwise rotation.  If the rows of the table above are scanned from bottom to top, the rotation will be anti-clockwise.

The current within the electromagnet coils is alternated in such a way as to perform a rotation of precisely pre-defined steps.  The N poles and S poles of the electromagnets alternate in a sequence which allows continuous rotation until the final position is reached.  The ‘steps’ are represented by small rotations from one electromagnet to the next, and rotations of more than 360 degrees are possible.  Once the required position has been reached, the stepper motor will stay there with a good holding torque.

Stepper motors can be unipolar (6 or 8 wires) or bipolar (4, 6 or 8 wires) in design.  The electronic control of unipolar steppers is not as complicated as that for bipolar stepper motors.  Bipolar steppers usually have more torque.  Unipolar steppers have a centre tap to the coil connections.  Below are some uni-polar and bi-polar stepper motor wiring schemes:

Thanks to for the image.

Here endeth the physics lecture!  But why motors?  Just be patient and we'll soon see!

No comments:

Post a Comment