pcfens / RaspberryPi-AS3935

A basic library for working with the AS3935 that's connected to the Raspberry Pi.
Other
52 stars 24 forks source link

Constant false detection #10

Closed jcroucher closed 10 years ago

jcroucher commented 10 years ago

I just got my sensor ( MOD-1016 v6 ) and pi setup. It seems to connect up properly but it is giving lots of false positives. It is a clear sunny day, definitely no lightning around. The box is inside at the moment. Could it just be some sort of interference or a calibration issue?

pi@towerpi ~/lightning/RaspberryPi-AS3935 $ sudo python demo.py Waiting for lightning - or at least something that looks like it Noise level too high - adjusting We sensed lightning! It was 1km away. (02:35:44 - 2014/11/02)

We sensed lightning! It was 1km away. (02:37:04 - 2014/11/02)

We sensed lightning! It was 1km away. (02:38:08 - 2014/11/02)

We sensed lightning! It was 1km away. (02:38:12 - 2014/11/02)

We sensed lightning! It was 1km away. (02:38:20 - 2014/11/02)

We sensed lightning! It was 1km away. (02:38:34 - 2014/11/02)

We sensed lightning! It was 1km away. (02:42:19 - 2014/11/02)

We sensed lightning! It was 1km away. (02:42:57 - 2014/11/02)

We sensed lightning! It was 1km away. (02:43:31 - 2014/11/02)

..and so on.

I am using a Raspberry Pi B+ with MOD-1016 v6.

I modified the sensor address to be sensor = RPi_AS3935(address=0x03, bus=1)

pi@towerpi ~/lightning/RaspberryPi-AS3935 $ sudo i2cdetect -y 1 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: 03 -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- --

I have set tun_cap to match Tune 5 listed on the packet. sensor.calibrate(tun_cap=0x05)

Is there something I have missed? or has something changed in version 6 of the board?

jcroucher commented 10 years ago

I think there may have been a power issue or interference from a fan inside the case. I have turned off the cooling fan and I am no longer getting false detections.

pi@towerpi ~/lightning/RaspberryPi-AS3935 $ sudo python demo.py Waiting for lightning - or at least something that looks like it Disturber detected - masking

pcfens commented 10 years ago

My first suspicion was some electrical noise from nearby.

I'm going to close this issue since it sounds like you've gotten it taken care of and it wasn't a software issue. Feel free to comment or re-open if you need any help.