I'm using PWM output of a PIC microcontroller, which outputs at 5V. However, I need a 12V output. The output is roughly at 1000Hz. I've no idea on how to do this. Any help is appreciated!
Forgot to mention, I have a 5V and a 12V rail available.
I'm using PWM output of a PIC microcontroller, which outputs at 5V. However, I need a 12V output. The output is roughly at 1000Hz. I've no idea on how to do this. Any help is appreciated!
Forgot to mention, I have a 5V and a 12V rail available.
Please be more specific. You need to create another 12V from the 5V with your PWM signal? Or, do you just need a 12V version of your 1000Hz waveform? If the answer is the later, then just run your 5V 1000Hz signal to the base of a transistor and tie the collector up to+12 (level shifter)
Or, if the 12V needs to source & sink significant power, you could run your 5V 1000Hz signal to the control diode of a solid state relay that will output your 12V at the same rate (since 1000Hz is slow enough for SSRs)
You will need to put a resistor in the collector tied up to 12V then take your output from the collector. This configuration uses the trans. as a switch whereby the transistor pulls the output to ground or lets it get pulled up to 12V. With that said, it will not work if this 12V signal has to drive any appreciable current (but it could drive high impedance inputs).
If you need the current from the 12, try the relay method I mentioned above..
I tried this using crocodile clips simulation and it doesn't seem to work. Check if I'm doing something wrong. Btw, if i tie the emitter to 0V then it tells me the transistor will blow.
I tried this using crocodile clips simulation and it doesn't seem to work. Check if I'm doing something wrong. Btw, if i tie the emitter to 0V then it tells me the transistor will blow.
Your emitter should go to 0V. I don't know why simulator thinks it will blow.
Power dissipation maybe? Do you know why it thinks it is a problem?
What transistor is it(part#?). I assume it could handle the 1.19 mA of current. Use a higher than 10k value to reduce power dissipation in device.
Also, what does the 12V have to drive? Is that the model of your load that you have shown? If you need the 12 to drive something, like I said earlier this might not be the right thing to do. But for light loads, this will reproduce your Waveform on 12V
You must insert resistor between PIC output and base of your transistor!!!
If you don't do that, Base-Emiter section of your transistor will short the PIC output to ground (well to 0.6V). This will be fatal to your PIC.
Ok, I got this working. However, from simulation again, this inverts the signal. If 5V is going in, I get, nothing out, then with zero in, I get 12 out. I solved this using two transistors, one after the other, but i'm not sure if this is the correct output.