Noob here. Can someone please tell me what part I need to do the following job? I want to input a varying voltage from 0-5v (using a PIC) and have the output be 0-12v (see sketch below). I know that a transistor can do this but I really need a linear relationship between the input and output voltages. Can someone recommend a specific part for me? Thanks!!!!
op amp set up with non-inverting gain of 2. To get the full range of 0 to 12V, though, you're going to have to bias the op-amp from somewhat higher than 12V on the Vdd end and somewhat lower than 0V on the Vss end. You could go for a rail-to-rail op-amp - at least that would get you close to the rails without having to change the power supply.
Yes, use an op-amp, PICs may be good for complex applications but for something simple like this you can't beat an op-amp. I think PICs are often over-used these days, people often use them because they don't know how to do it the "propper way".