Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

automatic antenna tuning #27

Open
wjcarpenter opened this issue Mar 30, 2019 · 1 comment
Open

automatic antenna tuning #27

wjcarpenter opened this issue Mar 30, 2019 · 1 comment

Comments

@wjcarpenter
Copy link

You have the bones for someone to set the tuning capacitors, which is great for someone who knows what the value should be. In my case, there was no such info from the vendor.

Using the frequency output on the IRQ pin, you could simply iterate through all 16 possibilities and select the best one. Here is a version done in C++: https://github.com/SloMusti/AS3935-Arduino-Library/blob/master/AS3935/AS3935.cpp It uses a divisor of 16, but divisors of 32, 64, and 128 are also available. (I'm not sure how fast an interrupt handler in python on a RPi could count.)

This person claims that the tuning with this method does not agree with what they were told for their board, and they also claim it varies over time. https://github.com/evsc/ThunderAndLightning Beats me.

I'm hoping to have you do this work :-), but if you are not interested, I assume you would consider a PR if I coded it up.

@ecodina
Copy link

ecodina commented Dec 4, 2019

Hi! For a project I am currently developing, I had to create a new module for the AS3935 as I had to use Pigpio instead of rpi.gpio.

You can download it from https://pypi.org/project/as3935/ and has the function to calibrate it:
calculate_tuning_cap(self, frequency_divisor=16, tries_frequency=3, seconds_try=4)

It can actually perform all the actions detailed on the Datasheet with easy to use methods. It is fully documented.

I hope you find it useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants