Let’s continue the modification of the Fcmila smart bulb by analyzing the WiFi / BLE module.
In the first episode I tried to connect it to the PC without success: the serial communication seems to be disabled.
I then soldered some wires to the remaining pins of the module to be able to analyze its behavior:
Thanks to an oscilloscope (I’m using an ADS1013D) I was able to verify how the signal on RGBW pins changes when you modify the bulb color through the official application:
On each pin a square wave is present, with a frequency of about 4KHz. The wave duty cycle (that s the fraction of one period in which a signal is active.) changes depending on the brightness set on the app. This is a popular way to vary the brightness of LEDs with a digital signal.
The behavior is the same for all pins except for the W pin, which in all my tests remained at 0V. I can assume that the module was designed for bulbs with cold white LEDs (C), and for those with warm white LEDs (W). My model has no warm white LED so it is correct that there is no signal on the corresponding pin.
I then analyzed the board carrying the LEDs, to understand where the signals generated by the microcontroller ended up.
This board has a 6 pins connector for its connection to the main board. After some testing, I was able to give a meaning to each pin:
In addition to the LEDs, there are some SMD components on the board: in particular, 3 transistors (MOSFET) and 6 resistors are noted.
For RGB LED control, the schematic for each channel is as follows:
The value of the pull-down resistor R1 is the same for all the 3 channels (5.1Kohm), while the current-limiting resistor is different and its value is::
- red leds: 430ohm
- green leds: 200ohm
- blue leds: 180ohm
The different values certainly are for normalizing the brightness of the different LEDs.
For white LEDs, however, the connection is much easier. The LEDs are divided into two groups; the POWER pin is connected to each group as ANODE and the WHITE pin as CATODE:
Looking closer at the main board, I discovered that the designers have chosen to put the MOSFET (and the resistors) here and therefore ultimately the schematic is similar to what we saw above for the 3 colors:
1 Comment