1

I'm trying to control a 12V power supply with a MOSFET using PWM on the Raspberry Pi. The intention is to fade the 12V power which will be connected to a 12V LED strip (the LEDs will fade on and off).

I have my design configured as shown:

Raspberry Pi MOSFET Diagram

This is the MOSFET that I'm using: https://www.adafruit.com/product/355

I have a python loop running that fades the PWM from 100 to 0 at .5 Hz on pin 11. When configured as shown, the voltmeter reads correctly: the voltage fades between 12V and 0V, and back again. However, when I replace the volt meter with my strip LEDs, they don't light up.

What am I missing with my design? When don't the LEDs turn on if the voltmeter registers a voltage change?

  • Comments are not for extended discussion; this conversation has been moved to chat. – Ghanima Oct 18 '16 at 15:53
  • I hope you haven't actually connected you MOSFET the way you have shown. – Milliways Oct 18 '16 at 22:37
  • @Milliways I suspect the OP connected it right, but assumed the pin order is the same on symbol and package, resulting in wrong schematic. – Dmitry Grigoryev Oct 19 '16 at 14:24
1

Connect the voltmeter in parallel with the LED strip, then you'll know what the problem is:

  1. The voltmeter never reaches 12V, not even nearly: something is wrong with your MOSFET setup. Either you didn't identify/connect the pins correctly, or it's broken.

  2. The voltmeter goes from 0 to (almost) 12V: something is wrong with the LED strip. Either you connected it in reverse, or it doesn't like to be PWM'd, or simply broken.

Most 12V LED lights I've seen start to visibly glow somewhere between 7V and 9V. So anything below 7V is likely to be case 1, and anything above 9V is likely to be case 2. Of course, if you have some data about your LED strip in particular, this estimation is irrelevant.

0

There seems to be a lot confusion about the pins. You should try it this way:

schematic

simulate this circuit – Schematic created using CircuitLab

  • Talking about confusion please check that circuit again. – Ghanima Oct 19 '16 at 14:08
  • Yep, looks like you swapped drain and source here. Source should be negative (relative to drain) in N-channel MOSFETs. – Dmitry Grigoryev Oct 19 '16 at 14:22
  • Meh. Was too quick and did not double check. – kwasmich Oct 19 '16 at 14:33
  • It's good you've corrected yourself but it is hard for me (a non-expert with transistors...) to see what difference it is going to make putting the load on the opposite side. When the gate is shut, there's high impedence, so no substantial current anywhere. When the gate is open, there is current flowing through the transistor (i.e., it is the same as if it were just wire). If there's a reason you think this is different in a significant way from what the OP already has it might be nice if you explain it ;) – goldilocks Oct 19 '16 at 16:13

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.