Reveal Yourself #1 – El Cheapo “Smart” LED Bulb

We are all surrounded by a huge variety of “Smart” LED bulbs of varying output power numbers. But the thing that is common between most of these – they are cheap!

For something that can be controlled over the internet to produce 16 million colors (why do we need that?!) and turn your room into a retro discotheque floor (again – why would you do that to your home?!), it sure goes easy on the pocket.

Even though I had a fair idea of what might be sitting inside, I decided to take a look inside. In this post, an el cheapo Smart LED Bulb reveals itself.

Outside v/s Inside

I bought one of these smart bulbs from Amazon. It is a 7W B22 bulb compatible with Amazon Alexa and Google Assistant. Yes – BOTH of them! Fascinating times, these!

The finished product on the left and the internals on the right – scraped thru all the goo holding the entire thing in place inside!

The build of the bulb was pretty sturdy. Most of the weight came from the rubber-like filling inside the bulb which I assume was to protect the circuitry from mechanical damage or motion in case of hard impacts like falls or throwing against the wall (wait, what?!).

The Main Components

The circuit is not the most difficult to understand. At a high-level, there are two PCBs that mate using a purely mechanical linkage. No solder or any fancy mechanical lock – straight up thru-hole mating!

The six-pin male header from the main board plugs snugly into the six pin female connector on the LED board

The first PCB is the power cum WiFi board – referred to as main board from now on. The second PCB has the LEDs – referred to as the LED board from now on. The six pin mechanical connection is used to transmit various control signals and power from the main board to the LED board.

Main Board

The main board is responsible for converting AC to DC and then generating different DC rails – a power rail for the WiFi module and a power rail for the LEDs.

LEDs need a constant current source. Since these are RGB LEDs (i.e. they have Red, Green and Blue separate channels), the power rail for them is obtained by first generating a DC rail and then using a 3-channel LED driver to split this DC rail into three rails for individual control.

The main ICs used are:

  • MB10F for doing full wave rectification on the input AC voltage
  • BP8516 for generating DC rail for WiFi module
  • BP2513D for generating DC rail which will be the input to the 3-channel LED driver IC
  • SM15133E for splitting DC rail into three channels for R,G,B control
  • 1YC NPN transistors used as switches for enabling/disabling the R,G,B channels
  • TYWE3L Tuya WiFi module for …well..doing WiFi stuff
Images of ICs on the main board

LED Board

There is nothing much on the LED board except – guess what…LEDs!

WiFi Module – TYWE3L

The WiFi module on the board is TYWE3L by Tuya. You can find more info here and here!

It is essentially an ESP8266. I tried to see what is going on by listening to the UART messages. I tried 4800 bps, 9600 bps, 19200 bps, 38400 bps, …, you get the idea. But they use a non-standard baudrate. So I decided to see the UART activity on an oscilloscope.

Guess what…the baudrate was 74880 bps. To prevent straightforward sniffing? I think so.

Anyhow, I was able to see it making a connection to my AP, trying a firmware update, etc. Nothing interesting there.

scandone
no my_ssid 2.4g found, reconnect after 1s
reconnect
[notice]mqtt_client.c:450 gw wifi stat is:5
scandone
no my_ssid 2.4g found, reconnect after 1s
reconnect
[notice]mqtt_client.c:450 gw wifi stat is:5
scandone
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 1
pm open phy_2,type:2 0 0
cnt

connected with my_ssid 2.4g, channel 8
dhcp client start...
[notice]mqtt_client.c:450 gw wifi stat is:5
[notice]mqtt_client.c:450 gw wifi stat is:5
ip:192.168.43.124,mask:255.255.255.0,gw:192.168.43.226
[notice]mqtt_client.c:450 gw wifi stat is:5
[notice]mqtt_client.c:484 DNS START 01-00 00:00:00
[notice]mqtt_client.c:517 who_fir:0 ip:13.234.88.185
[notice]mqtt_client.c:527 DNS END 01-00 00:00:00
[notice]mqtt_client.c:533 MQTT CONN START 01-00 00:00:00
[notice]mqtt_client.c:549 MQTT CONN END 01-00 00:00:00
[notice]mqtt_client.c:637 mqtt connect success
[notice]smart_wf_frame.c:3712 firmware self detect upgrade start...
[notice]tuya_httpc.c:3378 {"t":1571156238,"e":false,"success":true}

Summary

So that was simple enough. Now I know what those WiFi LED bulbs are hiding and what makes them so cheap! I assume most of these el cheapo WiFi LED bulbs would have the Tuya WiFi module. I will probably do something interesting with the Tuya module other than driving LEDs…but that is for a later day.

It is not surprising to see parts like BP2513D, BP8516, SM15133E, etc. on the board. These are all from Chinese manufacturers and hence – extremely cost-effective!

Compared to LED drivers from reputed companies like TI, Microchip or Infineon, there would be obvious compromises made in terms of the quality of light output from the LEDs, THD, emitted radiation, etc. But I guess nobody cares about all this if they can turn their living room into a discotheque floor for $8!!!

2 thoughts on “Reveal Yourself #1 – El Cheapo “Smart” LED Bulb

Leave a ReplyCancel reply