4
\$\begingroup\$

I have solar charge controller PCB in which I am using MOSFET IRF9540. I am using ATmega328P as microcontroller to read the voltages of battery and solar and to enable/disable the charging process. Below is the schematic:

Enter image description here

Now in the above schematic, I am giving solar voltage at X1 connector. R1 and R2 are used as a voltage divider and its output is going to an analog pin of the microcontroller. CHARGEPIN is a GPIO of the microcontroller. So when this GPIO is high, it turns on the transistor, which then turn on the MOSFET and solar is then connected to the battery to start the charging process. When the GPIO is low, solar and battery are disconnected. I am also using a serial port to monitor the voltages.

Now what's happening is when I have not connected the solar pins and only connected the battery pins. At that time, charging is off (because we do not have a solar voltage), so CHARGEPIN is low thus, the MOSFET will be OFF. So solar and battery should be disconnected. But somehow battery voltage is going to solar voltage because when I read the voltage at the MBR2045 diode, it shows the battery voltage, which should not show because the MOSFET is OFF. Why is the MOSFET acting like this?

\$\endgroup\$
4
  • 1
    \$\begingroup\$ Do measurements of the voltages of all terminals of the FET, then you will see why it does what it does. \$\endgroup\$
    – PlasmaHH
    Commented Feb 9, 2017 at 12:41
  • \$\begingroup\$ @PlasmaHH At drain, it is 12.32 and at gate and source it is 11.7. Can you explain more. Thanks \$\endgroup\$
    – S Andrew
    Commented Feb 9, 2017 at 12:43
  • \$\begingroup\$ Hm, I just saw you are using a PMOS... Anyways, have you considered the effect of the body diode? \$\endgroup\$
    – PlasmaHH
    Commented Feb 9, 2017 at 12:47
  • 1
    \$\begingroup\$ Look up "body diode". \$\endgroup\$ Commented Feb 9, 2017 at 12:47

2 Answers 2

6
\$\begingroup\$

MOSFETs have an internal diode that conducts in the reverse direction thus you see battery voltage on the diode node: -

enter image description here

Note the diode above. There is usually a diode junction from both source and drain to the substrate in both P and N channel MOSFETs. Here's the P channel MOSFET: -

enter image description here

What usually happens is that the manufacturer connects the "body" terminal to the source terminal so that one of the diodes can never be forward biased and this leaves the other diode able to be forward biased only when drain rises higher than source (P channel MOSFET).

\$\endgroup\$
1
  • 2
    \$\begingroup\$ This is why I insist that when appropriate, MOSFET symbols get drawn with the body diode present! It's an immediate reminder / clue into behavior of your circuit. \$\endgroup\$ Commented Feb 9, 2017 at 18:59
4
\$\begingroup\$

The P-channel power MOSFET has a body diode that points from drain to source.

The diode is actually the PN junction between the drain contact and the substrate. The substrate needs to be held at a higher voltage than all of the other terminals in order to keep those PN junctions from conducting. In a MOS IC the P-channel substrate is normally connected directly to Vdd. However, in nearly all discrete MOSFETs, the substrate is not brought out as a separate terminal; instead, it is bonded directly to the source terminal, which is expected to be the most positive terminal of the device.

If you want bidirectional isolation, you'll have to use two MOSFETs in a back-to-back arrangement. Driving the gates can be tricky; things are simplified somewhat if you connect the sources together — then the gates share a common reference and can also be connected together.

\$\endgroup\$

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.