Introduction: Light Triggered Motor
Also, I am thirteen years old. (Mandatory mention of age for robot's challenge)
Step 1: Materials
You will need:
A motor. I took one out of a broken Nerf Barricade.
A TIP31 transistor. $0.20 http://www.taydaelectronics.com/tip31c-tip31-npn-transistor-3a-100v.html
A 2N3906 transistor or similar PNP transistor. $0.02 http://www.taydaelectronics.com/2n3906-general-propose-pnp-transistor.html
A battery holder. I used one that held 3 AA's. $0.14 http://www.taydaelectronics.com/aa-battery-holder-5.html
A SFH 314 phototransistor. $0.58 http://www.mouser.com/ProductDetail/OSRAM-Opto-Semiconductors/SFH-314/?qs=K5ta8V%252bWhtbR6gV8hNfmATd6ftDkb0eH0AduyQe8MSk%3d
Perf Board. I used one I had laying around, but you should use Radioshack's miniboard, which costs around $2.19. http://www.radioshack.com/product/index.jsp?productId=2104052
A laser pointer is recommended to activate the light switch.
The total cost came to around $5, with shipping.
Must be able to solder and read schematics
Step 2: Make the Circuit.
Here is the schematic for the circuit. Before you solder everything, you should test the circuit on a breadboard. To do it, just shine a laser (I just used a 5 milliwatt laser) on the phototransistor. If the motor starts spinning, solder the circuit on perf board.
TIP31 pinout: http://www.hobbytronics.co.uk/image/data/st/tip31.jpg
2N3906 pinout: http://www.reprise.com/host/circuits/images/to-92.gif
The emitter of the phototransistor is the longer lead. The shorter lead of the phototransistor should be soldered to the negative (black) battery holder lead.
Step 3: Enjoy Your Light Activated Motor.
Be creative in how you use it! You could use it to remotely turn on just about anything involving motors. I am going to use mine to make a remotely fired nerf gun.
Step 4: How It Works.
A phototransistor allows electricity to flow through it when light is shining on it. However, it can't handle enough current for a motor. Transistors can be used as switches when a little positive current is passed to base (in the case of an NPN transistor). When the positive current goes to base, it allows current to pass from the emitter to the collector or from the collector to the emitter (it depends on whether or not the transistor is NPN or PNP).
However, when I tried that with a 2N3904 (an NPN transistor), I found that the transistor didn't allow enough current through to power my motor. To do that, I needed a transistor that allowed more current through, like a TIP31. However, the phototransistor didn't allow quite enough current to switch the TIP31 transistor.
To allow more current to go, I used a PNP transistor. The phototransistor allowed enough negative current to go to the base of the PNP transistor, so that positive current could flow from emitter to the collector. The 2N3906 transistor allowed enough positive current to go to the base of the TIP31 transistor to switch it.
Because the positive lead of the motor is attached to the positive lead of the battery holder, when the TIP31 transistor switched, it allowed negative current to go from the battery case to the motor. The motor was then connected to the positive and negative leads of the batteries, and it begins to spin.