неділя, 16 жовтня 2016 р.

voice control Arduino Uno & HC-06 bluetooth module


Task: voice control of Arduino UNO.
We need:
1.Arduino UNO
2.bluetooth module HC-06
3.LED and  wires
4.PC (Windows 8.1) with IDE Arduino 1.6.12 software 
5.file"sketch" with code for upload to Arduino UNO (sketch_bluetooth_led_on_off.ino)
6.smartphone with voice recognise/bluetooth control application (Android & BT Voice Control for Arduino).

Everybody begin from connecting hardware, but I recommend you to start from uploading code to Arduino. Why? Because HC-06 seems to use the same channels that USB use for transmitting data. So you can`t upload sketch when bluetooth module is working.
So...

SOFTWARE

Dowload and install IDE Arduino 1.6.12 software  or latest version on your PC.
Connect Arduino UNO to PC with USB cable.
Dowload sketch and doubleclick on it. It will open in IDE Arduino programm window.
Choose COM-port you have connected Arduino (to recognize it unplug Arduino and plug again and you'll see wich port is disappearing. it's yours).

Upload the sketch to Arduino.
Disconnect Arduino and PC.
Go to your smartphone.
Smartphone is important part of system here because it interpret voice to command and send it to bluetooth. You also can use the AT terminal apps in this system. There is a lot of them, but I used "Bluetooth Terminal" for android.

In this case I used "BT Voice Control for Arduino".
https://play.google.com/store/apps/details?id=robotspace.simplelabs.amr_voice&hl=uk
Now we going to hardware connections.

HARDWARE

Pins to connect
Arduino => HC-06
     5V    => VCC
     GND => GND
     RX   => TXD
     TX   => RXD




Connect LED to Arduino:(it need not be a LED. you can connect any device of the same power requirements (motor, fan, siren or relay))
Arduino => LED
     GND => "-"
     pin13 => "+"
Now plug in power supply (not USB) to Arduino. HC-06 blinking.
Go to Settings of your smartphone and switch on bluetooth. Scan for devices and choose hc-06 (or hc-05) from list to make a pair.
Go to BT Voice Control for Arduino. In upper right corner choose "connect robot" from drop-down menu and choose the HC-06. Now you ready to command the robot. Say "one" to switch on, say "zero" to switch off the LED.
If you make a changes to sketch you may connect relays to several pins and command various devices.
Good luck :)

Немає коментарів:

Дописати коментар