Standard Interfacing Circuits
The Arduino provides up to 10mA per channel, and the micro ship is limited to about 50mA. This means you can light about 4 to 5 LEDs from the Arduino. Anything more will burn out you microprocessor. To solve this problem we use transistors to boost current for our output devices and as switches for our pins. For instance, the 2N3904 transistor rated to output 200mA and has a gain of 25.
So the transistor needs 8mA to output 200mA, because Current = 200 mA / 24 gain = 8 mA.
The microcontroller runs at 5 V, so we need a resistor that will provide us with at least 8mA. There is a 0.7V voltage drop across the transistor, which reduces the overall supply to 4.3V. We ned a resistor that is less than the maximum output:
Resistance = 4.3 V / 0.008 A = 550 Ohms
Resistors are manufactured in a variety of amounts. The closes resistor we have to 550 Ω is 470 Ω. It is good practice to connect in parallel to the output device a back emf suppression diode, because devices like relays, solenoids, and motors produce a back emf when power is switched off.
Darlington Transistors
The MPSA42 is a medium, power transistor that can handle up to 300V at 600mA of current, which is three times as much as our last. Transistor only multiply or amplify the input current from the power source, so we increase the resistance to the base of the transistor. The MPSA42 transistor needs about 20mA to turn on completely and this is more than what the Arduino can supply through channel. To solve this problem we first connect a transistor that can handle the input of the microcontroller like the 2N3904 and connect the base of the MPSA42 to the emitter of the 2N3904. When we connect the transistors collectors together the gain is further multiplied. This arrangement of transistors is called a Darlington, named after the inventor. The gain of a 2N3904 is 25 band the gain of a MPSA42 is 30, and the gain in the Darlington configuration os Total Gain = 25 * 30 = 750. A few Darlington transistors for high current DC motors are: MPSA13 low power NPN 30V 1.2A ($0.1.0), MPSA64 low power PNP 30V 1.2A ($0.08), and TIP 120 medium power NPN 60V 5A ($0.24). The package of transistors thus far have been TO-92 package, so now we will use the larger package TO- 220.
DC Motors
Brushed DC motors (BDC) used in many applications like toys and other hobbies, because they are easy to use , inexpensive, and abundant. BDC motors are made of the same components: a stator, rotor, brushes, and a commuter. The stator generates a stationary magnetic field that surrounds the rotor. This field is generated by either permanent magnets or electromagnetic windings. The different kinds of BDC motors are based on there construction of the stator or the way the electromagnetic windings are connected to the power source. The rotor, also called the armature, is made up of one or more windings. When these windings are energized they produce a magnetic field. The magnetic poles of this rotor field will be attracted to the opposite poles generated by the stator, causing the rotor to turn. As the motor turns, the windings are constantly being energized in a different sequence so that the magnetic poles generated by the rotor do not overrun the poles generated in the stator. This switching of the field is the rotor windings is called commutation. Unlike other electric motor types, BDC do not require a controller to switch current in the motor windings. Instead, the commutations of the windings of a BDC is done mechanically. A segmented copper sleeve, called a commutator, resides on the axles of a BDC motor. As the motor turns, carbon brushes slide over the commutator, coming in contact with different segments of the commutator. The segments are attached to the different rotor windings, therefore, a dynamic magnetic field is generated inside the motor when a voltage is applied across the brushes of the motor. Its is important to note that the brushes and commutator are the parts of a BDC motor that are most prone to wear because they are sliding past each other. One downside to BDC motors is that the motor introduces a lot of noise on the power rails, which can affect the microcontroller and some cases can completely stop the control of a program functioning. Electrical noise can be reduced by soldering suppression capacitors across the motor contacts
Basic Principal of PWM
Pulse width modulation is achieved with the help of a square wave whose duty cycle is changed to get a varying voltage output as a result of average value of waveform.
Demonstrate Microcontroller Controlling signal Lamp
Materials:
- 470Ω resistor
- 3.3KΩ resistor
- 2N3904 transistor
- Signal lamp
- 5V power supply
WE are to build a circuit that uses the transistor to an output device under a load. Using pin 6 as our signal and connected to the resistor to protect the transistor from burning out. The base of the transistor is connected to the resistor, collector to the output device, and emitter to the ground.We are using a signal lamp powered by a 5V powersupply. It is important to identify the transistor pins or else the desired outcome will not be achieved. The signal lamp is programed to turn on for one second and turn off for one second. We measure the voltage drop across the signal lamp, which is 5.2V. We then replace the 470Ω resistor with a 3.3KΩ resistor, which is much larger. The result is the signal light is turned on, but very dimly. The new voltage drop across the signal lamp is 4.9V.
Demonstrate Darlington Controlling signal Lamp
Materials:
- 470 resistor
- 3.3K resistor
- MPSA13 transistor
- 2N3904 transistor
- MPSA42 transistor
- Signal lamp
- 5V power supply
This lab is very similar to the previous lab, but we use the MPSA13 Darlington transistor, and the 2N3904 and MPSA42 to compare resistor change outs. The MPSA13 Darlington transistor is the equivalent to the to 2N3904 and MPSA42 combo transistors, because the signal light did not change in brightness.
Demonstrate Microcontroller Controlling Motor
Materials:
- 2.2K resistor
- TIP 120 transistor
- 1N4001 diode
- BDC motor
- 1.5V battery and battery holder
IN this lab we use a medium power transistor to turn ON and OFF a BDC motor with an emf suppression diode. Although, we could use a capacitor, but we will not need tot solder it directly to the BDC terminal, because we can just use a diode.
Behold the DC motor turns ON and OFF from Arduino controller program. YA!!!
Yes, we used a digital square wave signal.
Demonstrate PWM signal driving Motor
Materials:
- 2.2K resistor
- TIP 120 transistor
- 1N4001 diode
- BDC motor
- 1.5V battery and battery holder
In this lab we will use a PWM signal, which sort of mimics an analog signal. AS we know digital signals cannot be analog signals, right? A digital signal sends two or more signal at different constant voltage levels to turn our little motor on and off. An analog signal would be like a sine waveform that is constantly changing and never rests at one particular voltage level. Well, PWM is a type of digital signal that copies the overall pattern of a sinewave, does so in tiny intervals of constant voltage levels, so when averaged together looks like an analog signal. The key to controlling a PWM is setting a D.C., not direct current, but Duty Cycle. A Duty Cycle is percentile of "pulses", which can look like a lopsided square wave. But a square wave that looks symmetrical and is actually a 50:50 D.C. And by adjusting the duty cycle you can sort of set a certain speed, besides the full blast speed of 1.5V or 5V ON mode.
(Drops microphone) PEACE!!!!
No comments:
Post a Comment