ironsheep / lightning-detector-MQTT2HA-Daemon

Linux script to monitor AS3935 lightning detector and report detections to MQTT
GNU General Public License v3.0
34 stars 7 forks source link

Tuning Frequency is Far Off #23

Open ocona040 opened 2 years ago

ocona040 commented 2 years ago

Checklist:

Release with the issue: v2.2.7

Last working release (if known):

Hardware, Operating System, Python version: Rasp Pi Zero W AS3935

Description of problem: Tuning lists average frequencies around 45,000 HZ, instead of 500,000. Yesterday it showed 125,000 average, but I don't believe I changed anything. No tuning cap gets it close to the ideal 500,000. Any ideas what could cause this? Here are the tuning logs:

* Please allow a long time for this function to stop. It should take a little over 3 minutes to test the 16 values
For tuning 0x0: average frequency of 42128.698511 Hz (diff: +28617.0)
For tuning 0x1: average frequency of 49636.536376 Hz (diff: +28147.7)
For tuning 0x2: average frequency of 49684.220732 Hz (diff: +28144.7)
For tuning 0x3: average frequency of 49599.874890 Hz (diff: +28150.0)
For tuning 0x4: average frequency of 49607.471047 Hz (diff: +28149.5)
For tuning 0x5: average frequency of 48872.206343 Hz (diff: +28195.5)
For tuning 0x6: average frequency of 49594.869901 Hz (diff: +28150.3)
For tuning 0x7: average frequency of 49128.727662 Hz (diff: +28179.5)
For tuning 0x8: average frequency of 48260.377657 Hz (diff: +28233.7)
For tuning 0x9: average frequency of 48562.278049 Hz (diff: +28214.9)
For tuning 0xa: average frequency of 49030.357431 Hz (diff: +28185.6)
For tuning 0xb: average frequency of 47609.750222 Hz (diff: +28274.4)
For tuning 0xc: average frequency of 47798.167907 Hz (diff: +28262.6)
For tuning 0xd: average frequency of 47485.117801 Hz (diff: +28282.2)
For tuning 0xe: average frequency of 45858.543565 Hz (diff: +28383.8)
For tuning 0xf: average frequency of 45551.386876 Hz (diff: +28403.0)
- Your best tuning capacitor value is 0x2: which is off by +28144.7

Python errors shown in the logs (if applicable):

* Please allow a long time for this function to stop. It should take a little over 3 minutes to test the 16 values
For tuning 0x0: average frequency of 42128.698511 Hz (diff: +28617.0)
For tuning 0x1: average frequency of 49636.536376 Hz (diff: +28147.7)
For tuning 0x2: average frequency of 49684.220732 Hz (diff: +28144.7)
For tuning 0x3: average frequency of 49599.874890 Hz (diff: +28150.0)
For tuning 0x4: average frequency of 49607.471047 Hz (diff: +28149.5)
For tuning 0x5: average frequency of 48872.206343 Hz (diff: +28195.5)
For tuning 0x6: average frequency of 49594.869901 Hz (diff: +28150.3)
For tuning 0x7: average frequency of 49128.727662 Hz (diff: +28179.5)
For tuning 0x8: average frequency of 48260.377657 Hz (diff: +28233.7)
For tuning 0x9: average frequency of 48562.278049 Hz (diff: +28214.9)
For tuning 0xa: average frequency of 49030.357431 Hz (diff: +28185.6)
For tuning 0xb: average frequency of 47609.750222 Hz (diff: +28274.4)
For tuning 0xc: average frequency of 47798.167907 Hz (diff: +28262.6)
For tuning 0xd: average frequency of 47485.117801 Hz (diff: +28282.2)
For tuning 0xe: average frequency of 45858.543565 Hz (diff: +28383.8)
For tuning 0xf: average frequency of 45551.386876 Hz (diff: +28403.0)
- Your best tuning capacitor value is 0x2: which is off by +28144.7

Additional information:

studirene commented 2 years ago

I have the same problem with the same configuration

jjskaife commented 7 months ago

I had a similar problem in a pi zero W, I don't think it can handle that high of a pulse freq so I changed the divider to 128 and it worked