Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Convert 5V to 12V?

Status
Not open for further replies.

petesmc

New Member
Hi,

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.

-Peter
 
petesmc said:
Hi,

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.

-Peter

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)
 
It was the latter, I just need a 12V version of my 5V, then forgetting about the 5V version.

So I just use a NPN transistor, with collector directly to 12V? And where is the output, the emitter?

There are only minut amount of current being drawn, so I don't have to worry about the other method.
 
petesmc said:
It was the latter, I just need a 12V version of my 5V, then forgetting about the 5V version.

So I just use a NPN transistor, with collector directly to 12V? And where is the output, the emitter?

There are only minut amount of current being drawn, so I don't have to worry about the other method.

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.

Image is attached..

-Pete
 

Attachments

  • switch_263.jpg
    switch_263.jpg
    10.3 KB · Views: 1,111
petesmc said:
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.

Image is attached..

-Pete

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.
 
Good point!

Btw, I thought i saw somewhere, where you could convert a DC voltage to another DC using a couple of capactors and diodes. Anyone got a schematic?

-Pete
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top