Mini WiFi RGB/RGBW/RGBWW ledstrip controller (MagicHome/Arilux AL LC0x)


Chinese webstores offer the I presume by now well known Mini Ledstrip controllers that depending on the model work with WiFi, WifFi/RF, or Bluetooth.

Model Color Voltages Control Price Link
LC01 RGB 5-28V WiFi ~€7 Banggood
LC02 RGBW 9-12V WiFi ~€14 Banggood
LC03 RGB 5-28V WiFi/IR ~€9.50 Banggood
LC04 RGBW 9-12V WiFi/IR ~€11 Banggood
LC08 RGBWW 5-28V WiFi ~€10 Banggood
LC09 RGB 5-28V WiFi/RF ~€11 Banggood
LC10 RGBW 9-28V WiFi/RF ~€12 Banggood
LC11 RGBWW 9-28V WiFi/RF ~€10 Banggood
LC12 WS2812 12-24V WiFi ~€10 Aliexpress
LC13 RGBW 12-24V Bluetooth ~€6 Aliexpress

I added the links (and prices) only as an example, they may or may not be cheaper at Aliexpress (check here for other brand names as well) or at another supplier. One example of unexpected price difference for instance is the LC10/LC11 difference, where the controller with more functionality is in fact 2 euro cheaper.

Here, I will focus on the WFi controller.
There are basically 3 models: one with 4 pins, one with 5 pins and one with 6pins. The 4 pin model is for an RGB strip and the one with 5 pins is for an RGBW strip, the one with 6 pins, so you can control RGB, warmwhite and coolwhite. The remaining pin is usually the common anode. And then there is a model to be used with WS2812 programmable LED’s.

The models can take various voltages (see table above) and usually work with a 12 Volt LEDstrip. At this moment it isnt quite clear to me whether attaching 28 Volt will still make it useable for a 12 Volt strip (as I have no 28 Volt PSU), but for now I am not risking anything trying that.

The WiFi model is usually controlled by the MagicHome App or MagicHomePro App.

The setup for it to recognize your device is not that hard, but not always intuitive. You should be able to do it within a matter of minutes though. Roughly the process consists of the app recognizing the controller, then you switch to its WiFi accesspoint (it is the one with the weird name in your SSID list) and fill out your WiFi credentials.
With your device a little card should come that contains the link to a full instruction PDF

Once you have done that, the app allows you to switch to direct contact, so your commands will be sent to the device within your network, so you are not depending on a server somewhere in China. Upto 8 phones will be able to control the device.

Inspite of its less than perfect rating on the play store, it has some cool features. It can synchronize your lights with music or a microphone….if you are in that sort of thing

Many people though will be interested to control their devices from within their own home automation system.
there are in fact various possibilities to do that.

1-Open a MagicHome account, if you havent already done so.
You can do that via your App, as described in the instruction PDF
Then use either GoogleHome or Alexa to add the MagicHome service and you should be ready to go. As per now, I understand the GoogleHome App offers more functionality for this device than Alexa.

2-You don’t have/don’t want GoogleHome or Alexa (no worry, google knows you don’t want it and has your name on a list that will resurface when they rebrand themselves to SkyNet)
Well, if you happen to have OpenHAB, there is a binding that will let you control this device directly. The process is described thoroughly in the given link, but it comes down to the following steps:
Power up the LED Strip
open PAPER UI and install the WIFI LED Binding
in PaperUI inside THINGS should be something like “AK001-ZJ100” (WiFi LED Device) with corresponding MAC-Adress
click on it and u see something like: “wifiled:wifiled:DC30B89D35CE:power”
add this to your xxx.items File, using the following channels:
{channel=”wifiled:wifiled:DC30B89D35CE:power”}
{channel=”wifiled:wifiled:DC30B89D35CE:white”}
{channel=”wifiled:wifiled:DC30B89D35CE:color”}
{channel=”wifiled:wifiled:DC30B89D35CE:programSpeed”}

3-You just want to use python
Then this is for you: After installing the flux_led software, you will be able to use command line commands to control your WiFi LED

4-You do not have OpenHAB, or Alexa, or GoogleHome (but still want your own access)
Though I am sure that if the controller can be controlled from OpenHAB, it can be controlled from other Domotix systems such as HAS, but I am not sure if anyone already developed that. In that case, you have the option of flashing your controller, as it has an ESP8266 in it. It is not as easy as reflashing a sonoff, as you will need to do some soldering to tiny pads, but it is doable. Xose ‘tinkerman’ Perez describes how. Have a look here as well. Beware though that older replacement software, may not always be compatible as somewhere along the development apparently pin assignments were changed.
Also beware that not all replacement software out there  will implement e.g. your IR or RF functions if you happen to have a combined model.
The IR programming follows the NEC protocol with  the following codes:

