Motor and Transistor Problems

I'm trying to make a mini "windmill". I was wondering how I could wire a small dc motor to a S9015 transistor to turn a LED on. I want the LED to turn on when I spin the motor and it to be off when I am not.

Wire the LED/current limit resistor in parallel with the motor, so that when the motor drive transistor is on, it sinks current thru the motor and the LED at the same time.
Works for all coil based devices - motor, relay, solenoid.
Motor with indicator LED.jpg

Can you show this for a pop transistor?

For a pnp, it's the same thing, just the emitter is tied to +Supply and the collector to the motor. Keep the 220 resistor and reverse the logic. I.E. Logic high will turn off the motor (and pnp) while logic low will turn everything back on.

What I meant was when I manually spin the motor the led turns on. I don't want to control it with a microcontroller. I only need the microcontroller to provide power to the led. To power the led normally you would have to spin the motor very fast. I just want to know how I could wire the motor to a PNP transistor so that I don't have to spin the motor very fast for the led to turn on.

ezlikespie: What I meant was when I manually spin the motor the led turns on. I don't want to control it with a microcontroller. I only need the microcontroller to provide power to the led. To power the led normally you would have to spin the motor very fast. I just want to know how I could wire the motor to a PNP transistor so that I don't have to spin the motor very fast for the led to turn on.

A transistor cannot amplify anything on its own, you would need an external source of power to bias it. If you want to power it from the motor without a battery or anything else, you should probably look into something like a step-up regulator used for an energy harvesting application that can boost of a few dozen millivolts into a useable voltage. I don't know any specific ones to recommend though.

I only want to know how to wire the motor to the base of the PNP transistor. The external source of power is the 3.3V on my Arduino microcontroller. I only want to know how I would wire the motor to the base of the PNP transistor.

How much voltage does the motor produce at the RPM you want it to turn on at? If it's not over 0.6 V, it's got no chance of forward biasing the base unless you bias the output somehow, and I'm not sure how reliable that would be.

And if you want it to turn on no matter which direction it spins in, there's no way you'll get it to work with just a single transistor.

Your best bet is probably to use a comparator to sense when the motor's voltage is higher than a certain level to turn the LED on. If you want to make it work in both directions, you will need to use two comparators in a window detection circuit.

ezlikespie:
I only want to know how to wire the motor to the base of the PNP transistor. The external source of power is the 3.3V on my Arduino microcontroller. I only want to know how I would wire the motor to the base of the PNP transistor.

Quick answer: Feed the output of one of the Digital Pins on the Arduino to the 220 resistor (which is connected to the base in series).

Also, the schematic CrossRoads put up is incorrect since it has a NPN instead of PNP. Take a look at my previous post for the corrections on the wiring.