Sunday, January 28, 2018

Lab 9: Driving Motors and Other Output Devices

In this lab we learned how to use transistors to construct standard interfacing circuits.  These interfacing circuits can be used to create more load as the Arduino is only capable of 50mA max.  The transistor we used in constructing the circuits is the common 2N3904.  We know that the transistor is rated to 200mA and has a gain of 25 so to determine the current, we divide the current by gain to get 8mA (.008A).



We obtained a signal lamp and built a standard interfacing circuit with the 470 ohm resistor and transistor.  Then we used the same "blink" program for the Arduino and got the signal lamp to blink.




Here you can see the signal lamp blinking with the transistor integrated into the breadboard.





We also measured the voltage across the signal lamp with the multimeter while using the 470 ohm resistor in the circuit.  The voltage was an average of 4.81V.




Then we changed the resistor from 470 ohms to 3.3K ohms.  This is a bigger resistance and inserting it into the circuit would expect to produce a drop in voltage.  Measuring the voltage across the signal lamp a second time with the larger resistor gave a voltage of 4.60V.



Next we learned about Darlington transistors and their applications.  For example, the MPSA42 transistor is larger than the 2N3904 and can handle a bigger load.  So you can use the 2N3904 to "turn on" the bigger MPSA42.  This arrangement of transistors turning on bigger transistors is called a "Darlington".  If the gain of a 2N3904 is 25 and the gain of a MPSA42 is 30, the the gain of the two in a Darlingtion configuration is:     Total Gain = 25*30 = 750 gain



We built a Darlington circuit with the 2N3904, MPS, 3.3K ohm resistor, diode for back EMF suppression. 



You can see both the 2N3904 and MPS transistors on the breadboard which make a Darlington.  The signal lamp is being lit but it's not very bright.





We then replaced the MPSA13 transistor with a bigger TIP120 transistor which would increase the current to the signal lamp.  Notice the larger TIP120 on the breadboard and much brighter signal lamp.



Next we built a circuit using the same TIP120 power transistor to switch a small electric motor on and off.  We used a 2.2K ohm resistor and a diode for back EMF suppression along with a battery power supply.



You can see the motor spinning as the power supply (battery) is connected to the circuit, and also notice the TIP120 power transistor on the breadboard as well.



We then connected the circuit and motor to the Arduino and wrote code to adjust the speed of the motor using "analogWrite" to the pin with the motor connected.  The code adjusted the speed of the motor from 20% to 90% and back in a continuous loop with a delay of 1 second in between each switch.



You can see the speed of the motor speeding up and slowing down based on the code we wrote to the Arduino.  With the help of the power transistor TIP120, the Darlington circuit is functioning properly.



Lab 9 finished!

No comments:

Post a Comment

Lab 17: Using IR Sensors for flame and line detection for the VEX

In this lab, we used everything we learned in the previous labs to complete this final lab challenge.  The challenge was to navigate a maze ...