300 mA from a microcontroller pin

I have a 14-pin PIC microcontroller, the 16F684 to be exact. Each pin can be either 5 V, 0 V or high impedance, however they can only source or sink 25 mA, but I need 300 mA (both sourced and sunk). Currently, I'm using a setup consisting of an NPN and a PNP transistor in order to provide more current, like so:

formatting link
driverbeforegj7.jpg (the microcontroller is on the far left).

I've heard of things called "drivers" that can be used to boost the current, whilst still being able to provide the three states of 5 V, 0 V and high impedance. I've searched the web and come across things like the ULN2003 the MAX15025, but I'm having difficulty finding what I want. It seems that the ones that can provide enough current can only source current, while the ones that can source and sink tend not to be able to provide enough current.

Can someone please suggest a driver chip so that I can effectively get 300 mA out of my microcontroller pins? Remember that I need the three states.

--
Tomás Ó hÉilidhe
Reply to
Tomás Ó hÉilidhe
Loading thread data ...

Try searching for "half-bridge driver". These chips include both a high-side driver and a low-side driver and are designed so that you cannot inadvertently connect the +5V to ground. You will probably need two pins for the control---one to enable the driver and the other to set the output to +5V or to 0V.

Mark Borgerson

Reply to
Mark Borgerson

What are you driving that you need 3-state 300 mA outputs ? Depending on the application, there may be alternative solutions.

Reply to
Arlet Ottens

Arlet Ottens:

A bi-colour LED that has only two pins (they're in parallel facing in different directions). If the microcontroller pin is high, then it'll be red. If low, it'll be green. If high impedance, it'll be off.

The maximum current rating for the LED package is 30 mA... except I'm flashing a display and will only have them lit one sixteenth of the time, so I'm gonna put a burst of 300 mA through them. (I've seen experiments where people flashed an LED putting an entire amp through it, so I don't think 300 mA will be a problem for a duty cycle of one sixteenth).

--
Tomás Ó hÉilidhe
Reply to
Tomás Ó hÉilidhe

A quick google search using "300ma 3 state driver" gives a link to an Intersil device for the second hit.

formatting link

A little overkill on peak, it provides 2A peak, but only 100mA continuous so it depends on what you are driving.

What are you driving?

Robert

Reply to
Robert Adsett

How about this one ?

formatting link

It seems to do what you want, if you don't mind the SPI interface (which can probably be done in software through regular I/O pins if you must)

Reply to
Arlet Ottens

So this would be overkill :)

formatting link

500 mA Continuous, 12A peak.

Although it strikes me a discrete solution would be cheaper and not much more complex , an h bridge with a quartet of sot-23 fets, add a couple of comparators and a bias circuit on the output if you insist on using a single pin. I think that could work.

Robert

Reply to
Robert Adsett

Been there, done that. I have a full set of tri-state boosters in my furnace, for driving the remote thermostats:

formatting link

Download, for example, zone1.sch and view it with gschem. I used a pair of comparators to detect the three states, and they drive mosfets to replicate the state with the boosted current drive. They also do voltage level shifting at the same time. The output is fed through a shaper (the four passives) for managing impedance, i2c pullups, etc.

I think I ended up using 10k instead of 100k on the sense line, though, for improved switching speed. You'll have to fiddle with all that according to the speed you need.

Reply to
DJ Delorie

Thanks for all you driver chip suggestions. Unfortunately I'm a virgin when it comes to reading datasheets so I'll just make a list of the ones you select and go over them with my lecturers.

If there's any more suggestions, keep them coming.

Thanks everyone for your help :D

--
Tomás Ó hÉilidhe
Reply to
Tomás Ó hÉilidhe

Tomás Ó hÉilidhe:

That "select" shuda been "suggest"... I muddle my words a little when I'm tired...

--
Tomás Ó hÉilidhe
Reply to
Tomás Ó hÉilidhe

Ixys IXDD404 dual FET driver with enables

Reply to
Eric Smith

There you go. Arlet said there might be alternate solutions and there is one. You don't need the tri-state control. You can drive the LED forward with one pin high and the other low, backward by switching the two and off by bringing them both high or both low. Can't be much easier than that! You will still need two pins from your controller, but you don't need a complex driver circuit. Just a pair of FETs, 1 P channel and 1 N channel on each leg of the LED. If you are driving from a high enough voltage that the N channel FET will be fully off (or using a low threshold part), you don't have to worry too much about shoot through. To eliminate it, you can put your current limiting resistors in between the drains of the two FETs and connect the load between the drains of the N channel FETs. That's pretty simple, four FETs and two resistors... about $0.40 per LED. You can even get a pair of FETs in an SC-70 package, only 2 mm square. I'm not sure SC-70 FETs are rated for 300 ma though. You may have to go to the SOT-23 package at 3 mm square...

