arduino powering

can I power my Arduino mega with 5v by dc jack

No. The minimum voltage you can apply to the barrel jack on the Mega is 7 V.

You can power the Mega with a 5 V supply connected to the 5V pin, but you must be very careful to not supply more than 5 V to that pin and also that you don't reverse the polarity of the power supply, otherwise you will destroy your Mega.

so can I use a step-up converter to bust 5v to 7v

Yes. It seems a bit goofy to go from 5 V to 7 V only to go back to 5 V, but if that’s what you have to do then go for it.

For a 5v supply, you either use the USB port (recommended, as it eliminates the possibility of reversed polarity) or 5v pin. I very often use the USB port and cheap 5v USB phone chargers for powering projects (to the point of connecting female micro USB connectors to power pins so I can use ubiquitous USB power supplies and cables for them)

but can i power it 7v 1a or 2a

Yes.

but how many amps does it need

Even though the voltage regulator on the Mega is rated for 800 mA, that would only be possible with much better heat sinking than the Mega provides. I'd say the maximum the voltage regulator on the Mega could supply to the 5 V rail with a 7 V supply is 350 mA. Add to that number the amount of current you want to be able to draw from the VIN pin on the Mega. That is limited to a maximum of 1 A by the reverse polarity protection diode if you're using the barrel jack.

i have voltage amp regulator

I don't know what a "voltage amp regulator" is.

it’s a voltage and amps regulator and
Thank you for everything
:smiley: :smiley: :smiley: :smiley:

Maybe you mean a bench power supply? Something like this:

yes

๋ Just set Voltage to 7 Volt, and set Current to 1 Amp.
Actually “set Current to 1 Amp” means, your power supply will cutoff when your board consume current over 1 Amp, it does not mean your power supply will try to ejects 1 Amp of current to your board.
So, you can set Current to 1, 2, 3 or even 10 Amp, but not set Current less than your board need (normally not over 1 Amp).