I am using Arduino mega 2560. I have some doubts about powering my microcontroller. Can I use the 9v battery to power my arduino through the VIN terminal?enter image description here I have uploaded an image. Check whether it is a correct method or not?

  • 1
    you can, but it wastes expensive batteries. 4/9ths of the energy used will be heat. a DC-DC buck converter will only waste about 1/9th of the battery. That's like buy 2 get 1 free; not bad for less than $1 "investment". – dandavis May 18 '17 at 21:25


The board can operate on an external supply of 6 to 20 volts. If supplied with less than 7V, however, the 5V pin may supply less than five volts and the board may become unstable. If using more than 12V, the voltage regulator may overheat and damage the board. The recommended range is 7 to 12 volts.

The power pins are as follows:
- Vin. The input voltage to the board when it's using an external power source (as opposed to 5 volts from the USB connection or other regulated power source). You can supply voltage through this pin, or, if supplying voltage via the power jack, access it through this pin.


Vin is the same as the external positive power input.

  • 2
    Vin is the same as the external positive power input.; not exactly. The jack also has a diode, to protect against reverse polarity. Vin doesn't have this diode. But other than that, they are the same. – Gerben May 18 '17 at 15:18
  • Gerben you are correct. Thanks for your clarification. – sa_leinad May 18 '17 at 15:19
  • 1
    A standard 1N4004 or 1N4007 can be found almost anywhere that sells electronics. – sa_leinad Jan 7 '20 at 0:23
  • 1
    Alternatively, you could get an adaptor that allows you plug straight into the barrel jack - hence removing the need for the diode. For example: jaycar.com.au/2-1mm-dc-plug-with-screw-terminals/p/PA3711 – sa_leinad Jan 7 '20 at 0:27
  • 1
    @misterbee The diode is only used for protection against reverse polarity. Connect it up the correct way and you won't need the diode. However, connect it up the wrong way and you could get smoke. – sa_leinad Jan 7 '20 at 0:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.