[chbot] noob mosfet/transistor question

Volker Kuhlmann list57 at top.geek.nz
Mon May 24 08:23:57 BST 2021

On Mon 24 May 2021 10:58:03 NZST +1200, andrew dean wrote:

> Short version: What transistor/mosfet / resistor would you use to
> switch 9-13v 100-300ma from an arduino?

You need to decide on the switching circuit first, then choose suitable
parts. High-side switching is slightly trickier, but not much for the
numbers you give, and will save you headaches down the track.

You can get away with a very simple switching stage provided you switch
the arduino outputs to open collector, i.e. switch the internal pull-ups
off. Watch the arduino initialisation sequence so the pull-ups aren't
accidentally switched on for the length of a glitch.

You can use a PNP (*with* arduino output to base resistor!) or a MOSFET
(output to gate resistor only needed if the max Vgs is < 15V).

Always use a base-emitter or gate-source resistor to ensure the
transistor stays switched off unless switched on (that's what I dislike
about the stackexchange suggestion posted by someone else). With open
collector driving, a gate-source resistor is a must because floating
gates will give you no end of headaches!

So, PNP: 2 resistors, with a suitable ratio to sink sufficient base
current for switching the load. Irrespective of load current, you loose
about 0.4-0.6V in the transistor.

p-MOSFET: gate-source resistor essential, output-gate resistor required
for Vgs < 15V; choose a suitable resistor ratio. p-channel choice is not
as big, Rds-on and price is higher, but you do get some pretty low

Choose a transistor for 1-2A minimum, more depending on the likelyhood
of shorts on the switched 12V line and for how long you want the circuit
to last before the transistor burns out, which also depends on the max
current of your supply. At 300mA the transistor heat loss is pretty
negligible though.

An IC does all the work for you, and the L293's overtemperature
protection makes it short-proof and kinda indestructible. You need to
buy some though, but you'd need to buy the right transistors too.


Volker Kuhlmann
http://volker.top.geek.nz/	Please do not CC list postings to me.

More information about the Chchrobotics mailing list