Author Topic: AS3935 Franklin Lightning Sensor IC w/RED FW 5.0  (Read 39368 times)

0 Members and 1 Guest are viewing this topic.

Offline miraculon

  • Sunrise Side Weather
  • Forecaster
  • *****
  • Posts: 3439
  • KE8DAF
    • Sunrise Side Weather in Rogers City MI USA
AS3935 Franklin Lightning Sensor IC w/RED FW 5.0
« on: December 10, 2013, 07:21:23 AM »
I posted this on the Blitzortung forum, but I thought that I would mention it here as well:

I got my AS3935 from Embedded Adventures running tonight. It is working well.
I had to route the I2C cable away from the GPS, it seemed to be causing some errors/interference at first. The new routing out near the Ethernet connector worked fine.

I used the 3V3 and GND at the Serial header for power/ground and picked up the signals off the Discovery board. I have a Sparkfun RJ45 breakout board with headers connecting via flat cable to the AS3935 in a separate box. The cable is about 1.5m long.

Still learning the settings, no lightning around here. I unchecked "ignore disturber" and got responses to my spark generator (BBQ igniter), so I know that it is working. I could see the connection and calibration in the debug window when I tried the debug option.


I'll try to get a picture of it including the controller connections sometime soon.

Greg


Blitzortung Stations #706 and #1682
CoCoRaHS: MI-PI-1
CWOP: CW4114 and KE8DAF-13
WU: KMIROGER7
Amateur Radio Callsign: KE8DAF

Offline miraculon

  • Sunrise Side Weather
  • Forecaster
  • *****
  • Posts: 3439
  • KE8DAF
    • Sunrise Side Weather in Rogers City MI USA
Re: AS3935 Franklin Lightning Sensor IC w/RED FW 5.0
« Reply #1 on: December 24, 2013, 01:49:32 PM »
Here are some pics and info showing the connections of the AS3935 to the RED controller.
I decided to use Sparkfun break-out-boards (BOB) for the RJ-45 connectors at each end. https://www.sparkfun.com/products/716
I also used their connectors which snapped right into the boards. https://www.sparkfun.com/products/643
I decided to use the dreaded 8-wire flat cable for the RJ-45 connections, thinking that the twisted pairs of Ethernet are not suitable since there is a different signal on each wire and they are not return pairs in this case.
I used snap strip headers and directly connected the Embedded Adventures board to the RJ-45 BOB.

I mounted the AS3935 board with the piggy-back BOB into a Hammond enclosure. I cut out one end for the RJ-45 connector to pass through.
I'll attach a couple of pics. The AS3935 is in an unremarkable blue box.
The controller picture shows the I2C and IRQ connections to the STM Discovery board. I picked up 3.3V and GND at the "Serial" header under the display. I found some pre-made female-female header jumpers on Mouser http://www.mouser.com/Search/ProductDetail.aspx?R=MIKROE-511virtualkey99990000virtualkey932-MIKROE-511 and Gravitech http://www.gravitech.us/juwipaffq24.html. The Gravitech ones had two different lengths in the kit.
The RJ-45 kludge is held in place with some Velcro.

Greg
 


Blitzortung Stations #706 and #1682
CoCoRaHS: MI-PI-1
CWOP: CW4114 and KE8DAF-13
WU: KMIROGER7
Amateur Radio Callsign: KE8DAF

Offline dfroula

  • Forecaster
  • *****
  • Posts: 543
Re: AS3935 Franklin Lightning Sensor IC w/RED FW 5.0
« Reply #2 on: January 05, 2014, 08:51:35 AM »
Greg, I just ordered the detector board and breakout boards, headers, and connectors from Sparkfun. This will be a great way to replace my old Stormwise LSU2002 "passive" detector for local lightning detection. It should make a nice integrated solution. I really like your idea of using the breakout boards for the remote connection.

I do hope Tobi adds some statistical and alarm tools to the Red firmware. I have been using the ancient Stormwise DOS software for local detection, using a DOS emulator. It works OK, but is a bit crude by today's standards.

Regards,

Don

Offline miraculon

  • Sunrise Side Weather
  • Forecaster
  • *****
  • Posts: 3439
  • KE8DAF
    • Sunrise Side Weather in Rogers City MI USA
Re: AS3935 Franklin Lightning Sensor IC w/RED FW 5.0
« Reply #3 on: January 05, 2014, 11:27:31 AM »
Cool. 8-)
I am impressed how the Franklin sorts out "disturbers" from strikes. I haven't had a single false strike, but hundreds of "disturber" signals. I left the "ignore disturbers" unchecked so I can see that it is working on noises.

Greg


Blitzortung Stations #706 and #1682
CoCoRaHS: MI-PI-1
CWOP: CW4114 and KE8DAF-13
WU: KMIROGER7
Amateur Radio Callsign: KE8DAF

Offline dfroula

  • Forecaster
  • *****
  • Posts: 543
Re: AS3935 Franklin Lightning Sensor IC w/RED FW 5.0
« Reply #4 on: January 05, 2014, 11:42:51 AM »
I'll be curious to see how far away I can get the module from the controller!

Offline miraculon

  • Sunrise Side Weather
  • Forecaster
  • *****
  • Posts: 3439
  • KE8DAF
    • Sunrise Side Weather in Rogers City MI USA
Re: AS3935 Franklin Lightning Sensor IC w/RED FW 5.0
« Reply #5 on: January 05, 2014, 11:56:17 AM »
I was concerned about this. I wanted it "far enough away" that there wouldn't be interference from the somewhat noisy RED controller board. But, you have to keep in mind that I2C is really intended for chip-chip communication on the same PCB. I have seen claims for as much as several meters, but I was dubious about this. You might want to look at the I2C waveforms to make sure that they are not too rounded (shark-fins) due to cable capacitance.

Greg


Blitzortung Stations #706 and #1682
CoCoRaHS: MI-PI-1
CWOP: CW4114 and KE8DAF-13
WU: KMIROGER7
Amateur Radio Callsign: KE8DAF

Offline dfroula

  • Forecaster
  • *****
  • Posts: 543
Re: AS3935 Franklin Lightning Sensor IC w/RED FW 5.0
« Reply #6 on: January 06, 2014, 09:51:17 AM »
I found a reference that indicated that the maximum I2C capacitance is 500 pF and that CAT5 cable has a capacitance of 17 pF/foot. Assuming this is correct, it appears that 30 feet should be about the maximum using the breakout boards and CAT5. I'm not sure how the flat 8-conductor cable with RJ-45 connectors would compare.

http://www.edaboard.com/thread80459.html

Offline dfroula

  • Forecaster
  • *****
  • Posts: 543
Re: AS3935 Franklin Lightning Sensor IC w/RED FW 5.0
« Reply #7 on: January 06, 2014, 09:58:04 AM »
Are the holes on the detector board on 0.1 inch centers?

Here are some pics and info showing the connections of the AS3935 to the RED controller.
I decided to use Sparkfun break-out-boards (BOB) for the RJ-45 connectors at each end. https://www.sparkfun.com/products/716
I also used their connectors which snapped right into the boards. https://www.sparkfun.com/products/643
I decided to use the dreaded 8-wire flat cable for the RJ-45 connections, thinking that the twisted pairs of Ethernet are not suitable since there is a different signal on each wire and they are not return pairs in this case.
I used snap strip headers and directly connected the Embedded Adventures board to the RJ-45 BOB.

I mounted the AS3935 board with the piggy-back BOB into a Hammond enclosure. I cut out one end for the RJ-45 connector to pass through.
I'll attach a couple of pics. The AS3935 is in an unremarkable blue box.
The controller picture shows the I2C and IRQ connections to the STM Discovery board. I picked up 3.3V and GND at the "Serial" header under the display. I found some pre-made female-female header jumpers on Mouser http://www.mouser.com/Search/ProductDetail.aspx?R=MIKROE-511virtualkey99990000virtualkey932-MIKROE-511 and Gravitech http://www.gravitech.us/juwipaffq24.html. The Gravitech ones had two different lengths in the kit.
The RJ-45 kludge is held in place with some Velcro.

