If you got fed up of buying new batteries for your circuits and want a reliable power source, then here is way. We use our Laptop or PC to charge you cellphones, similarly we can use power supply from our Computer’s USB for our circuits. Computer’s USB is a good power source for 5v DC regulated supply. Also when there is a circuit which consist motor like DC motor, Servo etc., it’s difficult to run them with a normal 9v battery, especially when battery have gotten weak. These motors require comparatively high current to rotate and we can easily draw approx. 500mA from Computer’s USB.
Now the question is how can we use USB power supply? Well, it’s very easy, you just need a USB cable, this can be either a cell phone charger cable or a printer cable. USB cable is easily available in the market at low price. You just need to cut the cable and you will find 4 wires in the cable. Out of those 4 wires, two wires are for Data transfer and two wires are for Power supply. These two power supply wires in USB cable can be easily identified, generally two extreme side wires or Red & Black wires are used for Power supply.
So you can use these two wires for your bread board or PCB circuits or you can properly solder two jumper wires to them. You can also measure the voltage from Multimeter, it would be 5v approx.