Seriell ansteuerbarer 16-fach LED-Treiber mit Power

Habe ein seriell ansteuerbaren µController mit 16-fach LED-Kontroller von Texas Instrument aus einem OPENSOURCE Projekt auf ein Hutschienenmodul geroutet.
Kann man natürlich auch in ein Gehäuse basteln.

16-fach ergibt 4 Module mit R B G und Weiss oder z.B. 5 LED RGB -Leisten.

Der Unterschied besteht aus einer Treiberstufe mit integrierten Stromquellenschaltung für LED’s mit wenig Strombedarf.

Diese kann man, bei Bedarf von höheren Strömem (direkt auf die LogicFets), weglassen oder auch mit dem TLC allein arbeiten.

Dann werden die LogicFets fast nicht mehr warm und man könnte Treiberströme von mehren Ampere fließen lassen.

Diese elektronischen Module sind adressierbar/kaskadierbar, wenn Intersesse besteht route ich den seriellen TTL-Anschluss raus, sodass man Den nur verbinden braucht.

Meine erste Version war mit der SMD-Variante, Diese ist mit DIL-Bausteinen.

XBEE Freaks können das Modul auch über Funk, Netzwerkfreaks über den Adapter von ELV, betreiben.

Meine geringen PHP-Kenntnisse haben das hier erzeugt:

  1. Variable vom Webfront abholen:
<?
//  Wert von Webfront holen, die Variable hat dann dieses Aktionsscript.
// Achtung, ich ändere nur die eine Variable, man kann Die auch gleich zum Comport schicken, ist hier geremt.

SetValue($IPS_VARIABLE, $IPS_VALUE);

switch($IPS_VALUE)                                // select
{
    case 10:
//  COMPort_SendText(17266 /*[Serial Port]*/,  //chr(0x12).chr(0x01).chr(0x00).chr($Wert1).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(//0x7D).chr(0x7D).chr(0x7D).chr(0x7D));
SetValueInteger("29405", $IPS_VALUE);
      break;
     case 20:
// COMPort_SendText(17266 /*[Serial Port]*/,  //chr(0x12).chr(0x01).chr(0x00).chr($Wert1).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(//0x7D).chr(0x7D).chr(0x7D).chr(0x7D));
SetValueInteger("29405", $IPS_VALUE);
        break;
     case 30:
// COMPort_SendText(17266 /*[Serial Port]*/,  //chr(0x12).chr(0x01).chr(0x00).chr($Wert1).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(//0x7D).chr(0x7D).chr(0x7D).chr(0x7D));
SetValueInteger("29405", $IPS_VALUE);
        break;
     case 40:
// COMPort_SendText(17266 /*[Serial Port]*/,  //chr(0x12).chr(0x01).chr(0x00).chr($Wert1).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(//0x7D).chr(0x7D).chr(0x7D).chr(0x7D));
SetValueInteger("29405", $IPS_VALUE);
        break;
     case 50:
// COMPort_SendText(17266 /*[Serial Port]*/,  //chr(0x12).chr(0x01).chr(0x00).chr($Wert1).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(//0x7D).chr(0x7D).chr(0x7D).chr(0x7D));
SetValueInteger("29405", $IPS_VALUE);
        break;
     case 60:
// COMPort_SendText(17266 /*[Serial Port]*/,  //chr(0x12).chr(0x01).chr(0x00).chr($Wert1).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(//0x7D).chr(0x7D).chr(0x7D).chr(0x7D));
SetValueInteger("29405", $IPS_VALUE);
        break;
     case 70:
// COMPort_SendText(17266 /*[Serial Port]*/,  //chr(0x12).chr(0x01).chr(0x00).chr($Wert1).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(//0x7D).chr(0x7D).chr(0x7D).chr(0x7D));
SetValueInteger("29405", $IPS_VALUE);
        break;
     case 80:
// COMPort_SendText(17266 /*[Serial Port]*/,  //chr(0x12).chr(0x01).chr(0x00).chr($Wert1).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(//0x7D).chr(0x7D).chr(0x7D).chr(0x7D));
SetValueInteger("29405", $IPS_VALUE);
        break;
     case 90:
// COMPort_SendText(17266 /*[Serial Port]*/,  //chr(0x12).chr(0x01).chr(0x00).chr($Wert1).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(//0x7D).chr(0x7D).chr(0x7D).chr(0x7D));
SetValueInteger("29405", $IPS_VALUE);
        break;
     case 100:
// COMPort_SendText(17266 /*[Serial Port]*/,  //chr(0x12).chr(0x01).chr(0x00).chr($Wert1).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(//0x7D).chr(0x7D).chr(0x7D).chr(0x7D));
SetValueInteger("29405", $IPS_VALUE);
        break;
}

