This page contains all relevant info on the custom, Hue compatible, Light Link firmware for the JN5168.
Currently up to 5 (monochrome) lights per JN5168 are supported, this is limited by the amount of PWM ports available. I am thinking about driving the leds through a separate PWM driver like this one. For this I need to figure out how to communicate with this driver. The use of an external driver would open up the possibility of multiple RGB, RGBW and Color Temperature lights. Theoretically the limit is 240 endpoints per JN5168, although available memory on the JN5168 will not allow this. With 5 lights I have seen no performance issues whatsoever, so there certainly is room to increase this number..
Sources for the multi Endpoint RGB LED’s can be found here.
I am in no way an expert on the matter so please do not take any of the information on this site for fact. Building your own lights is not something I would recommend, electricity is dangerous, and it gets people killed. So please, think and be careful!
For those still interested, these are the steps I took to build my own lights.
- Got me a JN5186 module
- Connected the hardware
- Downloaded a flash tool and a binary
- Flashed the JN5168 module
- Hue App -> Add lights -> Search
- Reset JN5168
- Enjoyed my lights 😉
Any JN5168 module will probably do. My experience is with the JN5168-001-M00 module. All info on this page is based on this model.
- Endpoint 1 => PWM : timer_00/PWM – DIO10 – PIN 16
- Endpoint 2 => PWM : timer_01/PWM1 – DIO11 – PIN 19
- Endpoint 3 => PWM : timer_02/PWM2 – DIO12 – PIN 20
- Endpoint 4 => PWM : timer_03/PWM3 – DIO13 – PIN 21
- Endpoint 5 => PWM : timer_04/PWM4 – DIO17 – PIN 26
Multi Endpoint Dimmable Lights
- 1 Endpoint : Light_DimmableLight_JN5168_ME_1-1.zip (331 downloads)
- 2 Endpoints : Light_DimmableLight_JN5168_ME_2-1.zip (156 downloads)
- 3 Endpoints : Light_DimmableLight_JN5168_ME_3-1.zip (108 downloads)
- 4 Endpoints : Light_DimmableLight_JN5168_ME_4-1.zip (138 downloads)
- 5 Endpoints : Light_DimmableLight_JN5168_ME_5-1.zip (220 downloads)
- JN5169 -> 1 Endpoint: Light_DimmableLight_JN5169_ME_1 (134 downloads)
RGB (single) endpoint
This endpoint uses an inverted PWM signal, which means, it only works with a common anode LED, or a driver that requires an inverted signal.
Red : timer_01/PWM1 – DIO11 – PIN 19
Green : timer_02/PWM2 – DIO12 – PIN 20
Blue : timer_03/PWM3 – DIO13 – PIN 21
- 1 RGB Endpoint : Light_RGBLight_JN5168.zip (306 downloads)
Multi Endpoint RGB Lights
The following downloads require an additional Adafruit PCA9685. The image below shows all the parts connected, in this case the RGB’s are inverted (Common Anode). Uninverted LED’s (Common cathode) would connect the cathode to ground.
- 1 Endpoint regular : Light_ColorLight_JN5168_ME_1_REGULAR (96 downloads)
- 1 Endpoint inverted : Light_ColorLight_JN5168_ME_1_INVERTED (63 downloads)
- 2 Endpoints regular : Light_ColorLight_JN5168_ME_2_REGULAR (53 downloads)
- 2 Endpoints inverted : Light_ColorLight_JN5168_ME_2_INVERTED (54 downloads)
- 3 Endpoints regular : Light_ColorLight_JN5168_ME_3_REGULAR (57 downloads)
- 3 Endpoints inverted : Light_ColorLight_JN5168_ME_3_INVERTED (52 downloads)
- 4 Endpoints regular : Light_ColorLight_JN5168_ME_4_REGULAR (76 downloads)
- 4 Endpoints inverted : Light_ColorLight_JN5168_ME_4_INVERTED (70 downloads)
Both will work, I use the command line tool.
Erasing and Flashing
Put the JN5168 in programming mode by connecting SPIMISO (3) to ground while powering the module.
It’s a good idea to clear the eeprom before flashing it with a new binary.
JN51xxProgrammer.exe -s COM3 --eraseeeprom=full
JN51xxProgrammer.exe -s COM3 -f binary.bin