{"id":1426,"date":"2014-11-20T20:32:43","date_gmt":"2014-11-21T03:32:43","guid":{"rendered":"https:\/\/logicalelegance.com\/journey\/?p=1426"},"modified":"2014-12-09T12:42:32","modified_gmt":"2014-12-09T19:42:32","slug":"lets-get-wordy","status":"publish","type":"post","link":"https:\/\/logicalelegance.com\/journey\/2014\/11\/lets-get-wordy\/","title":{"rendered":"Let&#8217;s Get Wordy!"},"content":{"rendered":"<p>I got a <a title=\"MicroView at Sparkfun\" href=\"https:\/\/www.sparkfun.com\/products\/12923\" target=\"_blank\">MicroView<\/a>: a tiny Arduino with a nice OLED screen. I want to make a ring with it. When I tap the ring, it should give me a word. If I tap it again, the ring shows the definition. I\u2019ll call the ring WORDY and vocabulary geeks all over the land will rejoice.<\/p>\n<p>I\u2019m sure you are wondering how to build this (and not why I would want to). The critical component is the MicroView. Here, have a picture to see how big it is on my hand.<\/p>\n<p><a href=\"https:\/\/logicalelegance.com\/journey\/wp-content\/uploads\/2014\/11\/photo-1.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-1429\" src=\"https:\/\/logicalelegance.com\/journey\/wp-content\/uploads\/2014\/11\/photo-1-252x300.jpg\" alt=\"MicroView on my hand\" width=\"252\" height=\"300\" srcset=\"https:\/\/logicalelegance.com\/journey\/wp-content\/uploads\/2014\/11\/photo-1-252x300.jpg 252w, https:\/\/logicalelegance.com\/journey\/wp-content\/uploads\/2014\/11\/photo-1-860x1024.jpg 860w, https:\/\/logicalelegance.com\/journey\/wp-content\/uploads\/2014\/11\/photo-1.jpg 1076w\" sizes=\"auto, (max-width: 252px) 100vw, 252px\" \/><\/a><\/p>\n<p>It fits reasonably well on my ring finger, easily on my pinky.\u00a0Now all I need is:<\/p>\n<ul>\n<li>A battery<\/li>\n<li>An accelerometer<\/li>\n<li>Ring to mount it on<\/li>\n<li>Connecting all that together<\/li>\n<\/ul>\n<p>Let\u2019s start with the battery. \u00a0It has to be small. When I measured the MicroView as consuming 330mA (5V), I was bereft. Of course, where was it putting the 1.5W without burning things? Once I read <a title=\"My own book schools me\" href=\"http:\/\/www.amazon.com\/gp\/product\/1449302149\/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=390957&amp;creativeASIN=1449302149&amp;linkCode=as2&amp;tag=httpembefm-20&amp;linkId=RTZVZJDVF4244QL4\" target=\"_blank\">a handy book<\/a>\u00a0with a section on how to measure current correctly with an ammeter, I found that the MicroView consumes about 13mA with the screen lit and can be put to sleep to consume 0.13mA. And once I stopped trying to use STUPID math (thank you tymkrs IRC!), that meant I could expect a 50mAh battery to last for about 100 hours, far beyond my minimum goal of 3 hours.<\/p>\n<p>Tangent: When I work on client projects, I\u2019m quite disciplined, writing things down, looking them up, and double checking my math. It seems that on my own projects, I keep trying to shortcut to the most obvious solution. Maybe it is because this is Arduino-based so I think it should be easy. That\u2019s dumb because I\u2019ve used the ATmega328, it is <strong>not<\/strong> a simple chip. Adding a layer of niceness doesn&#8217;t make for an easy system, it just is one layer of niceness.<\/p>\n<p>The next thing to add is an accelerometer. I like accelerometers: they give a layer of flexibility that is just lovely. I could say I want to \u201ctap to activate\u201d and have that mean: tap, move above some threshold, double tap, change orientation, etc. I could work out the user interface details after my prototype was functional.<\/p>\n<p>Or it would mean that if I didn&#8217;t keep blowing up accelerometers. Naw, that\u2019s not right, if I\u2019d blown up the accelerometers in tiny little explosions, that would be better. Instead, I tried to use the <a title=\"Sparkfun MMA8452 accelerometer breakout board\" href=\"https:\/\/www.sparkfun.com\/products\/12756\" target=\"_blank\">Sparkfun MMA8452 breakout board<\/a>. There is plenty of <a title=\"Code from Sparkfun\" href=\"https:\/\/github.com\/sparkfun\/MMA8452_Accelerometer\/tree\/QC-Rev\" target=\"_blank\">example code<\/a> for this accelerometer on an Arduino. Funny thing though:\u00a0 the standard Arduino board uses 5V but has 3V out. And there were <a title=\"Sparkfun Hookup Guide\" href=\"https:\/\/learn.sparkfun.com\/tutorials\/mma8452q-accelerometer-breakout-hookup-guide\" target=\"_blank\">some writings <\/a>about <a title=\"Garden path\" href=\"http:\/\/jeelabs.org\/2013\/04\/25\/what-if-mixing-3-35-0-part-2\/\" target=\"_blank\">adding resisters to decrease the voltage<\/a>\u00a0that the 3V accelerometer part would see on GPIOs.<\/p>\n<p>Perhaps I should have paid more attention. Though I did read it several times. I should have looked <a title=\"Should have seen this, I suppose\" href=\"http:\/\/electronics.stackexchange.com\/questions\/106849\/using-single-resistor-to-receive-5v-signal-on-the-3-3v-rated-pin\" target=\"_blank\">several plus one or two<\/a>. I would never just try it if I had an EE to talk to, which I would at a client\u2019s. (Sadly, my best EE friend moved to Seattle. He\u2019s happy but I have no one to take to that Japanese place next to Baskin Robbins and bribe into telling me I\u2019m about to do something moronic.)<\/p>\n<p>Anyway, that accelerometer is dead. I forgot to do the voltage limiting resistor trick on my interrupt line. Whoops. (Since I need a low signal to get out of sleep, I used the internal Arduino pull ups. Anyway, that accelerometer is dead.)<\/p>\n<p>However, Adafruit makes me think I\u2019m not the only one with this particular issue as they sell the same accelerometer in a <a title=\"Adafruit accelerometer breakout board\" href=\"https:\/\/www.adafruit.com\/product\/2019\" target=\"_blank\">5V tolerant breakout board<\/a>. Two things you should know: it isn\u2019t the same part (MMA8451 instead of 8452, mostly the same but not, you know, the same); and the address line is not 5V tolerant. I couldn\u2019t get it to respond to the \u201cwho am I\u201d register query so I kept moving the address line until that time I missed the 3V (output from the Adafruit board) and the GND, putting it on the 5V that is between them on the pins.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-1428\" src=\"https:\/\/logicalelegance.com\/journey\/wp-content\/uploads\/2014\/11\/photo-2-300x187.jpg\" alt=\"breadboard with dead accels\" width=\"300\" height=\"187\" srcset=\"https:\/\/logicalelegance.com\/journey\/wp-content\/uploads\/2014\/11\/photo-2-300x187.jpg 300w, https:\/\/logicalelegance.com\/journey\/wp-content\/uploads\/2014\/11\/photo-2-1024x640.jpg 1024w, https:\/\/logicalelegance.com\/journey\/wp-content\/uploads\/2014\/11\/photo-2.jpg 1280w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>Here you can see a picture of my little breadboard with my two dead accelerometers. A new Adafruit accelerometer will be here tomorrow. My driver is in a better state (it worked right before the accelerometer stopped working) so I\u2019ll be leaving it in the default address state.<\/p>\n<p>However, this Adafruit bread board is just a wee bit too big. I mean, just a tiny bit too big.<\/p>\n<p><a href=\"https:\/\/logicalelegance.com\/journey\/wp-content\/uploads\/2014\/11\/photo3.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-1427\" src=\"https:\/\/logicalelegance.com\/journey\/wp-content\/uploads\/2014\/11\/photo3-300x192.jpg\" alt=\"photo3\" width=\"300\" height=\"192\" srcset=\"https:\/\/logicalelegance.com\/journey\/wp-content\/uploads\/2014\/11\/photo3-300x192.jpg 300w, https:\/\/logicalelegance.com\/journey\/wp-content\/uploads\/2014\/11\/photo3-1024x657.jpg 1024w, https:\/\/logicalelegance.com\/journey\/wp-content\/uploads\/2014\/11\/photo3.jpg 1516w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>My plan involves a Dremel tool (and safety glasses and a mask). Should be no problem right? Actually, the top of the board has several 3-4mm of unnecessary board. I only need to shave off 1mm and it will fit.<\/p>\n<p>In the meantime, the button works really well. If something happens to the accelerometer tomorrow, I\u2019m going to radioshack to see if there are any tiny press buttons.<\/p>\n<p>Stumbling along in the project, I have ring blanks. I made them out of <a title=\"Cloud clay is strange\" href=\"http:\/\/www.amazon.com\/gp\/product\/B00378JRQU\/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B00378JRQU&amp;linkCode=as2&amp;tag=httpembefm-20&amp;linkId=SRALNPWJ4HHSER4O\" target=\"_blank\">freaky &#8220;cloud&#8221; clay<\/a> I found at the hobby shop (D&amp;J is awesome). I was hoping they\u2019d have small LiPos, only in other things and long-thin ones for aircraft but they did have this cloud clay.<\/p>\n<p>It is pliant when dry and super light. It says it doesn\u2019t shrink but it totally does. It smells like hair conditioner. Nail polish works really well on it so even though I got white, my rings aren\u2019t staying that way. It isn\u2019t rubber like Sugru but it seems reasonably durable. I would like to 3D print a ring base but I\u2019m pretty happy with my cloud clay blanks. Though I might try Sugru too.<\/p>\n<p>Now, connecting it all together. Hmm\u2026 the <a title=\"40mAh battery\" href=\"https:\/\/www.sparkfun.com\/products\/11316\" target=\"_blank\">new battery<\/a> will have a JST connector. I can\u2019t see how to keep that which means cutting that off and stripping the wires. But how to route them? I\u2019d like to put them in something with a connector but then I have to run wires around my finger since the connectors are sorta big.<\/p>\n<p><a href=\"https:\/\/logicalelegance.com\/journey\/wp-content\/uploads\/2014\/11\/photo.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-1431\" src=\"https:\/\/logicalelegance.com\/journey\/wp-content\/uploads\/2014\/11\/photo-190x300.jpg\" alt=\"ring blanks\" width=\"190\" height=\"300\" srcset=\"https:\/\/logicalelegance.com\/journey\/wp-content\/uploads\/2014\/11\/photo-190x300.jpg 190w, https:\/\/logicalelegance.com\/journey\/wp-content\/uploads\/2014\/11\/photo-649x1024.jpg 649w, https:\/\/logicalelegance.com\/journey\/wp-content\/uploads\/2014\/11\/photo.jpg 812w\" sizes=\"auto, (max-width: 190px) 100vw, 190px\" \/><\/a><\/p>\n<p>Yeah, those wires are\u00a0pretty hideous. I guess I\u2019ll \u00a0wrap wires around pins and use a little bit of electrical tape method. I don\u2019t like that either as it becomes a construction project to charge the battery but, hey, 100 hours means a lot more play time than the 3 hours I thought. Though, since the clay did shrink, some of the ring blanks don\u2019t fit all of the pins (as shown). I can make some new ones, I like playing with the clay. (Did I mention it is a little freaky? It is weirdly weightless.)<\/p>\n<p>As for the code, it is pretty simple. I\u2019ll post a link. The flash based wordlist that gave me the most trouble (again because I went for the easy looking path instead of what I know to be true about the ATmega). Also, I want a much better word list. The <a title=\"GRE list\" href=\"https:\/\/www.msu.edu\/~defores1\/gre\/vocab\/gre_vocab.htm\">GRE vocab list<\/a>\u00a0I started with is interesting but I know most of these words. <a title=\"Wordnik WOTD\" href=\"https:\/\/www.wordnik.com\/word-of-the-day\" target=\"_blank\">Wordnik<\/a> has a lovely set of lists and words but they aren&#8217;t easy to download (maybe there is an API?), On the other hand,\u00a0the sleep and low power code went in without a hitch.<\/p>\n<p>So, this is what I&#8217;ve been working on. It has been amusing and difficult. I\u2019m ashamed of myself for blowing the accelerometers but sort of pleased with myself for using my downtime to learn things, even build things.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I got a MicroView: a tiny Arduino with a nice OLED screen. I want to make a ring with it. When I tap the ring, it should give me a word. If I tap it again, the ring shows the definition. I\u2019ll call the ring WORDY and vocabulary geeks all over the land will rejoice. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[1],"tags":[5,63,64],"class_list":["post-1426","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-gadgets","tag-microview","tag-wordy"],"_links":{"self":[{"href":"https:\/\/logicalelegance.com\/journey\/wp-json\/wp\/v2\/posts\/1426","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/logicalelegance.com\/journey\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/logicalelegance.com\/journey\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/logicalelegance.com\/journey\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/logicalelegance.com\/journey\/wp-json\/wp\/v2\/comments?post=1426"}],"version-history":[{"count":2,"href":"https:\/\/logicalelegance.com\/journey\/wp-json\/wp\/v2\/posts\/1426\/revisions"}],"predecessor-version":[{"id":1432,"href":"https:\/\/logicalelegance.com\/journey\/wp-json\/wp\/v2\/posts\/1426\/revisions\/1432"}],"wp:attachment":[{"href":"https:\/\/logicalelegance.com\/journey\/wp-json\/wp\/v2\/media?parent=1426"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/logicalelegance.com\/journey\/wp-json\/wp\/v2\/categories?post=1426"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/logicalelegance.com\/journey\/wp-json\/wp\/v2\/tags?post=1426"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}