how to drive rgb led with atmega16 by using MOSFET

Status
Not open for further replies.

prashanttyagi85

Advanced Member level 4
Joined
May 5, 2011
Messages
106
Helped
33
Reputation
66
Reaction score
33
Trophy points
1,308
Location
india
Activity points
1,982
dear all
please help me. as i am working on RGB led driver, i have completed my software upto 90% with the help of you people. but now i am facing new problem here. my controller unit is working fine as when i connect led direct to it's pins, RGB color modes works well. but for driving power led (3w) i have used mosfet STP55NF06. but when i connect my led to it, led are not glowing properly. like say that controller send signal to glow it in purple color but its glowing in green color!!!!!!
my led connections are ok
please provide me an OK circuit of mosfet for it

thanks
 

thanks for your quick reply.
but i have read it through internet that this mosfet is used for very high freq switching
& it also used in some projects using pic micro controller for rgb light controlling!
 
but i have done it practically & it is creating problem.
i had connected one RGB led directly to controller & another one through mosfet card. direct led is glowing properly but second one is not

- - - Updated - - -
 
Have you experimented to see what happens to a square pulse when you use low current driver?



Red is input, blue is output.
 

Two N mosfets connected as low side switches with a resistor as load.

A square wave drives the gate and you get the shown square wave in the output.
The upper circuit uses a square wave source that can supply only 5mA while the lower circuit uses a source that can supply 1A, this reflects on the speed that the mosfet turns on/off, ideally the output should be as sharp as the input.
 
ok
here source means the output of controller or other high current source by using which we will operate leds?
 
It means the controller which has an internal resistance that can provide limited current.
The higher PWM frequency you use the worse results you will get with the mosfet.
If you can lower your PWM frequency your led will glow more.
 
now i seen one thing (i have seen only physically not tested it till now) let according to controller red have to be glow, direct led is glowing red but the mosfet led shows the green & blue color.
its mean that for glowing red i put the value of ocr register 00 for red, 255 for green &255 for blue. but i think mosfets are changing the states also i.e. the out put value of mosfet behave as that the value of ocr are 255 for red, 00 for green & 00 for blue.
why it is inverting the output?
 
The led turns on when the pin output is high because the N mosfet turns on when the gate is high, the mosfet inverts the signal

A higher value in OCR increases the duty cycle and makes the output stay positive for more so the led will glow more
 
ok thank you very much
i'll find out that bit
but if you know about it then please tell me the name of that
thanks a lot
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…