Calculate RL resistor for LEDs diodes
12-29-2013, 07:56 PM (This post was last modified: 12-29-2013 08:49 PM by ArielPalazzesi.)
Post: #1
 ArielPalazzesi Member Posts: 90 Joined: Dec 2013
Calculate RL resistor for LEDs diodes
Hello!

I leave the link to a small program I wrote to calculate the current limiting resistor for a given number of LED diodes in series.

http://www.ucontrol.com.ar/forosmf/tutor.../#msg82727

It's in Spanish, but if you think you need someone can translate it to English language.
I hope you find it useful.

Code:
 ﻿EXPORT resistencia_led() BEGIN //Declaro variables: local RL, VLED, NLED, ILED,VCC,POT; local lista1, lista2; lista1 := {"Vcc:", "VLED:", "ILED:","nLED:"}; lista2 := {"Tensión de la fuente (V)","Tensión del LED (V)","Corriente del LED (A)","Número de LEDs conectados en serie"}; INPUT ({VCC,VLED, ILED,NLED},"Cálculo resistencia limitadora (Ohms)",lista1, lista2); RL := (VCC-VLED*NLED)/ILED; IF RL<0 THEN   MSGBOX("El número de LEDs excede la tensión de la fuente."); ELSE   POT := (ILED^2)*RL;   RL := ROUND(RL,0);   POT := ROUND(POT,1);   print (RL);   print (POT);   MSGBOX("La resistencia limitadora debe ser de "+ RL +" Ohm(s) y al menos " + POT+ " Watt(s)."); END; END;

Greetings.
 « Next Oldest | Next Newest »

 Messages In This Thread Calculate RL resistor for LEDs diodes - ArielPalazzesi - 12-29-2013 07:56 PM

User(s) browsing this thread: 1 Guest(s)