Raspberry Pi also runs on 5V. So initially we collected it to the supply 5V rail that we created for L293d from the Lipo battery. Raspberry Pi model B requires around 700mA to 1000mA for itself. When we connected the Pi to the Lipo-l293d rail, the 7805 overheated. 7805 is a very lossy device. The drops voltage by burning the rest of the power. So with so much of current drawn and a half of the power wasted at the 7805 the lipo battery lasted less than 5 mins.