{"id":84,"date":"2017-03-17T14:33:09","date_gmt":"2017-03-17T14:33:09","guid":{"rendered":"http:\/\/danuc.in\/blog\/?p=84"},"modified":"2017-03-17T15:35:54","modified_gmt":"2017-03-17T15:35:54","slug":"testing-hc-05-bluetooth-module-using-arduino-uno-as-serial-to-usb-converter","status":"publish","type":"post","link":"https:\/\/danuc.in\/blog\/2017\/03\/17\/testing-hc-05-bluetooth-module-using-arduino-uno-as-serial-to-usb-converter\/","title":{"rendered":"Testing HC-05 bluetooth module using Arduino UNO as serial to USB converter"},"content":{"rendered":"<p>This post is for those who want to build a Bluetooth controlled robot but do not know how to test HC-05 bluetooth module, whether it is working or not with android phone and bluetooth control app. we have to use Arduino UNO as serial to USB converter by removing the Atmega 328 chip from the board.<\/p>\n<p>do the connectivity between Arduino uno board and HC-05 module \u00a0as shown in image below.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-85 \" src=\"https:\/\/danuc.in\/blog\/wp-content\/uploads\/2017\/03\/arduinohc05connect.png\" alt=\"\" width=\"561\" height=\"373\" srcset=\"https:\/\/danuc.in\/blog\/wp-content\/uploads\/2017\/03\/arduinohc05connect.png 1018w, https:\/\/danuc.in\/blog\/wp-content\/uploads\/2017\/03\/arduinohc05connect-600x399.png 600w, https:\/\/danuc.in\/blog\/wp-content\/uploads\/2017\/03\/arduinohc05connect-300x200.png 300w, https:\/\/danuc.in\/blog\/wp-content\/uploads\/2017\/03\/arduinohc05connect-768x511.png 768w\" sizes=\"auto, (max-width: 561px) 100vw, 561px\" \/><\/p>\n<p>Now in the image above note that i have removed Atmega 328 chip and i have connected digital pin0(RX) to TX of Bluetooth HC-05 Module. and\u00a0digital pin1(TX) to RX of Bluetooth HC-05 Module.<\/p>\n<p>so this circuit acts as serial to USB converter for HC-05 module thereby directly interfacing hc-05 with PC through USB cable.<\/p>\n<p>connect the arduino board to PC using USB Cable.<\/p>\n<p>now install following app on your Android phone but make sure it has inbuilt Bluetooth on it.<\/p>\n<p>This app is through the\u00a0courtesy of \u00a0<a class=\"document-subtitle primary\" href=\"https:\/\/play.google.com\/store\/apps\/developer?id=Hobbyprojects.com\">Hobbyprojects.com <\/a><\/p>\n<p><a href=\"https:\/\/play.google.com\/store\/apps\/details?id=appinventor.ai_hobbyprojects_com.BluetoothRoboControl&amp;hl=en\">https:\/\/play.google.com\/store\/apps\/details?id=appinventor.ai_hobbyprojects_com.BluetoothRoboControl&amp;hl=en<\/a><\/p>\n<p>App Instructions as mentioned on above link :<br \/>\n1. First make sure your HC-05 Bluetooth Module is paired with your mobile. The default password for pairing is &#8220;1234&#8221; or &#8220;0000&#8221;. Check the manual of Bluetooth module.<\/p>\n<p>2. Click on &#8220;SELECT DEVICE&#8221; icon to select paired Bluetooth module.<\/p>\n<p>3. When you press &#8220;UP Arrow&#8221; it sends the data &#8220;A&#8221; to Bluetooth Module connected with the circuit. When Microcontroller detects &#8220;A&#8221; the Robot \/ Robot Car moves FORWARD.<\/p>\n<p>4. When you press &#8220;Down Arrow&#8221; it sends the data &#8220;B&#8221; to Bluetooth Module connected with the circuit. When Microcontroller detects &#8220;B&#8221; the Robot \/ Robot Car moves REVERSE.<\/p>\n<p>5. When you press &#8220;LEFT Arrow&#8221; it sends the data &#8220;C&#8221; to Bluetooth Module connected with the circuit. When Microcontroller detects &#8220;C&#8221; the Robot \/ Robot Car turns LEFT.<\/p>\n<p>6. When you press &#8220;RIGHT Arrow&#8221; it sends the data &#8220;D&#8221; to Bluetooth Module connected with the circuit. When Microcontroller detects &#8220;D&#8221; the Robot \/ Robot Car turns RIGHT.<\/p>\n<p>7. When you press &#8220;STOP&#8221; button which is in the center of remote it sends the data &#8220;E&#8221; to Bluetooth Module connected with the circuit. When Microcontroller detects &#8220;E&#8221; the Robot \/ Robot Car gets STOPPED.<\/p>\n<p>8. When you press &#8220;360 Degree&#8221; button it sends the data &#8220;F&#8221; to Bluetooth Module connected with the circuit. When Microcontroller detects &#8220;F&#8221; the Robot \/ Robot Car rotates CLOCKWISE on the same position.<\/p>\n<p>9. When you press &#8220;-360 Degree&#8221; button it sends the data &#8220;G&#8221; to Bluetooth Module connected with the circuit. When Microcontroller detects &#8220;G&#8221; the Robot \/ Robot Car rotates ANTI-CLOCKWISE on the same position.<\/p>\n<p>10. Click on &#8220;DISCONNECT&#8221; icon to disconnect paired Bluetooth module.<\/p>\n<p>now install putty on your PC using following link.this program is very useful for debugging serial and tcpip ports. it is a very useful terminal Emulator program .very widely used and is free of cost.<\/p>\n<p>http:\/\/www.chiark.greenend.org.uk\/~sgtatham\/putty\/latest.html<\/p>\n<p>Please download and install most appropriate version for your PC.<\/p>\n<p>Now i will consider that<\/p>\n<p>1)You have connected your Arduino with HC-05 as shown in above image.<\/p>\n<p>2)You have installed your PC with putty program successfully.<\/p>\n<p>4) You have connected Arduino from above setup to PC using USB Cable .<\/p>\n<p>5) You have \u00a0paired \u00a0 your phone with HC-05 as discussed in steps 1 and 2 of Bluetooth app instructions \u00a0above.<\/p>\n<p>Those who do not know of putty Program please go through our following post<\/p>\n<blockquote class=\"wp-embedded-content\" data-secret=\"MWpNS2y8Wa\"><p><a href=\"https:\/\/danuc.in\/blog\/2017\/03\/17\/how-to-setup-a-serial-console-connection-using-putty\/\">How to Setup a Serial Console Connection using PuTTy<\/a><\/p><\/blockquote>\n<p><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;How to Setup a Serial Console Connection using PuTTy&#8221; &#8212; Danuc Robotics And Automation \" src=\"https:\/\/danuc.in\/blog\/2017\/03\/17\/how-to-setup-a-serial-console-connection-using-putty\/embed\/#?secret=h5ypilR2H5#?secret=MWpNS2y8Wa\" data-secret=\"MWpNS2y8Wa\" width=\"525\" height=\"296\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><\/p>\n<p>&nbsp;<\/p>\n<p>once all above steps are done open putty<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-99\" src=\"https:\/\/danuc.in\/blog\/wp-content\/uploads\/2017\/03\/CLILogin-300x170.png\" alt=\"\" width=\"300\" height=\"170\" srcset=\"https:\/\/danuc.in\/blog\/wp-content\/uploads\/2017\/03\/CLILogin-300x170.png 300w, https:\/\/danuc.in\/blog\/wp-content\/uploads\/2017\/03\/CLILogin.png 318w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>Now your PC should show a screen similar to above image.<\/p>\n<p>a. now open up bluetooth android app you installed on your phone to control robot and press right left up and down keys<\/p>\n<p>When you press &#8220;UP Arrow&#8221; it should sends the data &#8220;A&#8221; to your PC putty screen<\/p>\n<p>b. When you press &#8220;Down Arrow&#8221; it sends the data &#8220;B&#8221; to to your PC putty screen<\/p>\n<p>c. When you press &#8220;LEFT Arrow&#8221; it sends the data &#8220;C&#8221; to to your PC putty screen<\/p>\n<p>d. When you press &#8220;RIGHT Arrow&#8221; it sends the data &#8220;D&#8221;to your PC putty screen<\/p>\n<p>If \u00a0you are able to characters on PC screen according to i have mentioned above than your app and HC-05 module is<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This post is for those who want to build a Bluetooth controlled robot but do not know how to test&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"image","meta":{"footnotes":""},"categories":[3,2],"tags":[],"class_list":["post-84","post","type-post","status-publish","format-image","hentry","category-robot-for-kidz","category-robots-for-kids","post_format-post-format-image"],"_links":{"self":[{"href":"https:\/\/danuc.in\/blog\/wp-json\/wp\/v2\/posts\/84","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/danuc.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/danuc.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/danuc.in\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/danuc.in\/blog\/wp-json\/wp\/v2\/comments?post=84"}],"version-history":[{"count":11,"href":"https:\/\/danuc.in\/blog\/wp-json\/wp\/v2\/posts\/84\/revisions"}],"predecessor-version":[{"id":103,"href":"https:\/\/danuc.in\/blog\/wp-json\/wp\/v2\/posts\/84\/revisions\/103"}],"wp:attachment":[{"href":"https:\/\/danuc.in\/blog\/wp-json\/wp\/v2\/media?parent=84"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/danuc.in\/blog\/wp-json\/wp\/v2\/categories?post=84"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/danuc.in\/blog\/wp-json\/wp\/v2\/tags?post=84"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}