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

The two-channel switch - the regulator of lighting with remote control. Encyclopedia of radio electronics and electrical engineering

Free technical library

Encyclopedia of radio electronics and electrical engineering / Lighting

Comments on the article Comments on the article

This device is designed for both local and remote lighting control, using a standard electrical network ~ 220v 50 Hz. It contains two independent control channels, which in any combination can operate in one of two modes:

1. Switch mode. In this mode, when turned on, 100% of the mains voltage is immediately supplied to the load. It is used for energy saving lamps.

2. Regulator mode. In this mode, the load power can be smoothly adjusted. It is used for consumers such as incandescent lamps or halogen lamps (including those fed through an electronic transformer).

Remote control of the switch is carried out by four buttons (two per channel) of any remote control that works with the widely used RC-5 command system. The remotes of this system are quite affordable and cheap.

Advantages of this switch:

  • Due to the use of MOSFET transistors instead of triacs, there is no such thing as "holding current" and therefore the control range is not limited from below for any allowable load power
  • Possibility of control over a wide range of power consumption: from 1 W to 400 W (when transistors are installed on heat sinks)
  • Switching of loads occurs at the moment when the mains voltage passes through zero, thereby minimizing interference in the power grid. Therefore, there is no need for noise suppression elements in the switch.
  • For the regulator mode, it is possible to set the lower power control threshold individually for each channel. This may be necessary for those devices that cannot be reduced below a certain value (for example, electronic transformers for halogen lamps)

Functions performed by the switch:

  • Remote switching on and off the load, power adjustment;
  • Local switching on, switching off and regulation of power by means of control buttons
  • In regulator mode, smooth switching on, which extends, for example, the life of incandescent lamps
  • Remembering the previous state of the switch and the power level (in case of a power failure, the operation is restored). Due to the dynamic use of EEPROM for these functions, the resource for the number of breaker control manipulations for each channel is at least 3 million times.

Regulator control

local government is carried out by two buttons located on the switch (one for each channel)

  • Turning on or off the load - a single short-term pressing of the key (0,2 - 1 sec.).
  • Power adjustment - hold down the key for more than 1 sec. Each subsequent long press causes the opposite direction of power change.

Remote control is carried out by the remote control directed towards the switch. To control the circuit breaker, four keys of the remote control are defined.

  • Turning off or turning on the load - a single short press of the corresponding key on the remote control (0,1-1 sec.).
  • Power adjustment - hold down the key for more than 1 sec.

For each channel on the remote control, two keys are defined: turn on / increase power and turn off / reduce power in the load. The remote control button codes corresponding to these commands are stored in the EEPROM of the microcontroller. Thanks to this, in the learning mode (which is described in the manual), you can at any time change the set of remote control buttons that control the regulator. If at least one of the control channels is in the regulator mode, then it is possible to turn on / off both channels with one button pressed for more than 1 second. (more details in the instructions).

When you press the control keys of the local control or on the remote control, a sound signal is emitted with a duration of ~0,2 seconds, which means that the command has been accepted.

Circuit breaker device

The regulator is built on an inexpensive and affordable microcontroller АТtiny2313-20PU. The schematic diagram of the device is shown below.

The two-channel switch - the regulator of lighting with remote control. Schematic diagram of a dimmer
(click to enlarge)

Power node serves to provide the microcontroller and the IR receiver with a supply voltage close to 5 V. The input voltage is rectified through the diode bridge VD1, quenched by the resistor R1, limited by the zener diode VD2, as a result of which a voltage of about 1V is formed on C2, C5. R2C3 elements are a filter in the photodetector power circuit.

Synchronization node. R6R7R8C4 is the string required for zero detection. Resistors R6R7 dampen the input voltage, which is limited by the internal diodes of the PD2 output of the microcontroller. Capacitor C4 serves to suppress impulse noise. Each transition of the mains voltage through zero is processed 100 times per second. If the required and current power do not match, then the current one is corrected. This also makes it possible to implement a smooth switching on of the load in the regulator mode. Also, the double frequency of the mains is used to poll the local control buttons, the formation of time intervals for the glow of HL1 and HL2.