Reply to
rickman

How many LEDs do you have, and when you say 'flash' what on/off times are you giving each LED ? Where you have multiple leds and lower duty cycles, that usually means multiplex display, and that can dictate asymetric drive capability on each side of the LEDs.

-jg

Reply to
Jim Granville

I assumed the OP wanted to put the 16 LEDs in a 4x4 grid, and control them with 8 pins on the PIC (4 row and 4 column), which would require tri-state control.

However, using discrete components is probably the easiest solution (assuming there's space on the board).

Reply to
Arlet Ottens

"Tomás Ó hÉilidhe" schreef in bericht news:24H3j.23523$ snipped-for-privacy@news.indigo.ie...

Could you use RS485 (or RS422) line drivers? These are tri-statable.

Antoon

Reply to
Antoon

Arlet Ottens schrieb:

If you don't mind a bit of idle current, here's a simple way that worked for me (YMMV, of course), using 3 resistors,

2 NPN and 2 PNP transistors:

| | |/ | /-----K | | |\ |/ --- +----K 10k| | | |\ | | | | --- | | | --- | input -----+ 220| | +---- output | | | | --- --- | 10k| | | | | | | |/ --- +----K | |/ |\ \-----K | |\ | | |

HTH.

Reply to
Ph. Marek

rickman:

Thanks for your suggestion, but the second pin of the LED package will go to a shift register. I'll try explain:

I have a grid of LED's, 7 x 6. In each column, the second leg of each LED package will be common, and they will go to a pin on a shift register. In each row, the first leg of each LED package will be common, and it will come from the microcontroller. I shift a 1 across the shift register to determine which column will light. The shift register pins provide either 5 V or 0 V, but I have a transistor setup whereby they provide either 5 V or high impedance.

I'll post a picture of the relevant part of the circuit now in a few minutes.

--
Tomás Ó hÉilidhe
Reply to
Tomás Ó hÉilidhe

Tomás Ó hÉilidhe:

formatting link

As you can see, I've pins coming from microcontroller going to the shift register.

--
Tomás Ó hÉilidhe
Reply to
Tomás Ó hÉilidhe

... snip ...

And there is no driver dissipation power problem if saturating drivers are used. Typical sat voltage is about 0.3 V., which, at

300 mA, means about 0.1 watts.
--
 Chuck F (cbfalconer at maineline dot net)
   
   Try the download section.
Reply to
CBFalconer

Are you assuming that you can control this LED with just one pin? The only way I can see to do that is like

P1.1---- LED --- R1 ---- 2.5V

Then alternating P1.1 between 0 and 5V would change the direction of current flow. However, selecting R1 and getting a stable 2.5V current source/sink is another set of problems.

You don't really need a tri-state driver, then. If both LED pins are at the same level (either high or low), the LED will be off.

If total power dissipation isn't a concern, your circuit could simplify to:

+5 +5 | | R1 R2 | | |---- LED ----| | | P1.1---T1 P1.2---T2 | | | | gnd gnd

T1 and T2 are logic-level N-channel mosfets controlled by your MPU pins.

R1 and R2 are current-limiting resistors---and can be different to balance the apparent brightness of the LEDs

When P1.1 and P1.2 are low, T1 and T2 are off and the LED is off.

When P1.1 is high and P1.2 is low, current flows through R2 and the LED to ground. Current also flows through R1 to ground---wasted power, essentially. Assume that this is the Green direction of the LED.

When P1.2 is high and P1.1 is low, current flows through R1 and the LED to ground. Current also flows through R2 to ground---wasted power, essentially. Assume that this is the RED direction of the LED.

When both P1.1 and P1.2 are high, the LED is off and current flow through R1 and R2 keeps your circuit board warm! ;-)

If you don't want to warm the PC board as much, you can replace R1 and R2 with a combination of a P-Channel mosfet and a resistor.

+5 +5 | | P1.1---T3 P1.2---T4 | | R1 R2 | | |---- LED ----| | | P1.1---T1 P1.2---T2 | | | | gnd gnd

You can probably find small packages with two or more integrated transistors in the Digi-Key catalog. You will have to do a bit of research on gate voltages and current handling, though.

Mark Borgerson

Reply to
Mark Borgerson

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.