Forget using a 7805 regulator unless you have one on hand, and have room for a fat heatsink. Go to a "dollar store", thrift store, or flea market, and buy an obsolete car charger for a cellular phone. These typically contain an a small circuit consisting of about a dozen components, primarily a MC34063 switchmode-regulator chip (an 8-pin integrated circuit) that is much more efficient than a 7805 (and therefore waste less energy as heat). If you take it out of the case (insulate it with a piece of heatshring or bicycle tube), a typical 12->5v phone charger circuit is no larger than a 9v battery and can handle about 1 ampere of current. You can't build one for the price you'll pay at a junk store. You can change the output voltage to anywhere from 12v to 1v by changing one of the resistors (google mc34063 datasheet for details).