{"id":696,"date":"2016-07-16T18:05:29","date_gmt":"2016-07-17T01:05:29","guid":{"rendered":"http:\/\/zethus.ca\/wp\/?p=696"},"modified":"2017-01-01T22:43:16","modified_gmt":"2017-01-02T05:43:16","slug":"obdii-car-gauge","status":"publish","type":"post","link":"https:\/\/zethus.ca\/wp\/?p=696","title":{"rendered":"OBDII Car Gauge"},"content":{"rendered":"<p>Jan 1:<\/p>\n<p>The project that will never get done. \u00a0 Due to my new intense dislike for vmware on osx,(probably as a result of vmware letting go of the whole team a while back) I&#8217;ve switched to docker. \u00a0It took about a week of my spare time to get things more or less the way I want them.<\/p>\n<p>The Dockerfile I ended up with is: (ymmv):<\/p>\n<pre>FROM wolfeidau\/esp8266-dev:1.4.0\r\n\r\nRUN apt-get update &amp;&amp; apt-get install -y \\\r\n zlib1g-dev \\\r\n default-jdk \\\r\n curl\r\n\r\n# add all the SDK stuff to the PATH\r\n ENV PATH=$PATH:\/opt\/Espressif\/crosstool-NG\/builds\/xtensa-lx106-elf\/bin\r\n\r\n# this needs the trailing slash\r\n ENV XTENSA_TOOLS_ROOT=\/opt\/Espressif\/crosstool-NG\/builds\/xtensa-lx106-elf\/bin\/\r\n ENV SDK_BASE=\/opt\/Espressif\/esp_iot_sdk_v1.4.0\r\n\r\n# Path which contains your esp8266 project source code\r\n WORKDIR \/Volumes\/MacHD\/Users\/chuck\/Organized-Projects\/CarGauge\/Build\/esp-gauges\r\n\r\n# pass -v \/Users:\/Users to ensure your shared folder is available within\r\n# the container for builds.\r\n VOLUME \/Users\r\n VOLUME \/Volumes\/MacHD\/Users\r\n\r\nRUN echo \"root:Docker!\" | chpasswd\r\n\r\nUSER ubuntu<\/pre>\n<p>I&#8217;m also using obdsim on mac using the <strong>obdgpslogger-0.16.tar.gz<\/strong> version (in the Tarball section) from <a href=\"http:\/\/icculus.org\/obdgpslogger\/\" rel=\"nofollow\">this link<\/a>.<\/p>\n<p>You need to navigate to the downloaded folder and then run the commands:<\/p>\n<pre>mkdir build\r\ncd build\r\ncmake .. (I installed this with brew, which needed the newest xcode)\r\nmake\r\nmake install # optional<\/pre>\n<p>This whole digression is very reminiscent of <a href=\"http:\/\/sethgodin.typepad.com\/seths_blog\/2005\/03\/dont_shave_that.html\">yak shaving<\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Oct 31:<\/p>\n<p>More minor progress. \u00a0Communication is better, but slow. \u00a0Gauge PIDs are selectable through the U\/I. \u00a0Now to just pretty up the displays a bit.<\/p>\n<p><a href=\"https:\/\/zethus.ca\/wp\/?attachment_id=737\" rel=\"attachment wp-att-737\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-737 alignnone\" src=\"https:\/\/zethus.ca\/wp\/wp-content\/uploads\/2016\/07\/lex.gif\" alt=\"lex\" width=\"480\" height=\"270\" \/><\/a><\/p>\n<p>Oct 6:<br \/>\nNow with case&#8230; I spent a couple of nights CNCing, and now have a case, 1\/8&#8243; acrylic in front and a spacer for the boards to fit into and a back, that has some pocket cuts for \u00a0some of the larger parts, the LDO, usb mini jack esp8266, and a slot for serial port access, in case I really mess up an pooch the OTA capability. \u00a0Back to writing S\/W I guess.<a href=\"https:\/\/zethus.ca\/wp\/wp-content\/uploads\/2016\/10\/img_1847.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-728 size-full\" src=\"https:\/\/zethus.ca\/wp\/wp-content\/uploads\/2016\/10\/img_1847-e1475855821824.jpg\" width=\"3396\" height=\"1461\" srcset=\"https:\/\/zethus.ca\/wp\/wp-content\/uploads\/2016\/10\/img_1847-e1475855821824.jpg 3396w, https:\/\/zethus.ca\/wp\/wp-content\/uploads\/2016\/10\/img_1847-e1475855821824-300x129.jpg 300w, https:\/\/zethus.ca\/wp\/wp-content\/uploads\/2016\/10\/img_1847-e1475855821824-768x330.jpg 768w, https:\/\/zethus.ca\/wp\/wp-content\/uploads\/2016\/10\/img_1847-e1475855821824-1024x441.jpg 1024w, https:\/\/zethus.ca\/wp\/wp-content\/uploads\/2016\/10\/img_1847-e1475855821824-500x215.jpg 500w\" sizes=\"auto, (max-width: 3396px) 100vw, 3396px\" \/><\/a>Oct 4:<\/p>\n<p>It&#8217;s getting there. I&#8217;ve got five displays daisy chained now; selectable with the demultiplexer. Just tonight I&#8217;ve folded the displays over to the back of the board and held them down with 3M VHB double stick tape. \u00a0For development, I&#8217;m talking to\u00a0<code>obdsim\u00a0<\/code>on a linux vm to write the software. \u00a0So far, software-wise, I can initialize the controller, and query the OBD for the available PIDs. \u00a0I got a little bored of the SW and want to start building a case for the displays now. \u00a0Since the wifi OTA updates work great I&#8217;m confident that having the displays &#8220;case-ified&#8221; won&#8217;t be a problem at this stage of the game.<\/p>\n<p><a href=\"https:\/\/zethus.ca\/wp\/?attachment_id=721\" rel=\"attachment wp-att-721\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-large wp-image-721\" src=\"https:\/\/zethus.ca\/wp\/wp-content\/uploads\/2016\/10\/img_1826-e1475642006220-1024x251.jpg\" alt=\"img_1826.jpg\" width=\"584\" height=\"143\" srcset=\"https:\/\/zethus.ca\/wp\/wp-content\/uploads\/2016\/10\/img_1826-e1475642006220-1024x251.jpg 1024w, https:\/\/zethus.ca\/wp\/wp-content\/uploads\/2016\/10\/img_1826-e1475642006220-300x74.jpg 300w, https:\/\/zethus.ca\/wp\/wp-content\/uploads\/2016\/10\/img_1826-e1475642006220-768x189.jpg 768w, https:\/\/zethus.ca\/wp\/wp-content\/uploads\/2016\/10\/img_1826-e1475642006220-500x123.jpg 500w\" sizes=\"auto, (max-width: 584px) 100vw, 584px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/zethus.ca\/wp\/?attachment_id=726\" rel=\"attachment wp-att-726\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-large wp-image-726\" src=\"https:\/\/zethus.ca\/wp\/wp-content\/uploads\/2016\/10\/img_1845-e1475642347120-1024x188.jpg\" alt=\"img_1845.jpg\" width=\"584\" height=\"107\" srcset=\"https:\/\/zethus.ca\/wp\/wp-content\/uploads\/2016\/10\/img_1845-e1475642347120-1024x188.jpg 1024w, https:\/\/zethus.ca\/wp\/wp-content\/uploads\/2016\/10\/img_1845-e1475642347120-300x55.jpg 300w, https:\/\/zethus.ca\/wp\/wp-content\/uploads\/2016\/10\/img_1845-e1475642347120-768x141.jpg 768w, https:\/\/zethus.ca\/wp\/wp-content\/uploads\/2016\/10\/img_1845-e1475642347120-500x92.jpg 500w\" sizes=\"auto, (max-width: 584px) 100vw, 584px\" \/><\/a><\/p>\n<p>Sept 6:<\/p>\n<p>As you can see (way) below I&#8217;ve added the ELM 327 dongle to setup the and hooked up the UART through the mini USB connector. After booting the module, connecting to the AP and telnetting in :<\/p>\n<pre class=\"p1\"><span class=\"s1\">mac-mini:~ chuck$ telnet 192.168.4.1 23<\/span>\r\n<span class=\"s1\">Trying 192.168.4.1...<\/span>\r\n<span class=\"s1\">Connected to 192.168.4.1.<\/span>\r\n<span class=\"s1\">Escape character is '^]'.\r\n<\/span><\/pre>\n<p>And setting the baud rate on the web page:\u00a0I&#8217;m talking to the dongle:<\/p>\n<pre>&gt;01\r\nSEARCHING... UNABLE TO CONNECT\r\n&gt;ATZ\r\nELM327 v1.5 \r\n&gt;atrv \r\n11.9<\/pre>\n<p>Here is the web page log, along with the baud-rate selection buttons:<\/p>\n<p><a href=\"https:\/\/zethus.ca\/wp\/?attachment_id=719\" rel=\"attachment wp-att-719\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-719 alignnone\" src=\"https:\/\/zethus.ca\/wp\/wp-content\/uploads\/2016\/07\/Screen-Shot-2016-09-06-at-9.14.29-PM.png\" alt=\"Screen Shot 2016-09-06 at 9.14.29 PM\" width=\"977\" height=\"339\" srcset=\"https:\/\/zethus.ca\/wp\/wp-content\/uploads\/2016\/07\/Screen-Shot-2016-09-06-at-9.14.29-PM.png 977w, https:\/\/zethus.ca\/wp\/wp-content\/uploads\/2016\/07\/Screen-Shot-2016-09-06-at-9.14.29-PM-300x104.png 300w, https:\/\/zethus.ca\/wp\/wp-content\/uploads\/2016\/07\/Screen-Shot-2016-09-06-at-9.14.29-PM-768x266.png 768w, https:\/\/zethus.ca\/wp\/wp-content\/uploads\/2016\/07\/Screen-Shot-2016-09-06-at-9.14.29-PM-500x173.png 500w\" sizes=\"auto, (max-width: 977px) 100vw, 977px\" \/><\/a><\/p>\n<p>Here is the current hardware setup. It is a little more stable now that it is glued down!<\/p>\n<p><a href=\"https:\/\/zethus.ca\/wp\/?attachment_id=718\" rel=\"attachment wp-att-718\"><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-718 alignnone\" src=\"https:\/\/zethus.ca\/wp\/wp-content\/uploads\/2016\/09\/img_1664-e1473217577236-1024x581.jpg\" alt=\"img_1664.jpg\" width=\"584\" height=\"331\" srcset=\"https:\/\/zethus.ca\/wp\/wp-content\/uploads\/2016\/09\/img_1664-e1473217577236-1024x581.jpg 1024w, https:\/\/zethus.ca\/wp\/wp-content\/uploads\/2016\/09\/img_1664-e1473217577236-300x170.jpg 300w, https:\/\/zethus.ca\/wp\/wp-content\/uploads\/2016\/09\/img_1664-e1473217577236-768x436.jpg 768w, https:\/\/zethus.ca\/wp\/wp-content\/uploads\/2016\/09\/img_1664-e1473217577236-500x284.jpg 500w\" sizes=\"auto, (max-width: 584px) 100vw, 584px\" \/><\/a><\/p>\n<p>Sept 5:<\/p>\n<p>I&#8217;ve done a bit more investigating on the power up problems. \u00a0So purely empirically, when the display is running, if I cut and reconnect power before the 13V supply charge pump cap drops below about 12V, the display works. \u00a0Failing that I need to wait about 90 seconds before applying power (when the voltage at the cap is at about 6V). What is weird is that if I short the cap to discharge the 13V supply it still does not come up, so it seems that the display is rather particular about how it is powered on.<\/p>\n<p>This could easily still be a software problem. More digging is required! There are power up timing constraints in the data sheet which I am completely ignoring:<\/p>\n<p><a href=\"https:\/\/zethus.ca\/wp\/?attachment_id=716\" rel=\"attachment wp-att-716\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-716\" src=\"https:\/\/zethus.ca\/wp\/wp-content\/uploads\/2016\/07\/Screen-Shot-2016-09-05-at-4.35.10-PM.png\" alt=\"Screen Shot 2016-09-05 at 4.35.10 PM\" width=\"665\" height=\"566\" srcset=\"https:\/\/zethus.ca\/wp\/wp-content\/uploads\/2016\/07\/Screen-Shot-2016-09-05-at-4.35.10-PM.png 665w, https:\/\/zethus.ca\/wp\/wp-content\/uploads\/2016\/07\/Screen-Shot-2016-09-05-at-4.35.10-PM-300x255.png 300w, https:\/\/zethus.ca\/wp\/wp-content\/uploads\/2016\/07\/Screen-Shot-2016-09-05-at-4.35.10-PM-352x300.png 352w\" sizes=\"auto, (max-width: 665px) 100vw, 665px\" \/><\/a><\/p>\n<p>Oh well.<\/p>\n<p>Another Update Sept 4:<\/p>\n<p>The board is getting really messy now. \u00a0I reworked the board to use the hardware SPI chip select, instead of bit banging. This required using an inverting input on the HC138 (decoder\/mux). \u00a0After a bit of software rework,\u00a0voil\u00e0, we&#8217;ve got an image. \u00a0So it occurs to me that the reason the software CS probably didn&#8217;t was that the signal was inverted going through the mux. Oh Well. \u00a0I&#8217;m not out of the woods yet however, since there is a power up sequencing issue that I need to solve. \u00a0The upshot is that I need to leave the display unplugged a couple of minutes before the display boots correctly. More to come. \u00a0Long weekends rock!<\/p>\n<p><strong style=\"line-height: 1.625;\"><a href=\"https:\/\/zethus.ca\/wp\/?attachment_id=710\" rel=\"attachment wp-att-710\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft wp-image-710 size-large\" src=\"https:\/\/zethus.ca\/wp\/wp-content\/uploads\/2016\/09\/img_1663-e1473023657169-1024x1012.jpg\" width=\"584\" height=\"577\" srcset=\"https:\/\/zethus.ca\/wp\/wp-content\/uploads\/2016\/09\/img_1663-e1473023657169-1024x1012.jpg 1024w, https:\/\/zethus.ca\/wp\/wp-content\/uploads\/2016\/09\/img_1663-e1473023657169-300x297.jpg 300w, https:\/\/zethus.ca\/wp\/wp-content\/uploads\/2016\/09\/img_1663-e1473023657169-768x759.jpg 768w, https:\/\/zethus.ca\/wp\/wp-content\/uploads\/2016\/09\/img_1663-e1473023657169-303x300.jpg 303w\" sizes=\"auto, (max-width: 584px) 100vw, 584px\" \/><\/a><\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>Update Sep 4<\/p>\n<p>I soldered on the OLED display. It&#8217;s alive. \u00a0Sort of. \u00a0So I think electrically it is probably ok, I suspect the chip selects, or startup timing. Baby steps.<\/p>\n<p><a href=\"https:\/\/zethus.ca\/wp\/wp-content\/uploads\/2016\/09\/img_1662.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-707\" src=\"https:\/\/zethus.ca\/wp\/wp-content\/uploads\/2016\/09\/img_1662.jpg\" alt=\"\" width=\"3264\" height=\"2448\" srcset=\"https:\/\/zethus.ca\/wp\/wp-content\/uploads\/2016\/09\/img_1662.jpg 3264w, https:\/\/zethus.ca\/wp\/wp-content\/uploads\/2016\/09\/img_1662-300x225.jpg 300w, https:\/\/zethus.ca\/wp\/wp-content\/uploads\/2016\/09\/img_1662-768x576.jpg 768w, https:\/\/zethus.ca\/wp\/wp-content\/uploads\/2016\/09\/img_1662-1024x768.jpg 1024w, https:\/\/zethus.ca\/wp\/wp-content\/uploads\/2016\/09\/img_1662-400x300.jpg 400w\" sizes=\"auto, (max-width: 3264px) 100vw, 3264px\" \/><\/a><br \/>\nUpdate Sep 3<\/p>\n<p>Work is slowly progressing on board bring up. \u00a0So far there have been two errors in the board design.<\/p>\n<ul>\n<li>The boost converter to make the 13V for the oled cannot have 10v on the logic portion of the chip. This bit was reworked.<\/li>\n<li>mosi and miso were swapped on the esp8266-12E module schematic part in protel, whoops.<\/li>\n<\/ul>\n<p>Work is progressing on the software as well, \u00a0the mux is now in a state where it should work for selecting the onboard display. Next steps are to solder on the OLED when I&#8217;m feeling brave.<\/p>\n<p>Here is the current state of the board:<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/zethus.ca\/wp\/?attachment_id=705\" rel=\"attachment wp-att-705\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-large wp-image-705\" src=\"https:\/\/zethus.ca\/wp\/wp-content\/uploads\/2016\/07\/IMG_1654-e1472941495919-1024x614.jpg\" alt=\"backboard\" width=\"584\" height=\"350\" srcset=\"https:\/\/zethus.ca\/wp\/wp-content\/uploads\/2016\/07\/IMG_1654-e1472941495919-1024x614.jpg 1024w, https:\/\/zethus.ca\/wp\/wp-content\/uploads\/2016\/07\/IMG_1654-e1472941495919-300x180.jpg 300w, https:\/\/zethus.ca\/wp\/wp-content\/uploads\/2016\/07\/IMG_1654-e1472941495919-768x460.jpg 768w, https:\/\/zethus.ca\/wp\/wp-content\/uploads\/2016\/07\/IMG_1654-e1472941495919-500x300.jpg 500w\" sizes=\"auto, (max-width: 584px) 100vw, 584px\" \/><\/a><a href=\"https:\/\/zethus.ca\/wp\/?attachment_id=704\" rel=\"attachment wp-att-704\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-large wp-image-704\" src=\"https:\/\/zethus.ca\/wp\/wp-content\/uploads\/2016\/07\/IMG_1653-e1472941465601-1024x670.jpg\" alt=\"esp car gauge\" width=\"584\" height=\"382\" srcset=\"https:\/\/zethus.ca\/wp\/wp-content\/uploads\/2016\/07\/IMG_1653-e1472941465601-1024x670.jpg 1024w, https:\/\/zethus.ca\/wp\/wp-content\/uploads\/2016\/07\/IMG_1653-e1472941465601-300x196.jpg 300w, https:\/\/zethus.ca\/wp\/wp-content\/uploads\/2016\/07\/IMG_1653-e1472941465601-768x503.jpg 768w, https:\/\/zethus.ca\/wp\/wp-content\/uploads\/2016\/07\/IMG_1653-e1472941465601-458x300.jpg 458w, https:\/\/zethus.ca\/wp\/wp-content\/uploads\/2016\/07\/IMG_1653-e1472941465601.jpg 1844w\" sizes=\"auto, (max-width: 584px) 100vw, 584px\" \/><\/a>This page is reserved as doc for the car gauges in case anyone comes here based on the<\/p>\n<p>silk screen doc from dirtypcb. This will be fleshed out as work progresses.<\/p>\n<p>Boards are off to fab soon, \u00a0here is the teaser gerber:<a href=\"https:\/\/zethus.ca\/wp\/wp-content\/uploads\/2016\/07\/gauges.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-large wp-image-700\" src=\"https:\/\/zethus.ca\/wp\/wp-content\/uploads\/2016\/07\/gauges-1024x723.png\" alt=\"gauges\" width=\"584\" height=\"412\" srcset=\"https:\/\/zethus.ca\/wp\/wp-content\/uploads\/2016\/07\/gauges-1024x723.png 1024w, https:\/\/zethus.ca\/wp\/wp-content\/uploads\/2016\/07\/gauges-300x212.png 300w, https:\/\/zethus.ca\/wp\/wp-content\/uploads\/2016\/07\/gauges-768x543.png 768w, https:\/\/zethus.ca\/wp\/wp-content\/uploads\/2016\/07\/gauges-425x300.png 425w, https:\/\/zethus.ca\/wp\/wp-content\/uploads\/2016\/07\/gauges.png 1754w\" sizes=\"auto, (max-width: 584px) 100vw, 584px\" \/><\/a><\/p>\n<p>The basic premise is that a cheap OBD II dongle will interface with these boards to display data on an OLED display. \u00a0The display boards are designed to be daisy chained together so that up to 5 (five) boards can be controlled with one ESP-8266.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Jan 1: The project that will never get done. \u00a0 Due to my new intense dislike for vmware on osx,(probably as a result of vmware letting go of the whole team a while back) I&#8217;ve switched to docker. \u00a0It took &hellip; <a href=\"https:\/\/zethus.ca\/wp\/?p=696\">Continue reading <span class=\"meta-nav\">&rarr;<\/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":[16,24],"tags":[],"class_list":["post-696","post","type-post","status-publish","format-standard","hentry","category-car-computer","category-esp8266"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/zethus.ca\/wp\/index.php?rest_route=\/wp\/v2\/posts\/696","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/zethus.ca\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zethus.ca\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zethus.ca\/wp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/zethus.ca\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=696"}],"version-history":[{"count":21,"href":"https:\/\/zethus.ca\/wp\/index.php?rest_route=\/wp\/v2\/posts\/696\/revisions"}],"predecessor-version":[{"id":743,"href":"https:\/\/zethus.ca\/wp\/index.php?rest_route=\/wp\/v2\/posts\/696\/revisions\/743"}],"wp:attachment":[{"href":"https:\/\/zethus.ca\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=696"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zethus.ca\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=696"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zethus.ca\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=696"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}