Doing a RGBW lamp, White channel PWM ?

User avatar
fasani
Posts: 197
Joined: Wed Jan 30, 2019 12:00 pm
Location: Barcelona
Contact:

Doing a RGBW lamp, White channel PWM ?

Postby fasani » Thu Feb 07, 2019 3:25 am

just wanted to know what is the right way of doing a RGBW lamp:

https://hackaday.io/project/163672-esp3 ... led-panels

Started a project in Hackaday to make your own ESP-Mesh lamp and I'm using just the RGB PWM outputs. I though it would be possible to combine all Red, Green and Blue to make white, but I think white has it's own channel right :

```
11 | GPIO23 | O | PWM_BR output control
12 | GPIO19 | O | PWM_CT output control
```

My question is, should white be connected to GPIO19 ? Or what would be the best option to modify this and make it work with normal RGB Leds ?
Sorry if it's not such an interesting question, I wanted to create a project so electronic fans can create their own RGB Lamps with things that are already somewhere in their garage :)

Also last question, what is the default PWM frequency in the Light example ?
I guess it's possible to configure it editing the code. Thanks in advance
Attachments
self-made-RGB.jpg
self-made-RGB.jpg (95.18 KiB) Viewed 7565 times
epdiy collaborator | http://fasani.de Fan of Espressif MCUs and electronic design

User avatar
fasani
Posts: 197
Joined: Wed Jan 30, 2019 12:00 pm
Location: Barcelona
Contact:

Re: Doing a RGBW lamp, White channel PWM ?

Postby fasani » Wed Feb 13, 2019 9:31 am

I see now after getting in the Code, there is a PWM output for Warm white and another for Cold white, right ?

Now what I don't understand is, in the Colors wheel of the ESP-Mesh App you can only mix 2 colors. There is no possibility of having RGB at the same time right ?

Thanks in advance!
epdiy collaborator | http://fasani.de Fan of Espressif MCUs and electronic design

ESP_LBB
Posts: 108
Joined: Fri May 18, 2018 3:41 am

Re: Doing a RGBW lamp, White channel PWM ?

Postby ESP_LBB » Thu Feb 21, 2019 12:59 pm

Hi Fasani,

There are two ways to generate white color, considering two different types of hardware:

If the hardware supports RGB color, then we can use these three GPIOs as example:
GPIO4 PWM_R output control
GPIO16 PWM_G output control
GPIO5 PWM_B output control
In the code we can set by HSV color model.

Image


Another way, if the hardware supports only generate white and can modify color temperature, then we can use GPIO23 and GPIO19 as you mentioned. Then according to the hardware, there will be two different ways to control the brightness and color temperature.
1. GPIO23 + GPIO19 to generate the color temperature, GPIO23 + GPIO19 to generate the brightness. This is how our light configured.
2. One GPIO (for example GPIO23) to generate the temperature, another to generate the brightness. This requires more for the hardware design.
Hope I make myself clear by these two examples.

For our ESP-MeshKit-Light, RGB model and CT model are both supported but mutual excluded by the hardware.

The defaut PWM frequency is 1KHz, and it's modifiable.

Image
Attachments
WechatIMG1081.png
WechatIMG1081.png (219.74 KiB) Viewed 7387 times

User avatar
fasani
Posts: 197
Joined: Wed Jan 30, 2019 12:00 pm
Location: Barcelona
Contact:

Re: Doing a RGBW lamp, White channel PWM ?

Postby fasani » Fri Mar 01, 2019 6:47 pm

Thanks ESP_LBB !
In the code we can set by HSV color model.
Great, can you indicate me exactly where is this configurable? Because I think there is an image that is not appearing in your post.

I saw this in the code but I had no idea how to set it up. It's not configurable from the make menuconfig right? From there you can just set the output GPIOs and the speed of transition for the example. But now I think with these details I can figure out.
Great information it will be very interesting to see how this RGB normal Leds generate white using the ESP-Mesh app. I really like to soldier my own lamps in the free time, got also a 6 pack of real Esp-Mesh Lights in China but they still did not arrived home :)
epdiy collaborator | http://fasani.de Fan of Espressif MCUs and electronic design

Who is online

Users browsing this forum: No registered users and 13 guests