RGB LED strip wireless controller

A few months ago, I wrote some posts about PCA9634 LED driver. Today, we are to going to do a practical application of published module. We are going to make RGB LED strip wireless controller. More inside…

Picture below describes interconnection between PCA9634 module ULN2803 and LED strip. I used 3 pins of ULN for each color because of current limit of ULN. You can use another transistor of course. rgbstrip_block


I used software for PCA9634 EVM described in this post: Wireless LED driver with PCA9634 II – PC application and added new command ‘C’ for Remote controller. This command handles 6 buttons of Remote controller.

if (bufferRF[2] == 'C') // Set register
    // Write register R
    if (bufferRF[4] & 0x20)
        if (RGB_R < 250) RGB_R+=5;
     // Write register R
     if (bufferRF[3] & 0x02)
        if (RGB_R > 4) RGB_R-=5; 

Remote controller source code had to be changed too. I had to add ‘C’ command indicator, remove battery measurement and add address of target device…

read_IO();    // read buttons            
bufferRF[0] = 0x12;
bufferRF[1] = 0x34;
bufferRF[2] = 'C';
bufferRF[3] = btns_L;
bufferRF[4] = btns_H;
if ((btns_L) || (btns_H)) timeout = 10;
pulseLEDR();        // Pulse LED R
PIN = 0;            // P2P packet
DLEN = 5;           // data len = 5
RFTXpacket();       // Send it...
waitDelay(5);       // wait 50ms
timeout -= 1;       // decrease timeout

And this is all. It is very simple, isn’t it? 🙂

Full source code for both, EVM and RC are attached.


Download Attachments

  • c pca9634testV3.c
    PCA9634 EVM source code for RGB LED strip control
    File size: 7 KB Downloads: 1041
  • c RCTX_RGB.c
    RGB LED strip remote controler
    File size: 5 KB Downloads: 972

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.