Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Interfacing MCU with bicolor LED

Status
Not open for further replies.

nanorobot

Newbie level 6
Newbie level 6
Joined
Jun 16, 2012
Messages
13
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Visit site
Activity points
1,406
Hi

I want to drive a two lead bicolor LED with a MCU. The circuit ( simplified
schematic led.JPG) runs at 3V, max. sourced/sunk current by output pins is 25 mA . My problem is low driving current. Theoretically, Output High Voltage on MCU pin equals supply voltage 3V, Output Low Voltage equals ground voltage 0V. In reality, the higher sourced/sunk current, the lower the Output High Voltage and the higher the Output Low Voltage. That way the voltage across the resistor and LED in series gets lower and so the forward current through the LED (decreasing the brightness). Is there any typical way of increasig the current through the LED? Well, if it were one LED I'd use transistor but in this situation I'm not sure how to deal with it. Thank you for any help.
 

For bicolor red/green LED, in this circuit, ideally I could have 15 mA current for R = 87 ohm (in case of a red LED and Vled=1.7V). But all I can get is about 2.5 mA. Why? Because when I set one pin HIGH and the other LOW, the HIGH state is not 3V and the LOW state is not 0V (in my case HIGH is about 2.6V and LOW is about 0.4) These values depend on sunk/sourced current on pins. What can I do if I want higher current in my circuit.
 

I'm using PIC16LF1503 and PIC16LF1517 (voltage range of the MCUs is 1.8V - 3.6V), for both the problem is the same . Both ports are set as digital outputs. The software is not definately a problem. The problem is hardware. The attached figure (from PIC16LF1517 datasheet page 332 **broken link removed**) depicts dependance between Voltage when a pin is in LOW output state and Current sourced by that pin.
mcu.JPG. Well, it is normal behavior for microcontrollers. What I want to know is what external circuit/IC I should add to increase the current. Something like low/high side drivers in led displays projects.
 

I would suggest adding some small 244 type driver to the PIC outputs you're using and use that to drive the LED. From your chart the PIC isn't really capable of driving enough current. I suspect the typical current is 4mA per pin. Using the 244 type driver you'll get perhaps 24-48mA depending on the device.
This might work if you can get one, it has 50mA source/sink current.


Quick search on digikey...
https://www.digikey.com/product-detail/en/74LVC126APW,118/568-7665-1-ND/2753809

$0.44 isn't too bad, shipping will probably cost you more ;-)
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top