Stalled Iris 16 - RGB Vandal Button

iFreilicht

FlexATX Authority
Original poster
Feb 28, 2015
3,243
2,361
freilite.com
Yeah, 32u4, at least I have some knowledge of it from custom keyboards. :)

Jup, that's an additional plus :) You could probably load TMK on it and use it as a fancy macro-button if you wanted :D

Maybe I'm misunderstanding what exactly you are looking for, but afaik the 32u4 pins 18/19 are SCL/SDA pins.

That is correct, but there is a very stupid design flaw in the pin layout of the 32u4 that prevents me from exposing the SCL pin externally.
The pin 18/PD0 can indeed be used for SCL, but also has one of the PWM outputs, more precisely OC0B. Now, the 32u4 does have 8 PWM channels and I need only 7 to control the internal LEDs, but for some inexplicable reason, pin 12/PB7 is mapped to two of those channels, so effectively I only have 7 PWM pins and I need all of them internally. Maybe there's a actually a good reason for this, I don't know.
 
  • Like
Reactions: Commissariat

iFreilicht

FlexATX Authority
Original poster
Feb 28, 2015
3,243
2,361
freilite.com
Update!

As we all know, not everyone has the same level of expertise when it comes to electronics, soldering or modding in general. So, for those of us who don't have crimping or soldering equipment at home or want to modify the pinout of the button easier, I threw a quick (2 days) breakout-board together:




So if you need a longer/shorter cable or want to do custom stuff with the pins, you only need this, a microHDMI to HDMI cable, an internal USB cable and ideally a short zip-tie for materials and a slot screwdriver and box cutter for tools.

To fix the breakout board to the case you can either use screws or double-sided tape, but the latter would either require tape about 2mm thick or cutting the protruding pins off with a flush-trim sidecutter:



In the form you see here, the whole assembly is 12(H)*32(D)*36(W)mm in size, but you can get the height down to about 10.2mm by cutting the pins off and I will get those terminal blocks and a bit of prototype board to see how close I can get the two together without compromising usability. For a e s t h e t i c s, I also made a case that could be 3D-printed:



It's just transparent here for illustrative purposes, it could be any other colour, but you can see where the zip-tied bundle of cables would exit. When connecting an RGB LED strip or stuff like that, you could probably stuff the cable connections into there as well to get a clean look.

The total dimensions with the case are 14(H)*34(D)*39(W), so most cases should have space for it somewhere. If a case supports a 15mm thick 2.5" drive, then this will fit with no problem whatsoever.

Of course, for the highest possible space efficiency, you'll have to modify a microHDMI cable yourself.

What do you think? Would you use this instead of making your own cable?
 

jtd871

SFF Guru
Jun 22, 2015
1,166
851
If I got one of the buttons, I'd probably just run it at stock. But I am sure somebody will come up with a killer mod/repurposing, so it would be nice to know that those of us without soldering skills had a relatively painless option to roll our own.
 

Phuncz

Lord of the Boards
SFFn Staff
May 9, 2015
5,921
4,947
Considering it's not mandatory for basic function (that's how I interpret it), it doesn't seem big at all. I love it !
 
  • Like
Reactions: ricochet

iFreilicht

FlexATX Authority
Original poster
Feb 28, 2015
3,243
2,361
freilite.com
Jup, correct. The button will come with a cable that is enough for all the basic stuff. In fact, it's not even mandatory for any functionality. You can just as well splice an HDMI cable open and attach all the connectors you want to that by either soldering or crimping. This breakout board is just for those who want to do neither of those things or if you want to test everything before actually soldering. Though in the latter case, you could also get a generic HDMI breakout board like this one:



Though for some reason those are either not for sale or ridiculously expensive.
 
  • Like
Reactions: PNP and ricochet

iFreilicht

FlexATX Authority
Original poster
Feb 28, 2015
3,243
2,361
freilite.com
[This discussion has been copied over from the RGB - An Epiphany mini-rant thread - |||]

Yeah I totally agree, subtlety is the name of the game here. I think mainboard manufacturers are starting to move toward that direction. In general, RGB LEDs just make it easier to choose exactly the colour you want and change that in the future without replacing LEDs, so they offer a lot of value over regular single-colour LEDs.