Greg
 


Offline miraculon

  • Sunrise Side Weather
  • Forecaster
  • *****
  • Posts: 3439
  • KE8DAF
    • Sunrise Side Weather in Rogers City MI USA
Re: AS3935 Franklin Lightning Sensor IC w/RED FW 5.0
« Reply #8 on: January 06, 2014, 10:22:13 AM »
Yes. This is the "Embedded Adventures" board.

http://www.embeddedadventures.com/as3935_lightning_sensor_module_mod-1016.html

Is that what you are using?

Greg




Blitzortung Stations #706 and #1682
CoCoRaHS: MI-PI-1
CWOP: CW4114 and KE8DAF-13
WU: KMIROGER7
Amateur Radio Callsign: KE8DAF

Offline dfroula

  • Forecaster
  • *****
  • Posts: 543
Re: AS3935 Franklin Lightning Sensor IC w/RED FW 5.0
« Reply #9 on: January 06, 2014, 12:58:21 PM »
Greg,

Yes, that's the one. The manual made no mention of the hole spacing. I wanted to order the breakout boards, connectors, and male/female headers, but needed to know the header pitch before ordering. I have some RJ45 connectors with wire leads, so may just use those for simplicity.

It appears only 5 connections are needed for power/gnd and the three I2C connections, with two spots on the board NC. Any reason you went with 3.3 volts rather than 5?

Have you experimented with the new alarming features on V6.0 that Tobi just posted? Looks like good timing on getting this up and running for the spring with the new bug fixes and alarming features. A remote alarm capability (like the signal beep) would be a nice addition to the user alarms.

Best,

Don

Offline miraculon

  • Sunrise Side Weather
  • Forecaster
  • *****
  • Posts: 3439
  • KE8DAF
    • Sunrise Side Weather in Rogers City MI USA
Re: AS3935 Franklin Lightning Sensor IC w/RED FW 5.0
« Reply #10 on: January 06, 2014, 01:52:59 PM »
The header spacing is 0.1", I used a 0.1" snap strip header and connected directly to the Sparkfun RJ45 BOB.
The GPIO of the board is 3V3, I didn't check that the I2C ports on the STM processor were 5V tolerant. The AS3935 is happy with 3.3V. Seemed appropriate to use 3V3 to me...
The SPI connections were left NC.
I set the alarm functions for intense lightning, so no exercising of that yet...

Greg



Blitzortung Stations #706 and #1682
CoCoRaHS: MI-PI-1
CWOP: CW4114 and KE8DAF-13
WU: KMIROGER7
Amateur Radio Callsign: KE8DAF

Offline dfroula

  • Forecaster
  • *****
  • Posts: 543
Re: AS3935 Franklin Lightning Sensor IC w/RED FW 5.0
« Reply #11 on: January 08, 2014, 11:49:55 AM »
In preparation for the arrival of my AS3935-based local lightning detector board from Embedded Adventures, I completed the wiring of the STM32F4DISCOVERY board for the required I2C connections last night.

I used parts I had on hand for the connections. I decided to use RJ45 connectors and a straight through Ethernet cable to connect the board to the STM32F4DISCOVERY. The I2C spec allows a total of 500 pF capacitance on the bus. CAT5 cable is rated at 17pF/foot, so it should be possible to use up to a 30 foot cable for the connection between the controller and the detector board.

The I2C connections are available at the STM32F4DISCOVERY "P2" connector. I soldered a dual-row female header to a section of Radio Shack prototyping board for access to the 5 required connections: +3vdc power, Ground, PB9 (SDA), PB6 (SCL) and PC15 (IRQ). I had to bend the header pins over in the prototyping board to touch and solder to the adjacent row of contacts so that I had an extra solder point for the 5 wires.



I used some hot melt glue to hold the wires neatly along the underside of the board.



I terminated the other ends of the 5 wires to an RJ45 insulation-displacement connector. I used pins 1 and 8 for power and ground. I used pins 3, 4, and 5 for the I2C signals.





