Rgb Led Arduino Schaltung. Connect the irf540n mosfet and rgb led strip as shown in the circuit diagram above. Rgb leds are widely used in many of the projects with arduino platform.
Connect the 1st pin of irf540n which is a gate pin to arduino pwm pin as d6 d5 d3 respectively for rgb pin. First we will use for loops to step through dyadic combinations between red green and blue led colors. Connect the irf540n mosfet and rgb led strip as shown in the circuit diagram above.
The 2nd pin of irf540n mosfet which is a drain pin is connected to rgb led pins.
Connect the cathode of the rgb led which is the longer pin of rgb led to the gnd of arduino and the other three pins to the pin 11 10 9 of arduino through the 220 ohm resistors. They work on the basic concept of combination of the basic colors of any shade that is red green and blue. Thus we can make any color we want using a rgb led. The 2nd pin of irf540n mosfet which is a drain pin is connected to rgb led pins.