Last week, we have successfully using microcontroller with input devices such as LDR sensor and button to switch on and off LED lights. This time, we will be using other output devices such as a motor.
Before we start, we have to know that the maximum current output from the launchPad is very small. Therefore we cannot connect the motor directly at the launchPad, we have to use transistors.
Some transistors that can handle greater current are TIP120, and MPSA13. One can also use Darlington transistors to handle greater current.
Because motors are quite expansive and of limited supply in the class, it is always safer to test out the circuit with a cheaper output device.
In this case, a christmas light tree!
On the side, the circuit using a MPSA13 transistor is shown.
Voltage across the light when the base pin is connected to a ~2.2k ohm resistor.
Voltage across the light when the base pin is connected to a ~330 ohm resistor.
As you can notice, the smaller the current going to the base pin will decrease the voltage across the output device. Therefore, we can control the output device by changing the current going to the base pin.
In case you do not have any TIP120 or MPSA13, you can always use a 2N3904 and a MPSA42 transistor to build the darlington transistors.
After confirming that the circuit is correctly built, hook the extended wires from the toy's motor to the circuit as the output device. As expected, the motor is activated as expected.
Aftering completing all the activities involve driving motors, there is no more time to work on the project. The only project-related complishment for today is to get the motors to work under control.



No comments:
Post a Comment