im-tomu / fomu-hardware

Tomu FPGA (Fomu for short), a FPGA which fits inside your USB port!
Creative Commons Attribution Share Alike 4.0 International
205 stars 22 forks source link

RGB LED Brightness #3

Closed drandreas closed 5 years ago

drandreas commented 5 years ago

The brightness of red, green, blue is fundamentally different.

To get white the colours have to be mixed:

The code blow demonstrates the issue.

rgb.zip

Edit: According to the documentation, the FPGA has a RGB LED driver with a per color configurable current. What are reasonable values?

drandreas commented 5 years ago

Looking at the LED's data sheet the current should be <=10mA for continues operation.

I configured the LED driver as follows

This is clearly the way to go. However it still isn't giving a nice color mixture w/o using pwm in addition.

rgb_pwm.zip

mithro commented 5 years ago

There isn't really any space for resistors on the board :-P

mithro commented 5 years ago

Also makes a good starting project for people :-)

drandreas commented 5 years ago

I’ve came up with another idea.

Blue LEDs have a typical forward voltage thats higher then other colors. Cree states a average forward voltage of 2.9V in the datasheet.

The 2.5V power supply might be simply to low (value taken from schematic)?

drandreas commented 5 years ago

Note: It could also be that my sample is perticularly bad.

xobs commented 5 years ago

I haven't noticed this issue on my EVT boards, and those should be electrically identical to the final release.

Can you post an example verilog file to demonstrate what you're seeing? Also, does it change at all if you press on the FPGA part?

On 3 January 2019 19:32:57 GMT+08:00, AntiCat notifications@github.com wrote:

Note: It could also be that my sample is perticularly bad.

-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/im-tomu/fomu-hardware/issues/3#issuecomment-451118872

drandreas commented 5 years ago

I can counter the issue by having different duty cycles for blue, green and red. I also do only intend to use the RGB LED for diagnostic purposes. So this issue is kind of solved.

However, I wanted to understand why the brightness of the colours is fundamentally different. So I kept digging. The data sheet and hacker version schematic are telling me that the blue LED might be running outside of its spec: schematic v vs ma

This discovery is a correction to my initial perception that RED and GREEN are too bright - BLUE is too dim. Since not much can be done about this I'm closing the issue. Never the less I'm curious why 2.5V instead of 3.3 are used as power source. I assume it's to compensate for the missing resistor as discussed earlier.

xobs commented 5 years ago

Good find!

The hacker version uses a 2.5V source, and the EVT/DVT/production versions of the board all use 3.3V as the source.

For those PCBs, we'll want to set the constant current sink to ~4 mA for the Red, and ~8 or 10 mA for Green and Blue (running in half mode).

mithro commented 5 years ago

FYI - The hacker board has some serious limitations around routing, hence it is my understanding the 2v5 rail was the only option.