Go Down

Topic: PWM problems when controlling a MOSFET gate (Read 78 times) previous topic - next topic


I am working on a project that involves using an Arduino to control the brightness of an led. The LED takes in 12v to power, so I am using an external power source and connecting it to the ground via a MOSFET controlled by my Arduino Uno.

This issue: no matter what component I try to power, it "flashes" whenever the analog pin output is an intermediary value (i.e. not 0 or 255). Interestingly, the brick in my power source has an LED that will start to flash the same way.

I am confused why the lights work perfectly on full power but have this flashing issue when PWM techniques are used. I attached a diagram of my setup, so any help would be appreciated.

Thank you!

Also, here is the datasheet for the transistor: https://www.arduino.cc/documents/datasheets/MosfetTransistor.pdf

PS I come from an all software background, so I would appreciate hardware explanations in layman terms


Jan 13, 2018, 09:53 pm Last Edit: Jan 13, 2018, 09:57 pm by larryd

You need the correct MOS FET, that one needs 10 volts to turn on.

Make sure your load does not need current limiting.
Use a logic level transistor.
Use a gate resistor.
See the Q3 circuit.

Click on the image for full resolution.

No technical PMs.
The last thing you did is where you should start looking.


Jan 13, 2018, 10:16 pm Last Edit: Jan 13, 2018, 10:18 pm by jremington
That particular MOSFET won't work properly with Arduino, because it requires 10V on the gate to turn it on fully. Use a logic level MOSFET, like this one.

Always use a current limiting resistor between the output pin and the gate, 150 Ohms minimum.

If the power supply LED is blinking, that may mean that the supply is overloaded.


Jan 13, 2018, 10:16 pm Last Edit: Jan 13, 2018, 10:19 pm by raschemmel
Sparkfun has logic level mosfets.

WHAT "analog pin output" ?
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

Go Up