Help Me In Designing Smart LED Tube Light.

Thread Starter

Sumitb21

Joined Sep 19, 2021
19
It looks to me like the BP5926 is a dual channel brightness controller which is controlled by a single PWM signal. I have tried to find a datasheet on the BP5926 but failed to do so. I can't think of a way that a single PWM signal can control 2 channels. I would think finding that information is the first step in the design process.
Although you say you want to design it it sounds more like you want someone else to design it but you then want to build the design. Am I correct ?

Les.
I am not saying that I want to design it. I mean please help me in the above circuit to connect IR receiver to it.
 

zophas

Joined Jul 16, 2021
165
Your thread title says"
HELP ME IN DESIGNING SMART LED TUBE LIGHT."

Electronic design takes time and effort, if you can show that you have done some of it maybe some kind people here will point out any errors or suggest some improvements. Have you tried doing any work on this?
 

Thread Starter

Sumitb21

Joined Sep 19, 2021
19
Your thread title says"
HELP ME IN DESIGNING SMART LED TUBE LIGHT."

Electronic design takes time and effort, if you can show that you have done some of it maybe some kind people here will point out any errors or suggest some improvements. Have you tried doing any work on this?
This is what I have, a schematic to which I want to connect an IR remote.
 

Attachments

LesJones

Joined Jan 8, 2017
4,191
I am not sure the design in the schematic you posted in terms of changing colour. From your description I was guessing that you wanted to mix three primary colours of LED. The design you posted just mixes two colours, warm white and cold white. (I assume this is for photographic illumination.)
In post #21 you say " to connect IR receiver to it" This seems to imply that you already have the IR transmitter. What communications protocol does this transmitter use ?

Les.
 

djsfantasi

Joined Apr 11, 2010
9,163
It looks to me like the BP5926 is a dual channel brightness controller which is controlled by a single PWM signal. I have tried to find a datasheet on the BP5926 but failed to do so. I can't think of a way that a single PWM signal can control 2 channels.
Multiplex the brightness commands? 0-49 widths control channel 1… 50-99 widths control channel 2. Subtract 50 if the channel is over 50 and multiply the width or subtraction result by 2. Slight loss of control, but practical for this purpose. Or some similar variation. Pulses can alternate between channel 1 and 2.
 

LesJones

Joined Jan 8, 2017
4,191
Hi djsfantasi, Thanks for the explanation. That should be easy to implement. If the OP had the PCB for the posted design he could use one of the spare I/O ports on the ESP12S for the IR receiver input and write code using the Arduino IDE to produce the required PWM stream from the received IR commands. I think you have given him most of the solution to his requirement.

Les.
 

Thread Starter

Sumitb21

Joined Sep 19, 2021
19
Multiplex the brightness commands? 0-49 widths control channel 1… 50-99 widths control channel 2. Subtract 50 if the channel is over 50 and multiply the width or subtraction result by 2. Slight loss of control, but practical for this purpose. Or some similar variation. Pulses can alternate between channel 1 and 2.
Thanks! for the reply. Can you please explain me in brief. I don't have deep understanding about electronics.
 

Thread Starter

Sumitb21

Joined Sep 19, 2021
19
Hi djsfantasi, Thanks for the explanation. That should be easy to implement. If the OP had the PCB for the posted design he could use one of the spare I/O ports on the ESP12S for the IR receiver input and write code using the Arduino IDE to produce the required PWM stream from the received IR commands. I think you have given him most of the solution to his requirement.

Les.
Yes, the design has PCB at the OP. Do I need to connect the DATA pin to one of its I/O port, VCC pin to VCC and and then ground. This is what you want to say?
 

djsfantasi

Joined Apr 11, 2010
9,163
Yes, the design has PCB at the OP. Do I need to connect the DATA pin to one of its I/O port, VCC pin to VCC and and then ground. This is what you want to say?
First, do you know how to code?

Second, do you have the code for the ESP12S? I think there was an autocorrect typo in my original post. Not sure. I mean do you have the code?
 

MrSalts

Joined Apr 2, 2020
2,767
No, I don't know how to code. Also I don't have code for the same.
Then you need to either pay someone to help you or buy a few ESP12F modules or, easier, some esp8266 modules with USB). You can download the Arduino IDE and use that to write the code and flash the ESP chips. The Arduino IDE has example code to get you started with some basic http server and http client code examples.
 

Thread Starter

Sumitb21

Joined Sep 19, 2021
19
Then you need to either pay someone to help you or buy a few ESP12F modules or, easier, some esp8266 modules with USB). You can download the Arduino IDE and use that to write the code and flash the ESP chips. The Arduino IDE has example code to get you started with some basic http server and http client code examples.
I know basics of arduino uno and how to use it. I just don't understand how do I connect a ir receiver to the ESP module. And secondly, is there any method to import code from already installed in the ESP module?
 

djsfantasi

Joined Apr 11, 2010
9,163
I know basics of arduino uno and how to use it. I just don't understand how do I connect a ir receiver to the ESP module. And secondly, is there any method to import code from already installed in the ESP module?
Depends on which IR Receiver you have. Generally, you supply power to the receiver and connect its output to an unused GPIO pin on the ESP module.

Then you add to the existing ESP code, instructions to set up the IR receiver, monitor it for output, convert the output to useable values and modify the EDP control code to take action. This is quite a bit of coding for someone who doesn’t know how to code.

Plus, you need access to the existing code. Personally, I don’t know how to do that if all you have is the ESP module.
 

Thread Starter

Sumitb21

Joined Sep 19, 2021
19
Depends on which IR Receiver you have. Generally, you supply power to the receiver and connect its output to an unused GPIO pin on the ESP module.

Then you add to the existing ESP code, instructions to set up the IR receiver, monitor it for output, convert the output to useable values and modify the EDP control code to take action. This is quite a bit of coding for someone who doesn’t know how to code.

Plus, you need access to the existing code. Personally, I don’t know how to do that if all you have is the ESP module.
The question is how to access the existing code?
 

djsfantasi

Joined Apr 11, 2010
9,163
The question is how to access the existing code?
You can’t from the ESP module. You need to find the source code elsewhere. From the manufacturers site (often not available to protect their IP). Or maybe a search will turn up a GitHub project.

if you search diligently, you might (emphasis on “might”) find software that reads the ESP memory, but all you’ll get is a bunch of hex characters which are unintelligible. Unless you find software to decompile the hex codes. But be aware, you can’t recover variable names, function names or definition of loops. There still is a lot of work to do.

And such software won’t work if the code is “locked”. I.e.. protected against reading.
 

MrSalts

Joined Apr 2, 2020
2,767
The question is how to access the existing code?
It's usually easier to write your own code to make the device function - unless there is an app, wifi, bluetooth or IR remote already connected to it - in that case, you'll need to rewrite the code for the remote device as well.
 
Last edited:

Thread Starter

Sumitb21

Joined Sep 19, 2021
19
You can’t from the ESP module. You need to find the source code elsewhere. From the manufacturers site (often not available to protect their IP). Or maybe a search will turn up a GitHub project.

if you search diligently, you might (emphasis on “might”) find software that reads the ESP memory, but all you’ll get is a bunch of hex characters which are unintelligible. Unless you find software to decompile the hex codes. But be aware, you can’t recover variable names, function names or definition of loops. There still is a lot of work to do.

And such software won’t work if the code is “locked”. I.e.. protected against reading.
Oh! That's a big task.
 

Thread Starter

Sumitb21

Joined Sep 19, 2021
19
It's usually easier to write your own code to make the device function - unless there is an app, wifi, bluetooth or IR remote already connected to it - in that case, you'll need to rewrite the code for the remote device as well.
Can you help me in writing the code? Because, as of now I have just copy pasted it for all my projects.
 
Top