Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

GPIO Current Source & Sink Capability

Current Sink; GPIO Current Source

Best Answer hanzibal, 21 April 2013 - 01:25 PM

Yes, you can use all digital pins to drive led and while specs says each pin can source a maximum of 25mA, you can only pull ~125mA in total. This means the sum of all the LEDs must not exceed 125mA. Pulling 20mA through a LED will make it shine very brightly, I'd say 5 to 8 mA would suffice. 5mA per LED would yield a total of 70mA which would keep you on the safe side. If you need more power, you can have an NPN transistor control each LED. The transistor will only consume a little power in order to turn ON by letting just a little current flow in though the base via a resistor, while the collector-emitter current can be much higher as can voltage, say 30V or more depending on the type of transistor. You could use an external power source to make sure you don't exceed the max ~500mA of your USB port (assuming that is your power source today). Let me know if you need help on how to wire up your transistors. Go to the full post


  • Please log in to reply
3 replies to this topic

#1 xmakina

xmakina

    Member

  • Members
  • PipPip
  • 13 posts

Posted 20 April 2013 - 09:41 AM

Hi,

 

I am new to netduino and MCUs and I just got a new NETDUINO PLUS 2.

 

Can I use all 14 digital I/O's as output , driving 14 LEDS ? That's about 14 * 20mA = 280 mA. I read from the spec that Idd for the microcontroller should just be about 93 mA at ambient temp. Is it possible to drive all 14 I/O's for running LED's without exceeding the Idd in spec sheet ?

 

I was thinking about instead of current sourcing, I will just apply 5V external power supply and just make the 14 I/O pins sink or ground the LEDs.Will that make any difference ?

 

If not, what is the best solution to drive all 14 LEDs simultaneously using the NDP2 ?

 

Please help.

 

Thanks.



#2 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 21 April 2013 - 01:25 PM   Best Answer

Yes, you can use all digital pins to drive led and while specs says each pin can source a maximum of 25mA, you can only pull ~125mA in total. This means the sum of all the LEDs must not exceed 125mA. Pulling 20mA through a LED will make it shine very brightly, I'd say 5 to 8 mA would suffice. 5mA per LED would yield a total of 70mA which would keep you on the safe side. If you need more power, you can have an NPN transistor control each LED. The transistor will only consume a little power in order to turn ON by letting just a little current flow in though the base via a resistor, while the collector-emitter current can be much higher as can voltage, say 30V or more depending on the type of transistor. You could use an external power source to make sure you don't exceed the max ~500mA of your USB port (assuming that is your power source today). Let me know if you need help on how to wire up your transistors.

#3 NooM

NooM

    Advanced Member

  • Members
  • PipPipPip
  • 490 posts
  • LocationAustria

Posted 21 April 2013 - 04:40 PM

http://blog.codeblac...ransistors.aspx

 

thats the way to go.

 

you can drive as many as you want with max power this way.

 

(well, it shouldnt exceed the onboard regulators power output)

 

 

on that blog are more pages, all contain usefull information.



#4 xmakina

xmakina

    Member

  • Members
  • PipPip
  • 13 posts

Posted 22 April 2013 - 01:44 PM

Thank you so much Hanzibal. You just confirmed what was running on my mind. I needed a second opinion badly as I didn't want to brink my newly-bought NDP2. 

 

THanks so much to you too Noom. Nice link there. Very informative.







Also tagged with one or more of these keywords: Current Sink;, GPIO, Current Source

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.