?>

Beispiel zum Comport senden, getriggert per Variablenupdate:

<?
// Bei Ausführung werden alle 16 PWM-Kanäle mit den (Hex)-Werten beschrieben
// 1.         chr-Zeichen = Anzahl der Bytes
// 2.         chr-Zeichen = Modul-ID ( Jedes Modul könnte 3 Units haben, im EEprom an Adr 00 steht die Unit-ID-Nr.)
// 3.         chr-Zeichen = Unit Nr. ( in Adr 01 steht die Unit-Nr. wobei 0 = 1. Unit, 1 = 2. Unit und 2 = 3. Unit ist)
// 4. bis 18. chr-Zeichen = Parameter 0 bis 255 aber Hex in chr() verpackt
// Test ohne Variablen:
//COMPort_SendText(17266,  chr(0x12).chr(0x01).chr(0x00).chr(0xFE).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D));
// Test:
//COMPort_SendText(17266,  chr(0x12).chr(0x01).chr(0x00).chr(0xFF).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D));

// der geübte PHP-Programmierer verpackt die Werte in Variablen....

//  z.B. der erste Wert per Variable:
$Wert1=GetValueInteger("29405");
COMPort_SendText(17266 /*[Serial Port]*/,  //chr(0x12).chr(0x01).chr(0x00).chr($Wert1).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(//0x7D).chr(0x7D).chr(0x7D).chr(0x7D));
//Ein Test hat ergeben, dass es besser ist das 2-mal zu senden
COMPort_SendText(17266 /*[Serial Port]*/,  //chr(0x12).chr(0x01).chr(0x00).chr($Wert1).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(0x7D).chr(//0x7D).chr(0x7D).chr(0x7D).chr(0x7D));


?>

Targetfiles per PM
Gruß Helmut

Nachtrag: Da der µC-Code verfügbar ist, könnte man die Aulösung auch auf die 12 Bit (4095) erhöhen, geht aber auch so gut.
Da der TLC von fast 1 Mhz gespeist wird, flackert da nix!

Und hier eine Betrachtung über das Empfinden des menschlichem Auge und PWM von LED

Ach Helmut, muß das sein ?

Jetzt plage ich mich schon seit Wochen mit der Entscheidung Chromoflex vs. DMX und nun kommst auch noch du mit einem netten Bastelvorschlag um die Ecke. Und nu ?

Das Ding, oder evtl. anderen Selbstbau, mit Xbee zu verheiraten ist ja wirklich eine gute Idee von dir.
Ach wenn ich doch nur mehr Zeit hätte…

gruß
bb

nee, nee, die Funkgeschichte ist auch nur ein Wunsch von mir.

Aber hirschbrat hat was mit Jeelab und dem Ardinio gemacht, kommt zu deiner Entscheidungsfindung noch dazu:p.

Und wenn das IPSymcon - Team ihr Funkmodul fertig hat?

Was machst du dann? :rolleyes:

Gruß Helmut

Edit: hab’ was drin an festen Programmen, weiß aber noch nicht wieviele, weil ich da doch noch ein 433MHz-Funkmodul reinbingen will und das braucht auch noch ROM/RAM.

Versuche gerade feste Programme in den Rom-Bereich zu speichern, flexible, selbst erstellte Programme scheiden aus, weil der RAM-Speicher des Chips zu klein ist.
Was macht man da rein, welche Lichtspiele hat man da so?

Kann mir jemand, der so etwas verwendet, mal seine RGB- oder RGBW - Werte verraten?

Steht dann so (beispielhaft) im ROM-Speicher und soll dann per ser. Befehl aufgerufen werden können:

const PRG1 as byte[16] = (131,128,131,130,131,130,131,131,130,131,130,131,125,255,255,125)
  const PRG2 as byte[16] = (131,128,131,130,131,130,131,131,130,131,130,131,125,255,255,125)
  const PRG3 as byte[16] = (131,128,131,130,131,130,131,131,130,131,130,131,125,255,255,125)
  const PRG4 as byte[16] = (131,128,131,130,131,130,131,131,130,131,130,131,125,255,255,125)
    const PRG5 as byte[16] = (131,128,131,130,131,130,131,131,130,131,130,131,125,255,255,125)
  const PRG6 as byte[16] = (131,128,131,130,131,130,131,131,130,131,130,131,125,255,255,125)
  const PRG7 as byte[16] = (131,128,131,130,131,130,131,131,130,131,130,131,125,255,255,125)
  const PRG8 as byte[16] = (131,128,131,130,131,130,131,131,130,131,130,131,125,255,255,125)
     const PRG9 as byte[16] = (131,128,131,130,131,130,131,131,130,131,130,131,125,255,255,125)
  const PRG10 as byte[16] = (131,128,131,130,131,130,131,131,130,131,130,131,125,255,255,125)
  const PRG11 as byte[16] = (131,128,131,130,131,130,131,131,130,131,130,131,125,255,255,125)
  const PRG12 as byte[16] = (131,128,131,130,131,130,131,131,130,131,130,131,125,255,255,125)
   const PRG13 as byte[16] = (131,128,131,130,131,130,131,131,130,131,130,131,125,255,255,125)
  const PRG14 as byte[16] = (131,128,131,130,131,130,131,131,130,131,130,131,125,255,255,125)
  const PRG15 as byte[16] = (131,128,131,130,131,130,131,131,130,131,130,131,125,255,255,125)
  const PRG16 as byte[16] = (131,128,131,130,131,130,131,131,130,131,130,131,125,255,255,125)
    const PRG17 as byte[16] = (131,128,131,130,131,130,131,131,130,131,130,131,125,255,255,125)
  const PRG18 as byte[16] = (131,128,131,130,131,130,131,131,130,131,130,131,125,255,255,125)
  const PRG19 as byte[16] = (131,128,131,130,131,130,131,131,130,131,130,131,125,255,255,125)
  const PRG20 as byte[16] = (131,128,131,130,131,130,131,131,130,131,130,131,125,255,255,125)
     const PRG21 as byte[16] = (131,128,131,130,131,130,131,131,130,131,130,131,125,255,255,125)
  const PRG22 as byte[16] = (131,128,131,130,131,130,131,131,130,131,130,131,125,255,255,125)
  const PRG23 as byte[16] = (131,128,131,130,131,130,131,131,130,131,130,131,125,255,255,125)
  const PRG24 as byte[16] = (131,128,131,130,131,130,131,131,130,131,130,131,125,255,255,125)
    const PRG25 as byte[16] = (131,128,131,130,131,130,131,131,130,131,130,131,125,255,255,125)
  const PRG26 as byte[16] = (131,128,131,130,131,130,131,131,130,131,130,131,125,255,255,125)
  const PRG27 as byte[16] = (131,128,131,130,131,130,131,131,130,131,130,131,125,255,255,125)
  const PRG28 as byte[16] = (131,128,131,130,131,130,131,131,130,131,130,131,125,255,255,125)
    const PRG29 as byte[16] = (131,128,131,130,131,130,131,131,130,131,130,131,125,255,255,125)
  const PRG30 as byte[16] = (131,128,131,130,131,130,131,131,130,131,130,131,125,255,255,125)
  const PRG31 as byte[16] = (131,128,131,130,131,130,131,131,130,131,130,131,125,255,255,125)
  const PRG32 as byte[16] = (131,128,131,130,131,130,131,131,130,131,130,131,125,255,255,125)
     const PRG33 as byte[16] = (131,128,131,130,131,130,131,131,130,131,130,131,125,255,255,125)
  const PRG34 as byte[16] = (131,128,131,130,131,130,131,131,130,131,130,131,125,255,255,125)
  const PRG35 as byte[16] = (131,128,131,130,131,130,131,131,130,131,130,131,125,255,255,125)
  const PRG36 as byte[16] = (131,128,131,130,131,130,131,131,130,131,130,131,125,255,255,125)
   const PRG37 as byte[16] = (131,128,131,130,131,130,131,131,130,131,130,131,125,255,255,125)
  const PRG38 as byte[16] = (131,128,131,130,131,130,131,131,130,131,130,131,125,255,255,125)
  const PRG39 as byte[16] = (131,128,131,130,131,130,131,131,130,131,130,131,125,255,255,125)
  const PRG40 as byte[16] = (131,128,131,130,131,130,131,131,130,131,130,131,125,255,255,125)
    const PRG41 as byte[16] = (131,128,131,130,131,130,131,131,130,131,130,131,125,255,255,125)
  const PRG42 as byte[16] = (131,128,131,130,131,130,131,131,130,131,130,131,125,255,255,125)
  const PRG43 as byte[16] = (131,128,131,130,131,130,131,131,130,131,130,131,125,255,255,125)
  const PRG44 as byte[16] = (131,128,131,130,131,130,131,131,130,131,130,131,125,255,255,125)
     const PRG45 as byte[16] = (131,128,131,130,131,130,131,131,130,131,130,131,125,255,255,125)
  const PRG46 as byte[16] = (131,128,131,130,131,130,131,131,130,131,130,131,125,255,255,125)
  const PRG47 as byte[16] = (131,128,131,130,131,130,131,131,130,131,130,131,125,255,255,125)
  const PRG48 as byte[16] = (131,128,131,130,131,130,131,131,130,131,130,131,125,255,255,125)
    const PR49 as byte[16] = (131,128,131,130,131,130,131,131,130,131,130,131,125,255,255,125)
  const PRG50 as byte[16] = (131,128,131,130,131,130,131,131,130,131,130,131,125,255,255,125)
  const PRG51 as byte[16] = (131,128,131,130,131,130,131,131,130,131,130,131,125,255,255,125)
  const PRG52 as byte[16] = (131,128,131,130,131,130,131,131,130,131,130,131,125,255,255,125)
    const PRG53 as byte[16] = (131,128,131,130,131,130,131,131,130,131,130,131,125,255,255,125)
  const PRG54 as byte[16] = (131,128,131,130,131,130,131,131,130,131,130,131,125,255,255,125)
  const PRG55 as byte[16] = (131,128,131,130,131,130,131,131,130,131,130,131,125,255,255,125)
  const PRG56 as byte[16] = (131,128,131,130,131,130,131,131,130,131,130,131,125,255,255,125)
     const PRG57 as byte[16] = (131,128,131,130,131,130,131,131,130,131,130,131,125,255,255,125)
  const PRG58 as byte[16] = (131,128,131,130,131,130,131,131,130,131,130,131,125,255,255,125)
  const PRG59 as byte[16] = (131,128,131,130,131,130,131,131,130,131,130,131,125,255,255,125)
  const PRG60 as byte[16] = (131,128,131,130,131,130,131,131,130,131,130,131,125,255,255,125)
   const PRG61 as byte[16] = (131,128,131,130,131,130,131,131,130,131,130,131,125,255,255,125)
  const PRG62 as byte[16] = (131,128,131,130,131,130,131,131,130,131,130,131,125,255,255,125)
  const PRG63 as byte[16] = (131,128,131,130,131,130,131,131,130,131,130,131,125,255,255,125)
  const PRG64 as byte[16] = (131,128,131,130,131,130,131,131,130,131,130,131,125,255,255,125)
    const PRG65 as byte[16] = (131,128,131,130,131,130,131,131,130,131,130,131,125,255,255,125)
  const PRG66 as byte[16] = (131,128,131,130,131,130,131,131,130,131,130,131,125,255,255,125)
  const PRG67 as byte[16] = (131,128,131,130,131,130,131,131,130,131,130,131,125,255,255,125)
  const PRG68 as byte[16] = (131,128,131,130,131,130,131,131,130,131,130,131,125,255,255,125)
     const PRG69 as byte[16] = (131,128,131,130,131,130,131,131,130,131,130,131,125,255,255,125)
  const PRG70 as byte[16] = (131,128,131,130,131,130,131,131,130,131,130,131,125,255,255,125)
  const PRG71 as byte[16] = (131,128,131,130,131,130,131,131,130,131,130,131,125,255,255,125)
  const PRG72 as byte[16] = (131,128,131,130,131,130,131,131,130,131,130,131,125,255,255,125)

Für Ardunio-Freunde gibt es auch allerlei mit dem TLC-Chip, guuggst du und älter:

Noch was für PIC-Controller in „C“

Bilder mit RGB_LED’s

Hab’ das nicht mit XBEE gemacht, hatte noch ein 433MHz-serielles Funkmodul von sureelectronic liegen, aber … es hat jetzt auch Funk, wer’s denn will.
Bild vom Layout im ersten Tread.
Diese Platine ist nicht ausprobiert, weil ich es auf meiner Jetzigen von Hand nachgerüstet habe.

Gruß Helmut