Following my ups and downs regarding lightning detection with MikroElektronika’s Thunder click, I have finally decided to buy the official AS3935-DK development kit from AMS. A 267$ + VAT hole in my blogging budget. Is it well-spent money? We shall see…
The development kit consists of a lightning emulator board and an AS3935 based lightning sensor board. A USB cable to connect the AS3935 board to the PC is provided. In the box, I’ve also found one USB stick with documentation and source files (more about this later). Two sets of batteries for the lightning emulator and the lightning sensor are also provided.
The lightning sensor
As a surprise, the moment I’ve got the development kit, the weather changed, and I’ve had some episodes of heavy rain with plenty of lightning strikes. Time to test the lightning sensor in the wild. And it works damn fine! It detects about one lightning strike/second, just as described in the AS3935 datasheet. Distance to storm front is also detected correctly (it shows the storm as approaching or departing). Not much to say about lightning energy. I have no idea what to do with the energy value this for now.
The accompanying software allows us to view the register map. Thus we can examine the content of each register, and we can make some changes in the operating mode.
The lightning emulator
For me this is the main reason for ordering the development kit – the lightning emulator can simulate noise, disturbers (man-made perturbations) and lightning strikes, at far, medium and close distance. One should keep a distance of about 10cm between the sensor and the lightning emulator, and keep both boards away from other electronic devices – my cell phone is a good source of “disturbers”, for example. The operation is pretty straight-forward, you turn on the device, then start playing with the buttons.
Not much to say here, it does what is supposed to do, and it does it fine.
The USB stick
Here is the big surprise of the development kit, and not a good one: besides the usual datasheet and application notes, and the PC connectivity program, on the USB stick we will find an executable file which will extract the source files on a specified folder. The trick is that to extract the source files one must accept the software licensing terms. Here’s a short excerpt:
[…] Recipient may not copy, modify, rent, sell, distribute or transfer any part of the software except as provided in this Agreement, and you agree to prevent unauthorized copying the Software. You are not authorized to distribute the Software thereof in source code or in object code or in executable format to open source Communities such as Linux, Android etc. […]
This is an extremely restrictive license to use the source codes. I can use the source codes only to create my products and not much else. So please, don’t ask me for the source code, I won’t be able to share those files with you. End of story.
Lightning emulator and Thunder click
As I have said before, getting my hands on the lightning emulator is the main reason I’ve spent so much money on this development kit.
You all know my previous posts regarding lightning detection using Thunder click. Now I was able to compare the lightning sensor in the development kit against my own Arduino-based lightning detector. And to my surprise, the Arduino + Thunder click combo worked quite well.
In fact, it showed a detection rate very close to that of the sensor board in the AS3935-DK development kit, There is only one issue in the code: it detected correctly an approaching storm, but once a “storm overhead” is detected it stays like this. It doesn’t sense the departing storm. This is something minor, and I feel that it will be easy to fix in a day or two.
Also, as future development, it would be nice to perform some changes in the code to show lightning energy, just as the development kit does.
Another thing that I wish to improve is the calibration process. The AS3935 lightning sensor shows not only the LCO frequency (which is very close to the ideal 500kHz) but also the SRCO and TRCO frequencies. With the TRCO things are simple, a frequency of 32.26kHz is easy to measure. The SRCO has a 1.2Mhz frequency; it will be challenging to measure it. Most frequency meters implemented with Arduino Uno can measure up to 1MHz. As an alternative, I’m thinking to perform only a check of register 0x3A for TRCO_CALIB_DONE and TRCO_CALIB_NOK values, respectively register 0x3B for SRCO_CALIB_DONE and SRCO_CALIB_NOK values.
And I can do this by changing the existing AS3935 Arduino library, without using the source codes provided by AMS. Thus, the code can still be distributed freely.
Nice, but expensive
Considering the very restrictive Software License Agreement, the source codes provided with this development kit are not usable for the purpose of this blog. Considering the popularity of AS3935 for lightning detection, I would have liked to have the source codes available as open-source. But as it is, I can forget about using those source codes on the USB stick.
However, not everything is lost: I have the lightning emulator, which can be used to test my Arduino + Thunder click lightning detector, and I'm pretty confident that I can improve the existing AS3935 code. Of course, it will take me more time to do it without using the original source codes, but it's doable.
- Lighning emulator
- Lightning sensor
- PC application
- License to use source code
- Value for money