Menu English Ukrainian russian Home

Free technical library for hobbyists and professionals Free technical library


ENCYCLOPEDIA OF RADIO ELECTRONICS AND ELECTRICAL ENGINEERING
Free library / Schemes of radio-electronic and electrical devices

RGB LED control circuit. Encyclopedia of radio electronics and electrical engineering

Free technical library

Encyclopedia of radio electronics and electrical engineering / Microcontrollers

Comments on the article Comments on the article

Option 1

Below is a simple circuit for driving an RGB LED or multiple LEDs.

RGB LED control circuit. RGB LED control

The LED is controlled by the ATMEL Attiny15L microcontroller (8 pins)

Resistor R1 - about 10 kOhm
Resistors R3, R4, R5 - depend on the type of LED. You can calculate this resistor using the formula:
Rx = (Vcc-Vf)/Im
where Vcc is the supply voltage, Vf is the LED voltage, Im is the maximum LED or MK output current (20 mA)

The program is written in assembler (avra under Linux, but must be compatible with AVR Studio). Timer0 is used for interrupts, 30 kHz for 8 bit PWM. Timer1 is used to change the color of the RGB LED.

RGB LED control circuit. A photo

Option 2. For high power LEDs

The circuit below allows you to drive more powerful LEDs. In this project, I used 3 LEDs with a power of 1 watt each.

RGB LED control circuit. Powerful LED control

Q1, Q2, Q3 - N-channel HEXFet MOSFET transistors with RDSon (transistor open channel resistance) about 50 mΩ.
R1, R2, R3 - 2.2 kOhm
R4, R5, R6 - 15 kOhm.
R7, R8, R9 - depend on the type of LEDs used and Vcc.
If you are using high RDSon mosfets, you must consider RDSon when calculating the resistors:
Rx = (Vcc-Vf)/Im-RDSon
where Vcc is the supply voltage, Vf is the LED voltage, Im is the maximum LED or MK output current (20 mA)

You can download the source code in assembler, as well as the source code for MK ATTiny45 here

Publication: cxem.net

See other articles Section Microcontrollers.

Read and write useful comments on this article.

<< Back

Latest news of science and technology, new electronics:

Machine for thinning flowers in gardens 02.05.2024

In modern agriculture, technological progress is developing aimed at increasing the efficiency of plant care processes. The innovative Florix flower thinning machine was presented in Italy, designed to optimize the harvesting stage. This tool is equipped with mobile arms, allowing it to be easily adapted to the needs of the garden. The operator can adjust the speed of the thin wires by controlling them from the tractor cab using a joystick. This approach significantly increases the efficiency of the flower thinning process, providing the possibility of individual adjustment to the specific conditions of the garden, as well as the variety and type of fruit grown in it. After testing the Florix machine for two years on various types of fruit, the results were very encouraging. Farmers such as Filiberto Montanari, who has used a Florix machine for several years, have reported a significant reduction in the time and labor required to thin flowers. ... >>

Advanced Infrared Microscope 02.05.2024

Microscopes play an important role in scientific research, allowing scientists to delve into structures and processes invisible to the eye. However, various microscopy methods have their limitations, and among them was the limitation of resolution when using the infrared range. But the latest achievements of Japanese researchers from the University of Tokyo open up new prospects for studying the microworld. Scientists from the University of Tokyo have unveiled a new microscope that will revolutionize the capabilities of infrared microscopy. This advanced instrument allows you to see the internal structures of living bacteria with amazing clarity on the nanometer scale. Typically, mid-infrared microscopes are limited by low resolution, but the latest development from Japanese researchers overcomes these limitations. According to scientists, the developed microscope allows creating images with a resolution of up to 120 nanometers, which is 30 times higher than the resolution of traditional microscopes. ... >>

Air trap for insects 01.05.2024

Agriculture is one of the key sectors of the economy, and pest control is an integral part of this process. A team of scientists from the Indian Council of Agricultural Research-Central Potato Research Institute (ICAR-CPRI), Shimla, has come up with an innovative solution to this problem - a wind-powered insect air trap. This device addresses the shortcomings of traditional pest control methods by providing real-time insect population data. The trap is powered entirely by wind energy, making it an environmentally friendly solution that requires no power. Its unique design allows monitoring of both harmful and beneficial insects, providing a complete overview of the population in any agricultural area. “By assessing target pests at the right time, we can take necessary measures to control both pests and diseases,” says Kapil ... >>

Random news from the Archive

DNA-Based Programmable Computing Device 30.09.2023

Chinese scientists have achieved a significant breakthrough in the field of biological computing by creating a programmable computing device based on DNA. This important step brings us closer to creating a full-fledged DNA computer.

Integrated circuits that have been widely used in recent decades are mostly electronic and photonic circuits based on semiconductors. However, using genetic code for computation, known as rare earth circuits, is an entirely new strategy that can enable massive parallelism in the coding and execution of algorithms.

However, biological molecules typically diffuse and mix in liquids, making this strategy difficult to use for general computing.

Recent research has demonstrated a system incorporating multi-layer DNA programmable gate arrays (DPGAs) capable of solving quadratic equations.

Researchers from Shanghai University, led by Jiao Tong, created a device with three successive DPGA layers, each containing 30 logic gates and about 500 strands of DNA. These layers work in synchronization to control the random interactions of molecules.

The scientists noted that the use of single-stranded polymers consisting of a small number of nucleotides as homogeneous transmission signals allows the integration of large-scale integrated circuits with minimal loss and high accuracy for general computing.

According to the study, this device, equipped with an analog-to-digital converter, can be used to classify microDNA associated with various diseases.

Other interesting news:

▪ water bike

▪ New HP Data Center Solutions

▪ Miniature Precision ADCs MAX11259 and MAX11261

▪ You can love a caring robot

▪ 220 TB tape

News feed of science and technology, new electronics

 

Interesting materials of the Free Technical Library:

▪ section of the site Cultivated and wild plants. Article selection

▪ article by Immanuel Kant. Famous aphorisms

▪ article Why are cranberries and many other berries sour? Detailed answer

▪ Article Hematemesis. Health care

▪ article Spiral antenna for portable radios. Encyclopedia of radio electronics and electrical engineering

▪ article Frequency synthesizer for a portable radio station. Encyclopedia of radio electronics and electrical engineering

Leave your comment on this article:

Name:


Email (optional):


A comment:





All languages ​​of this page

Home page | Library | Articles | Website map | Site Reviews

www.diagram.com.ua

www.diagram.com.ua
2000-2024