UP 0xFF906F
DOWN 0xFFB847
OFF 0xFFF807
ON 0xFFB04F
R 0xFF9867
G 0xFFD827
B 0xFF8877
W 0xFFA857
1 0xFFE817
2 0xFF48B7
3 0xFF6897
FLASH 0xFFB24D
4 0xFF02FD
5 0xFF32CD
6 0xFF20DF
STROBE 0xFF00FF
7 0xFF50AF
8 0xFF7887
9 0xFF708F
FADE 0xFF58A7
10 0xFF38C7
11 0xFF28D7
12 0xFFF00F
SMOOTH 0xFF30CF

If your flashing goes wrong, supposedly the original firmware can be found here, but given the fact that there are various models, I presume the bin file somehow is configurable.

Advertisements

The 16 relay module and the Raspberry Pi: not an ideal marriage


  • If you need lots of Relays to switch, the 16 channel relay board(above) that is available at various Chinese webshops seems like a good idea, and in fact it is if you use 5Volt logic.
    It is a complete different matter if you like to use it with a 3v3 system such as the raspberry Pi, or  the ESP series.

To understand why, it is best to have a look at the circuit:

and as that may appear a bit daunting, let’s bring it back to one channel:
The relay is driven by an ULN2803 and the ULN2803 is driven by an optocoupler. In this configuration ofcourse that is completely useless as there is no galvanic separation between the microprocessor and this board and the optocoupler doesn’t add much other than a problem.

  • First problem: the optocoupler inverts the signal: you need a LOW to activate the relay and a HIGH to deactivate the relay.
  • Second problem: you need a HIGH that is pretty close to 5Volt to deactivate the relay:
        • Suppose that you use a raspberry that in its HIGH state puts 3Volt on a GPIO pin. That means that over the optocoupler and R1 there is a voltage of 2Volt.
        • Suppose that the optocoupler has a forward voltage of 1.2Volt, that means that a current of 0.8mA will flow. Not much, but it might just be enough to keep the relay activated.

    On the internet you will find people using this relay board with a raspberry without problems while others struggle. That is simply a matter of variation in specs: suppose you have a module in which the LM2576 step down regulator is at the low end of its specs with 4.8 Volt, the HIGH the raspberry puts out is closer to 3.3 Volt, the optocouplers forward voltage is 1.3Volt and R1 is 1100 ohm rather than 1k.
    Then with a HIGH there is 1.5Volt left over the optocoupler and R1, so a current of 0.18mA will flow which is hardly enough to ignite the optocoupler.
    So, what to do when you have this board and want to connect it to your raspberry and it will just not switch off. Well there are a few options and none is perfect:

    1. You could replace the LM2957 with a 3V3 type, but that is quite an undertaking.
    2. You could get 16 NPN transistors and 32 resistors and build the below circuit 16 times. That will  adapt the raspberry to the  required level of the board and it inverts the signal so you have an active HIGH relay again.The irony though is that each of those transistor circuits in itself is capable of driving a relay.
    3. Instead of the transistor you could try to add an LED to each input line: it still will be OK for when the input signal is O volt, and this time when it is HIGH, the voltage drop of 1.7 volt will be over 2LEDs and a resistor with virtually no current flowing.  Add the LED in the same direction as the optocoupler, so with the cathode towards the raspberry output)
    4. You could just remove the optocoupler and link the emitter and kathode contacts (suggestion from reader Jeroen)

    A python program to test the relays could look like this:

    import time
    GPIO.setmode(GPIO.BCM)
    pins = [2, 3, 4, 17, 27, 22, 10, 9, 14, 15, 18, 23, 24, 25, 8, 7]
    for pin in pins:
       GPIO.setup(pin, GPIO.OUT) 
       GPIO.output(pin, GPIO.LOW)
       time.sleep(0.001)
       GPIO.output(pin, GPIO.HIGH)
       time.sleep(0.001)
    GPIO.cleanup
  • Other relay module posts:
    The 16 relay module and the Raspberry Pi: not an ideal marriage
    Re-inverting an inverting relay
    Simple WiFi relay board (3)
    Simple WiFi relay board: a 4 channel DIY WiFi relay board (2)
    Simple WiFi relay board: an overview (1)
    Adding a popular 5Volt 4 channel relay board to a 3V3 processor (beginners)