- Mon Feb 11, 2013 8:07 pm
#155410
Second update based on Embedded Adventures BOB for the AS3935.
The board arrived and was of high quality. This board included mounting holes (unlike many SFE products)! The board has a place to put a 5 pin 1/10 inch center header, but it did not come with it. I soldered one in, dropped in on a breadboard and started to interface it to an Arduino. After three days, I did manage to get it to work. In the process, I found that the board demands a "repeated start" when turning around the bus for a read cycle. Not something I was aware of and took some time to figure out.
The other time waster is what I believe to be an "undocumented feature" of the AS3935. It would appear that one must read a register other than 0x00 before reading 0x00. If you do not, the chip NAKs the device address of the read phase. This is using the I2C interface. Not sure if it is a problem with the SPI interface. But it is fairly simple to overcome. Just read any old register first and then start hammering away on any random register.
I implemented auto-tune and found that it worked reliably giving me the same cal value that Embedded Adventures gave me. It now sits on my desk spitting out the random "disturber" notice for electrical noise it sees that it deems is not lightning. Like every time my furnace kicks on. Now I just need to wait for a storm.
Although the AS3935 has some distinct quirks (register 0 and interrupt issue), it does seem to be a workable device. Looking forward to spring and the first good storm.
Been blogging about this at the address in my signature