I want to power an Arduino Nano through the "5V" pin and the "GND" pin and the rest of the circuit (sensors) with 5V, is it better to use a 9V battery or a 12V battery through a 5V voltage regulator? Adding the current consumed by the Arduino Nano of 30mA + the total current consumed by the sensores ~ 100mA it will give 130mA.
In which case would it last longer?
Is because I see 3.7V batteries with 2000mAh and 9V batteries with 200-250mAh and I am not sure if powering an Arduino Nano with more voltage is better or not.
if you rely on the internal regulator, keep the voltage low to keep the temperature low. if you power it with more voltage you just turn battery power to heat for no benefit.
I use buck converters from ebay that cost chump change, keep heat off the Arduino and can be replaced in seconds if they ever failed
If i power the Arduino Nano through the "5V" and "GND" pins can I still use de "3V3" to power other components?
Beacuse I don't think so.
raw power barrel >> V In pin >> 5v reg >> 5 v pins ( apply regulated external 5V here ) >> 3.3V reg >> 3.3V pins
Nano gets its 3.3V from the FT232 on an Arduino Nano.
Offbrand Nano's, who knows? Check the schematics for the board you have.
With more amp-hours you get more hours at the same current, regardless of voltage.
With a higher voltage you are wasting more energy as heat but a 12V battery can discharge "deeper". A 12V battery discharged down to 5V is at 42% of it's original voltage and 9V discharged-down to 5V is 56% of it's original voltage.
If you had two batteries with equal Watt-hour ratings the 9V battery would last longer (less energy lost to heat in the regulator).
But if they have equal Amp-hour ratings, the 12V battery will last longer. The 12V battery would have more Watt-hours and it can be discharged deeper past it's normal "life".
A step-down switching regulator is a win-win. You can get more current out of the regulator than you pull from the battery and almost no power is wasted in the regulator.
I saw it here about the FTDI FT232RL chip.
"The FTDI FT232RL chip on the Nano is only powered if the board is being powered over USB. As a result, when running on external (non-USB) power, the 3.3V output (which is supplied by the FTDI chip) is not available"
Which is not correct per the Nano V3 board schematics which I rearranged a little here).
The FT232 can supply 3.3V @ 50mA per the its datasheet.
The datasheet clearly shows 3.3V coming from the internal 3.3V regulator, powered from the Vcc pin.

On the Nano, VCC can be from the 5V regulator, or it can be from Vusb (thru a diode).
Just shows that Gravitech is as poor in its documenting as Arduino is.

If I use the converter CC-CC LM2596 to get 5V output it's better to use a 12V battery than a 9v battery despite the mAh?
And do I put a Switch on/off between the battery and the buck converter or between the buck converter and the Arduino Nano, or is the same?