AKJ:
GoForSmoke,Thanks for the answer. But i am not trying to convert DC Power. Let's take an example: If you connect an arduino uno to Power In, to a 9 VDC Power connector (which get's scalled to 5 V) and still connects the Serial USB device, which supplies 5 V, the arduino somehow keeps the current at 5 V. I want to realise the same thing.
The somehow is a 7805 linear regulator, it's standard and it wastes power input. All > 5V is lost.
If you put in 100mA 9V you get out 100mA 5V and a Warm Heat Sink.
If you put in 100mA 12V you get out 100mA 5V and a Very Warm Heat Sink.
The Heat is the Wasted Potential turning into Kinetic energy in the voltage drop. School physics.
So when you put your must be >= 7V battery to work through this, it spends power making heat.
When you use a DC converter the loss is far less, which you can measure by Heat to know the true for what you got.
If you put 100 mA 9V through a buck converter set for 5V, you get 900 * efficiency / 5 mA 5V out.
I have cheap, < $3 DC buck converters that are rated to 3A output. I wouldn't push them more than half that, rather 1A at most.
I fed the converter measured 5.5V and it gave me measured 5V back, 6V battery works for this and NOT the 7805.
I have cheap boost converters that take .9V to 5V in and put out 5V on an MP3 charger socket. For small power, 1 AAA battery can deliver 5V until it is drained to .9V. And hehehe, 4 dead AAA's in series can also deliver 5V until the total reach .9V. Think of that.
I've probably had too much time to think.