The board fits securely. It does not interfere with viewing the LCD screen.



For connection to the lightning detector board, I prepared another RJ45 connector with leads marked for the 5 solder connections required to the AS3935 board. The remote board will be housed in a small plastic Radio Shack project box with an opening for the RJ45 cable.





I'm really looking forward to experimenting with the new 6.0 firmware features for this board. I'm hoping some logging and Excel export options become possible for analysis of the local lightning data.

Offline dfroula

  • Forecaster
  • *****
  • Posts: 543
Re: AS3935 Franklin Lightning Sensor IC w/RED FW 5.0
« Reply #12 on: January 14, 2014, 09:47:45 AM »
I received my AS3935 board from Embedded Adventures. Initially, I tried using 2 meter CAT5 and 8-conductor telephone-style cables to connect the board to the Red controller, per my earlier post and photos. This resulted in very unreliable I2C bus operation. Any attempt to modify settings would cause the AS3935 to be "un-detected" by the firmware. I saw this behavior on both firmware versions 6.0 and 6.1. I tried enabling the I2C and AS3935 debug messages. The debug log confirmed that there were repeated I2C bus errors when the controller attempted communication with the AS3935 board.

I gave up on the idea of remotely mounting the AS3935 in an enclosure and instead mounted it within the Red controller housing itself with a lead length of only 4 inches or so. This completely resolved the AS3935 communication issues. I expected to have to reduce the sensitivity and increase the spike rejection and signal threshold to compensate for the noise generated by the Red controller. However, this was not the case! I am able run at maximum sensitivity (minimum noise floor), "outdoor" setting checked, with the signal threshold and spike detection both set very low ("1"). With these settings, I see only very occasional disturber events. Since my controller is located on the second floor of my home near the Red amplifier, I believe detection still should be pretty good.

I posted a few questions about the operation of the AS3935 settings for Tobi on the Blitzortung forum:

- My board came with a recommended antenna capacitor calibration value for my specific board. However, the settings page has no way to enter the calibration value directly. The AS3935 log shows that a calibration routine is run at boot. Does this routine set the optimal antenna coil capacitor value?

- According to the AS3935 data sheet, the "Min. number of lightning" setting sets the number of strikes needed within a 15-minute interval before valid lightning detection events will generate an interrupt?

- The AS3935 alert settings allow setting a distance value greater than 40 km. However, the maximum distance that the AS3935 will detect is 40 km before reporting "out of range". Should this field only allow setting the valid AS3935 distances? These are "Storm is overhead", 5,6,8,10,12,14,17,20,24,27,31,34,37,40, and "Out of range" according to the AS3935 data sheet. What happens if a value greater than 40 km is defined?

- I have defined an alert that sounds a short single beep. I linked that alert to an AS3935 event with a minimum distance of 0 km and minimum lightning count of 1. Will the alert sound only on the first lightning event at any distance, or will subsequent single lightning events sound the alert beep as well? In other words, when does the AS3935 event trigger "reset"?

- The AS3935 seems to enter "interference mode" for a few seconds when a reboot occurs. If I set the spike detection and signal threshold to "0", the values get set to something higher after interference mode exits, typically "3". Is this a function of the AS3935 board or the Red firmware?

- With version 6.1 of the firmware, what is the new definition of an "event". My disturber count increases, but the event count remains at "1", set when the first disturber was detected. I thought the definition for events was (lightning events + disturber events).

Don
« Last Edit: January 14, 2014, 10:10:14 AM by dfroula »

Offline dfroula

  • Forecaster
  • *****
  • Posts: 543
Re: AS3935 Franklin Lightning Sensor IC w/RED FW 5.0
« Reply #13 on: January 14, 2014, 11:20:32 AM »
Here are some shots of the AS3935 board installed in the Red enclosure. This arrangement eliminates the I2C bus errors I was experiencing with the AS3935 remote enclosure and longer cable lengths. Oh, the new "STR" LCD screen for AS3935 events is great!






Best,

Don
« Last Edit: January 14, 2014, 11:56:50 AM by dfroula »

Offline miraculon

  • Sunrise Side Weather
  • Forecaster
  • *****
  • Posts: 3439
  • KE8DAF
    • Sunrise Side Weather in Rogers City MI USA
Re: AS3935 Franklin Lightning Sensor IC w/RED FW 5.0
« Reply #14 on: January 20, 2014, 10:23:31 AM »
Don,

Following your results, I tried a much shorter 1 ft CAT UTP cable. I am now getting good results! \:D/
I ran all night on 6.2 with the UTP cable. I am still puzzled as to why it was stable on 6.0 with the long flat cable, but I will take whatever works.
I set the I2C rate to 40KHz, but I tried all the way down to 1KHz before changing out the cable.
I also routed the jumper-to-RJ45 BOB wiring away from the cable.
I am guessing that the coupling in the flat cable was causing a problem that isn't evident with the UTP.

Greg


Blitzortung Stations #706 and #1682
CoCoRaHS: MI-PI-1
CWOP: CW4114 and KE8DAF-13
WU: KMIROGER7
Amateur Radio Callsign: KE8DAF

Offline dfroula

  • Forecaster
  • *****
  • Posts: 543
Re: AS3935 Franklin Lightning Sensor IC w/RED FW 5.0
« Reply #15 on: January 22, 2014, 12:43:14 AM »
I wonder if the calibration routine is what's causing the crosstalk problem. This outputs 31.25 KHz (500 KHz/16), then 72.25 KHz (1155.3 KHz/16), and 2.06 KHz (32.95 KHz/16) square waves on the IRQ pin as part of the calibration routine, where the frequency is calculated by the STM board. The sustained high-frequency square waves on the IRQ lead may be causing enough crosstalk to interrupt I2C communications. These frequencies are independent of the I2C clock frequency.

 Of course, the calibration needs to be performed. One possible solution might be to run the calibration routines under control of a GUI check box or if the routine has never run, store the capacitor calibration number in flash and just write it directly to the register on subsequent reboots. The RCO calibration can be run internally on the AS3935 without outputting the frequencies to the IRQ pin. This is just done for reference now and isn't actually needed to perform the RCO calibrations..

 Don

Offline dfroula

  • Forecaster
  • *****
  • Posts: 543
Re: AS3935 Franklin Lightning Sensor IC w/RED FW 5.0
« Reply #16 on: February 20, 2014, 08:55:23 AM »
We are having nearby lightning in the Chicago area this morning. The AS3935 seems to be working quite well. Alerts are all functioning as expected. I see an occasional "Too much interference" notice in the AS3935 status window. However, the "Noise Auto Raise" function kicks in, raises the noise floor threshold and all works fine.

I did find that if the noise threshold is set to the lowest setting, the status display will indicate "interference detected" on lightning strikes. The auto-adaptation sometimes doesn't kick in quickly enough on the short noise bursts, resulting in lost detections. Setting the threshold manually to one setting above the minimum corrected the problem.

The only slight glitch I see is that the AS3935 status display shows the "outdoor" threshold, even if the "outdoor" sensitivity box is not checked in the settings page. This is just a display bug (verified by Tobi). The gains are actually set correctly by the indoor/outdoor check box.

Images of the lightning activity are attached. The second to last image shows the distance estimate increasing as the lightning activity moved west of my location. Nice!

Regards,

 Don

Offline dfroula

  • Forecaster
  • *****
  • Posts: 543
Re: AS3935 Franklin Lightning Sensor IC w/RED FW 5.0
« Reply #17 on: March 12, 2014, 04:08:33 PM »
I've got a nice little near real-time display set up that displays stats of the latest strike and lightning "event", as well graphs of historical strike distance, strike energy, and strike rate.

There was a problem with IE11 caching the strike data and not updating correctly, but I finally got that fixed with a JavaScript setting to disable caching of the retrieved data.

http://projectmf.homelinux.com

http://projectmf.homelinux.com/as3935_stats.html

Don

« Last Edit: March 12, 2014, 04:14:50 PM by dfroula »

 

anything