If you enjoy my work, please consider a small donation to help my future efforts...

Click here to lend your support to: ROBOTICS AND AUTOMATION and make a donation at www.pledgie.com !

Friday, August 14, 2009

5---MOTORS

I have worked with 3 types of motors viz. DC, Servo and Steppers.




DC MOTORS

As a beginner we mostly use DC motors. Stepper and servos are a little complicated. As we know DC motor has two leads. If we apply +ve to one lead and ground to the other, the motor will rotate in one direction, if we reverse the connection the motor will rotate in the opposite direction. If we keep both leads open or both leads ground it will not rotate (but some inertia will be there). If we apply +ve voltage to both leads then braking will occur. We can test this, first without applying any voltage we rotate the shaft of the motor, then apply ground on both lead and try to rotate the shaft. Both the cases feels the same. But if we apply +ve voltage (+12V) to both the leads and try rotating the shaft, we can feel the difference between the previous one. We have to apply more force to rotate the same rotation in the second connection. So we take this condition as braking.
The main things about a DC motor are Voltage rating, Current rating, Torque and Speed. It should be kept in mind that torque is inversely proportional to speed. So while building a robot we should keep in mind the problem statement and accordingly choose between torque and speed.


By looking at the motor datasheet can determine the output velocity and torque of our motor. But unfortunately for robots, motors commercially available do not normally have a desirable speed to torque ratio (the main exception being servos and high torque motors with built in gearboxes. In robotics, torque is preferrable than speed. With gears, we can exchange the high velocity with a better torque. This exchange happens with a very simple equation:

Torque_Old * Velocity_Old = Torque_New * Velocity_New

Torque_Old and Velocity_Old can be found simply by looking up the datasheet of our motor. Then what we need to do is put a desired torque or velocity on the right hand side of the equation.
So for example, suppose our motor outputs 3 lb-in torque at 2000rps according to the datasheet, but we only want 300rps. This is what equation will look like:

3 lb-in * 2000rps = Torque_New * 300rps

Thus our new torque will be 20 lb-in.
Now suppose, with the same motor, we need 5 lb-in. But suppose we also need 1500rps minimum velocity. How would we know if the motor is up to spec and can do this? Easy . . .

3 lb-in * 2000rps = 5 lb-in * Velocity_New

Velocity_New = 1200rps

We now have just determined that at 1200 rps the selected motor is not up to spec. Using the simple equation, we have just saved tons of money on a motor that would have never worked. Doing all the necessary equations before designing our robot will always save you tons of money and time.


The photograph of the DC motor given is a 12V DC motor with gearbox and extended shaft



There are 0.1uF Capacitors on motor terminals... these were put so as to make sure that no AC component goes into the motors.









STEPPER MOTORS

Stepper motor is an electromechanical device which converts electrical pulses into mechanical movements. The shaft of a stepper rotates in discrete step increments when electrical command pulses are applied to it in the proper sequence.
Lets see why steppers are used in robotics:

1. The rotational angle of the motor is proportional to the input pulse.

2. The motor has full torque at stand-still.

3. Precise positioning can be done. They have an accuracy of 3-5% of a step and this error is non cumulative from one step to the next.

4. It is very much reliable since there are no contact brush in the motor. Therefore the life of the motor is simply dependant on the life of the bearing.


As the saying goes everything has its own merits and demerits…


Steppers are vulnerable to resonance if not properly controlled and it can also not be operated at extremely high speeds.


A stepper motor can be a good choice whenever controlled movement is required. They can be used in applications where we need to control rotation angle, speed, position and synchronism.


Stepper motors are current controlled motors unlike DC motors which are voltage controlled.





Servo functioning in easy words can be thought as moving a electromagnet near a piece of iron. The iron piece will move (get attracted) towards the electromagnet. The dots in the picture are the coils in the picture are the electromagnets which attract the arrow (which instigates the motor shaft movement).







This is one of the the steppers which i bought for 600 bucks each. They were high torque steppers and the suppliers took 100 out of the 600 for the special light weight aluminium wheel and the wheel grip (the blue colour in the picture)



BIPOLAR STEPPER



Stepper motors are available with 4 wires, 5 wires, 6 wires. Wires are not like a DC motor. 4 wire stepper motor is surely a bipolar motor, 5 wire motor will be surely a unipolar motor and 6 wire motor can be used as a unipolar motor as well as a bipolar motor.

First of all I have never used a bipolar stepper. Mine was a 6 wired motor but I used it in the unipolar mode. Things are a little more complex for bipolar permanent magnet stepping motors because these have no center taps on their windings. Therefore, to reverse the direction of the field produced by a motor winding, we need to reverse the current through the winding. We could use a double-pole double throw switch to do this electromechanically; the electronic equivalent of such a switch is called an H-bridge and is outlined below






It is worth noting that H-bridges are applicable not only to the control of bipolar stepping motors, but also to the control of DC motors, push-pull solenoids (those with permanent magnet plungers) and many other applications.
With 4 switches, the basic H-bridge offers 16 possible operating modes, 7 of which short out the power supply! The following operating modes are of interest:
Forward mode, switches A and D closed.
Reverse mode, switches B and C closed.

These are the usual operating modes, allowing current to flow from the supply, through the motor winding and onward to ground. The figure below illustrates forward mode:






Fast decay mode or coasting mode, all switches open.


Any current flowing through the motor winding will be working against the full supply voltage, plus two diode drops, so current will decay quickly. This mode provides little or no dynamic braking effect on the motor rotor, so the rotor will coast freely if all motor windings are powered in this mode. Figure below illustrates the current flow immediately after switching from forward running mode to fast decay mode.







Slow decay modes or dynamic braking modes.


In these modes, current may recirculate through the motor winding with minimum resistance. As a result, if current is flowing in a motor winding when one of these modes is entered, the current will decay slowly, and if the motor rotor is turning, it will induce a current that will act as a brake on the rotor. Figure below illustrates one of the many useful slow-decay modes, with switch D closed; if the motor winding has recently been in forward running mode, the state of switch B may be either open or closed:





The image below shows an example of an H-bridge








The main thing to keep in mind is that there should not be any short circuit of A-B or C-D.

The following operating modes are available


Wednesday, August 5, 2009

4--- Voltage Regulators

Voltage regulators produce fixed DC output voltage from variable DC (a small amount of AC on it). Normally we get fixed output by connecting the voltage regulator at the output of the filtered DC. It can also used in circuits to get a low DC voltage from a high DC voltage (for example we use 7805 to get 5V from 12V). There are two types of voltage regulators

1st type of regulator is the

Fixed voltage regulators(78xx,79xx)
In fixed voltage regulators there is another classification
1. +ve voltage regulators
2. -ve voltage regulators

and the 2nd type is the

Variable voltage regulators(LM317)



1. Positive Voltage Regulator includes 78xx voltage regulators. The most commonly used ones are 7805 and 7812. 7805 gives fixed 5V DC voltage if input voltage is in the range 7.5V to 20V.






2. Negative Voltage Regulator includes 79xx voltage regulators. The most commonly used ones are once again the 05 and 12.









This is the circuit diagram of 5V/9V/12V fixed power supply (Negative) at 1 Ampere current rating.

L1 = Step down transformer with i/p of 230 AC 50 Hz and output of (XX ) - 0- (XX)) volts(rms).
XX = Required DC output voltages.

