Well I have a candy tin and wanted to put a 9v (battery) input and a 12v (car) input. And have it go out to a female USB port. I need one of these **broken link removed** So it will regulate the voltage to 5v. It is rated for 5v to 18v so I figured no problem having 2 input voltages (only going to use one at a time of course) and would have a switch so you can select 12v, 9v or off. I would like to include a on LED so I figured I would put that behind the voltage regulator. Do you think this is possible do I need any capacitors to keep the power "clean"?
What is it you're trying to charge ?
The 7805 will give you a fairly clean 5V output for either 9 and 12V inputs. You might want to add caps depending on your load. Also, keep in mind what the power dissipation is with the 12V input (P on 7805 = (12-5) x current). You may need a dissipator. Make sure you have a switch to cut off the LED (and load)...