How to supply a power to a NodeMCU ESP8266 + MPU-6050 (as shown in below image) using a portable battery so that the ESP8266 board is not required to connect to a PC or power adaptor.
That’s indeed an important info. Some boards have “Vin” pin, while others have a 5V pin. The input voltage range depends on what regulator your board has, but it’s good to keep it close to the minimum. So, I agree with the powerbank.
can I directly connect a 4xAAA without any additional components such as voltage converter, resistor, etc. Will it also gives the power to MPU-6050 sensor?
As I said, normally yes, because the board has an onboard regulator. But it will be better if you find the specs of your exact board to know the max voltage that can be applied to “Vin” pin.
Yes, but through the ESP8266 board, as it’s showed in the pic you posted in #1. You can’t apply 6V directly on the MPU6050
You can, but this would be a poor choice because of these two reasons:
9V (aka smoke alarm) batteries have a small capacity and will be quickly drained;
the difference between 9V and 5V will be wasted as heat on the onboard regulator. This decreases the amount of current that you can drain from the board. Not a problem if you have only the MPU6050 connected to it, but it can be if other things will be connected to the board later.
Many newer ESP32 boards are designed for battery power.
They have a LiPo battery connector and even a buil-in charging circuit.
The NodeMCU ESP8266 is not such a board.
The easiest way to battery power the NodeMCU is with a cellphone powerbank, connected to the USB socket.
Leo..