I'm looking to have an ESP-32 control 12v loads through PWM. Mostly it will be LED lights around 5W each, but I'd like something that can do up to 10W. Looking for PWM control to have dimming options. Ideally it would be able to be controlled with 3.3v to have less components, but if I had to I could use 5v I'm sure.
I was thinking perhaps an N-channel FET would be best from what I've been reading, but I have no experience with them as of yet and thought I'd ask if anybody has any particular suggestions for which one to use.
I'm open to even using something other than a FET if you think there is a better option.
The reason I want to use an ESP-32 is for the ESP-NOW wireless protocol for remote control.
An N-channel is an appropriate choice. You will want to make sure that you use a logic level one, since will help avoid the need to use another transistor to drive the FET. But be aware that 'logic level' is a somewhat nebulous term. Most will be fine with 5V, but the lower the voltage the more issues.
Do some searching for posts by LarryD on this forum and you will find nice circuits too.
You will want to do some form of current limiting for the LEDs.
There are plenty of LED dimmer circuits out there.
Probably a better choice for the OP. However they need to limit the Vgs applied as the max is stated at 12V. I know these parts are conservatively rated but with voltage spikes an other variations running at Max is a recipe for future device failure.
I should probably clarify a little bit. Not all of the loads will be LEDs, and what will be LEDs will be premade modules that will likely what have current limiting resistors and made to run off 12v.
I'm basically looking to create something to control accessories on a truck, so the voltage could get around.14v.
Here's the scenario;
In vehicle: touch screen controller with ESP-32 for controls, only hooked to power, using ESP-NOW to send commands to one or multiple modules around the vehicle.
Around the truck, under the hood; perhaps in a light bar; under the bed to control things mounted in the bed or on the back; maybe even something on a trailer being towed to have wireless lighting: this will be an ESP-32 with one or more i2c PWM chips that could receive commands and potentially control (maybe even dim) lights as well as other loads that will just be ON/OFF.
The i2c chip i had in mind is the PCA9685, which would then control a FET which would control the loads.
Ok, I hate to ask, but I'm a dummy when it comes to transistors, not much experience with them.
After looking up Vgs, I can see that it means gate to source voltage, but what exactly does this mean in term a dummy can understand? LOL. I know that transistors can switch things, and I have very basic knowledge of what the difference between PNP and NPN is, that's pretty much it. Is there a good "guide for dummies" as to what all the different specs mean?
That was very helpful, a good lesson. Thank you, @LarryD!
So, as to the comment about not going over 12v by @JohnRob, if I'm controlling the MOSFET directly from the ESP-32, or an i2c chip, and using an N-Channel MOSFET... The voltage passing through would be the vehicles positive voltage, and the gate being ground activated, this would mean that the Vgs would be too high while the vehicle is running. Am I understanding that correctly?
So, ideally, a P-Channel MOSFET would be better, but would require the ground of the device being controlled to go all the way back to the controller and not be a chassis ground. Unless, of course, I make sure the Vgs rating is high enough for any vehicle voltage.
My apologies. In my tired state, I was not thinking and got the N and P backwards. I meant to say it the other way around. On a P channel triggered by negative on the gate, the vehicles voltage would determing the Vgs, correct? So, an N channel (with the ground going to the controller and not chassis) would be idea.
The idea in my head seemed right, the words just came out wrong. LOL