Hi,
In this project we’re going to control an Arduino with Voice commands with a Simple android App that I’ve create with MIT App Inventor.
Watch the video below
Resources for this project:
- How To Use App Inventor With an Arduino
- How to control outlets with 433Mhz Transmitter
- Review of the HC-05 Bluetooth Module
Parts Required
- Arduino UNO – read Best Arduino Starter Kits
- 1x Smartphone
- 1x Bluetooth Module (for example HC-06 – Read my review here)
- 1x 433Mhz Receiver and Transmitter
- 2x Remote Controlled Sockets with a Remote Control (Controlled by 433Mhz Frequency)
- 1x Breadboard
- Jumper Cables
You can use the preceding links or go directly to MakerAdvisor.com/tools to find all the parts for your projects at the best price!
Receiver Circuit
Click here to Download the RCSwitch Library. Install it an Re-open the Arduino IDE. Then open the example “ReceiveDemo_Advanced”. Upload the code and open the serial monitor. Start pressing the buttons from the Remote you’re going to use and save them.
Final Circuit
Upload and install the source code below
- Arduino Sketch
- Install the RC Switch Library
- Voice_Control.apk
- Voice_Control.aia (to edit the android app)
Note: If you want to edit my app this is what you need to do. Download Voice_Control.aia and upload it to MIT App Inventor.
Tips:
- You need to remove the RX and TX cables when you’re uploading the sketch to your Arduino.
- Sometimes people connect the TX from the bluetooth module to the TX of the Arduino… that’s wrong and it won’t work. Make sure you connect it properly, the TX into RX and the RX into the TX.
- If the HC-05 Bluetooth Module asks for a password, It’s ’1234′.
- Before Testing my “BlueLED” app, test if you’ve made all the connections correctly. How you can do that? Simply enter numbers (’1′, ’0′) into your serial monitor and your LED should be turning on and off.
I hope you found this useful!
Do you have any questions? Leave a comment down below!
Thanks for reading. If you like this post probably you might like my next ones, so please support me by subscribing my blog and my Facebook Page.
P.S. Click here to see how to use MIT App Inventor with Arduino
P.P.S. Click here to learn how to use the 433Mhz Transmitter/Receiver circuit to control outlets.
Hi Rui!
Do you know where I can find the Remote Controlled Sockets for 220V with Round Holes/pins (Like in Israel…)? I see in your picture you have such round holes – unlike the Amazom link you specified…
Thanks!
Hi Itzik,
I’ve posted those sockets with Amazon Link because I know that a most of readers live in countries with those sockets.
You can find on ebay for example or in a local store.
Those sockets below should work just fine:
http://www.ebay.com/itm/Wireless-Remote-Control-adapter-AC-Power-Plug-Wall-Outlet-Switch-with-EU-220v-/131131272276?pt=Home_Automation_Controls_Touchscreens&hash=item1e88086c54
Thanks for asking,
Rui
it’s amazing think you
Thank you boubaker!
It only works sending ‘1’ and ‘0’ , because i modify the program to send more ‘byte’ numbers, in this case 50 (char 2) and 51 (char 3) , but arduino only reads 1 and 0 , what can be the problem?
I want to turn on and off a lamp (1 , 0)
and the number 2 and 3 to ‘OPEN’ and ‘CLOSE’ a door, but dont works 🙁
In other programs like BlueTerm arduino works perfectly to 0 – 9 chars, but in this one i cant.
Check out my other project where I’m controlling more than 2 buttons.
It’s probably a problem with your android app.
you made some sort of mistake I guess
https://randomnerdtutorials.com/arduino-control-2-dc-motors-via-bluetooth/
hi Rui santos
i use bluetooth module 0755 with arduino uno i get the code from your website but it can not communication arduino and bluetooth .this problem from bluetooth module or arduino?
Hi,
can send me the link for your bluetooth module please?
hii
how to arduino-control DC motor via bluetooth Shield?
Hi,
This code should work almost exaclty the same, since the bluetooth modules work via serial communication.
You might need to make a few changes to my Arduino code, but the android app should work just fine.
I assume that your bluetooth shield as a couple of arduino code examples, take a look at them and compare with my code.
Thanks for asking,
Rui
Hi!,
I have one problem… I am able to decode the rf signal from my remote. But if I would like to send the rf signal to my sockets, nothing happens. I tested the transmitter. He is working.
I tried so much, but I dont know why it isnt working. I does have this sockets :
amazon.de/mumbi-Funksteckdosen-Set-Funksteckdose-Fernbedienung/dp/B002UJKW7K/ref=lh_ni_t?ie=UTF8&psc=1&smid=A3JWKAKR8XB7XF
And this rf transmitter and receiver:
amazon.de/receiver-Superregeneration-Wireless-Transmitter-Burglar/dp/B00ATZV5EQ/ref=lh_ni_t?ie=UTF8&psc=1&smid=A2DD36NWW1ABNW
If you are receiving the rf signal from your remote it’s a good.
Now you need to transmit the exact signal you’re receiving. Have you watched my youtube video?
https://randomnerdtutorials.com/arduino-control-220v-lamps-from-anywhere-in-the-world/
Yes. I watched your video. Icopied the decimalcode and did paste it in the code. The rf transmitter works but my socket is still just working with the remote. I checked it with the “send demo code” of the rc switch library. So what is false? I did open One of my sockets, and tested the socket receiver. He is working. Is the output current to low for the relay?
Hi! I cant find a failure! Ok I actually does send this code to my arduino wich is connected to my 433 MHz Transmitter.
–>
#include <RCSwitch.h>
RCSwitch mySwitch = RCSwitch();
void setup() {
Serial.begin(9600);
mySwitch.enableTransmit(10);
}
void loop() {
mySwitch.send(5308693, 24);
delay(5000);
mySwitch.send(5308692, 24);
delay(5000);
}
And this is my Received data which I received before…
–>
Button#1-ON:
Decimal: 5308693 (24Bit) Binary: 010100010000000100010101 Tri-State: FF0F000F0FFF PulseLength: 329 microseconds Protocol: 1
Raw data: 10228,376,932,1100,348,372,936,1096,344,372,936,376,944,376,936,1092,348,372,940,372,948,368,936,376,944,372,940,372,948,372,936,1096,344,376,940,368,948,372,940,1096,348,368,940,1092,348,372,936,1096,344,
Button#1-OFF:
Decimal: 5308692 (24Bit) Binary: 010100010000000100010100 Tri-State: FF0F000F0FF0 PulseLength: 329 microseconds Protocol: 1
Raw data: 10224,380,932,1100,340,376,936,1096,344,376,932,376,944,376,936,1096,344,376,936,372,948,372,936,376,944,372,936,376,944,376,936,1096,344,376,936,372,948,372,936,1100,344,372,940,1092,348,368,940,372,948,
hi, Rui santos
I have a problem that when i click on connect and choose the bluetooth address this massage appear to me : “Error 507: Unable to connect. Is the device turned on?
The amazon link for 2x Remote Controlled Sockets with a Remote Control (Controlled by 433Mhz Frequency) is broken.
PLEASE ADAPT IT WITH TASKER APLICATION AND MAKE THE TUTORIAL AGAIN!!
thanks a lot for explanation
it works perfect
but I wonder is there a way to explain how you make the android app steps ?
beacuse I wanted to modify your code
to use more than one device and different voice commands
thanks
HI rui.
I made the reciever circuit and can run the program fine. The problem is when I open the serial monitor and press buttons on my remote nothing shows.
Hi Mark,
Which remote are you talking about?
Hello there. i was wondering if this needs an internet for the speech recognition to work? or is there a way to do this with no internet connection like offline. thanks mate for the sources.
Hi Rui,
Can you tell me which part of the code process the voice ‘ON’ and turn variable ‘state’ into 1? And also for the ‘OFF’ state?
I can’t really understand the code
This is another great tutorial. You do a very good job explaining how to develop the project.
Thank you David for the continuous support!
Hi Guyz! I need a code for mobile app for training of voices and recognition of one specific voice.