Home  |  Contents 

Microcontroller and PC projects
  Forum Index : Microcontroller and PC projects         Section
Subject Topic: AS3935 lightning detector Post ReplyPost New Topic
<< Prev Page of 6 Next >>
Author
Message << Prev Topic | Next Topic >>
TassyJim
Guru
Guru


Joined: 07 August 2011
Location: Australia
Online Status: Offline
Posts: 2470
Posted: 08 July 2017 at 2:32am | IP Logged Quote TassyJim

A bad link makes life difficult!

I have noticed that restarting the code once the capacitor value has been found and set i the code seems to work better.
When simply exiting the capacitor set routine and monitoring, the module seems too quite.

With my test setup (on the bench), I can create Disturber events by putting a finger on the module. Too much touching and I get a noise too high.

My simulator seems to work OK and I can create close and distant events easily enough.

I still need to put the module outside away from the computers etc and play with the gain settings.

Jim

__________________
It all started with the ZX81....
VK7JH
http://www.c-com.com.au/MMedit.htm


Back to Top View TassyJim's Profile Search for other posts by TassyJim Visit TassyJim's Homepage
 
Phil23
Guru
Guru


Joined: 27 March 2016
Location: Australia
Online Status: Offline
Posts: 1440
Posted: 08 July 2017 at 3:18am | IP Logged Quote Phil23

Jim,

Do you think I am doing totally the wrong thing by using an ESP-8266 on the console so close to the AS3935?

I know it's up at 2.4Gig, but I'm not much of an RF guru when it comes to harmonics & other interference.

And yes, the code seems to run better if you don't visit the cap routine.

Phil.
Back to Top View Phil23's Profile Search for other posts by Phil23
 
TassyJim
Guru
Guru


Joined: 07 August 2011
Location: Australia
Online Status: Offline
Posts: 2470
Posted: 08 July 2017 at 3:38am | IP Logged Quote TassyJim

Switchmode power supplies and 240V LED lights are more likely to cause interference.

If you aren't getting "noise too high" too often or too many Disturber events, I would wait for a storm and see what happens.

I haven't play with the ESP-8266 for a while and didn't look at it's RF noise.

Jim

__________________
It all started with the ZX81....
VK7JH
http://www.c-com.com.au/MMedit.htm
Back to Top View TassyJim's Profile Search for other posts by TassyJim Visit TassyJim's Homepage
 
lew247
Guru
Guru
Avatar

Joined: 23 December 2015
Location: United Kingdom
Online Status: Offline
Posts: 900
Posted: 08 September 2017 at 8:29am | IP Logged Quote lew247

Has anyone got a lightning detector working properly?
I'm going to include on in my weather station but reading the posts here it seems very complex to get it working and not certain if anyone has even got it working right
Back to Top View lew247's Profile Search for other posts by lew247
 
RonnS
Regular Member
Regular Member


Joined: 16 July 2015
Location: Germany
Online Status: Offline
Posts: 84
Posted: 09 September 2017 at 5:55am | IP Logged Quote RonnS

hello Lew,

Quote:
if anyone has even got it working right

idont know but i know you can buy a asembled one with Housing from
ELV Germany

these Parts should working

Regards Ron
Back to Top View RonnS's Profile Search for other posts by RonnS
 
lew247
Guru
Guru
Avatar

Joined: 23 December 2015
Location: United Kingdom
Online Status: Offline
Posts: 900
Posted: 09 September 2017 at 7:57am | IP Logged Quote lew247

Thanks Ron, but that won't integrate into the weather station I have
Back to Top View lew247's Profile Search for other posts by lew247
 
lew247
Guru
Guru
Avatar

Joined: 23 December 2015
Location: United Kingdom
Online Status: Offline
Posts: 900
Posted: 20 November 2017 at 10:54pm | IP Logged Quote lew247

I'm having problems with my Lightning detector
I suspect it's due to me using Pin 2 on the 28 pin MM as the IRQ pin on the detector
Can anyone verify this by looking at the output when I try and run it?

Is there any way round this to make pin 2 work or will I need to make a new board with one of the Count pins as the IRQ pin?


> RUN
Playing With Fusion: AS3935 Lightning Sensor, SEN-39001-R01
beginning boot procedure....
wrt: 00 Act: 00
wrt: 20 Act: 00
wrt: 00 Act: 00
wrt: 24 Act: 00
set up for indoor operation
wrt: 00 Act: 00
disturber detection enabled
wrt: 00 Act: 00
wrt: 00 Act: 00
capacitance set to 8x0 = 0pF
AS3935 manual cal complete

04:03:27  01-01-2000
Reg &H00: 00
Reg &H01: 00
Reg &H02: 00
Reg &H03: 00
Reg &H04: 00
Reg &H05: 00
Reg &H06: 00
Reg &H07: 00
Reg &H08: 00
AFE Gain Boost:       00000
Power-down:           0
Noise Floor Level:    000
Watchdog threshold:   0000
Clear statistics:     0
Minimum num lightning:00

Spike rejection:      0000
Freq div -ant tuning: 00
Mask Disturber:       0
Interrupt:            0000
Energy LSB:           00000000
Energy MSB:           00000000
Energy MMSB:          00000
Distance estimation:  000000
Display LCO on IRQ:   0
Display SRCO on IRQ:  0
Display TRCO on IRQ:  0
Internal Tuning Caps: 0000
Energy:   0


This is the error I get

[137] SetPin IRQ_PIN, fin
Error: Invalid configuration

Does the IRQ pin have to be FIN?

EDIT:

I Changed the IRQ input to DIN and not now runs with "no errors"
OTHER than the capacitance being 0pF

When I try and change the value to 4pF it does nothing but ignore the input???

Quote:
> run
Playing With Fusion: AS3935 Lightning Sensor, SEN-39001-R01
beginning boot procedure....
wrt: 00 Act: 00
wrt: 20 Act: 00
wrt: 00 Act: 00
wrt: 24 Act: 00
set up for indoor operation
wrt: 00 Act: 00
disturber detection enabled
wrt: 00 Act: 00
wrt: 00 Act: 00
capacitance set to 8x0 = 0pF
AS3935 manual cal complete

04:16:37 01-01-2000
Reg &H00: 00
Reg &H01: 00
Reg &H02: 00
Reg &H03: 00
Reg &H04: 00
Reg &H05: 00
Reg &H06: 00
Reg &H07: 00
Reg &H08: 00
AFE Gain Boost: 00000
Power-down: 0
Noise Floor Level: 000
Watchdog threshold: 0000
Clear statistics: 0
Minimum num lightning:00
Spike rejection: 0000
Freq div -ant tuning: 00
Mask Disturber: 0
Interrupt: 0000
Energy LSB: 00000000
Energy MSB: 00000000
Energy MMSB: 00000
Distance estimation: 000000
Display LCO on IRQ: 0
Display SRCO on IRQ: 0
Display TRCO on IRQ: 0
Internal Tuning Caps: 0000
Energy: 0
wrt: 80 Act: 00
Frequency: 16
New tuning capacitor (1 - 120pF)? 4
wrt: 00 Act: 00
capacitance set to 8x0 = 0pF
Capacitor set to 0pF

Frequency: 16
New tuning capacitor (1 - 120pF)? 4
wrt: 00 Act: 00
capacitance set to 8x0 = 0pF
Capacitor set to 0pF

Frequency: 16
New tuning capacitor (1 - 120pF)? 4
wrt: 00 Act: 00
capacitance set to 8x0 = 0pF
Capacitor set to 0pF

Frequency: 16
New tuning capacitor (1 - 120pF)?



Edited by lew247 on 20 November 2017 at 11:02pm
Back to Top View lew247's Profile Search for other posts by lew247
 
macca
Newbie
Newbie


Joined: 21 February 2017
Location: Australia
Online Status: Offline
Posts: 17
Posted: 05 December 2017 at 11:32am | IP Logged Quote macca

Hi to all
Under the same program how can I change the settings say from 0 to 2 or ratio 16 to 64. Having a play around with AS3935 from MikroElektronika on MM+




Function AS3935_SetLCO_FDIV(fdiv)
' This function sets LCO_FDIV register. This is useful in the tuning of the antenna
' LCO_FDIV register: add 0x03, bits 7:6
' default value: 00
' set 0, 1, 2 or 3 for ratios of 16, 32, 64 and 128, respectively.
' See pg 23, Table 20 for more info.
AS3935_SetLCO_FDIV = AS3935_reg_write(&H03, &HC0, ((fdiv And &H03) << 5))

End Function

Regards
John
Back to Top View macca's Profile Search for other posts by macca
 
TassyJim
Guru
Guru


Joined: 07 August 2011
Location: Australia
Online Status: Offline
Posts: 2470
Posted: 05 December 2017 at 12:06pm | IP Logged Quote TassyJim

To change the divisor to 64,simply call the function
re = AS3935_SetLCO_FDIV(2)
I would put the call at the end of the AS3935_setup SUB

In the setcap SUB, for the frequency display to make sense, you would also need to change

print "Frequency: ";str$(pin(IRQ_PIN)*16)

to

print "Frequency: ";str$(pin(IRQ_PIN)*64)


As the MM is capable of reading the higher frequencies, I didn't both changing from the default.

Jim


__________________
It all started with the ZX81....
VK7JH
http://www.c-com.com.au/MMedit.htm
Back to Top View TassyJim's Profile Search for other posts by TassyJim Visit TassyJim's Homepage
 
macca
Newbie
Newbie


Joined: 21 February 2017
Location: Australia
Online Status: Offline
Posts: 17
Posted: 06 December 2017 at 1:17pm | IP Logged Quote macca

Thank you TassyJim I have changed as to what you sent me. Changed to 32 and the program seems to settle down not so many Disturbers found. I have a ACURITE Lightning detector so will monitor and do a comparison. storms this weekend
Regards
John
Back to Top View macca's Profile Search for other posts by macca
 
CaptainBoing
Guru
Guru
Avatar

Joined: 07 September 2016
Location: United Kingdom
Online Status: Offline
Posts: 511
Posted: 06 December 2017 at 8:04pm | IP Logged Quote CaptainBoing

macca wrote:
storms this weekend


Never seen anyone happy about this... perhaps Grogs should take some of what you're having
Back to Top View CaptainBoing's Profile Search for other posts by CaptainBoing
 
macca
Newbie
Newbie


Joined: 21 February 2017
Location: Australia
Online Status: Offline
Posts: 17
Posted: 12 December 2017 at 1:04pm | IP Logged Quote macca

Hi TassyJim
What simulator are you using to trigger an event as I don't have one at the moment and would like to play around with this project.
Regards
John
Back to Top View macca's Profile Search for other posts by macca
 


<< Prev Page of 6 Next >>
In the news...
 
Post ReplyPost New Topic
Printable version Printable version
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum

Powered by Web Wiz Forums version 7.8
Copyright ©2001-2004 Web Wiz Guide

This page was generated in 0.1875 seconds.
Privacy Policy     Process times : 0.06, 0, 0, 0.12