Output voltage (DC Volts)------------------Transformer rating (rms Volts)
5------------------------------------------230: 5-0-5
9------------------------------------------230:9-0-9
12-----------------------------------------230:12-0-12
15------------------------------------230:15-0-15

The current rating has to be more than 1 Amp.


D1, D2 = Diodes 1N4003
D3 = Diode 1N4003/ 1N4001 (optional)

C1 = 1000 Micro Farad aluminum electrolytic capacitor(For loads less than 100mA you can sustitute with 220 microfards capacitor). Voltage rating = 2.5 times of Output Voltage.

C2 = 10 Micro Farad aluminum electrolytic capacitor


IC1 = 7905 for -5V DC output
=7909 for -9V DC output
=7912 for -12V DC output
=7915 for -15V DC output




A very important thing to be noted here is that 7805 gives fixed -5V DC voltage if input voltage is in the range -7V to -20V.
Also to be noted is that voltage regulators like 7805 acts as a current regulator and allows 1 A current through them.


But now if we want to use 7805 and get negative 5 volt we got to have a -7V. So how to get it?? One of the simplest solutions is to use the batteries as in the figure.





We can also get a positive and a negative voltage from the idea that every voltage is relative. There is no negative voltage in reality. 5 V can be treated positve if 0 V is considered the ground, and can be treated as -2 if +7 V is treated as ground. Likewise if we got a 12 V power supply and then divide the volatage using resistances and then use the 6V as the common ground for the whole circuit, we can use the original ground as the negative 6 volt.

We can also use a centre tapped transforme for the same purpose.




In the category of Variable Voltage Regulator most common is LM317 although other variable voltage regulators are available. The advantage of variable voltage regulator is that we can get a variable voltage supply by just varying a resistance only.





The basic circuit diagram for variable volatage regulator LM317 is given in the picture below





One disadvantage about LM317is that its very sensitive to temperature. The regulated voltage given as output by it changes with temperature. As we know IC's get warm after been used for a while. This results in the change in the output voltage after 317 is been used in the circuit(as it gets warm )after sometime. So constant value of voltage is not achieved. By the way we can also use a nice heat-sink attached to it so as to check it from getting warm.

3--- OPAMPS and COMPARATORS (IC741, LM324 etc)

As the name implies it is an operational amplifier. It performs mathematical operations like addition, subtraction, log, antilog etc. OPAMPS can amplify both AC and DC signals. The 741 has two inputs and one output. The difference between these two inputs is amplified and that is what appears at the output. We can get good amplifier gain in OPAMPS. The most commonly used OPAMPS are 741 and 324. IC741 is used in close loop configuration and LM324 in open loop configuration. i.e. LM324 mainly used as comparator while 741 for amplification, addition etc...











Now here we need negative voltage in some cases. That seems impossible with batteries right?? But it is not so. Let us discuss the Voltage Regulators in details.

2--- TRANSISTOR

As switches BC547 (NPN Silicon) are the most used in small (5v-12V range) robotic circuits.





To drive high power circuits like motors, relays etc in robotics we use power transistors. NPN (TIP 120, 121, 122) and PNP (TIP 125, 126, 127) etc.





Let us now compare a normal transistor and a power transistor.

In BC548 we have Ic=0.1A whereas in TIP-122 we have Ic (continuous) =5 A and Ic (peak) =8 A.

Normal DC motors have current rating of 250 mA. So if we connect the motor to the collector of BC548 then it will not able to drive the motor because max. Ic of BC548 is 100mA. But a TIP or KS D880 can drive this motor. This is the main reason we use power transistor.

Second reason is the probability of damage because of the heat sink of the power transistor is very less. If some short circuit occurs the heat sink will get heated saving the transistor from getting damaged.