{"id":493,"date":"2011-09-29T22:15:41","date_gmt":"2011-09-29T22:15:41","guid":{"rendered":"http:\/\/www.hakancakiroglu.com\/wordpress\/?p=493"},"modified":"2011-09-29T23:01:33","modified_gmt":"2011-09-29T23:01:33","slug":"connect-arduino-to-bluetooth-gps-btgp-38-hack-with-arduino","status":"publish","type":"post","link":"https:\/\/www.hakancakiroglu.com\/wordpress\/?p=493","title":{"rendered":"Connect Arduino to Bluetooth GPS (BTGP-38 Hack with Arduino)"},"content":{"rendered":"<p>A few couples days ago I found my old bluetoth-gps device and I thought I can use that device with my arduino. So I googled for it but there is no article or any matching results for &#8220;Arduino + BTGP-38&#8221; or &#8220;Arduino + Bluetooth GPS&#8221;.\u00a0 Then I decided to write such an article\u00a0 to reuse old bluetooth-gps devices with arduino as gps device without spending any money.<!--more--> <a href=\"http:\/\/www.hakancakiroglu.com\/wordpress\/wp-content\/uploads\/2011\/09\/Bluetooth_GPS_Receiver_-_16_Channels_BTGP-38.jpg\"><img loading=\"lazy\" class=\"alignright size-full wp-image-497\" title=\"Bluetooth_GPS_Receiver_-_16_Channels_BTGP-38\" src=\"http:\/\/www.hakancakiroglu.com\/wordpress\/wp-content\/uploads\/2011\/09\/Bluetooth_GPS_Receiver_-_16_Channels_BTGP-38.jpg\" alt=\"\" width=\"300\" height=\"300\" srcset=\"https:\/\/www.hakancakiroglu.com\/wordpress\/wp-content\/uploads\/2011\/09\/Bluetooth_GPS_Receiver_-_16_Channels_BTGP-38.jpg 300w, https:\/\/www.hakancakiroglu.com\/wordpress\/wp-content\/uploads\/2011\/09\/Bluetooth_GPS_Receiver_-_16_Channels_BTGP-38-150x150.jpg 150w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>(you know gps modules for Arduino&#8217;s are not cheap devices)<\/p>\n<p>In a bluetooth-gps device there are two main modules,\u00a0 GPS module for receiving the GPS data, bluetooth module for transmitting GPS data to bluetooth activated devices\u00a0 and a controller for both of these modules to work properly. In BTGP-38, NEMERIX GPS module is used for receiving gps data over satelittes.\u00a0 NEMERIX GPS module receives the signal from GPS satelittes and then process this signal and then transmits the processed data from its serial port to bluetooth module. Actually I am not sure if the module itself doing this process or the controller but it&#8217;s not matter for us. Because we are going to find and use the pins with our Arduino which are transmitting these data from gps module to bluetooth module.<\/p>\n<p>To find which pins we are going to connect our Arduino&#8217;s Tx Rx pins, we need to disassemble our BTGP-38 device and then solder some cable to these pins and also solder some piece of cable to ground pin.<\/p>\n<p>&nbsp;<\/p>\n<p>Here I am adding some images where to solder cables;<\/p>\n<p style=\"text-align: left;\">Red Cable is going to connected\u00a0 to Arduino&#8217;s Receive pin (digital 0) so this is the transmit pin of the GPS Module. And the gray cable is going to connected to Arduino&#8217;s Transmit pin (digital 1) so it is the receiver pin of GPS module.<\/p>\n<p style=\"text-align: left;\"><a href=\"http:\/\/www.hakancakiroglu.com\/wordpress\/wp-content\/uploads\/2011\/09\/2011-09-22-23.50.131.jpg\"><img loading=\"lazy\" class=\"size-large wp-image-502\" title=\"2011-09-22 23.50.13\" src=\"http:\/\/www.hakancakiroglu.com\/wordpress\/wp-content\/uploads\/2011\/09\/2011-09-22-23.50.131-768x1024.jpg\" alt=\"\" width=\"618\" height=\"823\" srcset=\"https:\/\/www.hakancakiroglu.com\/wordpress\/wp-content\/uploads\/2011\/09\/2011-09-22-23.50.131-768x1024.jpg 768w, https:\/\/www.hakancakiroglu.com\/wordpress\/wp-content\/uploads\/2011\/09\/2011-09-22-23.50.131-225x300.jpg 225w, https:\/\/www.hakancakiroglu.com\/wordpress\/wp-content\/uploads\/2011\/09\/2011-09-22-23.50.131.jpg 1920w\" sizes=\"(max-width: 618px) 100vw, 618px\" \/><\/a><\/p>\n<p style=\"text-align: left;\"><a href=\"http:\/\/www.hakancakiroglu.com\/wordpress\/wp-content\/uploads\/2011\/09\/2011-09-22-23.56.15.jpg\"><img loading=\"lazy\" class=\"size-large wp-image-504\" title=\"2011-09-22 23.56.15\" src=\"http:\/\/www.hakancakiroglu.com\/wordpress\/wp-content\/uploads\/2011\/09\/2011-09-22-23.56.15-1024x768.jpg\" alt=\"\" width=\"619\" height=\"462\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>I have showed only tx and rx pins attached on the images but <strong>DO NOT FORGET TO SOLDER GND cable<\/strong>. Because if you dont connect GND pin of BTGP-38 and Arduino it wont works. So you can solder a piece fo cable between charger jack&#8217;s GND and Arduino&#8217;s GND .<\/p>\n<p><a href=\"http:\/\/www.hakancakiroglu.com\/wordpress\/wp-content\/uploads\/2011\/09\/Untitled-Sketch_bb.jpg\"><img loading=\"lazy\" class=\"aligncenter size-full wp-image-523\" title=\"Untitled Sketch_bb\" src=\"http:\/\/www.hakancakiroglu.com\/wordpress\/wp-content\/uploads\/2011\/09\/Untitled-Sketch_bb.jpg\" alt=\"\" width=\"503\" height=\"464\" srcset=\"https:\/\/www.hakancakiroglu.com\/wordpress\/wp-content\/uploads\/2011\/09\/Untitled-Sketch_bb.jpg 503w, https:\/\/www.hakancakiroglu.com\/wordpress\/wp-content\/uploads\/2011\/09\/Untitled-Sketch_bb-300x276.jpg 300w\" sizes=\"(max-width: 503px) 100vw, 503px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>And after that use the simple code below to write received Serial Port data to Serial monitor.<\/p>\n<p>&nbsp;<\/p>\n<pre><span style=\"color: #cc6600;\">char<\/span> incomingByte;\t<span style=\"color: #7e7e7e;\">\/\/ for incoming serial data<\/span>\r\n\r\n<span style=\"color: #cc6600;\">void<\/span> <span style=\"color: #cc6600;\"><strong>setup<\/strong><\/span>() {\r\n\t<span style=\"color: #cc6600;\"><strong>Serial<\/strong><\/span>.<span style=\"color: #cc6600;\">begin<\/span>(9600);\t<span style=\"color: #7e7e7e;\">\/\/ opens serial port, sets data rate to 9600 bps<\/span>\r\n}\r\n\r\n<span style=\"color: #cc6600;\">void<\/span> <span style=\"color: #cc6600;\"><strong>loop<\/strong><\/span>() {\r\n\r\n\t<span style=\"color: #7e7e7e;\">\/\/ send data only when you receive data:<\/span>\r\n\t<span style=\"color: #cc6600;\">if<\/span> (<span style=\"color: #cc6600;\"><strong>Serial<\/strong><\/span>.<span style=\"color: #cc6600;\">available<\/span>() &gt; 0) {\r\n\t\t<span style=\"color: #7e7e7e;\">\/\/ read the incoming byte:<\/span>\r\n\t\tincomingByte\u00a0=\u00a0<span style=\"color: #cc6600;\"><strong>Serial<\/strong><\/span>.<span style=\"color: #cc6600;\">read<\/span>();\r\n\r\n\t\t<span style=\"color: #7e7e7e;\">\/\/ say what you got:<\/span>\r\n\r\n\t\t<span style=\"color: #cc6600;\"><strong>Serial<\/strong><\/span>.<span style=\"color: #cc6600;\">print<\/span>(incomingByte);\r\n\t}\r\n}<\/pre>\n<p>That&#8217;s all&#8230; Uplaod this sketch to your arduino and open your Serial Monitor window.<\/p>\n<p>&nbsp;<\/p>\n<p>Here are the results ;<\/p>\n<p><a href=\"http:\/\/www.hakancakiroglu.com\/wordpress\/wp-content\/uploads\/2011\/09\/gps_serial.jpg\"><img loading=\"lazy\" class=\"size-large wp-image-513 alignleft\" title=\"gps_serial\" src=\"http:\/\/www.hakancakiroglu.com\/wordpress\/wp-content\/uploads\/2011\/09\/gps_serial-1024x731.jpg\" alt=\"\" width=\"628\" height=\"448\" srcset=\"https:\/\/www.hakancakiroglu.com\/wordpress\/wp-content\/uploads\/2011\/09\/gps_serial-1024x731.jpg 1024w, https:\/\/www.hakancakiroglu.com\/wordpress\/wp-content\/uploads\/2011\/09\/gps_serial-300x214.jpg 300w, https:\/\/www.hakancakiroglu.com\/wordpress\/wp-content\/uploads\/2011\/09\/gps_serial.jpg 1366w\" sizes=\"(max-width: 628px) 100vw, 628px\" \/><\/a><a href=\"http:\/\/www.hakancakiroglu.com\/wordpress\/wp-content\/uploads\/2011\/09\/2011-09-30-00.40.53.jpg\"><br \/>\n<\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"http:\/\/www.hakancakiroglu.com\/wordpress\/wp-content\/uploads\/2011\/09\/2011-09-30-00.40.53.jpg\"><img loading=\"lazy\" class=\"alignleft size-large wp-image-516\" title=\"2011-09-30 00.40.53\" src=\"http:\/\/www.hakancakiroglu.com\/wordpress\/wp-content\/uploads\/2011\/09\/2011-09-30-00.40.53-1024x768.jpg\" alt=\"\" width=\"627\" height=\"469\" srcset=\"https:\/\/www.hakancakiroglu.com\/wordpress\/wp-content\/uploads\/2011\/09\/2011-09-30-00.40.53-1024x768.jpg 1024w, https:\/\/www.hakancakiroglu.com\/wordpress\/wp-content\/uploads\/2011\/09\/2011-09-30-00.40.53-300x225.jpg 300w\" sizes=\"(max-width: 627px) 100vw, 627px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Now I am trying to parse the data coming from gps and make it human readable via Serial monitor or Lcd. I will share it soon.<\/p>\n<p>I hope this article was helpful for you and I\u00a0 hope to see you again in another article, thank you&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A few couples days ago I found my old bluetoth-gps device and I thought I can use that device with my arduino. So I googled for it but there is no article or any matching results for &#8220;Arduino + BTGP-38&#8221; or &#8220;Arduino + Bluetooth GPS&#8221;.\u00a0 Then I decided to write such an article\u00a0 to reuse old bluetooth-gps devices with arduino as gps device without spending any money.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[],"_links":{"self":[{"href":"https:\/\/www.hakancakiroglu.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/493"}],"collection":[{"href":"https:\/\/www.hakancakiroglu.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hakancakiroglu.com\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hakancakiroglu.com\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hakancakiroglu.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=493"}],"version-history":[{"count":27,"href":"https:\/\/www.hakancakiroglu.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/493\/revisions"}],"predecessor-version":[{"id":528,"href":"https:\/\/www.hakancakiroglu.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/493\/revisions\/528"}],"wp:attachment":[{"href":"https:\/\/www.hakancakiroglu.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=493"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hakancakiroglu.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=493"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hakancakiroglu.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=493"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}