The second thing that has to change is the existence of a myriad of in-house, non-documented lighting protocols. ASUS, MSI, Cooler Master, Thermaltake, Corsair, Razer, Roccat, Alienware, everyone and their dog have custom software for controlling lighting on their products, and most of them integrate into obnoxiously large software suites that take minutes to load, slow down your boot time and look horrific in general.

Lighting in PC parts an peripherals has to be seen as a separate entity from the product itself. An advent of an open standard would greatly simplify this sort of thing, but I don't claim I would know how to implement such a thing, and it would be a lot of work to write a piece of simple software that retroactively included all or even just the most popular of RGB lit (cue air horns) product lines.
 
Last edited by a moderator:

EdZ

Virtual Realist
May 11, 2015
1,578
2,107
RGB lighting in and of itself isn't a problem, but more often than not it's bad lighting, and integrated into a bad product (a literal Shiny Thing distraction), so everything RGB gets tarred by the same brush.

If you're going to implement RGB lighting though, at the very least do it properly! Pick suitable LED primaries to get a good gamut, make sure your controller can mix with sufficient bit-depth for good selection fidelity and to avoid 'jumps' during fades, and don't do silly things like failing to account for perceptual luminance (e.g. ending up with 50 indistinguishable levels of 'too bright', and about 3 levels of useful dimming between 'off' and 'bright', because you used linear colour). If you can't achieve sRGB with a D65 white point, characterise your colourspace so it can be mapped correctly to match the on-screen picker (and to other lightsources).
 

iFreilicht

FlexATX Authority
Original poster
Feb 28, 2015
3,243
2,361
freilite.com
If you're going to implement RGB lighting though, at the very least do it properly! Pick suitable LED primaries to get a good gamut, make sure your controller can mix with sufficient bit-depth for good selection fidelity and to avoid 'jumps' during fades, and don't do silly things like failing to account for perceptual luminance (e.g. ending up with 50 indistinguishable levels of 'too bright', and about 3 levels of useful dimming between 'off' and 'bright', because you used linear colour). If you can't achieve sRGB with a D65 white point, characterise your colourspace so it can be mapped correctly to match the on-screen picker (and to other lightsources).

Clearly I still have to learn a little to make my button look good :D At least I know about logarithmic colour fading, so that's a start. You know any good resources I could use to read up on this?

And please manufacturers, figure out a way to do it wireless. I don't like a USB cable per device or proprietary systems thay you'll abandon in 6 months.

That could be quite a challenge though. You can't really expect every PC to have internal bluetooth connectivity.
 

|||

King of Cable Management
Sep 26, 2015
775
759
If you're going to implement RGB lighting though, at the very least do it properly! Pick suitable LED primaries to get a good gamut, make sure your controller can mix with sufficient bit-depth for good selection fidelity and to avoid 'jumps' during fades, and don't do silly things like failing to account for perceptual luminance (e.g. ending up with 50 indistinguishable levels of 'too bright', and about 3 levels of useful dimming between 'off' and 'bright', because you used linear colour). If you can't achieve sRGB with a D65 white point, characterise your colourspace so it can be mapped correctly to match the on-screen picker (and to other lightsources).

Clearly I still have to learn a little to make my button look good :D At least I know about logarithmic colour fading, so that's a start. You know any good resources I could use to read up on this?

@EdZ is talking about professional color calibration; same as is used on professional monitors used for color grading. It is becoming more relevant in the consumer space with High Dynamic Range displays that have some level of factory calibration. I have never seen this level of rigor being applied to vanity lighting. I would focus the design effort on finding high quality LED's and incorporate modularity of a Look-Up Table (LUT; found on professional monitors) so they can be adjusted later on.

Best case application of something like this would be to incorporate it into a quality assessment check of the LED's. Set up a rig with a generic colorimeter, insert the button into a custom shroud, and have an automated test that not only checks for the LEDs to be working, but simultaneously determines offsets for the LUT and applies them.

Personally, my highest priority for LEDs on components is having control. I'm good if they are just a single setting of "on" like this:



And please manufacturers, figure out a way to do it wireless. I don't like a USB cable per device or proprietary systems thay you'll abandon in 6 months.

That could be quite a challenge though. You can't really expect every PC to have internal bluetooth connectivity.

Daisy-chaining would probably be optimal for this...no need to high bandwidth or nano-second response rates.
 

