I'm little confused about this one and don't know where to start. The idea is to have micro-controller or FPGA output PWM signal (5V or 3.3V while PWM is 100%), and then use a transistor to power ventilator that needs 12V to run.
I know that I need to connect grounds of ventilator's power supply and FPGA's (or μC's) power supply together. After that, I use resistor in series with transistor's collector to limit current.
The part that's bugging me is how to connect the base and the PWM output pin? Which resistor value do I need to chose if I want 3.3V to be 100% ? And which value do need if I want 5V to be 100% ? I mean, how can I "tell" transistor that 3.3V (or any other voltage that I'm operating on) is when it needs to power ventilator at 100% capacity?
I hope you can understand my question. Thank you for any answers !!