Control and indication units. Buttons SB1 and SB2 are designed to control the first and second loads, respectively.
LEDs HL1 and HL2 serves to indicate the operating modes of the first and second control channels.
Photodetector B1 receives IR messages from the remote control. It also demodulates the carrier frequency of RC-5 bursts (36 kHz). The generated output signal of the photodetector is fed to the input PD3 of the microcontroller. Decoding of IR parcels in the MK is carried out by software. Analyzing the code of the received command, the microcontroller DD1 generates control signals for power transistors. Sound piezo emitter HA1 and LEDs HL1, HL2 gives signals under certain states of the regulator in various modes of operation.

Switch node loads. From the output PB0 (PB1) of the microcontroller DD1, positive pulses through R9 (R10) open the transistors VT1 (VT2), through which the mains voltage is supplied to the corresponding load. Resistors R11 and R12 serve to prevent spontaneous opening of transistors at the time of power supply to the device, when the outputs PB0, PB1 are still in the third state and have not been configured by the MK program. The rectified mains voltage is supplied to the load, which is acceptable for the lamps used.

Selection of operating mode is carried out by jumpers S1 and S2 for the first and second channels, respectively. If there is no jumper, then the channel is in the regulator mode, and if installed, then the switch.

Regulator design

The regulator is assembled on a single-sided printed circuit board made of foil fiberglass, the drawing and location of the parts of which are in the attached files. On the side of the printed conductors, elements HL1, HL2, B1, SB1, SB2, HA1 are installed. The remaining elements are installed on the opposite side. The board is fastened with D2.5mm screws at the corners. The power transistors are specially placed on the edge of the board so that heatsinks can be easily attached to them if the load being used draws more than 100 watts.

Two-channel switch - dimmer with remote control

Two-channel switch - dimmer with remote control

Used parts and possible replacements

To control the regulator, you can use any remote control that works according to the RC-5 protocol. The DD1 microcontroller can be replaced with an ATtiny2313-20PI or ATtiny2313V-20PU(PI), and the B1 photodetector can be replaced with a similar one, designed for a carrier frequency of 36 kHz, for example, TSOP4836, TSOP1836SS3V, SFH506-36, SFH5110-36, TFMS5360, but note that the location the outputs of photodetectors of different types may differ. Transistors VT1, VT2 can be IRF840A or domestic analogues of KP840, KP707, but it should be noted that for all these transistors, unlike 2SK2545, the surface for attaching the heat sink is not isolated from the drain, so they can only be mounted on a common radiator through insulating gaskets. We will replace the VD2 zener diode with BZX79C5V1, BZX55C5V1, 1N4733A, or you can choose domestic KS156A, G KS456A, G so that the stabilization voltage does not exceed 5,5V. Instead of HL1 HL2 LEDs, you can use HB3B-446ARA, ARL-3214URC-10cd or similar super-bright ones. The diode bridge VD1 must be designed for a current not less than the total current consumption by both loads and for a reverse voltage of at least 400V. HA1 - any two-pin piezoelectric tweeter. The fuse holders used are brand FH-100. Fuses protect power elements from overload and short circuit. Their rating should be 2 ..... 2,5 times higher than the current consumption of the load used.

Assembly and adjustment of the regulator

