This document outlines the assembly of a circuit designed to pulse width modulate (PWM) a high-power RGB LED strip and program an Arduino to cycle through various colors. The high-power range is specified as 9-12 volts. The procedure includes mounting a transistor to a heatsink and assembling the circuit, while soldering techniques are not covered, as some RGB LED strips come with leads. The language used is intended to be straightforward to facilitate understanding. It is important to note that the author has no affiliation with any mentioned companies, including Arduino, Jameco, Adafruit, and Sparkfun. The Arduino has a current limit of 40mA per output, which restricts the activation of multiple LEDs or components simultaneously. To manage loads exceeding this limit, a microcontroller will control a transistor, which will source power from an external battery. RGB LED strips consist of three LEDs in series, which can be cut at designated junctions, with care taken to maintain connection points. Understanding the difference between series and parallel circuits is essential for powering the RGB LED strip with 9-12V. Each RGB LED typically requires 3.3V and 60mA at full brightness, resulting in an approximate requirement of 9.9V for a strip of three LEDs. It is crucial to consult product datasheets to avoid damaging components, as not all RGB LED strips operate within this voltage range. The strips are common anode types, meaning they share a positive terminal. The power limitations of the Arduino apply to various components requiring more than 40mA. The use of a heatsink is important to dissipate heat from components like the 7805 voltage regulator, which provides a steady 5V to the microcontroller. Proper assembly includes applying thermal compound to the transistor and securely fastening it to the heatsink. Good breadboarding practices, such as color-coding wires and using heat shrink tubing, are recommended to prevent shorts and facilitate troubleshooting. The schematic provided is applicable for Arduino boards like the Uno and Pro Mini, with similar principles for ATTiny microcontrollers. Datasheets and pinouts should be reviewed for specific components used. Caution is advised against powering the Arduino via both battery and USB simultaneously. It is possible to power the Arduino via USB during development while keeping the battery connected to the LED strip by removing the connection between the 7805 output and V-in, ensuring ground remains connected. The document also touches on programming chips directly using an ISP, particularly with the ATTiny85, which may have limitations on PWM outputs depending on the programming method used. Finally, uploading code to the circuit is discussed, with a recommendation to start with simple blinking programs before progressing to more complex fading effects. A reference program for controlling the RGB LED strip is suggested.
The circuit assembly for PWM control of a high-power RGB LED strip involves several key components and considerations to ensure proper functionality and safety. The primary components include an Arduino microcontroller, a transistor (such as a TIP120), a 7805 voltage regulator, and the RGB LED strip itself. The Arduino is used to generate PWM signals that control the brightness of the RGB LEDs by varying the duty cycle of the output signal.
The transistor acts as a switch, allowing the Arduino to control a higher current load from an external power source, which is necessary since the Arduino's output pins can only handle a maximum of 40mA. The transistor should be mounted on a heatsink to dissipate heat generated during operation, particularly when handling high currents. Thermal compound should be applied between the transistor and heatsink to enhance thermal conductivity.
The RGB LED strip consists of multiple LEDs arranged in a series configuration. Each LED typically requires 3.3V and can draw up to 60mA when all color channels are active. To power the strip effectively, an external power supply within the 9-12V range is necessary, and the total voltage required for a strip of three LEDs in series should be calculated to ensure compatibility with the power source.
Proper wiring techniques are crucial for circuit assembly. Color-coded wires can help prevent mistakes, and the use of heat shrink tubing can protect connections from shorts. The schematic for the circuit should be carefully followed, ensuring that all connections are made to the correct pins as indicated in the datasheets for each component.
When programming the Arduino, it is essential to understand the limitations of the microcontroller in terms of PWM outputs, especially when working with smaller chips like the ATTiny85. The programming environment allows for flexibility, and users are encouraged to explore existing libraries and examples to facilitate the development of their projects.
Overall, this circuit design provides a robust platform for controlling RGB LED strips with an Arduino, allowing users to create a dynamic lighting experience through programming and hardware integration.This Instructable covers the assembly of a circuit capable of PWM-ing ( pulse width modulating ) a high-power RGB LED strip and programming an Arduino to cycle through a range of colors. In this context, high power is 9-12 volts. I will discuss how to mount a transistor to a heatsink and assemble the circuit. I will not go into soldering as som e of the RGB LED strip comes with leads (and there is no shortage of great tutorials out there). Also, I will use the most plain, non-jargony language possible to explain the circuit because I know how frustrating it can be to learn this stuff. Note 1: I am in no way affiliated with any of the companies mentioned or linked to, including Arduino, Jameco, Adafruit, and Sparkfun.
I receive no compensation for the publication of this Instructable by any of the aforementioned companies. If you are new to Arduino and are wondering why more than a few LEDs or other components like motors won`t activate when functions are called in the code, its because each output has a current limit of 40mA.
In other words, a component cannot draw more than 40mA of current from each channel. To refer to the water analogy of electronics, the pump pressure is 5V, and the amount of water is the number of electrons (measured in Amps, or in our case, a much smaller amount milliamps, mA). To accommodate a load that requires more current than 40mA at 5V, we will use our microcontroller to control a transistor, which will provide a component with power from an external source (the battery).
Without getting too technical, its worth knowing that individual strips are made up of 3 LEDs in series which can be cut with clippers at any junction. If you want to cut the strip at any point, just be sure to leave connection points on each halve. To understand how the RGB LED strip can be powered with 9-12V, you need to know the difference between circuits in series vs.
parallel (this page has a simple explanation with great illustrations, and there is a popular Instructable that covers wiring LEDs in series & parallel ). Basically, when LED`s are connected in series, the supply voltages and necessary current are added together (respectively).
For example, since an average RGB LED requires 3. 3 V and 60mA (at full brightness; each color channel draws 20mA, so R-G-B all on at same time is 20 x 3 = 60mA), each strip of 3 RGB LEDs will require approximately 9. 9V ( the strip I`m using from Jameco can be powered between 9-12V. Be sure to look at your product`s datasheet to prevent frying your components. Not all RGB LED strip is powered in the 9-12V range, such as Adafruit`s digitally addressable RGB LED strip ).
One more thing, these strips are common anode, meaning the LEDs share a positive terminal ( read about anode vs. cathode ). Perhaps the greatest take-away is the power limitation of the Arduino. The next section which shows how to use a transistor can be applied to all sorts of other components (ex.
motors, solenoids, servos) that require more than 40mA at 5V. Note: Since I mentioned digitally-addressable strips, its important to recognize a limitation of the strip I`m using all of the LEDs will behave in the exact same way as you will see. Digitally-addressable RGB LEDs are pretty awesome in that each LED can be accessed individually (check out this cheesy/awesome video ) A heat sink s function is to dissipate heat so components don`t fry, melt connections/become un-soldered, or become too hot to touch.
This is really important if you`re using a 7805 for voltage regulation, which I`m also doing in this circuit. The 7805 will output a steady 5V to the microcontroller and dissipate quite a bit of heat. I like to do this because I don`t trust the Arduino SMD voltage regulator, especially on ProMinis which I use frequently (even thought the Arduino Uno datasheet says the input voltage can be as high as 20V).
This part is pretty straight-forward. Apply some heat sink compound to the transistor (first image in this series) and then put the nylon washer on screw on then through the transistor (second). The compound increases thermal conductivity, which aids in the dissipation process. Lastly, fasten the nut to the back of the heat sink. Now that the transistors and 7805 are mounted to heat sinks, let`s assemble the circuit. I think its worth noting that you`ll save yourself time and frustration if you use good breadboarding techniques such as color-coding wire connections, and using heat shrink tubing to prevent shorts (see image of battery).
Its considerably easier to find errors too when your wire connections are shorter and color-coated. I think the only way to learn this is the hard way, but I figured its worth mentioning. The first schematic is for an Arduino full-development board (Uno, Pro Mini, etc), but is essentially the same if you want to use an ATTiny (for this component, you just need to hook it up to the right pins ). If you are breadboarding the circuit, be sure to look up the datasheets and pinouts for your exact components.
I have provided a simple illustration depicting the pinouts for the components I`m using (Tip 120, 7805). If you are unfamiliar with reading schematics, here is a pretty good tutorial and a symbol guide. Important Note: You can fry your Arduino if it is powered by the battery via V-in and the USB cable at the same time.
Unplug the battery before you upload programs. Also, if you want to power your Arduino via USB during development and still leave battery plugged in (to power the strip), simply remove the connection between the output of 7805 to V-in, but be sure that you still have ground connected, otherwise it won`t work. The deeper I get into Arduino, the more I find myself programming chips directly using an ISP (In-System Programmer, I use Jeff Murchison`s ISP shield but there are cheaper ways of doing this such as using the Arduino directly ), and learning AVR proramming.
I bring this up because there seems to be a bit of confusion out there regarding the ATTiny85 as to whether it has two or more PWM outputs. The answer seems to be that if you write your program using the Arduino language, you`ll only be able to access two, but interfacing with the hardware directly in C (still written in the Arduino IDE) can allow for more.
This is beyond the scope of this tutorial, but here is a good starting point that really helped me learn it. So now that you have a functional circuit, its time to upload some code. If this is your first Arduino program, it may be helpful to example a digitalWrite blinking program before moving on to fading in order to understand the structure of the language.
Its taken me quite a while to realize that there`s no reason to reinvent the wheel, and with the current obsession with all things blinky, I`ve also realized that there`s no reason for me to write a program to demonstrate the range of colors for an RGB LED. Clay Shirky has published a pretty convenient program, which is a good starting point for controlling your RBG LED strip before making it interactive with some kind of input.
The Clock Controller was designed to be an exemplary of using 'C' language to control timer0 interrupt, 7-segment LED and keypad scanning. It provides 1-bit sink current driving output, for driving a relay, opto-triac, say. Many projects requiring 7-segment...
The second circuit for darkroom time exposure utilizes a 555 timer integrated circuit (IC A) for timing functions. A relay controlled by the circuit regulates the exposure light source. The exposure time can be adjusted using potentiometer RP, allowing...
The frequency remains stable as the voltage decreases. It is referred to as the "backwards JT" because it operates optimally with a bifilar coil and a single transistor. With a modification to the circuit, it is possible to deplete...
The FM IF MW radio receiver circuit schematic utilizes the LA1260 integrated circuit (IC) for AM and FM radio receiver electronic projects. The LA1260 incorporates numerous functions and features essential for radio receiver applications, including a high signal-to-noise ratio...
The circuit depicted features a secondary N3 center tap transformer (T) with a common point connecting diodes VD2 and VD3 to positive electrodes, along with capacitors C2, C6, C7, and negative electrodes connected to capacitors C9 and C10. Additional...
Breathe down and come out on the bright flashlight. In order to promote the voltage, pieces of a highly skilled Joule thief circuit have been used.
The Joule thief circuit is a minimalist, low-power boost converter designed to extract energy...
We use cookies to enhance your experience, analyze traffic, and serve personalized ads.
By clicking "Accept", you agree to our use of cookies.
Learn more