{"id":2110,"date":"2015-04-10T00:00:59","date_gmt":"2015-04-10T07:00:59","guid":{"rendered":"http:\/\/192.168.3.4\/?p=2110"},"modified":"2018-01-09T06:50:25","modified_gmt":"2018-01-09T14:50:25","slug":"first-things-first-document-it","status":"publish","type":"post","link":"https:\/\/www.cloudacm.com\/?p=2110","title":{"rendered":"Lost in the Details?  Define then design."},"content":{"rendered":"<p><strong>Introduction &#8211; It&#8217;s easy to get caught up in all the parts<\/strong><\/p>\n<p>It isn&#8217;t old age, but a sign of maturity when you have to write things down in order to remember them later.\u00a0 Ideas are like gas, potent when present but easily forgotten when gone.\u00a0 If ideas are worth keeping, then organizing and documenting will give them solid form.\u00a0 It seems simple, but failing to structure complex ideas only adds to the complexity.\u00a0 You can spare yourself lost details or circling back countless times.\u00a0 Creating a structure to an idea not only makes it easier to convey to others but also easier to digest.\u00a0 Ideas are meant to give fruit to more ideas, not <a href=\"https:\/\/youtu.be\/IBH97ma9YiI\" target=\"_blank\">rehash<\/a> in endless loops.<\/p>\n<p><strong>Purpose &#8211; Asking the pertinent questions<\/strong><\/p>\n<p>In this post, I&#8217;ll cover a basic way to organize an idea that I&#8217;ve worked with in the past.\u00a0 I put myself in the &#8220;other person&#8217;s&#8221; shoes to formulate the questions.\u00a0 It&#8217;s easier to think of it in terms were the works is being handed off.\u00a0 What needs to be done?\u00a0 What are the requirements?\u00a0 What are the limits?\u00a0 What is the deadline?<\/p>\n<p><strong>Details &#8211; Remember that you&#8217;ll forget<\/strong><\/p>\n<p>Process definition and design starts with asking the right questions that have the clearest answer.<\/p>\n<ul>\n<li>What is it you&#8217;re trying to do?<\/li>\n<li>What are the parts?\u00a0 How do they work and connect?<\/li>\n<li>What will it look when it&#8217;s put together?<\/li>\n<li>Is there an easier way?<\/li>\n<\/ul>\n<p>1. Define the process. \u00a0What are the goals of the process?<\/p>\n<p>In this example I want to geotag data from sensors for use in heat maps. \u00a0Tilt sensor data will be used to plot smooth or rough road conditions in the area. \u00a0Current sensor data will be used to plot high energy use in the area. The ultimate goal is to have enough information to make route selections that are the most comfortable and energy efficient.<\/p>\n<p>2. Defined the hardware use for the process. \u00a0 What will be used?<\/p>\n<p>A GPS unit from SparkFun <a href=\"https:\/\/www.sparkfun.com\/products\/11571\" target=\"_blank\">GP-635T<\/a> will be used as the\u00a0Geotag source. This device streams TTL-UART \u00a0(serial) data at 9600 from its transmit pin, while powered from a 3.3 to 5 volt source.<\/p>\n<p>The current sensor used will be a Pololu <a href=\"https:\/\/www.pololu.com\/product\/1187\" target=\"_blank\">ACS714<\/a> unit which\u00a0has a variation of analog voltage based on the current passing through it. \u00a0It is powered with a 5 volt source.<\/p>\n<p>Tilt sensor data will be acquired using a Parallax <a href=\"https:\/\/www.parallax.com\/product\/28526\" target=\"_blank\">MMA7455<\/a>. \u00a0This device operates from a 3.3 to 5 volt source. \u00a0The tilt sensor uses SPI to send and receive data.<\/p>\n<p>All of the sensor peripherals will connect to the <a href=\"http:\/\/store.arduino.cc\/product\/A000066\" target=\"_blank\">Arduino UNO<\/a>. \u00a0This micro controller will detect serial data from the GPS and parse the values to registers. \u00a0That event will trigger it to register the value it reads on its analog pin from the current sensor. \u00a0Next it will establish <a href=\"http:\/\/www.bitwizard.nl\/wiki\/index.php\/SPI_versus_I2C_protocols\" target=\"_blank\">SPI\/I2C<\/a> communications with the tilt sensor and register readings made successively for a short period of time. \u00a0The variations in the tilt values will be processed later to give standard deviation, which is the amount of vibration the sensor is experiencing. \u00a0All of the registers will print their values serially out.<\/p>\n<p>The data will be logged using a SparkFun <a href=\"https:\/\/www.sparkfun.com\/products\/9530\" target=\"_blank\">OpenLog<\/a>. \u00a0This device writes the serial data sent to it at 9600 baud to a microSD chip inserted into it. \u00a0This device operates\u00a0with 5 volts.<\/p>\n<p>3. Based on the spec sheets for all of the components, its easier to create a connection diagram.<\/p>\n<p>There isn&#8217;t any questions about this.\u00a0 Having a connection diagram gives a bird eye view of the parts.\u00a0 It lessens the chance of connecting something wrong and it clears the path.\u00a0 Even the basic summary of specs defined above is no match for the clarity of the diagram below.\u00a0 It drives the point home.<\/p>\n<p><a href=\"http:\/\/192.168.3.4\/wp-content\/uploads\/2015\/04\/Geo-Tagged-Data.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-large wp-image-2131\" src=\"http:\/\/192.168.3.4\/wp-content\/uploads\/2015\/04\/Geo-Tagged-Data-1024x773.png\" alt=\"Geo Tagged Data\" width=\"605\" height=\"457\" srcset=\"https:\/\/www.cloudacm.com\/wp-content\/uploads\/2015\/04\/Geo-Tagged-Data-1024x773.png 1024w, https:\/\/www.cloudacm.com\/wp-content\/uploads\/2015\/04\/Geo-Tagged-Data-300x226.png 300w, https:\/\/www.cloudacm.com\/wp-content\/uploads\/2015\/04\/Geo-Tagged-Data-100x75.png 100w, https:\/\/www.cloudacm.com\/wp-content\/uploads\/2015\/04\/Geo-Tagged-Data-150x113.png 150w, https:\/\/www.cloudacm.com\/wp-content\/uploads\/2015\/04\/Geo-Tagged-Data-200x151.png 200w, https:\/\/www.cloudacm.com\/wp-content\/uploads\/2015\/04\/Geo-Tagged-Data-450x340.png 450w, https:\/\/www.cloudacm.com\/wp-content\/uploads\/2015\/04\/Geo-Tagged-Data-600x453.png 600w, https:\/\/www.cloudacm.com\/wp-content\/uploads\/2015\/04\/Geo-Tagged-Data-900x679.png 900w, https:\/\/www.cloudacm.com\/wp-content\/uploads\/2015\/04\/Geo-Tagged-Data.png 2040w\" sizes=\"auto, (max-width: 605px) 100vw, 605px\" \/><\/a><\/p>\n<p>4. Where is the code for the Arduino?\u00a0 What code can be used for each part?<\/p>\n<p>It&#8217;s much easier to start with something.\u00a0 Fortunately, we can use fundamental code that has already been written.\u00a0 Lets start by breaking down the code into segments based on each of the components.<\/p>\n<ul>\n<li>\u00a0The OpenLog is easy, it receives serial TTL-UART data from the Arduino.\u00a0 No code needed, just connect it to the correct pin and set your serial out of the Arduino to the correct baud rate.<\/li>\n<li>\u00a0The Pololu current sensor is analog data, here we can reference the &#8220;<a href=\"http:\/\/www.arduino.cc\/en\/Tutorial\/AnalogInOutSerial\" target=\"_blank\">AnalogInOutSerial<\/a>&#8221; from the Arduino IDE examples list, kindly offered by Tom Igoe.<\/li>\n<li>The Parallax tilt sensor can operate using SPI\/I2C.\u00a0 Even though this isn&#8217;t included with the IDE examples, the code is already written and <a href=\"https:\/\/code.google.com\/p\/mma-7455-arduino-library\/\" target=\"_blank\">available<\/a>, thanks be to Moritz Kemper.<\/li>\n<li>Data from the GPS is a little more complex, it has to be parsed and formatted.\u00a0 Also, the devices sends serial TTL-UART data to the Arduino.\u00a0 Great thing is the <a href=\"http:\/\/arduiniana.org\/libraries\/tinygps\/\" target=\"_blank\">leg work has already been done<\/a>, thanks to Mikal Hart.<\/li>\n<\/ul>\n<p>I find it much easier to use the most complex piece of code as base code.\u00a0 Strip away code that won&#8217;t be used.\u00a0 From there, the simpler code can be added to the base, much like a pyramid.<\/p>\n<p><strong>Summary &#8211; Consider it an investment<\/strong><\/p>\n<p>In this post I covered a basic way of structuring an idea with the intent that it can be revisited later with minimum effort.\u00a0 It gives firm footing on the concept and provides inroads to more advanced ideas.\u00a0 The steps are worthwhile and rewarding, although they might not seem to be initially.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction &#8211; It&#8217;s easy to get caught up in all the parts It isn&#8217;t old age, but a sign of maturity when you have to write things down in order to remember them later.\u00a0 Ideas are like gas, potent when present but easily forgotten when gone.\u00a0 If ideas are worth keeping, then organizing and documenting will give them solid form.\u00a0 It seems simple, but failing to structure complex ideas only adds to the complexity.\u00a0 You can spare yourself lost details&#8230;<\/p>\n<p class=\"read-more\"><a class=\"btn btn-default\" href=\"https:\/\/www.cloudacm.com\/?p=2110\"> Read More<span class=\"screen-reader-text\">  Read More<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-2110","post","type-post","status-publish","format-standard","hentry","category-rd"],"_links":{"self":[{"href":"https:\/\/www.cloudacm.com\/index.php?rest_route=\/wp\/v2\/posts\/2110","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.cloudacm.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cloudacm.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cloudacm.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cloudacm.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2110"}],"version-history":[{"count":31,"href":"https:\/\/www.cloudacm.com\/index.php?rest_route=\/wp\/v2\/posts\/2110\/revisions"}],"predecessor-version":[{"id":2154,"href":"https:\/\/www.cloudacm.com\/index.php?rest_route=\/wp\/v2\/posts\/2110\/revisions\/2154"}],"wp:attachment":[{"href":"https:\/\/www.cloudacm.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2110"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cloudacm.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2110"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cloudacm.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2110"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}