iFreilicht

FlexATX Authority
Original poster
Feb 28, 2015
3,243
2,361
freilite.com
I would focus the design effort on finding high quality LED's and incorporate modularity of a Look-Up Table (LUT; found on professional monitors) so they can be adjusted later on.

What values would that LUT map? sRGB colours to PWM duty cycles of each LED?
 

|||

King of Cable Management
Sep 26, 2015
775
759
http://www.eizo.com/library/basics/maximum_display_colors/

Your use case may be slightly different from those of monitors. If you're directly controlling the levels by the PWM duty cycle, it may just be a modifier to the frequency. I'm not sure if this could be linear, logarithmic, or something completely else, as it was mentioned that our eyes perceive non-linearly, but the colorimeter may be linear or otherwise (this is strictly for color calibration, not intensity).

P.S. Let's take further discussion to your thread on the RGB Vandal button.
 
  • Like
Reactions: iFreilicht

EdZ

Virtual Realist
May 11, 2015
1,578
2,107
I'm not expecting professional levels of delta-error, but even just knowing the primaries of your LEDs and their voltage/current/PWM (depending on driving mode) response would be enough to get a rough map of the available colourspace. Once you have even a good estimate of the colourspace you can now translate between colourspaces which would greatly ease in matching multiple systems to the same colour.

The short (ish) version is:
The range of possible colours an RGB light can produce is determined by the 'primaries' (the colours of the R, G and B sources). You can think of that range as a 'volume', roughly cuboid, whose corners consist of: pure R, pure G, pure B, white (R G and B at max, AKA your 'white point') and black (R G and B at minimum). Put the black point at the 'bottom', the white point at the 'top', and that shape is the 'colourspace'.
If you imagine the most pure red possible, the most pure blue possible, and the most pure green possible, then you can make a space of all possible colours. This cannot be achieved in reality, because no physical object could produce these theoretically pure colours. We're mapping colour as perceived by the human eye, which doesn't directly correspond to a spectrograph of a given light source.
If you have different coloured primaries, then this cuboid will change shape and move about within that 'full' colourspace.
TV, cinema, desktop monitors, and HDR all have one or more specifically defined colourspaces they are expected to conform to. sRGB is the common one for desktop monitors though sometimes you'll find AdobeRGB, rec.709 for HDTV, DCI P3 for cinema, rec.2020 for UHD, rec.2100 for HDR, etc.
The problem is, the way colour data is stored is not 'here is the exact colour I want to represent with this pixel', but instead 'here is a mix of R, G and B for this pixel'. Notice how we just handed over three numbers without bothering to define colour primaries, or absolute brightness, or whitepoint? This is why it's so hard to get an image on any given screen to look the same as on another: a colourspace is just assumed, and if you assume the wrong one the image is not displayed as intended.
Some displays even deliberately use a 'wrong' colourspace to have punchy saturated colours, or are just unable to actually match any specific colourspace due to poor choice of backlight and/or colour filters and.or phosphors etc.
The generally accepted standard for describing the 'space of all possible colours' is 'Lab colour space. If you know how your system fits into Lab space, then you can use that as a go-between to know your it maps to every other colour space.
If you know what colourspace a colour is stored as (for PC use, assuming sRGB is almost always correct), and know what the colourspace your light source can achieve, you can map one onto another. The actual mapping can either be just a simple intersection (i.e. limited to choosing colours both spaces have in common), or you can clip out any colours that go outside your achievable colour volume, or even 'squeeze' in colours that fall near and outside the edge of the volume. The last option seems initially attractive because it means no sharp transitions if you;re trying to do a fade, but overall it means trying to actually match any given colour is nearly impossible. Think of it like trying to solve the problem of being to tall to fit your entire view in a mirror by bending the mirror and viewing a funhouse reflection: technically solves the problem of fitting everything in, but gives a useless result.

Now, a full Lab representation of an RGB lighting system would be massive overkill. For the forseeable future (any use of non-sRGB colour is still a clusterfuck on PC, let alone HDR), even a rough translation between sRGB and what your LEDs can achieve would but it well beyond the capabilities of any RGB lighting system.

