Voice Control of Radio Sockets
by victoruni in Circuits > Remote Control
457 Views, 2 Favorites, 0 Comments
Voice Control of Radio Sockets
We are all now fighting the prevailing COVID-19 pandemic. In addition, we are now in a situation where we must adapt to the prevailing conditions by applying additional security measures. Here, the project deals with preventing COVID-19 from spreading through touch. This project was developed by my students who go to school in the 8th grade (15 years). This is a device for voice control of UNIEL sockets based on the Arduino controller, 433MHz transmitter and voice recognition Module V2 by elechouse (site - http://www.elechouse.com).
UNIEL Sockets
They are directly installed in any outlet and an electrical appliance is already connected to them, which can be switched on and off from a remote control. The range of action in the open area is up to 25 m, the frequency of receiving and transmitting commands is 433.9 MHz. The range includes different loads for 300 W, 1000 W, 3600 W. The entire range can be viewed on the official website page http://www.uniel.ru/ru/catalog/1235.
The group code is set in the remote control. In each socket, the group code = the remote control group code and the socket code
Radio Modules
Our task is to replace the remote control for UNIEL sockets. We need radio modules that operate at a frequency of 433 MHz. I purchased FS1000A
Included receiver and transmitter. The price on ebay is less than 100 rubles.
Connecting the Receiver to the Arduino and Receiving Codes From the Remote Control Sockets
For Arduino, there are libraries for working with various 433/315 MHz-controlled actuators. I used this:
rc-switch-Arduino library to operate low cost 315 MHz / 433 MHz remote control devices - http://code.google.com/p/rc-switch/
Download and unpack to the libraries folder
First, connect the receiver
Arduino - - - - - module
+5V ----------VCC
GND ----------GND
DATA (any)------------2
running an example from the RCswitch library example ReceiveDemo_Advanced
Click on the remote and see what gives the sketch to the serial port
Remember the parameters 24Bit, PulseLength - 309 microseconds, Protocol 1
We will need them when writing the sketch. You DON't have to remember the codes!!! To send codes, you only need to know the group code and the device code!!!
Sending Commands From the Transmitter to Control the Radio Sockets
Connect the transmitter to the Arduino to check the operation of the sockets
Arduino - - - - - module
+5V ----------VCC
GND ----------GND
DATE ------------10
We upload a sketch to the Arduino Board, and watch as the sockets turn on in a circle, and then turn off.
If desired, you can control 32x32 sockets from the controller
Downloads
Voice Recognition Module V2
The Voice Recognition Module V2 was purchased on ebay at a very reasonable price. When ordering, I didn't look at it, and in vain. The module didn't quite meet expectations:
1) Declared operation with 15 pre-recorded voice commands at the same time is not possible (the module recognizes only 5 commands of each block (3 blocks)).You can load only 1 block, then another, and so on. Therefore, it was decided to use word chains (2-3) with pauses needed to load the next block, for example
Cafe --> lamp --> turn off
Fountain --> enable
2) the Module does not respond to the voice of another person, two people will have to duplicate commands First, I will tell you how to work with the module, and then how the problem was solved
To train the module, you must send commands to the module over the serial port and utter phrases. Download to your computer (Windows) the manufacturer's recommended program for working with the com port (AccessPort-download page), connect the module to the Arduino
Arduino----- module
+5V ----------VCC
GND ----------GND
TX ------------3
RX ------------2
Connect the Arduino to your computer. Uploading a sketch to Arduino
In the AccessPort program, we set the following settings
Looking at the map-attached
and send commands
AABB-information about the module
V2. 0 By ELECHOUSE www.elechouse.com
Next-training of the first block - AA11
After the START command in the terminal window, we say THE first phrase into the microphone, the inscription Again appears, we wait, we are silent, the START command appears again. The second time we say THE first phrase into the microphone for confirmation. If the recording is successful, Finish one appears, indicating that the first command was successfully recorded. The different label indicates that the second command did not sound like the first one and the module did not recognize it. Too loud indicates that you are speaking too loudly into the microphone (> 1300 MS). Similarly, we write down the 4 remaining phrases. Label Group 1 finished ! indicates that the first block was written successfully.
To check speech recognition, call block 1 with the aa21 command and speak the phrases into the microphone. During recognition, a confirmation is output to the terminal
Then we train blocks 2 and 3 by sending commands AA12 AND AA13, respectively. To call blocks 2 and 3 from memory, send a command to terminal AA22 and aa23, respectively.
Another point - if we want to receive a response from the voice module in a short form (not "Result:15" but 15), we need to send the module the command AA37
In the blocks we enter the following commands (2 people participate) for gatherings in the kitchen-kettle(electric) + lighting (RGB lights, lamp near the kitchen table, night light)
Here are examples of correct chains
"Cafe" (1 voice) --> "night light" (1 voice) --> "Turn off" (1 voice)
"Fountain" (2 voice) --> "Enable" (2 voice)
"Cafe" (2 voice) --> "Lights" (2 voice) --> "turn On" (2 voice)
etc.
For clarity, we will add an indication of 3 LEDs to the pins 7,8,9
(red - 1 block loaded
yellow - block 2 is loaded
green - block 3 is loaded
3 LEDs are lit (1 second) - the combination of words is correct)
Here is the device diagram
And a sketch for Arduino. To the above, I will add that if
after loading the second or third blocks during FRAZA_TIME = 2000 MS, there is no recognized word -
Bank 1 is loaded.