Controlling Small Currents With a
Microcontroller
- What do we do when we wish to control circuits which
require more current than is available at the output port. (Refer
to microcontroller spec sheet) This is often enough current to
light up a few LEDs and may not be enough for that.
- Here is a circuit which will switch up to about 200 mA with a
supply voltage up to about 60 VDC.
- The microcontroller output is connected to the gate of the
transistor (at B5). The 2N7000 transistor acts as a switch which
is on when the gate voltage is high and off when the gate voltage
is grounded.
- Pull Down Resistor
- It is a bad idea to leave the gate on any mosfet
unconnected. Stray static electricity charge may be induced or
conducted onto the gate and destroy the mosfet. The 100k
resistor shown (you can use up to about 1M) is called a pull
down resistor.
- Its function is to provide a ground to the gate, (never
leaving it disconnected) to prevent static from destroying
the mosfet
- and to shut off the mosfet during the microcontroller
start up when the logic level of the output pin may not be
defined.
- In addition it is recommended in some cases to put a series
resistor between B5 and the gate with a value of 1k to 10k, to
limit the current to the gate, particularly if this connection
is physically long. Ref Art of Electronics pp163-164.
- notes
- this could have a delay effect
due to gate capacitance
- solves some latching up
problems with inductive loads (later)
- Current can be increased to almost 10 A and Voltage to about
100 VDC (please don't experiment with anything above 40 VDC) by
substituting a IRL520N for the lower power 2N7000. Additional
increase can be achieved by adding heat sinks to the IRL520N or by
putting two or more transistors in parallel if you know what you
are doing. (You must lay out the circuit symmetrically)
- spec
sheet IRL520N
- Perhaps make a light dimmer using PWM
Technological Design
Home