As for how to measure this, my first idea would be to grab the cheapest tristimulus colorimeter* (or spectrophotometer* if one turns up) off of ebay, which will be sold as a monitor calibrator. Pair this with DisplayCal. Because we're only trying to get a relationship with sRGB, we can ignore most of Displaycal's capabilities, and just pretend the LED is a single-pixel monitor.
The way DisplayCal works is to draw a box of a certain colour on your screen. You stick the calibrator over that box, and DisplayCal reads the measurements to tell how far off your display is from the colour it should be showing. The 'hacky' way to make this work to calibrate an LED would be to stick the calibrator on the LED, and 'sniff' that box for the onscreen colour, then set the LED to that colour for the sensor to read. DisplayCal will iterate through a bunch of different colours, then spit out a LUT (Look Up Table) that tells you how to get a desired colour from the actual range the LED can show. Depending on how the LED driver is set up, you could even correct how it drives the LED and recalibrate to get a more refined LUT.

*Tristimulus colorimeter = looks for how much red, green and blue light it can see using filters. Only gives truly correct results for a single colourspace and if the display primaries match those of that colourspace. Great for calibrating an sRGB display to sRGB, won't give quite the right answers in other cases
*Spectrophotometer = compact spectrograph. measures the spectrum of a lightsource. More broadly applicable than a tristrimulus colorimeter, but less accurate.
 
  • Like
Reactions: iFreilicht

iFreilicht

FlexATX Authority
Original poster
Feb 28, 2015
3,243
2,361
freilite.com
That was a long read, but very informative. Thanks a lot!

Instead of measuring to get that information, could it be deducted from the datasheet? The LEDs I'm using have Dominant Wavelength and Luminous Intensity specified for each chip. Is that enough information? Or should that be tested at the current I'll be running the LEDs at to get more accurate results? Will the colour space be influenced by a diffusing optical element above the LEDs?
 

HeroXLazer

King of Cable Management
Sep 11, 2016
707
476
I just realized, this would be a perfect one key keyboard. There's that 32u4 and TMK/QMK/kiibohd/etc.
 
Last edited:

iFreilicht

FlexATX Authority
Original poster
Feb 28, 2015
3,243
2,361
freilite.com
In theory yes, but there's no need to use TMK or QMK. There's a perfectly viable Keyboard Library built into the Arduino IDE core, which is plenty if you only have one macro.

Additionally, I'm not sure whether TMK/QMK would play nice with the Arduino Bootloader, you might have to reprogram the button if you wanted to use them. SPI is broken out, so you can do it, but in my opinion it's not worth it at all.

kiibohd is a bit more complicated and will only run on ARM-powered keyboards, IIRC.

Of course there's also room for discussion about your idea of "perfect". Key travel is pretty darn short at 0.2mm (I think, not 100% sure) and activation force is about 160gf, so that's certainly not quite as luxurious as having something like a Gateron Green or Tactile Grey in there. BTW, that was my initial idea: to have a keyboard switch inside there so you could modify the feel.
 

HeroXLazer

King of Cable Management
Sep 11, 2016
707
476
In theory yes, but there's no need to use TMK or QMK. There's a perfectly viable Keyboard Library built into the Arduino IDE core, which is plenty if you only have one macro.

Additionally, I'm not sure whether TMK/QMK would play nice with the Arduino Bootloader, you might have to reprogram the button if you wanted to use them. SPI is broken out, so you can do it, but in my opinion it's not worth it at all.

kiibohd is a bit more complicated and will only run on ARM-powered keyboards, IIRC.

Of course there's also room for discussion about your idea of "perfect". Key travel is pretty darn short at 0.2mm (I think, not 100% sure) and activation force is about 160gf, so that's certainly not quite as luxurious as having something like a Gateron Green or Tactile Grey in there. BTW, that was my initial idea: to have a keyboard switch inside there so you could modify the feel.
I just realized, would it be possible to use a keyboard switch to turn on a computer?
 
  • Like
Reactions: ricochet

PNP

Airflow Optimizer
Oct 10, 2015
285
257
I just realized, would it be possible to use a keyboard switch to turn on a computer?

If you mean as a drop in replacement for case buttons, someone's done it. You only need to short two pins on the motherboard, doesn't matter how.

If you mean as part of a keyboard, I think that's been possible since +5VSB was added to the ATX power spec. In fact, my main Windows PC used to boot up mysteriously before I disabled it...
 
  • Like
Reactions: ricochet