Tuesday, September 21, 2021

LED Bars

Two LED bar graphs. You would think they would be much alike, but no.

On the left: LTA-1000Y (2017 Thailand.) On the right: FJB10Y.

The polarity is reversed. The LTA has anode on the side of the first pin. The FBJ has the cathode on the side of the first pin.

The obvious difference: face colour grey vs face colour black.

Light colour is similar, but brightness is much different. I need to use 470 ohm resistor with the LTA, and a 2K ohm resister with the FJB.

I did some extra research on another convention, for multi-coloured bars. Is RED on top or on the bottom of the bar?:

  • AVAGO HDSP-4832 has R/R/R/Y/Y/Y/Y/G/G/G with pin 1 as RED anode.
  • KingBright DC7G3HWA has G/G/G/G/G/G/G/R/R/R with pin 1 as GRN anode.
  • Fairchild MV5A164 (obsolete) has R/R/R/Y/Y/Y/Y/G/G/G with pin 1 as RED anode.
  • Fairchild MV5C164 (obsolete) has G/G/G/G/G/G/Y/Y/Y/R with pin 1 as GRN anode.
  • KYX B10BBGYR has B/G/G/G/G/Y/Y/Y/R/R with pin 1 as BLU anode.
  • MT1025CTF has G/G/G/G/G/Y/Y/Y/R/R with pin 1 as GRN anode. Pin 1 (unmarked) at side that has print.
  • SunLED XGMDKVGX10D has 10+10 bi-colour LEDs to interpolate between GRN to YLW to RED. To use them, 2k Ohm on R and 470 Ohm on G works well. Unfortunately, it is a common-cathode setup, which makes it useless for standard LED drivers.
  • F2510GHR has G/G/G/G/Y/Y/Y/Y/R/R with pin 1 as GRN cathode. It is easy to connect incorrectly. UNLIKE ALL OTHERS, THIS ONE HAS PRODUCT NUMBER PRINTED AT CATHODE SIDE (BUT STILL AT PIN1 SIDE.) Gorgeous colours though, with the yellow being more like amber, A nice looking green that is not very bright, though.
  • F2510HYG has R/R/R/R/Y/Y/Y/G/G/G with pin 1 as RED anode.

Some 8 segment led bars:

  • F2010RG is R/R/G/G/G/G/G/G with pin1 as red anode.
  • KYX-B08GOR is G/G/G/G/G/G/R/R with pin1 as grn anode.

Monday, September 20, 2021

Arduino

Last year, I did a project with the Arduino Micro kit. This is an ATmega32U4 microcontroller.

With it, I built a USB input device, with knobs, to tune my noise fields for Ring Miner.

In that project, I was simultaneously writing USB HID data, reading turn knobs, and writing OLED displays. In order to avoid stalls I had to modify the standard lib so I could skip writing USB data if there was no space available in the buffer, which is what happens when the PC is not reading the USB HID device.

I have recently picked up the Arduino again. This time to see if I can steer LED bar graphs with it. I noticed that out of the box, Ubuntu's arduino IDE will not run. You need to patch a library before it will run.

I have been learning on how to drive LEDs with a constant current shift register. I think I will end up using the TLC5917IN chip. Unfortunately, it is only 8 bit, I would have preferred 10 bits, but it was available in-stock, and affordable.

The simplicity of micro controllers is refreshing, in this age of super complexity. Close to the metal, and straightforward.

When coding for micro controllers, use static PROGMEM const qualifier for your data that you want to reside in ROM, instead of RAM.