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

Adapter for a two-channel light cord on a microcontroller. 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

The ON button turns on the adapter, and the OFF button, respectively, turns it off. Hold the ON button until the POWER indicator lights up for about three seconds, at which time a reset is performed for a stable start (capacity 4.7x10v is being charged). If you press and hold the S1 button before turning on the power, the MAX indicator will light up. The glow of this indicator indicates that the bulbs are 20% dimmer. This mode is designed to increase the life of the bulbs. The current state is stored in non-volatile memory and is retained at subsequent power-ups. To disable this mode, hold the S1 button again when turning on the power.

Adapter for a two-channel light cord on a microcontroller. Diagram of a dual-channel power cord adapter
Fig.1. Diagram of a dual-channel power cord adapter (click to enlarge)

The glow of the COMPARE indicator indicates that the comparator is on and if the voltage in the 240 V network is exceeded, the entire adapter will be forced to turn off. To turn off the comparator, you must hold down the S2 button before turning on the power. The state of the comparator is not remembered, each time the comparator is turned on again automatically, to turn it off, you will have to repeat the above steps. Pressing the S1 button changes the speed of the current effect. The change in speed occurs cyclically, each new press leads to a decrease in speed, and when the minimum speed is reached, the highest speed is switched on again.

The current speed state is adjusted and remembered independently for each effect. The next time you turn on the adapter, the last speed setting for each effect is restored. Pressing the S2 button selects the current effect. Every sixth press will light the AUTO indicator, the glow of this indicator indicates that all effects are performed in automatic mode one after another. Each effect is repeated 100 times. The program currently includes five effects. Each effect is carefully selected and thought out. In all effects, there is no complete extinguishing of the bulbs, so there is no unpleasant blinking. Each of the five effects has an overflow function. Of course, the use of only two channels does not make it possible to implement a "traveling wave", and yet everything looks very nice.

Operating modes switched by button S2:

0 - automatic
1 - the first channel smoothly goes out, and the second one slowly flares up (and vice versa)
2 - wink
3 - smoothly flares up and abruptly goes out (in turn)
4 - smoothly go out and sharply flare up (in turn)
5 - one channel burns constantly, and the second sharply flares up and smoothly goes out.

You can download the following files related to the project:

flash_light.hex - microcontroller firmware file
flash_light.obj - program object file
flash_light.asm - control program source
Download files

Author: Konovalov V.A., odorant@mail.ru; 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

The Polymer Diode Revolution Is Coming 22.10.2006

American chemists have obtained a sheet of flexible polymer diodes.

The hard silicon substrate on which microcircuits are applied has long thwarted electronic engineers who dream of creating unprecedented devices like a self-luminous T-shirt or an umbrella that can turn sunlight into electricity to power a camping TV. And the way out is in the creation of microcircuits from flexible polymers.

Scientists from Cornell University (USA) have created another prototype for such a chip. The main difference from other similar works is the use of ions with different charges. The device consists of two polymer films bonded to each other, one of them contains positive and the other negative ions.

At the point of contact, they leave their native film and move to the neighboring one until equilibrium is reached. The resulting electric field causes the movement of electrons. And on the outside, two more films of electrically conductive polymers are attached, one of which is also transparent. These are the cathode and the anode.

When a potential difference is applied to them, an electric current will flow through the entire structure: electrons will go in one direction, and holes in the other. Having met, they must recombine, but the migration of ions affects this process.

As a result, it is possible to excite polymer molecules, and they reset their excitation by emitting light. In order to skip it, one electrode is made transparent.

The reverse process is also possible: the excitation of molecules by an external light source and the production of an electric current.

Other interesting news:

▪ Butterflies fly like birds

▪ Processor Samsung Exynos 5 Octa

▪ Hybrid ATV Krampus

▪ Biofuels: more and cheaper

▪ Miniature reed switch from Coto Technology

News feed of science and technology, new electronics

 

Interesting materials of the Free Technical Library:

▪ section of the site Electrical safety, fire safety. Article selection

▪ article Economics of the enterprise. Lecture notes

▪ article How did pneumatic tires appear? Detailed answer

▪ article Winter cress. Legends, cultivation, methods of application

▪ article Warning device for operation of the refrigerator protection relay. Encyclopedia of radio electronics and electrical engineering

▪ article A simple panoramic indicator. 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