SparkFun Forums 

Where electronics enthusiasts find answers.

Have a good idea for a new product for SFE or Olimex? Let us know!
By fll-freak
#154979
Placed an order for one yesterday. About $USA 27 including slow boat shipping from the UK. Should arrive in about 10 days. Can't wait to play with it. I have been working on a home brew system for some years. Although I could get the detection range (literally over 100 miles) from the antenna, I had problems with false alarms. I very much want a system that could shutdown my rather extensive computer system and warn the household of approaching storms.

I will report back on any experiences I have with the BOB. The first thing I noticed is that although the chip can do I2C or SPI, the developers hard wired in to I2C with a fixed non changeable address. Unfortunate, but not devastating.
By fll-freak
#155208
Although I have not received my unit, I have already found an 'interesting' limitation with the AS3935. The chip provides an interrupt pin that strobes for one of several reasons. The noise floor could be too high, it could have seen non lightning noise, or it could have seen a strike. You must read a register to determine the reason for the interrupt. This is all very normal stuff for a interrupt generating chip like this.

The 'limitation' (read completely idiotic design) is that one must wait 2 milliseconds after receiving the interrupt before you can read the status register to figure out what type of interrupt was generated. This effectively prevents reading the interrupt register from the ISR. All you can do is set a flag (or possibly trigger a timer) in the ISR and then poll it from the main application.
As incredulous a flaw this is, I confirmed it with the Austrian manufacturer assuming it was a language translation error. Sadly it is not.
By fll-freak
#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
By fll-freak
#157309
This is a warning to those using the I2c interface and device ID/address 0. The chip will not allow you to read or write register 0 (overall gain and powerdown bit) unless you ignore the I2C NAK and force the clocking of data out of the chip. This only happens on the first access of that register. It is also not an issue if you use the other device IDs you can strap the chip to respond to.
This warning is very appropriate to the current Embedded Adventures break out board that uses I2C and address 0. There are work arounds to this issue that are documented on my website.
User avatar
By CircuitBurner
#159881
I know using radio on the longer wavelengths 20mhz and lower (lower the better) and receiving with SSB (single sideband) mode, I can hear lightning stikes from over a hundred miles away in various degrees of strength and duration. I wonder if these detectors are using similar methods. Lightning over ham radio has distinct qualities and you can definitely tell what it is when it starts coming...not many other radio noise sources are exactly like it.
By fll-freak
#159885
The AMS device looks in the 500kHz band. Based on the survey you read, the frequency with the most energy content is anywhere from 100 to 1000 kHz even though a spark event is a DC to light phenomena. 500 kHz was likely picked as it is a section of the RF spectrum that gets little HAM use, hence little interference.

The AMS does not simply look for a peak over a threshold. They look for the multi stage crackling signature of a lightning stroke. Where a series of small events occur before the major stoke occurs. This allows them to filter out noise events from things like solenoids from generating false alarms.