Home Salon How to make a cotton switch. Turning the light on by clap Sensor to turn off the light by clap

How to make a cotton switch. Turning the light on by clap Sensor to turn off the light by clap

Recently, LED lamps and various toys that operate on the “clap switch” principle have become very popular. In our article we will assemble something similar, but instead of a lamp we will use a 3 Volt LED.

Here is the actual diagram (for a more detailed display, click):

If you replace the HL1 LED with a relay coil, you can even light incandescent light bulbs, and VD1 will appear in the circuit, which will protect the VT3 transistor from self-induction in the relay coil when it is turned off. If you are making a circuit with an LED, then this diode is not needed.

It will look something like this:


So, the most important details of the scheme are:

Two KT315G. Can be used with any other letter. The pinout (location of pins) and markings of these transistors can be found in this article.


In this circuit we will also use the 3107B transistor.


And here is its pinout:

where K is the collector, B is the base, E is the emitter.

And of course, the most important part of our circuit is the microphone.


Attention here! Microphones are different. I think we won’t list the classification of microphones. I will say one thing, the so-called electret microphones:


The picture shows the EM-6050 electret microphone, which is used in my circuit.

What's the joke? The whole point is that they have roughly speaking, there is a polarity. One of the microphone leads is connected to the microphone body. This can be easily seen by the printed conductors that connect one of the microphone contacts to the housing. You can also ring by connecting one probe to the microphone body and the other to the microphone output.

In our circuit, we connect the output of the microphone, which is called to the case, to the minus of the power supply, and the other output, respectively, to the plus.

My circuit works perfectly with a supply voltage of 5-9 Volts, as can be seen in the video below:

By clapping your hands. The device is suitable both for a children's night light and for lazy people who don't want to get up wrapped up and turn off the light :) One minus of the device is that there are two different power supplies, the MK power supply and the load power supply. If you play with the trimming resistor, the range can reach up to 10 meters without any amplifiers with a capsule microphone. The scheme itself:

Printed circuit board:

All the necessary components are indicated on the printed circuit board, and there should be no questions. We will use as a microcontroller Attiny2313. Let's consider the principle of operation.

When the first clap appears, we record its appearance, start the timer, wait a while for the echo to subside and wait for the next clap to appear. If the next impulse came too early and fell into the red zone, we consider it to be extraneous noise and declare the session erroneous. We stop and reset the timer, reset the variables. If the pulse hits the green zone (the clap waiting zone), we record its occurrence by increasing the value of the variable and wait until the timer overflows and causes an interrupt. If there was silence after the second pulse, then in the timer interrupt handler we will switch the load. If the second clap came too late and fell into the red zone, we will assume that this was also noise. If after the second successful clap, while waiting for the timer to overflow, another impulse appears, we will also assume that this is noise and declare an error.

Discuss the article TURNING ON THE LIGHT BY COTTON

In everyday life, situations often arise when even a simple action - turning on the light in a room can be a problem. This is often associated with children, disabled people or bedridden patients, for whom reaching the switch is difficult or impossible. In such cases, an acoustic device becomes indispensable. It works on the cotton principle.

Application of acoustic (clap) switches

Such devices are gaining popularity due to their ease of use and practical usefulness. It is enough to pay attention to the dirty spots around the traditional switch that appear on the wall soon after the renovation. A non-contact device eliminates this unpleasant effect.

It is also useful for the younger generation if the lighting control devices are installed in the traditional place for Russia, and not below, as is customary in Europe. Just by clapping his hands, the child can easily turn on and off the light in the room.

In the same way, the acoustic switch will be useful for disabled people - wheelchair users and bedridden patients. It can also act as a signal system for them to ask for help when needed. A slight modification of the circuit will allow you to send not only a light signal, but also a sound signal.

The popular name of the device “cotton” is most likely accidental, because the device can also respond to other sharp sounds, including whistling, knocking and other signals.

It can be assumed that devices of this class will become indispensable accessories of a home management system called “smart home”.

Principle of operation

Cotton light switches are one of the types of devices for remote control of lighting. In this case, the signal to change the lighting status is a sharp sound in the form of clapping your hands. Of course, an indispensable element of such a control scheme is a microphone. When making a device yourself, it is not at all necessary to run to the store for such an important part. You can use devices from old phones, tape recorders, headphones and other devices associated with the use of elements sensitive to sound vibrations.

The operating algorithm provides for turning on the light when clapping and turning it off at the next similar signal.

Specifications

As an example, consider the data of a standard device

  • The device is powered from a standard 220 volt network;
  • the permissible total power of connected devices is 300 watts;
  • sound signal adjustment range within 30–150 decibels;
  • operating temperatures ranging from 20 degrees below zero to 40 degrees above zero;
  • IP-30 class housing protection.

Various luminaires can be used in the load network:

  1. Serial incandescent or halogen lamps.
  2. Fluorescent or energy-saving lamps.
  3. LED lamps and lamps.

Such characteristics allow the device to be used within the framework of the requirements of Federal Law No. 261 regarding the rational use of electricity.

The dimensions of the device are comparable to the size of a matchbox, which allows you to conveniently place it in close proximity to the lamp. You can attach it to any surface using double-sided tape or install it with self-tapping screws.

Device components

You can propose several schemes for the device.

Equipment according to option 1

This is the simplest scheme. It is distinguished by the use of a microphone with multiple amplification of the sound signal. It will require several KT 315 transistors and one powerful KT 818. From the microphone, the signal is transmitted to the KT 315, amplified many times and passed to the KT 818, which controls the relay for closing and opening the load contacts, be it a light bulb or any other consumer. The sensitivity of the device allows it to be switched on/off at a distance of 4–5 meters, which is quite suitable for use in household applications.

The optimal choice is an electret microphone, one of the terminals of which is connected to the body. Electricity consumption is low, voltage is 4–16 volts.

Device according to option 2

The device circuit in this case is more complicated, but it is also more reliable than the previous one. To implement it you will need:

  • resistor;
  • capacitor;
  • Zener diode;
  • controlled thyristors.

The transistor trigger must be connected to a voltage divider and a resistor. The trigger receives power through a diode and resistor. The capacitor and zener diode are designed to equalize the voltage.

Stable operation of the trigger is possible when one of the two controlled thyristors is turned on. Reacting to the sound from the microphone, the voltage divider switches them to a different state.

The load on the switch does not exceed 100 watts. If it is necessary to increase this characteristic, it is necessary to use diodes of higher power. Transistors are installed using radiators.

Connection and installation

The device is mounted on a one-key or two-key switch so that it receives power from a 220-volt network. This can be done as follows:

  • A typical light bulb connection diagram looks like this: power to the switch is supplied from the panel through the distribution box. The neutral wire is fed to the light source and connected in parallel to the switch;
  • It is necessary to break the power circuit to the key switch and install an acoustic device into the gap. The controller is installed in the lamp body;
  • Most often, the switch is equipped with two pairs of wires, white and black. Power is supplied in white, loads are connected in black. It is better to make the connection using terminals or simply a winding. Soldering is not used in such circuits.

Operating principle and operating procedure of an automatic soft lighting switch

The device is designed to increase the service life of lighting fixtures. Supplying maximum voltage in burst mode is often the reason for their burnout. As with the clapper switch, the signal for the light bulb to turn on is a beep.

It is fed to a microphone, which converts the acoustic signal into an electrical impulse. The signal is amplified in the operational amplifier and sent to a capacitor to charge it. When the charge reaches higher values ​​than on the capacitor, the comparator is triggered and a signal appears at the output instead of a zero value. As a result, the transistor generator that directs the pulses is started, and the symmetrical triode thyristor is opened, supplying voltage to the light bulb.

After some time, the voltage across the capacitor decreases, which leads to a decrease in the pulse frequency on the symmetrical triode thyristor as a result of an increase in the phase delay. At the same time, the lamp slowly goes out. By selecting the values, you can achieve a light source extinguishing time of up to three minutes.

Special devices intended for public places of periodic use also deserve attention. These are places such as entrances, elevator landings, basements and other similar places.

During daylight hours, the optical sensor disables the device from triggering. With the onset of darkness, the device switches on in standby mode. When sound exposure occurs, an acoustic sensor is triggered, turning on the light in the room. The built-in time relay turns off the light after 40–50 seconds of burning. If the sound signal is repeated during this period, the time count starts from the time it was received.

Such a lighting control system saves up to 50% of the electricity spent on lighting public passageways.

Test procedure for cotton switches

After installing and connecting the device, it must be tested under real operating conditions. The test consists of simulating household noises and the reaction of the installed system to them. The following noises can be considered common in the home:

  • noise of a household vacuum cleaner;
  • electric drill operation;
  • the clatter of plates;
  • sound from working with a hammer;
  • phone calls, etc.

By creating such noise effects one by one, we check which of them the device can respond to. You can try to eliminate unwanted reactions from the device by adjusting the microphone sensitivity. This feature is implemented in all device models.

The production of such a switch is shown in detail in the video.

To make an acoustic switch yourself, you undoubtedly need solid knowledge in the field of radio electronics and electrical engineering, but installing a standard device is within the capabilities of a performer with minimal electrical installation skills. I wish you success!

In recent years, remote lighting control systems have gained popularity. Sound commands are accepted by the clap switch. When the clap is strong enough, the light turns on or off. The device can be purchased at a store or, if you have sufficient knowledge of the basics of electrical engineering, you can make it yourself.

Application

The light switch claps on and off in response to the noise it makes. The operating algorithm is as follows: the first clap - switching on, the second - switching off.

It is recommended to install devices of this type only in quiet rooms. Premises of this type include bedrooms, storage rooms, utility rooms, and basements. It is irrational to install cotton devices in rooms where there are many people (offices, living rooms, industrial areas), since extraneous noise leads to false reactions of the devices.

The most common place to install a slam light switch is the bedroom. It is very convenient to control the lighting without getting out of bed. Cotton systems are popular in families with small children, since to turn the light on or off you no longer need to reach for a high-mounted switch.

Many people confuse cotton and acoustic devices. The acoustic switch is triggered by any noise, and the clap switch is triggered only by claps.

Principle of operation

The device operates using a microcontroller installed in it. The controller authorizes turning the light on and off by clapping. If desired, this device can be used to control other electrical household devices (air conditioners, fans, etc.).

A typical audible light switch contains an electronic microphone with a preamplifier. This component amplifies the sound entering the device, which allows you to record even the quietest pops. The operation of the amplifier is controlled using transistors VT1 and VT2. The circuit is controlled by a pair of resistors R2, and diodes VD1 and VD2 are used to equalize the signal.

The sound from the clap passes through the microphone, where the electrical impulse is amplified and transformed. Next, the sound is equalized due to the work of rectifying diodes. The sound is controlled by a resistor (if the sound volume level is below the specified level, the resistor will prevent the device from operating). When the signal on the capacitor is leveled, the voltage increases and the transistor switch VT3 opens.

The light turns off and on after sequential charging and discharging of the capacitors. At the end of a full cycle of activity (one more bang), the resistor and capacitor C10 are discharged in four seconds. This causes the device to turn off.

Specifications

As an example, let’s look at the characteristics of a standard device for turning the light on and off by clapping.

Device details:

  1. Power is supplied from a standard network with a voltage of 220 Volts.
  2. The maximum total power of consumers does not exceed 300 Watts.
  3. Sound control ranges from 30 to 150 decibels.
  4. Permissible temperature range: from 20 degrees below zero to 40 degrees above zero.
  5. Housing protection class - IP30.

A variety of lamps are used in the network:

  1. Incandescent and halogen light sources.
  2. Energy-saving or fluorescent light bulbs.
  3. LED devices.

The specified characteristics comply with the requirements of the law of the Russian Federation number 261. This act regulates the rules for the rational use of electrical energy.

The equipment is similar in size to a matchbox, that is, compact. This makes it possible to install it close to the lamps. The device is fixed using self-tapping screws or double-sided tape.

Connection diagram and installation

Below is a diagram of a clap light switch. Based on it, you can connect this device.

The white conductors available on the device are connected to the network. The load is connected to the black wires. To connect copper conductors, you will need terminals. The black conductors are connected to the lamp bulb. These devices are connected in parallel.

The switch is powered via a single-key switch. If you need to turn it off, you just need to press the switch.

The sound sensitivity is controlled by the corresponding regulator. It is recommended to use the average audio value.

Tests

Before turning on the device, you should configure it to eliminate false alarms due to extraneous sounds. For example, a cotton device should not respond to the blows of a hammer, the knocking of dishes, a ringing telephone, or a switched-on hammer drill.

Settings are made experimentally. The device is considered configured when it responds only to claps.

Manufacturers

The most famous models presented on the Russian market are “Ecosvet” and “Claps”. Let's look at their main characteristics.

Ecolight switch

The Ecosvet device is designed to work with 220 Volt light bulbs.

Main parameters of the device:

  • sound signal spread - from 30 to 150 decibels;
  • housing protection level - IP30;
  • permissible temperature range - from 20 degrees below zero to 40 degrees above zero;
  • cost - from 350 rubles.
  • “Ekosvet” is fixed with self-tapping screws using the mounting legs. It is not recommended to install the device in noisy rooms. Despite the fact that “Ekosvet” is configured to clap, false alarms are possible.

    The figure above shows the device connection diagram. "Ecolight" is connected to a conventional switch to provide the ability to de-energize the circuit and stop its operation.

    "Claps" switch

    This model is one of the latest developments, where the audio signal is processed by an advanced microprocessor. The device only responds to claps, so it ignores false information. A prerequisite for operation is a certain nature of sound transmission, when the claps must occur in a row.

    There may be one or more switches in one room. Each of them will be set to a given number of claps. To do this, place a jumper on the board in the desired position. As a result, it becomes possible to control several devices that are unrelated to each other, for example, an air conditioner and a lamp, a TV and a tape recorder. “Claps” is compact (about the size of a box of matches) and can be mounted anywhere, including in a socket box.

    “Claps” costs more than “Ekosvet” (2450 rubles versus 350), but its reliability is higher. “Claps” will work with fluorescent light bulbs even when the load is switched on smoothly (“Ekosvet” is not capable of this).

    Making a switch yourself

    You can make a cotton device yourself.

    To do this you will need 3 boards:

    • Arduino Nano;
    • sound module;
    • power relay board.

    In addition, you need a computer, a USB cable, and a 5-volt power supply. You should install the Arduino IDE program on your computer, designed for flashing the microcontroller firmware.

    After copying the sketch data and pasting the text into the Arduino IDE window, you must immediately flash the controller firmware. When changing some settings and rewriting the device, it is possible to fine-tune the sound relay to suit your own needs.

    The diagram shows that the controller has 4 wires. A couple of them go to power, the yellow wire is directed to control the power relay (pin 13), and the green wire is the control wire from the microphone connected to the A0 controller.

    Note! A condenser-type microphone can be replaced with an electret microphone, in which an electret plate is used as a fixed capacitor plate and a constant voltage source. A distinctive property of the material is the ability to maintain a surface charge over long periods of time.

    The chip contains 8 analog inputs and 14 digital inputs and outputs. In this example, A0 and D13 are used, since they turn on the LED on the Arduino board.

    When replacing the AnalogRead indicator, the threshold sensitivity is determined. The highest value is 1024. If you change the Delay value, the time it takes to execute the sketch will be adjusted. In this way, the desired switching readiness time is achieved. A threshold is also determined that protects against interference and false alarms. The sensitivity of the microphone can also be changed using a variable control located on the board. Setting up and testing the circuits is carried out on the Arduino UNO board.

    A couple of weeks ago, an LED panel for room lighting was assembled and it was decided to assemble an acoustic switch for it, and today I want to look at perhaps the simplest acoustic switch circuit.

    The scheme was found on one of the bourgeois sites and slightly altered. The device allows you to turn the power circuit on and off with a clap. I intend to use it to turn on the lights. The device is quite sensitive thanks to a double amplifier using low-power transistors. It responds to clap at a distance of 5 meters from the microphone. All parts were replaced with domestic ones.

    The microphone amplifier uses domestic transistors of the KT 315 series with any letter or index. The final stage uses a powerful transistor switch based on a bipolar transistor of the KT 818 series, all other details are the same as in the original circuit. You can exclude the relay from the circuit and connect a load in its place, but this is only in cases where you need to control loads with power up to 12 volts; if you need to control loads with power from the network, you can’t do without a relay. At the moment of clap, the microphone receives the wave, and as a signal it is sent to a power amplifier, which alternately amplify the signal received from the microphone. The amplified signal arrives at the base of the switch, its magnitude is sufficient to trigger the transistor, and at this moment the junction of the transistor opens and conducts a current that powers the connected load or relay.

    When assembling, observe all the ratings of the parts; even a slight slope can lead to abnormal operation of the switch. The device responds not only to pops, but also to low-frequency noise (powerful bass, etc.).


    The supply voltage range is from 4 to 16 volts, power only from stabilized DC voltage sources and under no circumstances use switching power supplies, the device will not work with them!

    For the trial version, the device was mounted mounted, then it will be transferred to the board, the main thing is that everything works without failures.

    New on the site

    >

    Most popular