Netduino home hardware projects downloads community

Jump to content


Photo

Analog Pins for drive LEDs


  • Please log in to reply
5 replies to this topic

#1 Novice Alex

Novice Alex

    Advanced Member

  • Members
  • PipPipPip
  • 59 posts

Posted 26 July 2012 - 02:54 AM

Hi Guys, As I have exhausted all the Digital Pins for all my pulse counter and communication, now only left with the Analog pins untouched. May I know is there any way I can use the Analog pins for driving a LED (for machine status) purpose? also can it be configure to use to detect button press input? Thanks in advance.

#2 Nobby

Nobby

    Advanced Member

  • Members
  • PipPipPip
  • 70 posts

Posted 26 July 2012 - 04:04 AM

Hi Guys,

As I have exhausted all the Digital Pins for all my pulse counter and communication, now only left with the Analog pins untouched. May I know is there any way I can use the Analog pins for driving a LED (for machine status) purpose? also can it be configure to use to detect button press input?

Thanks in advance.


I have recently used a few of the analog pins for similar reasons as yours. I can confirm you can use them as TTL output pins and almost certainly as TTL inputs.

Just ensure the maximum forward current through each LED doesn't exceed 25mA(maximum pin current).

#3 Nevyn

Nevyn

    Advanced Member

  • Members
  • PipPipPip
  • 877 posts
  • LocationNorth Yorkshire, UK

Posted 26 July 2012 - 06:05 AM

Just ensure the maximum forward current through each LED doesn't exceed 25mA(maximum pin current).


You might want to double check the limits per pin on the Netduino Plus page as 25mA looks to be too large a current draw.

Regards,
Mark

To be or not to be = 0xFF

 

Blogging about Netduino, .NET, STM8S and STM32 and generally waffling on about life


#4 Stefan

Stefan

    Moderator

  • Members
  • PipPipPip
  • 1961 posts
  • LocationBreda, the Netherlands

Posted 26 July 2012 - 08:07 AM

Hi,

The A0 to A5 pins can be used as GPIO with interrupt capabilities, just like the D0 to D13 pins.
As Nevyn pointed out though, the max. current is important:

max current: 8 mA per pin
digital pins 2, 3, 7: 16 mA per pin
analog pins 0-3: 2 mA per pin


"Fact that I'm a moderator doesn't make me an expert in things." Stefan, the eternal newb!
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs

#5 Novice Alex

Novice Alex

    Advanced Member

  • Members
  • PipPipPip
  • 59 posts

Posted 27 July 2012 - 10:22 AM

Hi Guys, thanks for your sharing. Now I managed to light up my LEDs as per normal by setting the Analog pins as output, but as mentioned by Stefan, the output current is limited, so it may not be too bright. Anyway is a good step.

#6 Nevyn

Nevyn

    Advanced Member

  • Members
  • PipPipPip
  • 877 posts
  • LocationNorth Yorkshire, UK

Posted 27 July 2012 - 11:07 AM

thanks for your sharing. Now I managed to light up my LEDs as per normal by setting the Analog pins as output, but as mentioned by Stefan, the output current is limited, so it may not be too bright. Anyway is a good step.

Hook the output from the Netduino to a transistor and use that to deliver more power and you should get a brighter LED.

Regards,
Mark

To be or not to be = 0xFF

 

Blogging about Netduino, .NET, STM8S and STM32 and generally waffling on about life





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

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