Car headlight control with Transistor

I am basically making an auto light switch for my car using an attiny85, 5v regulator, photoresistor and a N type irfz44n transistor. I understand most of it besides the transistor part. The whole G,D,S pins messes me up. I've scaled it down this project to turning on an LED. Heres my problem,

I first wired the transistor like this Gate to 3v , Drain to pin on Arduino uno (for testing purposes), and source to positive LED lead, other went to ground. This worked but even when i would take the Gate pin out(the 3v) it still turned on and off, i was puzzled.

I then tried Gate to pin on Arduino, Drain to 3v to LED+ lead and source to ground. This also worked but worked in reverse, when there was a voltage in gate the LED turned off.

I then tried Gate to Arduino pin, Drain to 3v and Source to LED+ and this worked as it should.

I need to know which way is correct for the transistor because i plan to scale it up to 12 for headlights and I'm not sure which way is correct.

Hi, try gate to Arduino, drain to 0v and source to led-. Led+ to 5V via series resistor.

N-type fets are normally used as "low side" switches which means they sit between the "load" and ground/0V.


Hi, connect the LED like the attached file.

Tom.... :slight_smile: