Voice control of lighting. Voice lighting control. Connecting PSC05 to Arduino
There are many different solutions on the market today. remote control some kind of lighting device. For example, you can control a lamp using a smartphone and a special application, you can control it from a remote control, etc. Each has its pros and cons.
The Russian company ARMiSoft approached this issue more fundamentally and, I must say, diversified. Over the past year and a half, the company's specialists have been working on the creation of the Voicer voice light switch, which has an elegant design and voice control functions.
Voicer allows you to adjust the brightness of the connected lamps through mechanical actions (dimmer ring and button), infrared remote control signals or voice commands (last, most interesting solution). Voicer is the world's first device that combines original design and intelligent control of separate voice commands. It will be a pleasure to have it in every home as a logical replacement for traditional light switches.
And in the light of the gradual development of the “smart home” direction, this decision will be in demand, especially since there are no analogues. The sensitivity of receiving voice commands turned out to be at a high level, which is clearly seen in the video.
Main characteristics:
- Ergonomic design
- Built-in dual color backlight
- The compactness of the outer part. The height of the case, measured from the plane of the wall, is only 5.5mm.
- Convenient mechanical control via button and dimmer ring
- Voice control through commands trained for a specific person in the selected language. In the future, speaker independence is possible on an already purchased switch!
IR control - Scheduled device operation
The device is connected to a break in the circuit 100 - 220V (50-60Hz) of the lamp power supply through a two-wire connection - An LED dimmable lamp or an ordinary incandescent lamp can act as a load.
- Does not require technological equipment to flash the device: Like any device that uses complex processing algorithms, the device can be easily flashed new version programs. Voicer is flashed through sound by playing on any multimedia device (for example, on a phone) an audio file in WAV format (this file is a flashing for the device), offered for download from the company's website! Firmware time sound file will not exceed one minute. This technical innovation is currently being patented by the company.
ARMiSoft is currently looking for venture funding. It is open to discussing this issue with potential investors. An attempt to place on the crowdfunding site indiegogo.com did not justify itself.
According to the authors of the project, this is due a small amount active audience of the site - only 106 views of the project were registered after a week from the date of publication of the project. This is clearly inconsistent with indiegogo's claimed monthly audience of 15 million. human. Representatives of ARMiSoft do not lose optimism, expressing confidence in the future of the Voicer voice switch.
In case of timely financing of the project, its entry into the market is possible by March next 2016. The authors almost guarantee that by the time of the serial release of the product, it will use speaker-independent recognition and a significant expansion of the command dictionary.
Below are videos for those who want to see in more detail how the Voicer switch works, its capabilities and how to control it.
It is necessary to arrange around the house acoustic system consisting of highly sensitive microphones and speakers to control smart home systems
Usually, the user gets a system with standard commands, which he can supplement with his own hands through a computer. Any programmed function of the equipment connected to the scenario will be executed by voice command.
The role of arduino in programming
The self-design of the "smart home" system includes the selection of equipment that will meet all the expected requirements. In particular, a controller will be needed that allows you to collect all the management of the house on one device, from which the guide will be conducted.
Among fans, arduino controllers are very popular, which are an empty printed circuit board, whose peripherals and protection against damage depend on the user. You can connect anything - the program is written easily. In general, Arduino has many advantages:
- addition or copying is possible;
- a large amount of available information about the possible use of the controller, circuit options for different results;
- fixed pin layout (this allows manufacturers to safely release new devices to add functions - shields);
- arduino does not need a programmer and extensive knowledge in programming.
The appearance of the main control device for home systems - the arduino controller
This controller can be connected to a computer, it is often used in robotics and when creating stand-alone devices.
Voice Control Features
At the dawn of its development, voice control had certain limits, and it was difficult to imagine its current interface. It felt like something out of a fantasy movie. But now the situation has changed, and the possibility of an alternative control option in addition to existing methods (remotes and digital devices) makes it very attractive to the user.
A kind of guarantee of better interaction between a person and automation will be the recording of several options for one order (“Turn on the light in the bedroom”, “Turn on the light”, and so on), then the system will understand exactly what is required of it.
Such management, even created by oneself, most often includes the following common actions:
- turning on and off household appliances;
- climate control and curtains;
- irrigation program in front of the house;
- listening to news, weather forecasts and other information that the control will be configured to receive and play.
Some programs allow you to enter a distinction for each stage of the scenario: the control can be carried out in one room, and the command will work in another.
You can program with your own hands, as a command, any word. Some developers offer standard options in which smart home management commands are written in plain text. It is very convenient for the average user.
Description of one of the options
Voice control over the smart home system will not be activated until the owner activates it with a specific command or action (voice recognition is also available). Depending on the area on which operation is supposed, for the best functionality the house can be equipped with several controllers subordinate to one device. It is easy to use the "smart" equipment, the program contains several languages that it easily recognizes.
You don't have to shout to control your home systems. Highly sensitive microphones pick up small voices. Depending on the type of microphone and the shape of the room, they need to install 1 microphone on an area of 20-30m2
Other purported amenities include instant response to orders, interactive communication that gives the impression that the house is really smart and talks to the owner on its own (although in fact it is a well-recorded live speech). Automation is able to report that the home has forgotten to close the gate, or to inform about a violation of the security of the site.
One of the many advantages is invisibility. All speakers and microphones are located out of sight of the owner (on a cabinet, under a shelf, hidden in pieces of furniture). It is very aesthetically pleasing, as there are no wires.
The equipment is installed in false ceilings or piers at the pre-installation stage; in houses with a fine finish, visual decoration is used for household appliances
A strong security system notifies of unauthorized entry into the premises by means of a message on a smartphone or verbally, and adequately responds in the event of an emergency.
This system can be controlled using a smartphone. "Smart home" connects to its operating system, and through it the owner can give the necessary instructions to the controller.
Let's consider several experimental schemes that implement voice control of the load. The frequency filters are based on the LMC567CN chip. The choice of this particular microcircuit is due to its efficiency, since it is assumed that the microcircuit can be used in devices with transformerless power supply, for example, with quenching ballast capacitor. If there are no restrictions on power efficiency, then a bipolar functional analogue can be used - a microcircuit of the LM567 type (domestic clone - KR1001XA01). The figure shows a circuit that decodes the frequency of the vowel sound “(Y”E)” in the command word “LIGHT”:
In this and the following circuits, the microphone amplifier is implemented on operational amplifier DA1 type KR140UD1208. A feature of the microcircuit is the ability to set the current consumption by a resistor (in the diagram - R5) connected to the 8DA1 output, which allows you to use the circuit in an economical mode. The gain sets the resistor R4 connected between the pins 2DA1 and 6DA1. This resistor sets the sensitivity of the circuit to voice commands. Resistors R2 and R3 form the virtual power supply midpoint DA1, setting the non-inverting input 3DA1 to about half the supply voltage. From the release of 6DA1 amplified signal through separating C3 and limiting current R6 enters the level limiter AC voltage- two counter-parallel germanium diodes VD1 and VD2. Diodes limit the signal at ~300…400mV peak-to-peak. Through R7 and separating C6, a limited signal is fed to the 3DA2 input. Resistors R9, R10 and capacitor C7 set the reference oscillator frequency (VCO center frequency). Resistor R10 is used to achieve a low level at the 8DA2 output when the “LIGHT” command is pronounced. At the drain of transistor VT1 (common connection point of resistors R11, R12 and diode VD3) the signal is inverted - log.1 appears. Trigger DD1.1 operates in single vibrator mode, the time constant of which is set by the elements R13 and C9. With the specified elements, the time is approximately one minute.
As a rule, sound interference is random and short-lived. The integrating circuit R12-C8 is necessary to suppress these interferences. When decoding the "LIGHT" command or the sound of interference, a low level appears at the 8DA2 output and VT1 closes. Through R11 and R12, C8 begins to charge. The charge time of C8 is longer than the duration of the interference, therefore, the vowel “E” in the word “LIGHT” should be pronounced a little longer than usual - light-E-Et. When the interference stops, then C8, charged to a certain voltage level, is quickly discharged through VD3 and the open drain-source channel of transistor VT1. This is the easiest way to cut off sound interference with the same frequency as the sound of the "E" vowel. The command sounds longer than the interference, so C8 will charge up to the switching threshold of the trigger DD1.1 at the input "S". The trigger will switch to a "single" state - on the main output log.1, and on the inverse - log.0. Through the open VD4, the capacitor C8 will quickly discharge, and C9 will start charging through R13. Depending on the logic of the actuator, the control signal can be removed from the outputs 1DD1.1 or 2DD1.1. If a command is received again during the operation of the executive device, then this will not change anything, because. C8 shunted low level voltage from 2DD1.1 through an open diode VD4. In about a minute, the voltage at C9 will reach the trigger switching threshold at the input "R", the trigger will return to its original "zero" state and C9 will quickly discharge through the open VD5. The load will be de-energized. For verification, the device was assembled on a factory perforated board. Instead of the KP501A (VT1) transistor, a “telephone” current key of the KR1014KT1V type was installed:
A video demonstrating the operation of the circuit in FIG. 1 is shown below. The account imitates sound interference, while it is clear that the blue LED installed in the drain circuit of the transistor VT1 goes out, but the lamp does not turn on - the duration of the interference is short. The duration of the "LIGHT" command is longer - the lamp turns on. The "LAMP" or "ON" commands do not turn on the lamp:
Video 1
The second video demonstrates the operation of the device that responds to the "LIGHT ON" command with automatic load shutdown. The circuit of the device has not changed - the same as in FIG. 1, but the reference oscillator DA2 is tuned to the frequency of the “AND” sound with a tuning resistor R10. In addition, the value of the resistor R4 in the circuit feedback DA1 is increased to 5.1 megaohms, which determined the sensitivity of the amplifying path - the command is given from a distance of five meters from the microphone. Here, too, the score imitates sound interference. It is interesting to note that the device does not respond to the “POWER ON” command, although the “AND” vowel sound coincides in duration with the “AND” vowel in the “BURN” command. It can be assumed that the sound "I" after the consonant sound "Ch" in the command "TURN ON" has a higher frequency compared to the sound "I" after the consonant sound "R" in the command "BURN ON":
Video 2
Suppose, when power is applied, the trigger DD1.1 is set to a state in which the output 2DD1.1 is log.1, and the output 1DD1.1 is log.0. Diode VD5 is closed, and VD6 is open and shunts capacitor C8. The frequency of the reference oscillator DA1 with a tuning resistor R4 is tuned to the frequency of the sound “(Y”E)” in the command word “LIGHT”. When pronouncing the command and decoding, the transistor VT1 will close, so C7 will start charging. When the voltage reaches the switching threshold DD1.1 at the input "S", the trigger will switch to a "single" state, in which the output 2DD1.1 is log.0, and the output 1DD1.1 is log.1. Log.1 will go to the gate VT2 and open it. An open channel drain / source VT2 will connect the capacitor C6 in parallel with the capacitor C5 - the frequency of the reference oscillator will decrease. The device will be ready to accept the STOP command. Since the VCO frequency has changed, the low level at the 8DA1 pin will change to high and VT1 will open. Now C7 is shunted through the open diode VD5, and VD6 is closed, therefore, if you say the STOP command to turn off the load, C8 will be charged, which will lead to the next switching of the trigger DD1.1. In this circuit, as well as in the circuit in Figure 1, the elements R7, C7, VD3 and R8, C8, VD4 are designed to cut off sound interference, the frequencies of which coincide with the frequencies of vowels in command words. Diodes VD5 and VD6 provide the correct operation algorithm, determining the order in which capacitors C7 and C8 are charged. The capacitances of capacitors C5 and C6 may differ from those indicated in the diagram. First, by installing the capacitor C5 and adjusting R4, they achieve a reaction to the “LIGHT” command, then they select the capacitance C6, connecting it in parallel to the capacitor C5, so that there is a reaction to the “STOP” command. Only after that C6 is included in the drain circuit of the transistor VT2. FIG. 3 shows a diagram that implements the control of an incandescent lamp by the commands "ON" and "STOP":
In fact, the circuit is the same as the circuit in Figure 2, but with some differences. Analog keys are used as switching elements. The K561KT3 (or K1561KT3) chip contains four such keys. In the initial state, the DD1.2 key is open, because at the output 2DD2.1 - log.1, and the key DD1.3 is closed, since the output 1DD2.1 is log.0 and the incandescent lamp EL1 is off. open channel X-Y key DD1.2 tuning resistor R12 is shunted, thereby excluded from the reference oscillator circuit, so the VCO frequency is determined by the elements R10, R14, C7 and is tuned (by resistor R14) to the frequency of the “AND” sound in the command word “GORI”. When the command is decoded, the DD2.1 trigger switches, so the DD1.2 key closes and the DD1.3 key opens. The LED turns on solid state relay VS1 and lamp EL1 are lit. Since the DD1.2 key is now closed, the tuning resistor R12 is connected in series with the resistors R10 and R14, which means that the VCO frequency becomes lower. With resistor R12, it is tuned to the frequency of the sound "O" in the "STOP" command. Resistors R8 and R9 set the hysteresis of the switching characteristics of the 8DA2 output, which contributes to more accurate command processing. Key DD1.1 works as an inverter. The HL1 LED goes out during signal decoding. This circuit was also tested on a breadboard and showed a positive result:
The demo video shows the operation of the device, assembled according to the scheme in Figure 3. As in the previous videos, the score imitates sound interference, other commands are given with different vowel durations:
Video 3
Figure 4 shows a variant of the circuit that accepts a command word with three vowels. As an example, the "SYSTEM" command is selected. Such a command can be used to launch a the electronic unit or serve as a sound "key" to activate the scheme with other voice commands. Any other command word can be used, for example, "BATHROOM" to control the light in the bathroom or toilet rooms of the apartment:
The elimination of sound interference occurs differently than in the previous schemes - due to the sequential switching of triggers, and the next trigger fixes the state of the previous one. If an audio interference appears at the input, then in order to affect the state of the load, the frequency of the interference must change two times and coincide with the frequencies of the vowels in the command word in the desired sequence, and this seems to be very unlikely. In this circuit, the original VCO frequency is switched twice, so the DA2 tone decoder operates with three reference frequencies. In the initial state, the key DD1.2 is open and the frequency is determined by the elements C7, R11 and R12. Trimmer resistor R12 it is tuned to the sound "And". After the “I” sound in the “SI” syllable is pronounced and decoded, the DD1.2 key will close and the DD1.3 key will open. Now the VCO frequency is set by the elements C7, R11 and R15, which adjust the device’s response to the sound “(Y”E)” in the syllable “CTE”. After decoding the sound “(Y”E)”, the DD1.3 key will close, but the DD1.4 key will open, which means that the frequency of the reference oscillator will be determined by the elements C7, R11 and R18, which adjust the VCO frequency to the sound “A” in the syllable “MA ". After the pronunciation and decoding of the sound "A", the DD1.4 key closes and the DA2 decoder stops working - its reference oscillator is turned off, because. all keys are closed. The circuit will return to its original state by the RESET signal, which it will receive from the actuator after the execution of the following commands or the completion of the operating cycle of the control object.
If an interference corresponding to the sound “AND” appears at the input, then the DD2.1 trigger will switch - the DD1.2 key will close, and the DD1.3 key will open. Now the frequency of the interference should coincide with the frequency of the sound “(Y”E)”. Miracles do happen in our lives, but very rarely. Therefore, after a time T = 0.7 * C8 * R13, the trigger DD2.1 will return to its original state, since it works in the single vibrator mode.
If there was a command and the sound “I” was followed by the sound “(Y”E)” (the syllables SI-STE were pronounced), then through the open diode VD5 the switched state of the trigger DD2.1 will be fixed - the capacitor C8 will not be able to charge up to the trigger switching threshold according to input "R". The same thing will happen with the DD2.2 trigger, if the sound “A” is decoded after the sound “(Y”E)” (all three syllables SI-STE-MA will be pronounced) - its switched state will be fixed by the open diode VD7. Each main output of the previous trigger is connected to the data input (D) of the next, so decoding the entire command word will only be possible if the vowels follow each other in a strict (correct) sequence. The LEDs connected to the circuit through current amplifiers VT1 - VT3 indicate the decoding of vowel sounds. When the last sound is decoded, LED "A" remains on until the circuit receives a RESET signal from the actuator. When a RESET signal is received, the LEDs will switch in reverse order (from "A" to "I"), indicating the return of the device (trigger cells) to its original state. On the basis of this circuit, the circuit with the command word "TURN ON" and automatic load disconnection has been practically tested, shown below:
The circuit decodes vowel sounds (Y”U) and “I”. Connection from pin 4DD2.1 to pin 12DD2.2 through VD5, marked in red, to demonstrate the sequence of trigger cells. If this connection is removed, then the DD2.1 one-shot will return to its original state after a time of T = 0.8 seconds, regardless of whether the vowel “AND” is decoded or not. The signal after decoding is not fed through the inverter to the clock inputs “C” of the triggers from the 8DA2 output, therefore the sound (Y”U) is not limited in time. Only after it ends, the DD2.1 trigger will switch - a high voltage level will be applied to the clock input. The duration of the sound "I" is limited by the time T = 0.8 sec. The R13-C9 chain delays the appearance of a high voltage level at the 9DD2.2 input relative to its appearance at the 11DD2.2 input.
The video below shows the operation of the circuit in FIG. 5. It can be seen from the video that after decoding the sound (Y”U), the blue LED turns on, indicating the switching of the first trigger cell, and the incandescent lamp turns on only after the sound “I” is decoded, i.e. after switching the second trigger cell, which sets the load operation time using the elements R15 and C10. The return to the initial state occurs in the reverse order: the lamp turns off - the DD2.2 single vibrator has switched to its original state, and only then the LED goes out - the DD2.1 single vibrator has switched to its original state. Giving other commands does not turn on the incandescent lamp:
Video 4
In the devices in the last two figures, commands are given in the usual way without stretching the vowels in syllables. And at the end of the topic, for example, I will give one more experimental circuit. This circuit as a "single" device was not tested, but its individual nodes were previously assembled and showed a positive result in work. The circuit allows you to turn on, turn off and adjust the brightness of an incandescent lamp with your voice, that is, this device is a voice dimmer. The circuit is shown in Figure 6:
The control part consists of two voice channels, the operation of which is described in the diagrams in FIG. 1 and FIG. 2. The first voice channel (DA2 and DD1.1) decodes the "LIGHT" command and controls the on or off of the EL1 lamp. The second voice channel (DA3 and DD1.2) decodes two commands - "START" and "STOP", controlling dimming. The VS1 triac is controlled by a DA5 chip of the K145AP2 type in a typical inclusion. The microcircuit has two control inputs - inverse 3DA5 and non-inverse 4DA5. The functional purpose of these inputs is the same - the first short signal will open the triac and the lamp will turn on, the second short signal will close the triac and the lamp will turn off. If the control signal is applied for a long time, then the microcircuit generates pulses that smoothly unlock or lock the triac. This causes the brightness of the lamp to change. If you turn off and then turn on the lamp, the brightness of the lamp will be the same as before turning it off. The logic of operation of these inputs is different - the 3DA5 input is controlled by a low logic level, and the 4DA5 input is controlled by a high one. When decoding the "LIGHT" command, the DD1.1 trigger will generate a short pulse with a low voltage level, which turns on the lamp. When decoding the "START" command, the DD1.2 trigger is set to a "single" state, so a high voltage level will be applied to the 4DA5 input and the brightness of the lamp will begin to change smoothly. If up to this point the brightness has decreased, now it will increase. If before that the brightness increased, now it will begin to decrease. If you do not give the STOP command for a long time, then the lamp brightness will change from minimum to maximum (or from maximum to minimum) and vice versa. After the "STOP" command is given and its decoding, the DD1.2 trigger will return to its original "zero" state and the regulation will stop - the lamp brightness will be fixed at the selected level. By submitting the “LIGHT” command again, you can turn off the lamp - at the 3DA5 input, the DD1.1 trigger will again generate a short pulse with a low logic level. The device is powered through a quenching capacitor C22 and a half-wave diode-zener diode rectifier VD9-VD10. Capacitor C18 smooths out ripples. microphone amplifier DA1 and tone decoders DA2, DA3 are powered by +5V from the linear regulator DA4. Transistors VT1 and VT2 not only act as signal inverters, but also match the logic levels of decoders and triggers. In the above experimental schemes, an incandescent lamp is used as a load, but various other control objects can be used. It all depends on the invention and scope of these schemes. For example, you can tune the tone decoder to the frequency of the vowels "A" and "Y", and connect the switching element to the "TALK" button circuit of the talking clock. Then, at the command "CLOCK", the clock will prompt current time. And in the third, final part, I will introduce you to another, practical scheme.