470Views9Replies

# How to control more positive current using microcontrollers? Answered

Most microcontrollers can directly control low current  at +5v. Using NPN transistors I can control higher currents, but now negative.

My question is: how to switch more positive current (>40mA) than my microcontroller can do directly?

The obvious idea is to cascade a PNP to a NPN transistor, but aren't there ICs ready-made for it? More or less like UNL2803A, but using Sziklai arrays instead.

What would otherwise be the "standard" way of doing it?

Tags:

## Discussions

My question was not clear, but I have eventually got it answered. I know there is no such a thing as "positive current", sorry about the terrible way of exposing the question.

Also, there were, in fact, two questions. The first one is about switching high currents and it has been answered: "MOSFET".

The other question comes, for example, from conversion TTL-RS232. How is it possible? I see circuits where a capacitor is used (I guess) to store negative charge "stolen" from the RS232 line, but what if we have two TTL devices running the same strategy?

I'm not getting your question.

There's current flow, and there is no current flow. But no such thing as "negative current." There is negative voltage and positive voltage, which help explain the direction current flows.

And are you simply concerned with the fact that simple BPJ transistors are inverting stages? Or is it a current source vs current sink question?

I.E., what are you trying to switch?

erm...positive and negative indicate the direction of current flow. One could as easily say there is no "negative voltage", since the potential difference can be measured as easily by reversing the voltmeter leads.

It's all referential.

I guess it depends on how you chose to define it. If current is flow, then the direction doesn't matter.

But yeah, mathematically, negative current is a useful construct. So you got me on that...

I'm not sure it's a useful concept for the OP here, though.

I understand where you're coming from and I agree from an academic pov...but as you've noted, mathematically, positive and negative simply determine direction for current flow and establishes a virtual common for voltages...

Honestly, I'm not even sure if he really wants anything to do with negative currents. the way I translated his query was ==> "How can I control large currents with a microcontroller?"

I'm hoping he clarifies the question, too...

Using PWM, you can use a fast SSR or power fet. Or you can use a power opamp for analog control.

For instance, I designed a 3.5A servo amp for an export test rig for KLM back in 2003 or 2004 that accepts a 0-5 or 0-10V input and outputs a -3.5--3.5A output using a +-15V source and a pair of back to back OPA544s (and a bunch of ancillary signal conditioning circuitry). Obviously, if you don't need 3 or 4 amps, you can use a lesser opamp...

In either case, you'll need to connect to the power supply (or another power supply) upstream of the micro controller, so as to avoid burning up the micro by trying to pass too much current thru it.

for simple switching of large currents, the standard way is to use a relay.

Try using a logic-level MOSFET.  Some devices are capable of switching 2 amps or more, all from a single 5V control voltage.  I find they are much easier to use than a BJT transistor, for switching applications.