At the beginning, all elements except DD1, B1, C4 are soldered onto the board. Turning on the regulator in the network, measure the DC voltage on C1 and then on C3. In both cases, it should be around 5V. Then the tracks on the board are connected in series with a jumper, going to the 20th and 5th, 20th and 4th pins of DD1, while HL1 and HL2 should light up, respectively. Now we need to check the operation of the control channels. To do this, turn off the power, connect as loads, for example, incandescent lamps up to 100W, turn on the power supply to the left terminals R9, R10 according to the diagram from the + 5V power supply (for example, by closing the tracks on the board with a jumper, going to 20 and 12, 20 and 13 terminals of DD1. In this case, the lamps of the first and second channels should light up, respectively. If everything went well, then disconnect the regulator from the network, solder DD1 (although it is better to put a socket for it) and B1, C4 and connect the programmer to the XP2 connector (standard a six-pin connector for in-circuit programming of the AVR). (flash EEPROM is also a must!!!)

The FUSE bits of the DD1 microcontroller must be programmed as follows:

• CKSEL3...0 = 0100 - clocking from the internal RC oscillator 8 MHz;
• CKDIV8 =0 - clock frequency divider by eight is enabled;
• SUT1...0 =10 - Start-up time: 14CK + 65 ms;
• CKOUT = 1 - Output Clock on CKOUT disabled;
• BODLEVEL2...0 = 101 - threshold level for the 2,7V supply voltage control circuit;
• EESAVE = 0 - erasing EEPROM during chip programming is disabled;
• WDTON = 1 - No permanent activation of Watchdog Timer;
The rest of the FUSE - bits are better left untouched. The FUSE bit is programmed if set to "0".

For the regulator mode, as mentioned above, you can set individually for each channel the lower power control threshold. To do this, you need to write the value for the first and second channels, respectively, into the EEPROM cells at $01 and $02. In this device, in the range from 0% to 100%, there are 127 steps of regulation. Thus, to set the lower threshold at a level, for example, 25%, you need to multiply this value by 1,27 (25 * 1,27 = 32) and write down the value 32 ($20) to the corresponding cell in the EEPROM. Initially, zeros are written in both cells.

The instruction manual is in the attached files. The switch has a remote control compatibility check mode. To do this, you need to set both channels to the regulation mode, turn them on, set the minimum power level on them, and turn them off. Then press any button on the remote control and if it works according to the RC-5 system, an audible signal will sound for 1 second. The permissible total power of the switched load in each channel without a radiator is 100 W. With a larger one, it is necessary to install transistors on a heat sink of the appropriate area. The regulator is designed to control only those types of loads that are indicated at the beginning of the article. They can be powered by rectified mains voltage. Do not connect other devices, such as fluorescent lamps or electric motors, to it. This may damage the regulator.

Attention! When assembling and adjusting the regulator, remember that all its elements are under mains voltage and touching them can lead to electric shock.

Download project files in one archive : diagram, demo firmware, printed circuit board drawings, instruction manual

Author: Alexey Batalov, alexperm72@yandex.ru, ICQ#: 477022759; Publication: mcuprojects.narod.ru/projects.html

See other articles Section Lighting.

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

Water found on asteroid Bennu 06.12.2018

The OSIRIS-REx probe, sent in September 2016 to the asteroid Bennu, flew 2,2 million km and arrived at its destination a week ago. It approached the celestial body and moves next to it at a distance of about 10 km. At the rendezvous stage, which lasted from mid-August to early December, the apparatus began scientific observations.

Data obtained with spectrometers showed the presence of molecules containing hydroxyl groups, that is, oxygen and hydrogen atoms bonded together.

The scientists believe these hydroxyl groups are found throughout the asteroid in water-bearing clay minerals, meaning that at some point Bennu's rock material interacted with water. The asteroid itself is too small to hold liquid water, but the findings indicate that liquid water was present for some time on the much larger asteroid from which Bennu broke off.

The researchers note that the data obtained using the OSIRIS-REx cameras confirm Bennu's ground-based telescopic observations and the asteroid model developed in 2013. In turn, the presence of hydrated minerals makes the asteroid Bennu, which appeared during the formation of the solar system, very well suited for the OSIRIS-REx mission to study the composition of primitive volatile and organic substances. The probe is to take soil samples from Bennu and bring them back to Earth in 2023. Scientists hope to obtain from them important information about the history and development of the solar system.

Other interesting news:

▪ Fujitsu Primergy servers based on Intel Xeon E5 v4 processors

▪ Trouble swimming in syrup

▪ Remote shutdown of car engines

▪ 1 Gbps over infrared

▪ solar chimney

News feed of science and technology, new electronics

 

Interesting materials of the Free Technical Library:

▪ site section Tone and volume controls. Article selection

▪ article Gentle, quiet word to remember (remember). Popular expression

▪ article Does the turtle have a voice? Detailed answer

▪ article Construction electrician. Standard instruction on labor protection

▪ Velofar's article on LEDs. Encyclopedia of radio electronics and electrical engineering

▪ article Audio player power supply, 3,1 volts 260 milliamps. 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