{"id":554,"date":"2013-02-10T20:22:47","date_gmt":"2013-02-11T01:22:47","guid":{"rendered":"http:\/\/fll-freak.com\/blog\/?p=554"},"modified":"2025-04-21T00:54:36","modified_gmt":"2025-04-21T04:54:36","slug":"as3935-details","status":"publish","type":"post","link":"https:\/\/fll-freak.com\/blog\/?p=554","title":{"rendered":"AS3935 details"},"content":{"rendered":"<p>After a very frustrating weekend, I am pretty confident I have the worst of the integration problems behind me. The Embedded Adventures board is a very nice board but did take the choice of SPI or I2C out of my hands. It was designed to be I2C only. Not a problem. The Arduino does I2C.<!--more--><\/p>\n<p>So I hooked up the break out board to my Arduino UNO and started to write some basic &#8220;Wire Library&#8221; code. How hard could this be? Well after the first day, I would say pretty hard. Turns out the AS3935 has some pretty stringent demands for reading and writing registers. Mostly, when turning around the bus, you must use a &#8220;Repeated Start&#8221; and not a more normal Stop and Start sequence. After I figured that out, I was able to realize that the Wire library does support that, but not in so many words. After Day one, I at least was getting some ACKs from the device address part of the bus transfer.<\/p>\n<p>After day two, I was able to read and write most registers except register 0x00. This one kept giving me a NAK when I sent over the device address for the read after I had sent over the register address in the write part of the transaction. Much aggravation because sometimes it would work and other times not.<\/p>\n<p>In the mean time, I have exchanged numerous emails with the Embedded Adventures people in the UK. They must never sleep and take days off over there because I was getting very fast turn arounds on the questions I was asking. The upshot is that they had issues as well with register 0x00. So with that in mind, I did a careful survey of the issue and discovered what must be an &#8220;undocumented feature&#8221;. Reading register 0x00 will always NAK you till such time as you read a different register. After that you can read and write any and all legal registers. I have sent out yet another email to the AMS people in Austria asking them about this issue and any other errata they might like to share.<\/p>\n<p>At the end of day three with the low level communication finished, I was able to get the unit to self calibrate and to sit in listen mode. Further more, I was able to get it to respond with &#8220;disturber (not lightning)&#8221; reports when I generated sparks in the area. Without the awfully expensive lightning simulator from AMS, I will now have to sit around and wait for a storm. That might be many months from now.<\/p>\n<p>But now with this off my plate (its been a running project for more than two years) I can get back to the AVC. Just so happens that I got two thermo electric coolers in the mail over the weekend just waiting to try to temperature stabilize the IMU and to characterize it for hard and soft magnetic properties.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>After a very frustrating weekend, I am pretty confident I have the worst of the integration problems behind me. The Embedded Adventures board is a very nice board but did take the choice of SPI or I2C out of my &hellip; <a href=\"https:\/\/fll-freak.com\/blog\/?p=554\">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":[22,28,24,20,4,27,17,7],"tags":[],"class_list":["post-554","post","type-post","status-publish","format-standard","hentry","category-arduino","category-as3935","category-avc","category-components","category-lightning-detector","category-pololu-9dof-imu","category-processors","category-projects"],"_links":{"self":[{"href":"https:\/\/fll-freak.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/554","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fll-freak.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fll-freak.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fll-freak.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fll-freak.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=554"}],"version-history":[{"count":4,"href":"https:\/\/fll-freak.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/554\/revisions"}],"predecessor-version":[{"id":1011,"href":"https:\/\/fll-freak.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/554\/revisions\/1011"}],"wp:attachment":[{"href":"https:\/\/fll-freak.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=554"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fll-freak.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=554"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fll-freak.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=554"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}