3

I am trying to get information about the transistor on the Arduino Mega board below:

enter image description here

It says "340P" on the transistor. I want be able to know which model transition is this so that I can check its documentation. It also want to know what it is driving or its function on the Arduino board.

1 Answer 1

8

It's a P-channel MOSFET. It's job is to act as a "dropless" diode.

The principle is this:

  • MOSFETs have a built-in diode across them in reverse bias (an effect of the chemistry)
  • The P-channel MOSFET is connected backwards in series with the incoming USB power.
  • The internal diode conducts power when there is +5V in to the USB to give power to the board.
  • The diode imposes a voltage drop, but there is enough voltage still to run the circuitry.
  • An op-amp compares the incoming voltage from the barrel jack (divided by 2) against 3.3V. If it's less than 3.3V (6.6V incoming) or not there at all, it turns on the P-channel MOSFET
  • The MOSFET then short circuits the internal diode removing the voltage drop, giving the full 5V from the USB to the rest of the board.

schematic

simulate this circuit – Schematic created using CircuitLab

Note: diode shown is internal to the MOSFET.

The MOSFET is designated T2 in the schematic, and is a FDN340P on the reference design, although the actual model is not that critical, as long as the threshold voltage is above about -3V and it can happily handle 500mA or more.

2
  • "The diode imposes a voltage drop" I noticed this too and was curios on what's going on. Thanks for your clear answer
    – Programmer
    Commented Nov 23, 2018 at 23:48
  • 2
    As a curiosity: if you connect 5V on the Vin, it'll be injecting current back to the USB (mainly if it's powered down). Or if you accidentally short 3v3 to 5v, threshold voltage jumps over 10V. (the first one was caused by 5V voltage regulator instead of 9V. Second one by some short on shield and 9V on Vin)
    – KIIV
    Commented Nov 24, 2018 at 9:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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