best way to battery power mega.

what do you guys recommend to power the mega with? I've seen write ups stating the Vin port but this needs 7-12v? which means li-poly battery packs would be no good.

looking for small physical size.

on31ll:
looking for small physical size.

You must have a good reason to use a big power-hungry Mega.
Try a smartphone powerbank, connected to the USB socket.
You might still have to add a dynamic load if it switches off (mine doesn’t).
Leo…

I've never used a Mega, but in theory you could have a single lipo with charger followed by a 5V boost converter, and apply that output to the 5V pin.

ShermanP:
...you could have a single lipo with charger followed by a 5V boost converter, and apply that output to the 5V pin.

So a powerbank.

The advantage of a powerbank is that charger and battery protection are buildin.
And 5volt enters the Mega via a fused USB socket.
Leo..

Wawa:
You must have a good reason to use a big power-hungry Mega.

i am very very new to arduino and coding. i bought the mega and the uno. when a friend helped write the code the uno ran out of space and i am in no way goo enough yet to edit that code to cut out the rubbish thats not "needed"

I'd rather try to optimize a code to make it fit to Uno

alesam:
I'd rather try to optimize a code to make it fit to Uno

i think that too as there is code included for an ethernet shield and SD card but that is no longer being utilised/connected

the removing or optimising the code is above my skill level I'm very new to this.