1
\$\begingroup\$

I am putting together a small system to control an externally powered circuit from my RPi to drive a LED. see image below

The circuit can be separated into 2 parts:

  • One side is used to power the Pi. I go from the battery (12V, 6A) to a buck converter that I use to drop the voltage to 5V. This seems to work fine. I was able to set current limitation and it would be effective.
  • The second part is used to control the LED. Here I go from the battery to a first MOSFET controller ( MOSFET Tube Driver Module For Arduino SCM ARM Raspberry Pi with a IRF520 ) plugged to the ground on the Pi and to GPIO16. The circuit continues then to a buck converter that limits the voltage to 3V and that should normally limit the current to 750mA. It goes then to a second MOSFET controller that is used to control the LED status. This MOSFET board is connected to the ground on the Pi and to GPIO21.

Now my problem is with the 2nd system. If instead of a LED I attach a multimeter and try to read the current I get the following:

  • MOSFET 1 and 2 are off --> current 0mA
  • MOSFET 1 on, 2 off --> current 0mA
  • MOSFET 2 on, 1 off --> current 0mA
  • MOSFET 1 and 2 on --> the current starts low (0.25A) and continuously rises. After 1 min it is around 0.5A and keeps going. I am new to electronics so I didn't know if it could damage the Pi. Therefore I did not leave it on to see where is stops climbing.

If I switch off the 2 MOSFETS for a while and then switch on again, the current values has dropped a bit and rises again.

My questions are:

  • What could potentially limit my current in the 2nd system at 250mA when I start up?
  • This current increase looks like something is charging somewhere. Could some part of the current go into the Pi? Or is my reading wrong by closing the system with my multimeter?
  • How can I prevent this unwanted behavior and have the wished 750mA right away when I switch on the 2 mosfets

Thank you in advance

\$\endgroup\$
  • \$\begingroup\$ We have no idea what your circuit is doing, at least a schematic would be necessary. \$\endgroup\$ – PlasmaHH Jul 7 '17 at 9:17
  • \$\begingroup\$ Nope, your circuit is undecipherable. Draw a circuit that makes sense to the problem you are having and don't include cartoons of superfuous componentry. \$\endgroup\$ – Andy aka Jul 7 '17 at 11:58
2
\$\begingroup\$

IRF520 needs 10V on the gate to fully turn on. Your Pi outputs 3.3V, which is insufficient. The FET goes in linear mode. As it heats up, its threshold voltage gets lower, which explains the increase in current.

Solution: use a FET which can be driven from 3V3, or use a level translator to make a 12V drive voltage from your 3V3 control signal.

Also, it is unclear why you use two FETs. Since they switch low-side (in the GND wire) and you connected both FET board's grounds together, at least one of them is useless.

EDIT:

Your new module has a MOSFET driver which accepts logic input, so it should work. I don't know what the "VCC" pin on the input side should be connected to, though.

Also you still can't use 2 low side FETs in series, as the GND pin on both boards need to be tied together for the control signal to work, so the first MOSFET can't interrupt the GND of the second one...

Much simpler to ditch the MOSFETs and use a 700mA LED driver with an ENABLE input. Just pulse the ENABLE input high or low to control the LED.

\$\endgroup\$
  • \$\begingroup\$ Thank you a lot for your answer. I understand better. So if I have something like that with a 3.3/5V input, would it work? I use 2 FETs because the current limiting feature on my buck converter only works if the buck is not loaded when it switches on. \$\endgroup\$ – EvilGarfield Jul 7 '17 at 11:03
  • \$\begingroup\$ see edit for better solution \$\endgroup\$ – peufeu Jul 7 '17 at 11:34
1
\$\begingroup\$

Check the Vgs(on) value for the IRF520, my hunch is that 5V will not really do it. You need 4V up it for 0.25mA typical and to fully turn it on you need 10V on the gate...

Basically, you chose the wrong mosfet, try a 'logic level' one instead you will be much happier.

The slow rise is due to the mosfet properties shifting as it heats up.

\$\endgroup\$

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.