RoadTest: NXP S32K-ISELED LED Lighting Solution
Author: saicheong
Creation date:
Evaluation Type: Development Boards & Tools
Did you receive all parts the manufacturer stated would be included in the package?: True
What other parts do you consider comparable to this product?: traditional RGB and white LED
What were the biggest problems encountered?: Install of develop tool kits need strictly following installation guide with matching OS and versions. (S32K SDK)
Detailed Review:
Webinar: NXP Solutions for Getting Started with ISELED Technology
ISELED is a new type of LED lighting embedded solution with a MCU, RGB LED, PWM, and temperature sensor integrated in a small package which is factory calibrated, target for Automotive and Industrial. ISELED digital protocol provide signal chain connect up to 4079 LEDs by a master control unit, it reduce great of wires, eliminate maintenance cost and improve reliability,
For example, a traditional 16 RGB matrix require 3x16+1ground as 49 wire connect to control units, compare as ISELED only require a 4wires (VCC,GND, SerialIO_P, SerialIO_N) for a daisy chain.
In this Roadtest, we exploring from how the Lucie Creator easy of design ISELED light effects without programming need to work at NXP S32DS SDK for diagnostic of each individual LED and finally design a custom code to emulate Day and Night effects.
ISELED is a embedded digital communication single packaged RGB LED lighting solution, each part integrated with RGB Led and the LED controller.
The driver IC from INOVA Semiconductors embedded with light sources provided by famous LED provider like Dominant Opto or Osram.
NXP or Microchip provide Mastering solutions supplied the ISELED driver on their platform to control the system overalls. It is not compulsory must use of official controller, theory can work under any microcontrollers with digital IO, however, currently not available very detail informations of how the protocol run, the driver provided by NXP is run on top of FlexIO and is closed source, so it is best to use official drivers to prevent unexpected and maintain highest reliability.
The serial chains is first connected by single-ended from master to nearby and following by differential singling. As connected by serial, if one LED controller on the chain is malfunction, all of downstream will be affected, but if just the LEDs failure, downstream can continue, the LED SDK provide "ping" function to verify the chain's integrity.
The pre-calibration ISELED products no require working of additional calibration for LED color consistency before productions, reduced customer human resources and checking equipment costs, provide faster production cycles and better quality.
The calibration value is wrote on OTP, so the LED may slightly brighting RED when pure GREEN command send, all working transparency to developer.
The ISELED invoke RED temperature compensation by internal temperature sensors as RED LED sensitive to temperature.
Traditional RGB | ISELED | |
---|---|---|
Wiring | 3n+1(GND) | 2 Power+2 Data |
Control | Master direct power control each LED | Indirect control by embedded controller |
Failure affect other | No | Yes |
Speed | Immediately | slightly delay |
Pre-calibration | No | Yes |
Diagnostic | No | Yes |
Temperature Sensor | No | Yes |
Red Compensation | No | Yes |
The LED Driver and RGB LED is integrated in a package.
Lucie Creator is a online creative tool by Lucie Labs which can easy design the ISELED color patterns without coding, the design interface similar of the video editing based time line view.
Following the offical guide create account and install the Driver is straightforward.
Each market corespending a LED, the Color layers used for create fixed color, or gradient effect that smooth change between two color, the Value layer provide additional fade control.
Push the Play button and the Application Kit will play the sequence immediately.
At the end, the user can save the sequence and reuse it online, Lucie also provide sample template for quick start.
As evaluation versions, the Application Kit required the Lucie Creator open to run the sequence, which will stop and reset the device default when offline.
As suggestion, hope the software author improve of following issues:
1. It hard to clone the pattern from one layout to one layout.
2. It hard to use one Marker to many LEDs, and hard to change target LED without create new Marker.
3. Duplicate marker is not fully some as original, for example the Gradient value may changed.
4. Better to provide desktop versions instead of online tools for better user experiment.
load of driver before login and user should keep those curiously windows when use this online software..
blue wave effect created in Lucie Creator
Overview this is good tool for build and run fixed or lighting patterns without programming knowledge, although advanced control require working for intensive coding.
For diversify control of the ISELED, such as change by conditions or run diagnostic of LED, should require install the developing tools and work for coding.
I built an example for study how the ISELED working, source code can be downloaded from our GitHub.
Firstly, suggest install Windows version, follow the guide NXP provided.
https://www.nxp.com/document/guide/get-started-with-the-s32k-iseled:GS-S32K-ISELED
Notice that develop version should "S32DS_ARM_v2018.R1", install all SDK, and install the ISELED package by choose "S32SDK_S32K1xx_RTM3.0.0".
I am not successful install Linux version even on new Linux LTS Distro installation, it may due to dependency issue.
Use of FreeMaster to control the ADK under the NXP ISELED official example running.
The example fully use the S32K develop kit user interface:
1. The Potmeter used for control overall lighting level.
2. The button A/B change color based on value storage on array.
3. TouchPad Up change mode and Down step close per LED down to zero at mode 0.
Mode: 0 Manual change LED
Mode: 1 Auto change LED
Mode: 2 A moving dark point effect
Mode: 3 Day and Night effect
A smoother work for change lighting and color gradually, and UART serial used for LED information output.
The fpsUpdateCallback is the timing callback every 20ms, this function change the digLED_FPSFlag to true as main loop trigger the update tick.
ADC and Touchpad
We slightly modified the touchpad driver which ADC0 share with touchpad and potmeter. As the ADC0 measure potmeter value every 20ms,
the touchpad will pending and wait the ADC0 finished to continue.
fpsUpdateCallback triggered ADC0 measure of potmeter value every 20ms, therefore ADC0 IRQ will callback adc_irq_callback when finish.
The adc_irq_callback compare as last value and ensure the different higher that the threshold to prevent unnecessary update by measurement deviation.
TouchPadControl function call every main loop for more precision touch sensing.
GPIO IRQ have been trigger the button_irq_callback when the button push down.
The button_delay_count variance used to prevent repeat trigger when button holding, therefore button_irq_callback call shiftColor for next color and change updateLED to true for main loop update.
Notice that the Component Inspector should correct config especially the Interrupt and DMA setting and generate processor expert code every update.
main
main function initial the Clock, digLED and Initial the strip, config the ADC and button and finally config the Touchpad.
After short delay, the main function setup timer and enter to the forever main loop.
while(1) { if (digLED_FPSFlag){ if (updateLED){ updateColor(); updateLED = false; } if (showled_trigger){ showLedInfo(); showled_trigger = false; } updateColorTick(); digLED_FPSFlag = false; } touchPadControl(); }
The timer will change digLED_FPSFlag every 20ms, so the code inside of bracket will run every 20ms.
When updateLED is true, call updateColor function to start a new action.
If showled_trigger is true, call the showLedInfo to output the Led data to console, which will discuss later.
The updateColorTick function is the programs' heart, most important function purpose for update LED value and send batch every frame.
Each main loop will update call the touchPadControl for detect any touchpad events for get more smooth touch experiments.
The updateColorTick will trigger every 20ms for update the led, there have three parts inside this enormous function.
1. pre-process update the color pattern every frame for indivual mode.
2. transfer pattern to cmdblock and send batch though DMA
For improve the accurate of low light colors, ISELED provide DIM command. It equivalent a scale value for improve the internal precision under low light,
By reference of section 4.6 of INLC10AQ data-sheet
https://iseled.com/files/daten/Downloads/Drivers%26Controllers/DS_INLC10AQ_Rev1.0_25.05.2020.pdf
We invoking transfer color value to dim and scaled color :
/*calculate dim value */ uint8_t red_dim = 0; float value = ledcolor[i].red*dim[i]; while (value<128 && red_dim<3){ ++red_dim; value*=2; } uint8_t redcolor = value;
Simply use a while loop increment dim and multiply 2 when value smaller that 128 until dim value 3 achieved.
Repeat this process for blue and green.
Following update the cmdBlock array as last step of send, please notice that the cmdBlock is twice the size of the original NXP example which we need to update both dim and RGB values.
Also, the cmdBlock is required to update everything in every call, because the digiLED driver will use the block content as buffer and change it.
result=digLED_Send_Cmd_Block(cmdBlock, nrOfLEDs*2, strip); if (result==DIGLED_EVALUATION_OVER){ /*evaluation over, sample reset the led driver*/ digLED_Init_Interface(NUMBER_OF_INTERFACES, iseled1_InitConfig); printf("Reset digLED driver while evaluation over\r\n"); /* Initialize strip */ digLEDResultStrip1.chainLength = nrOfLEDs; digLED_Init_Strip(&testInitType, &digLEDResultStrip1, strip); return; }
Finally, call the digLED_Send_Cmd_Block for trigger a batch commands send.
The function returned the result.
For the evaluate kits drivers, we received result DIGLED_EVALUATION_OVER when the number of command send react the limits, simply reset the driver with about delay one second and resend.
3. Post-Process
We decrement the counter, if the counter become zero, we working for post-process, we update relative variables, Mode 2 and 3 also set the updateLED to true for next call.
If we adjust the potmeter wheel abruptly, the LED will change the LED suddenly, make customer feel strange and eyes stain. The latest Airbus long-haul aircrafts softly increasing the lighting level after passenger sleep well, our example work on some approval for soft change.
Invoke a simple linear transformation is good enough for ISELED.
d = (adc_prev_reading-adc_reading>0? (adc_prev_reading-adc_reading)*pos+adc_reading: adc_reading-(adc_reading-adc_prev_reading)*pos) / (float) ADC_MAX;
The d value is normalised value from 0 to 1, therefore this value will multiply RGB value to form the dimmed values.
Repeat above for red, blue and green color.
You can get the LED parameter, the temperature, and run testing for ISELED's LEDs.
Our example call the showLedInfo function to demo of gathering the LED data when start or user pushed hardware buttons after the color changed.
The information have been showed on telnet though USB serial connection, use telnet client like PuTTY and 9600-1-N-1 connect to relative serial com port.
This function start a loop call all TEST by digLED_Test, and get result by digLED_Read_Diagnostic to get the result.
digLED_Test(i+1,0,strip); while (!stateFlag ); stateFlag = 0; ret = digLED_Read_Diagnostic (&digLEDResultStrip1, strip);
Following get all of parm value by
ret = digLED_Read_Param (i==NR_OF_PARM-1?15:i+1,&digLEDResultStrip1, strip);
Next, we get the temperature sensor value and calculate the °C
In our devices, the LEDs temperature between 38-50°C, middle with higher temperature because the low dropout regulators locate on central back of PCB..
ret = digLED_Read_Temp (&digLEDResultStrip1, strip); .... float value = tempoffsetStrip1.retData[j]&0xFFF; value += 94.57-(digLEDResultStrip1.retData[j]&0xFFF); value /= 0.87;
The equation of temperature based on INLC10AQ data sheet section 4.4
https://iseled.com/files/daten/Downloads/Drivers%26Controllers/DS_INLC10AQ_Rev1.0_25.05.2020.pdf
Finally, we read the PWM value by digLED_Read_PWM_RED,digLED_Read_PWM_GREEN,digLED_Read_PWM_BLUE.
LEDs information display on console
Be caution, the above result require mask 0xFFF for actual values, it is because the returned value first 12bit is the result, upper bits is the device address.
In additional, called digLED_Ping can get the last device address by shift >>12, it help to verify the entirely chain's integrity quickly.
At the end, i build up a special "LED show" that emulate a cycle of a day, with star and cloud effect for present the ability of ISELED, press three time of touchpad nearby the potmeter to enjoy it.
I am not go though the code very detail, the KtoRGB used for convert Kelvin color temperature to RGB ( the color temp between 3000-10000K sunrising/sunsetting), the code randomly generate star at night, after sunrising, with day and cloud effect, at the end the sunset fade to night and repeat. Randomly variance have been added for more natural feel. The cloud is a random pattern that update every frame and may move left or right. Reference of the code with comment at Github if you interesting the implementation.
Source Code: https://github.com/sicreative/NXPISELEDDemo
Video Demo of ISELED
The ISELED is a new type of digital RGB LED integrated LED PWM driver with RGB in a single package. The digital protocol reduce a lot of wire, IO, loss, and space compare as traditional RGB, for example a 100 RGB require 301 wires, as ISELED require only four wires as two wire for power, and two for the data connect by serial, without additional I/O expander.
The digital protocol also massively reduced the work load of the master controller, eliminate such of gamma, dim correction and temperature compensation and calibration, those jobs distributed to individual LED driver for faster overall responses.
One of the hardest works is how to maintenance RGB color correctly and sustainability, Red, Green and Blue have different characteristics especially red is very sensitive of ambient temperature, as traditional LED need great effort working on software and adjustment, this factory pre-calibrated products reduced both of software development and production work loads.
The bidirectional make developer possible to monitor independent LED working conditions such as PWM and temperature to enhance quality and reliability.
The dynamic lighting effect is good thanks for fast communicating chain, the update rate higher that 50fps, 12bits PWM resolutions and 2bits low light dimming function make smoother work very well.
The ISELED intent for vehicles and industrial markets and qualification automotive standards, wide temperature range and high quality LED as designed for mass productions.
The protocol open the possible of elaborating lighting controls, from building to private car, such as softly light up/down when the car enter/exit of tunnel automatically, or building external wall desirable LED display with monitoring temperature and conditions without additional parts.
The free driver for evaluation limited commands and therefore require resetting in a period, the ADK is not cheap and not designed for enthusiasts, as I suggest ISELED Alliance provides cost-effective Lite version target for students or amateur.