{"id":3022,"date":"2012-11-14T21:26:25","date_gmt":"2012-11-15T05:26:25","guid":{"rendered":"http:\/\/www.corbinstreehouse.com\/blog\/2012\/11\/elithion-bms-display-part-1\/"},"modified":"2018-11-03T13:36:27","modified_gmt":"2018-11-03T20:36:27","slug":"elithion-bms-display-part-1","status":"publish","type":"post","link":"https:\/\/www.corbinstreehouse.com\/blog\/2012\/11\/elithion-bms-display-part-1\/","title":{"rendered":"Elithion BMS Display &#8211; part 1"},"content":{"rendered":"<p id=\"top\" \/>\n<p>I want a better BMS display for my car. I have the <a href=\"http:\/\/elithion.com\">Elithion BMS<\/a> &#8220;<a href=\"http:\/\/elithion.com\/lithiumate_pro.php\">Pro<\/a>&#8220;, which has worked pretty well in my conversion. Sometimes it gives faults earlier than I would want, and sometimes I&#8217;ve had bank communication errors that really shouldn&#8217;t happen (all connections are tight, and I don&#8217;t have excessive noise in my environment). There are a <a href=\"http:\/\/elithion.com\/lithiumate_pro_displays.php\">few displays<\/a> out there listed on the Elithion website. I have the round small one made by elithion; it is lacking in features and doesn&#8217;t have the ability to show fine grained state of charge. There are simply 10 bars, and that means at any given time the car could be within a 10% range of state of charge. I want a specific number showing me the SOC. The fault indication is also not very good; the blinking light isn&#8217;t very useful other than to give you a warning something is wrong; sure, it warns, but why? you have to hook up another display (like an iPhone) or a computer to see what is up. The &#8220;third party&#8221;&nbsp;&nbsp;<a href=\"http:\/\/elithion.com\/6DS0020P.php\" style=\"font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; text-align: -webkit-auto;\">K &amp; K Multifunction display<\/a> is large and ugly\u2026and I want something I can control.<\/p>\n<p>So, I&#8217;m going to write my own hardware\/software combo. I bought:<\/p>\n<p>1. Arduino Leonardo (I have an UNO in my car already)<\/p>\n<p>2. <a href=\"http:\/\/www.adafruit.com\/products\/797\">Adafruit 2.2 TFT display<\/a>&#8212; Now I realize you can get much cheaper ones at other locations (oh well)<\/p>\n<p>3. <a href=\"https:\/\/www.sparkfun.com\/products\/10039\">Canbus shield<\/a> from spark fun<\/p>\n<p>I quickly ran into problems with this basic hardware. The display doesn&#8217;t work with a Leonardo unless you wire directly to the ICSP pins on the board (well, it will work in software mode, which is slow). I initially did wire it up, but then realized another problem. The Canbus shield won&#8217;t at all work with the Leonardo. It really assumes the ICSP pins are wired based on the UNO spec. So, I went out and bought an UNO from radioshack (expensive! but I wanted one that day).<\/p>\n<p>The next problem was that the demo code for the Adafruit display really sucks. The fonts are horrible, and the graphics are terrible. Luckily, I found a great library called <a href=\"http:\/\/henningkarlsen.com\/electronics\/library.php?id=52\">UTFT<\/a> by Henning Karlsen. It worked with the display I had..but only ran in serial mode. That was going to be a problem, as it was horribly slow, and worse, conflicted with the Canbus shield. As soon as the Canbus shield was initialized the UTFT library stopped working. I realized it was because the UTFT library assumes 100% control of all the pins, whereas I wanted it to share all the pins and use the SPI method of talking (which only requires one dedicated pin to talk to a particular device &#8212; this works by having a &#8220;Chip select&#8221; (CS) pin that identifies when that device is being talked to).<\/p>\n<p>So, I took the time to port the UTFT library to the Adafruit 2.2 shield, by using the (ugly) code from adafruit as a drop in hack to get it working. It took a while, but I figured it all out, and now understand a lot more about the Arduino hardware and how things work with it. (Code available soon)<\/p>\n<p>So now, it is time to read the Canbus spec and get rolling. <a href=\"http:\/\/lithiumate.elithion.com\/php\/controller_can_specs.php\">http:\/\/lithiumate.elithion.com\/php\/controller_can_specs.php<\/a><\/p>\n<p>\n<a href=\"http:\/\/www.corbinstreehouse.com\/blog\/wp-content\/uploads\/2012\/11\/IMG_8948.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.corbinstreehouse.com\/blog\/wp-content\/uploads\/2012\/11\/IMG_8948-tm.jpg\" width=\"500\" height=\"375\" alt=\"IMG_8948.JPG\" \/><\/a><\/p>\n<p>In the picture above: Arduino on bottom, Adafruit prototype shield in the middle (hooking pins up to the display), and the Canbus shield on top. I also plan to add some other neat things, like temperature reading and GPS information. That way I can calculate how many miles are left based on the state of charge and what watt\/hours per mile the car has actually been getting.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I want a better BMS display for my car. I have the Elithion BMS &#8220;Pro&#8220;, which has worked pretty well in my conversion. Sometimes it gives faults earlier than I would want, and sometimes I&#8217;ve&#8230; <a class=\"read-more\" href=\"https:\/\/www.corbinstreehouse.com\/blog\/2012\/11\/elithion-bms-display-part-1\/\">[read more]<\/a><\/p>\n","protected":false},"author":1,"featured_media":3020,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[34],"tags":[],"class_list":["post-3022","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-electric-bug"],"jetpack_featured_media_url":"https:\/\/www.corbinstreehouse.com\/blog\/wp-content\/uploads\/2012\/11\/IMG_8948.jpg","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.corbinstreehouse.com\/blog\/wp-json\/wp\/v2\/posts\/3022","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.corbinstreehouse.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.corbinstreehouse.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.corbinstreehouse.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.corbinstreehouse.com\/blog\/wp-json\/wp\/v2\/comments?post=3022"}],"version-history":[{"count":1,"href":"https:\/\/www.corbinstreehouse.com\/blog\/wp-json\/wp\/v2\/posts\/3022\/revisions"}],"predecessor-version":[{"id":5464,"href":"https:\/\/www.corbinstreehouse.com\/blog\/wp-json\/wp\/v2\/posts\/3022\/revisions\/5464"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.corbinstreehouse.com\/blog\/wp-json\/wp\/v2\/media\/3020"}],"wp:attachment":[{"href":"https:\/\/www.corbinstreehouse.com\/blog\/wp-json\/wp\/v2\/media?parent=3022"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.corbinstreehouse.com\/blog\/wp-json\/wp\/v2\/categories?post=3022"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.corbinstreehouse.com\/blog\/wp-json\/wp\/v2\/tags?post=3022"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}