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

Touch control for lighting with remote control. 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 proposed device is one of the options for microcontroller dimmers for incandescent lamps, the designs of which can be found on the Internet and in amateur radio literature.

In such regulators, one of three control methods is usually used: from your own remote control; from any remote control with memorizing the key code; from any remote when pressing any key in a certain way. In this case, the first option is chosen, which I consider the most successful, despite the fact that a separate control panel is required.

Let me explain a little why. Since different IR control systems have different modulation carrier frequencies, they can also differ in an arbitrarily used "remote-controller" pair, as a result of which the control range can be greatly reduced, which causes some inconvenience. The disadvantage of the latter method is also the fact that the regulator can respond to commands that are not intended for it at all, or regulation is difficult due to complex manipulations of the remote control key.

The proposed regulator is controlled by two buttons of any remote control operating with the widely used RC-5 command system. The remotes of this system are quite affordable and cheap.

Functions performed by the regulator:

  • remote turning on and off the light, adjusting the brightness of the lighting;
  • local switching on, off and dimming of lighting using a sensor that does not have galvanic contact with a person when touched;
  • smooth switching on of lighting, which prolongs the life of the incandescent lamp
  • remembering the previous lamp brightness setting and the state of the regulator. Due to the dynamic use of EEPROM for these functions, the resource for the number of manipulations of the regulator control is at least 5,4 million times.
  • auto-off after 12 hours, which is used for forgotten lights on;

Regulator control

Manual (touch) control is carried out by touching the entire palm or four fingers of the sensor folded together without effort.

  • Turning on or off the lighting - a single short-term touch of the sensor (0,5 - 1 sec.).
  • Adjusting the brightness of the lighting - holding the palm on the sensor for more than 1 second. Each subsequent long touch causes the opposite direction of brightness change.

Remote control is carried out by the remote control directed towards the switch. To control the regulator, two keys of the remote control are defined.

  • Turn off or turn on the lighting - a single short press of the corresponding key on the remote control (0,1-1 sec.).
  • Adjusting the brightness of the lighting - holding down the key for more than 1 second.

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 controller.

Regulator device

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

Touch control for lighting with remote control. Dimmer circuit
(click to enlarge)

Power node consists of elements C2, R2, VD1, VD2, C3, C4 serves to provide the microcontroller and the IR receiver with a supply voltage close to 5 V. The R3C5 elements are a filter for the power supply circuit of the photodetector.

Synchronization node. An input voltage divider is made on R4R6, which is necessary for detecting zero and eliminating false positives at the moments of opening VS1. C6 serves to suppress impulse noise. The output of the divider is connected to the output PD2. The internal diodes of this output of the MK limit the input voltage.

Nodes of control and indication. On the elements R7, VT1, R8, C7, a touch control unit is implemented. When there is no hand on the sensor, VT1 is closed and a logic unit voltage is applied to the input PD4 of the microcontroller. When the regulator cover is touched, a logic zero voltage is applied to this input and the MK program processes the control commands.
LED HL1 serves to indicate the operating modes.
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 the triac VS1, which controls the lamp.
On the elements HA1, R11, R12, R13, VT2, an audio frequency generator is assembled according to a typical scheme recommended by the manufacturer of the piezoelectric emitter. R10 serves to somewhat reduce the power supply of the generator and, accordingly, its current consumption, which does not affect the quality of its operation. Sound signals are given during the control of the controller.

Switch node loads. From the output PB0 of the microcontroller DD1, negative pulses through R5 open the triac VS1 at various moments of the half-wave of the mains voltage and thus regulate the brightness of the lamp. The R1C1 circuit and the L1 choke are used to suppress interference coming from the regulator to the mains at the time of switching the load.

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. The board is intended for installation in a VI-KO wall-mounted single-gang lighting switch (models "Yasemin" or "Carmen") from which unnecessary elements are removed and fastened to the frame with a d2.5mm screw. in the center. Under his hat, you need to put an insulating washer. On the reverse side, it is fixed with a nut as shown in the attached photo. The sensor in the form of a 30x45 mm rectangle cut out of foil is installed on the inside of the cover (which previously served as a key) and fixed on it with transparent tape over the entire area, it is only necessary to leave a contact pad for the spring. On the sides of the lid, strips of cardboard 4 mm x 30 mm in size and 0,5 mm thick are glued so that it sits in place with some effort. The piezo emitter is fixed on the cover with double-sided adhesive tape. The drawings in the attached files show the elements of the hull after completion. The regulator is placed in a standard recess for the switch in the wall and is connected according to the usual two-wire circuit, no modifications are required. It is necessary to connect the phase wire correctly, as shown in the diagram, otherwise the control from the sensor will not work.

Appearance of the assembled device.

Touch dimmer with remote control

Touch 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. We replace the DD1 microcontroller with an ATtiny2313-20SI or ATtiny2313V-20SU(SI), and the B1 photodetector with a similar one, designed for a carrier frequency of 36 kHz, for example, SFH506-36, TSOP1736, TSOP1836SS3V, but it should be noted that the location of the pins of photodetectors of different types may differ. As L1, an industrial surface-mount choke of the CDRH127 / LDNP-101MC PBF brand (100 μH 1,7A) was used. It can be replaced with a similar or home-made inductance of 30 - 200 μH for a current not less than the lamp consumed by the lamps (0,5 A for every 100 W).

Symmetrical thyristor VS1 can be from the BT137 - BT139 series for a voltage of at least 400V or similar from another manufacturer with a low control current. We will replace the VD2 zener diode with 1N4734A, KS156A, KS456A. Instead of the HL1 LED indicated in the diagram, you can use HB3B-446ARA or similar super-bright red glow colors (if the brightness is not enough, you can reduce R14 to 4,7 com.). The piezo emitter can be replaced with a frameless type FML-34,7T-2,9V1-100 or any other similar three-wire so-called "self-driven", for example, a ringer from old telephone sets of Asian origin.

Of course, it is easier to use a piezoelectric emitter with a built-in generator, for example HPA17A or HPM14A, but the author could not purchase such. In this case, the elements R10, R11, R12, R13, VT2 are not installed, and the sound emitter is connected to + 5V and to the PD0 terminal, observing the polarity. Instead of VT1, VT2, transistors of the KT315 (B, G, E), 2SC1015Y, KT3102 or similar types can be used. At the same time, the VT1 120 300. Capacitors C2, C200 type K1-2 or similar imported for a voltage not lower than those indicated in the diagram. All resistors - MLT power indicated on the diagram. The resistance ratio R73 / R17 must be close to 6 - otherwise the zero detector will not work correctly.

Assembly and adjustment of the regulator

An unmistakably assembled regulator from serviceable parts does not need to be adjusted. It is only necessary to program the microcontroller. The programmer is connected to the XP2 connector (a standard six-pin connector for in-circuit programming of AVR microcontrollers). In this case, the controller must be supplied with voltage from the programmer (the controller must be disconnected from the mains during programming) . The attached files contain two firmware: one implements only touch control, and the second - both types of control for 5 minutes. (Designed to test the device's performance).

For full-featured firmware, please contact the author, alexperm72@mail.ru.

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

• CKSEL3...0 = 0100 - synchronization 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,7 V supply voltage control circuit;
• BODEN = 0 power monitor enabled
• 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".
Then you should read the calibration byte for the internal RC oscillator at 8 MHz and write it to flash memory at address 7FFh (last cell).

The instruction manual is in the attached files. The controller has a mode for checking the remote control for compatibility. To do this, you need to turn it on and set the minimum brightness, then press any button on the remote control and if it works according to the RC-5 system, then a beep will sound for 1 second. Permissible total power of switched lamps - 400 W. With a larger one, it is necessary to install a triac on a heat sink of the corresponding area.

The regulator is designed to control only active load. Do not connect other devices, such as fluorescent lamps or electric motors, to it. This may damage the regulator. The regulator has good repeatability, all the assembled specimens started working immediately without any adjustment.

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

Author: Alexey Batalov, alexperm72@mail.ru, ICQ#: 477022759; Publication: mcuprojects.narod.ru/dimmerSIR/DimmerSIR.html

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

How to recognize someone else's dream 31.12.2017

A team of scientists from the University of Wisconsin-Madison, USA, has identified a "hot spot" in the posterior cortex near the back of the head, where when people say they are dreaming, low-frequency brain waves (associated with unconsciousness) are attenuated and high-frequency activity increased regardless of whether it was during periods of rapid eye movement or not.

Sleep provides science with the opportunity to study consciousness in all its various forms, from realistic dreams to complete unconsciousness. When a person is asleep, researchers can separate their conscious experience from the confusing influence of perceptions.

During the experiments, the scientists used electrodes to record the waves emitted by the sleeping brain using high-density electroencephalography. The researchers woke people up at short intervals and asked them if they had dreams, and if so, what the dreams were about. In one of their experiments they collected about 200 of these "awakening reports" from 32 people, and in another they added about 800 more from a smaller group of people specially trained to tell dreams.

In a third experiment with seven subjects, the scientists were able to determine with 87% accuracy when participants were dreaming and when they weren't. What's more, they were able to link brain wave activity in certain areas of the brain to specific elements of dream content - scenes, characters, and speech. These same areas are activated under the impressions that arise upon awakening.

"We did not try to predict the content (of dreams), although this direction is very interesting," the scientists say.

Other interesting news:

▪ LT1990 Micro Power Differential Amplifier

▪ Harm of antibiotics and antiseptics

▪ World's smallest high-speed MOSFET

▪ Navigator looking for parking

▪ Tamed Display

News feed of science and technology, new electronics

 

Interesting materials of the Free Technical Library:

▪ section of the site Car. Article selection

▪ article by Emil Michel Cioran. Famous aphorisms

▪ article What is the origin of the goldfish? Detailed answer

▪ article Removing and installing car wheels. Standard instruction on labor protection

▪ article What is Frame Relay? Encyclopedia of radio electronics and electrical engineering

▪ article Electrical installations for special purposes. Electrothermal installations. Plasma-arc and electron-beam installations. Encyclopedia of radio electronics and electrical engineering

Leave your comment on this article:

Name:


Email (optional):


A comment:




Comments on the article:

Leo
I think it's an interesting scheme.


All languages ​​of this page

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

www.diagram.com.ua

www.diagram.com.ua
2000-2024