Alternative firmware for IKEA ORSALA lamp (https://www.ikea.com/de/de/p/orsala-arbeitsleuchte-led-dimmbar-weiss-00482904/)

but why?

The ORSALA lamp from IKEA is a nice desktop lamp but has a very strange user experience. It features one rotary encoeder with button to control the brightness, color temperature and an on/off switch.

On the original firmware the following functions are implemented:

If lamp is turned off:

If lamp is turned on:

Also the lamp does not save the brightness or color temperature on power loss.

This firmware fixes the user experience in the following way:

If lamp is turned off:

If lamp is turned on:

The current color and brightness is saved in EEPROM on power off the lamp.


The IKEA ORSALA lamp contains a STM8S003F3P6 (https://www.st.com/resource/en/datasheet/stm8s003f3.pdf) cpu and two TTP932 led drivers for the warm and cold white leds.
The SWIM Interface is lead out to pads with 2mm spacing:

SWIM Interface

+    VSS     (VCC)      3.3V on STLINKv2
R    NRST    (Reset)    RST  on STLINKv2
S    SWIM    (SWIM)     SWIM on STLINKv2
-    VDD     (GND)      GND  on STLINKv2


PD4   internal led
PA3   warm white leds (via TTP932)
PD3   cold white leds (via TTP932)
PA1   encoder pin 1
PA2   encoder pin 2
PB5   encoder button



Sduino Arduino API Ports to STM8S https://tenbaht.github.io/sduino/


stm8flash (https://github.com/tenbaht/stm8flash/)

STLINKv2 (https://www.st.com/en/development-tools/st-link-v2.html)

Flash firmware