PSOC 5LP Schematic and firmware design support to drive Segment LEDs

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Mano
Level 1
Level 1
5 replies posted First reply posted First question asked

Hi,

Could you please help me with Schematic and firmware design support to drive Segment LEDs using the PSoC 5LP chip?
We have to drive a seven-digit seven segment display with various segment current from 16-bit serial input.

Regards,

Mari 

 

0 Likes
1 Solution

Mari,

Absolute Max specs should be avoided if at all possible.   They are there to define the point of destruction for the IC.

The spec you should be using for the GPIO is:

Len_CONSULTRON_1-1611235159073.png

The pin can drive more current but not without potential thermal damage.   Based on the spec above, a GPIO pin has the equivalent of a series resistance of:

  • Source mode => 0.6V/4mA = 150 ohms.  Pd = 2.4mW
  • Sink mode => 0.6V/8mA = 75 ohms. Pd = 1.2mW

There are design restriction of total pin current draw in App Notes.

Additionally drawing more current than specified will also drop more voltage across the driver than the 0.6V.   It can be done but more cautions must be observed to allow the IC for a reliable long life.

There are some links to App notes available regarding GPIO and SIO pin use.

 

 

Len
"Engineering is an Art. The Art of Compromise."

View solution in original post

0 Likes
12 Replies

Hi Len,
Thank you for your response. Could you please provide the LED segment component datasheet and also I am looking to use this chip to drive segment LED. If you have any example schematic to drive segment LED with this chip, kindly provide a reference to that document?
Regards,
Mari

0 Likes

Mari,

You can use the PSoC5 to drive LED commons up to 8mA per segment as long as the commons are in current sink configuration.

Above 8mA, you need external drivers.

Are you asking about an LED segment datasheet or LED driver datasheet.

Len
"Engineering is an Art. The Art of Compromise."
0 Likes

Thank you, Len. We are looking to drive around 10 to 20 mA. Could you please recommend any application note to drive the display with an external driver?

 

0 Likes

Mari,

 ... We are looking to drive around 10 to 20 mA. 


I'm assuming you're talking about 20mA per LED segment.   Is this correct?

Also, what is the forward voltage drop of the LED?   Red LEDs tend to be about 1.8V, Green and Yellow LEDs about 2.0V and Blue and White about 2.9V.

Len

Len
"Engineering is an Art. The Art of Compromise."
0 Likes

 

Thank you for your support. Yes, 20mA per LED segment.
Forward voltage drop is 2.0V (Typ) and 2.6V (Max)
As per the PSoC 5LP family datasheet, The GPIO current is between -30mA to 41mA. We thought it could support a max current of 41mA to drive the segment LEDs.

0 Likes

Mari,


... As per the PSoC 5LP family datasheet, The GPIO current is between -30mA to 41mA. We thought it could support a max current of 41mA to drive the segment LEDs.

I don't believe this is true.   I think you are mis-reading the datasheet.  

GPIO pins are capable of 4mA source and 8mA sink.

SIO pins (port 12) are capable of 4mA source and 25mA sink.

Here's a TopDesign schematic that uses PNP and NPN transistors to achieve the 20mA per LED segment.

Len_CONSULTRON_0-1611206240806.png

Each PNP driving the segments needs to drive 20mA for each segment.   Since only one common is one at a time, only 20mA is needed.

The resistors connected to the collector with a value of "Rclim" need to be adjusted based on the current to drive as a limiter.

Vdd = 5V.
Vfd of LED = 2.0V
Ifd = 20mA
Therefore Rclim = (Vdd - Vfd)/Ifd  = (5V-2V)/20mA = 150 ohms.

The NPN needs to supports potentially ALL of the LED segments for the digits.

Therefore if ALL 8 segments are on then the NPN needs to sink 8 * 20mA = 160mA.

Len
"Engineering is an Art. The Art of Compromise."
0 Likes

We referred to Absolute Maximum Ratings DC Specifications.

Mano_0-1611207509410.png

We thought that the PSoC 5LP could help us to control the brightness level of each digit independently.

Thank you for all your support. 

0 Likes

Mari,

Absolute Max specs should be avoided if at all possible.   They are there to define the point of destruction for the IC.

The spec you should be using for the GPIO is:

Len_CONSULTRON_1-1611235159073.png

The pin can drive more current but not without potential thermal damage.   Based on the spec above, a GPIO pin has the equivalent of a series resistance of:

  • Source mode => 0.6V/4mA = 150 ohms.  Pd = 2.4mW
  • Sink mode => 0.6V/8mA = 75 ohms. Pd = 1.2mW

There are design restriction of total pin current draw in App Notes.

Additionally drawing more current than specified will also drop more voltage across the driver than the 0.6V.   It can be done but more cautions must be observed to allow the IC for a reliable long life.

There are some links to App notes available regarding GPIO and SIO pin use.

 

 

Len
"Engineering is an Art. The Art of Compromise."
0 Likes

As per AN72382, GPIO pins can be shorted together to allow more current to be sourced. Can we short 3 or 4 GPIO to drive 12 to 16 mA?

Mano_0-1611252952079.png

 

 

0 Likes

Mari,

As per AN72382, GPIO pins can be shorted together to allow more current to be sourced. Can we short 3 or 4 GPIO to drive 12 to 16 mA?

 


The short answer: Yes.

The long answer:

I recommend you tie pins together that they are on the same port.  (See the Contiguous selection.)

Len_CONSULTRON_0-1611322711941.png

Len_CONSULTRON_1-1611323128002.png

The PSoC5 has no heat pad or slug on the bottom of the IC.   Therefore the part maximum power dissipation is about 300mW to 330mW.

There is a maximum current draw for GPIO on the same VDDIO domain.   

In a previous post, I listed that the common current sink requirement for your design (each LED segment at 20mA and each digit has 8 segments potentially on at the same time), is 160mA.  This means you would need to tie 20 GPIO pins together (8mA x 20) or 7 SIO pins (25mA x 7) for EACH common you need to support.   Since you are planning 7 LED digits, this becomes unpractical very quickly.

The same principal applies to source currents for the segment drive.   You only need 5 pins tied together for each segment (5 * 4mA = 20mA).  The worst-case condition is if you have all segments driven at the same time (the display = "8.")  This will require 160mA total source current with a 0.6V drop internally.

If you plan to tie the pins together to sink 8mA per pin then the potential power dissipation is (20 * 8mA * 0.6V) 96mW per digit's common.    If you source the segment drive internally, then your total power dissipation is (5 * 8 * 4mA * 0.6V) 96mW for each digit.

Therefore the total power dissipation for each digit in matrix driven mode is 96mW + 96mW = 192mW  out of 300mW for the part.

I don't know your desired application.

Today most designs no longer use segment LEDs.   It has been commonly replaced with a LCD displays (the PSoC5 has LCD drive support) with a backlight LED if needed.   The cost of LCD displays have steadily gone down in price due to improvements in the manufacturing processes.

Len
"Engineering is an Art. The Art of Compromise."
0 Likes

Mari,

Cypress provides a 8-digit 7-segment LED display example project.

You can access this when you select "File/New/Project..."

Len_CONSULTRON_0-1611150358422.png

 

Len
"Engineering is an Art. The Art of Compromise."
0 Likes