All kinds of problems with a simple DC light controller and PWM

I'm trying to build a DC light controller and I'm having all kinds of problems. My setup is a 12 volt car battery and a headlight, I have the CSD18535KCS MOSFET on the low side and an Arduino send a PWM signal directly to the gate.

IF I send pure 5V DC (from Vcc on the Arduino) to the gate the light of course it works and the temp stays around 100 deg F--i have a good size heat sink. If i send a PWM (32,250 Hz) let's just say a 50% duty cycle to the gate, the light dims, but the MOSFET gets super hot after a few minutes.

I have an LCD read out hooked to the Arduino to display the duty cycle and it goes crazy once PWM is turned on. If I disconnect the PWM from the gate, the LCD works fine. LCD not in the attached wiring diagram

Do I need to somehow filter the PWM to send pure DC to the gate? Is my frequency too high?

No clue...any thoughts?

Your dwg doesn't show the FET Gnd and Arduino Gnd tied together.
Is that because they really aren't?

You need a resistor from the gate to the ground 10 k should work to cool it back down.
And tie the grounds if there not like Runaway Pancake ask.

I am not an expert by any means but i think you forgot pull down resistor on the mosfet gate.

Switching losses.

You have choosen a mosfet with a rather high gate capacitance (~6nF).
And you want the Arduino pin (without current limiting) to charge/discharge that cap 64,500 times per second.

Charging/discharging a cap takes time, and during that time the mosfet is not fully "off" or "on", resulting in heat.

The 10k resistor mentioned is a bleed resistor that is only functional during Arduino's bootup.
You need to add a 220ohm (>125ohm) current limiting resistor between Arduino pin and gate.
That protects the pin, but could heat up the mosfet even more.
Drop that PWM frequency to the default ~500hz, or even 200hz as I told you before.
Leo..

I was thinking he meant 32.250 as 32 1/4 hz more as he was guessing it.

My drawing did have some stuff missing, there is a 10K pull down on the gate, and the Arduino ground and the mosfet ground are tied together.

The text says 32,250hz, but 32Khz is written on the diagram.
Not sure what it is now.

A too low frequency could also give problems.
A colder fillament has a lower resistance.
Leo..

Wawa:
A colder fillament has a lower resistance.

I tend to agree. Simply turning it on and leaving it on results one filament warming cycle, but repeated "On's" means it's hitting that low-ohms transition really hard, a real workout.
Depending on how much current we're talking about, like a car headlight, that could be a big deal.
Where are you getting this nominal 32kc from?

It's not a "logic-level" FET, either.
See page 1 --

Going by the graph, 5V is on the knee. What's acceptable depends on the current (ID )

The frequency (from the Arduino literature is PWM frequency of 31372.55 Hz I figured 32K would be good enough for discussion. And I really want to avoid low frequencies due to the hum i'll get.

The current draw in 10amps. I'm now wondering of the light bulb (which is a coil of wire) is creating some inductive load and sending spikes back to the MOSFET--I guess a diode across the bulb may fix that.

KrisKasprzak:
The frequency (from the Arduino literature is PWM frequency of 31372.55 Hz

Unless you're using some PWM library, the "stock" PWM freq on pins 5 & 6 is 976 Hz, and 490 Hz on 3, 9, 10, 11.

When you spread your problems for the same project across different threads, you will have to fully inform posters again.

http://forum.arduino.cc/index.php?topic=351034

Leo..

Hi,
Did you read post #9?
Your MOSFET is not a logic input MOSFET.

5V that you are applying to the gate is no turning the MOSFET completely ON.
There is some resistance between Drain and Source when you apply 5V.

This means that there is a voltage drop across the MOSFET and hence energy (heat) is dissipated in the MOSFET.

I would suggest you fix this before trying any other solution.

Tom.... :slight_smile: