Mr.G said:
Hi
Is there anything fundamentally wrong with this drive circuit:
http://tinypic.com/view.php?pic=2d6pi5d&s=5
You have the mosfet source and drain reversed. And make sure the
mosfet has a gate threshold such that it is always fully turned on
with the available gate voltage.
You might want to put a resistor in series with the mosfet gate, to
protect the micro against any spikes transmitted back through the
mosfet gate capacitance, or in case of mosfet failure.
You don't say what speed you want to switch the mosfet at - if it is
fairly fast (>10kHz say) you may need to review the gate drive current
vs gate switching charge.
I assume there are supply decoupling capacitors you havn't shown? You
need at least one between the regulator "GND" and "In" and one between
the micro Vcc and Vss. Maybe many more depending on the micro.
I would also put transient suppressors and maybe some series impedance
on the input and outputs - the details depend on the environment and
what you are switching.