MOSFET circuit, pull-down resistor not pulling down

Thread Starter

Nicholas

Joined Mar 24, 2005
139
Hi guys

I have my circuit that has a micro controller connected to the MOSFET circuit below. It is driving a coil at
something like 30-40V. Now, when I turn on the controller, it has 4.9V on the output pin right away, energizing
the coil right away.

I just want to be confirmed, this is a problem with the controller, not the circuit, right? My software sets all pins to
off, but that would take time in the real world...leaving the coil on until the device has booted and started the software,
thus turning the pins off (and coil off)

Any advice?

Nicholas

mosfet2.JPG
 
Sounds like a problem with the microcontroller.
On power up its outputs should be tri state.
Its not until you setup the port does it become input or output.
Set the port low first then set the direction of the port.
 

Roderick Young

Joined Feb 22, 2015
408
The circuit looks good. If you were using a PIC, this would be perfect, as the processor powers up with IO pins floating by default. If you're seeing the coil energized at power-up, make sure you have the right connections on your n-channel MOSFET, the IRL540. Looking from the top, the pins go left to right, Gate, Drain, Source.
 

Dodgydave

Joined Jun 22, 2012
11,285
Are you sure its the micro thats booting up with the output high, what happens if you short the G/S terminals on the fet and then power up, does the relay operate then?


As before, which micro is it?
 
Top