>> Home · AVR · tinyRGB

tinyRGB

The easiest way to control a RGB Led.

tinyRGB uses an ATMEL Attiny15L (8pin uC) to control a standard RGB Led.
R1 is a pullup Resistor for Reset generation (should be about 10k).
R3 to R5 depend on the LED you are using. You can calculate the resistor as followed:
Rx = (Vcc-Vf)/Im

[Vcc: Volatge of power supply, Vf: Vorward Voltage of the Diode, Im: Max current of LED or AVR pin (20mA)]
If you want to control power LED's read here: powerRGB.
The software is written in Assembler (avra under Linux, should be compatible to AVR Studio). Timer0 is used to generate interrupts at about 30kHz. This interrupts are used to build a 8bit PWM. Timer1 is used to change the color pattern.

Downloads:

11.11.2006. 12:59

Comments

Robert Ibener 10.12.2006. 12:55

Hello Tobi, your code just fit my needs for my application. The Program works fine , color-change is smooth, except for one small (but disturbing) side-effect: When one of the LED (either R,B or G) dimms up (gets brighter) there is a short "blackout" during the dimm-up-process.With "blackout" i mean, that the LED which gets brighter will switched off for a very short (but visible) time, then continues with dimming.This "blackout" shows up randomly, sometimes at the beginning of the dimming-process,sometimes in the middle or near the end or even when the LED is fully on.The "blackout" is only in the dimming-up-phase visible.Dimming-down is smooth and o.k. I have simulated your program in AVR-Studio4 for hours to detect this "blackout", but with no success.In AVR-Studio all seems to be fine, no reason for a "blackout" found.I have also tried several Tiny15�´s but no change at all. My Question:Do you know about this problem and (if available) can offer a patch to eliminate this "blackout" ?? Best regards and thank you for this great code Robert Ibener/Vienna

tobias 10.12.2006. 17:18

Someone reported this "blackout" earlier. I had a short look at the code then but couldn't find the source. When I have some time I'll have a look at it again. Tobias

tobias 13.12.2006. 01:05

so here's the new version of the code. The fading has been improved and I couldn't see any "blockouts" or "glitches" using an 1W RGB Led.

Robert Ibener 14.12.2006. 17:41

Hello Tobi, thank you for your new version.It works as expected now, even i am missing some features built in in the previous version (for example: adjustable dimming steps,adjustable time of color-change,e.t.c). I will try to implement above features into the new version.If you are interrested, i will send you the code, but it will need some time! Best regards Robert Ibener

tobias 15.12.2006. 00:46

I'm working on it. Do you need it faster or slower?

Robert Ibener 15.12.2006. 12:40

Hello Tobi, it�´s hard to say that i need it faster/slower.It depends on my applications (Moodlight-Stuff). For shure i need some adjustment-points in the code to control dimmtime/color-change-time.With only changing the Timer0/1-Prescaler my problem is not solved. But dont get nervous about this.It is not soooooo urgent and (i think) it�´s only my personal wish for my PERFECT application. In the meantime i have adapted your code for a Tiny45. Best regards Robert Ibener

Andreas 07.01.2007. 15:59

Hello Tobi, hello Robert, at first a happy new year and IÃ?´ll hope that you can understand my bad english. I think that IÃ?´m the ââ?¬Å?Someoneââ?¬? who reports earlier from this ââ?¬Å?blackoutââ?¬?. Now I have test allso the new code for the Tiny 15 and I can say: ââ?¬Å?It works fine and now there are no ââ?¬Å?blackoutsââ?¬? to see. Great work.ââ?¬? Sometimes IÃ?´m also think that it wood be fine, when there are some adjustment-points in the code to control dimmtime/color-change-time. Please let me know, if you Tobi or you Robert implement this features into an other new version. IÃ?´m also interested on the adapted code for the Tiny45. Robert, can you send me this code or where can i find the code in the www ? Best regards Andreas

Robert Ibener 02.03.2007. 17:43

Hello Andreas, sorry for my looooong delay to answer your question about the ATTiny45 code.As i have no Homepage for downloading, i ask Floe for help: Which is the best way to transfer my modified Code to Andreas??? (May be, Floe is also interested to check the Code?) Best regards from Vienna Robert

tobias 04.03.2007. 14:21

Send me an email with your code and I will publish it here.

Simon 12.12.2007. 01:30

How do you download code to it?

tobias 12.12.2007. 15:13

The programming part is not shown here in the circuit. But you can program it like all other AVR connecting MISO (PB1), MOSI (PB0), SCK (PB2) and RESET (PB5) to an ISP Programmer.

Simon 13.12.2007. 06:52

ok, thanks

MARCOS DONIZETI EVANGELISTA 11.01.2009. 18:00

Dera sir . Send me more informtion about RGB TINY ( PCB DIAGRAM AND SOURCE CODE ) tHANKS

masih 02.06.2010. 12:09

hi thank you for this program i want use this program by atmega32 but i face to problem. i think i must be change timer counter . please help me about this problem fast.

tobias 04.06.2010. 07:11

so tell me how can I help you?

Electronics-Lab.com Blog » Blog Archive &raq 16.10.2010. 20:31

[...] Attiny15L RGB Led controller – [Link] Tags: ATtiny15L, Led, RGB, tinyRGB Filed in Led | 1 views No Comments [...]

Electronics-Lab.com Blog » Blog Archive &raq 16.10.2010. 20:39

[...] is the extension of tinyRGB to drive high power LED’s. It is using 3 N-Channel HEXFet Mosfet’s to drive the LEDs and uses [...]

Write a comment

* = required field

:

:

:


1 + 8 =