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

adds rx module calibration #52

Merged
merged 3 commits into from
Apr 10, 2019
Merged

Conversation

JyeSmith
Copy link
Collaborator

@JyeSmith JyeSmith commented Apr 7, 2019

Calibration feature is required for multiplexing Rx modules #49 #50

Calibration is not required if you are not multiplexing.

To perform a calibration navigate to the 3rd OLED screen (press the left touchpad twice) which displays the current min max RSSI values for each Rx module. Place a quad/VTx on top of or close to the Chorus32 with the power set to 25mW. Now press the right touchpad.

A sweep of the frequency table will be performed and record the min and max RSSI for each Rx module detected. These values are used to map the rawRSSI measurements to a standard min 800 max 2700 range.

ADC readings changed to the average of 16 measurements to further reduce noise.

After testing with multiplexing the min max readings may need to be increased and a value stored for each frequency.

@AlessandroAU
Copy link
Owner

You can't wrap the ADC reads in a loop like that, it's too slow.

ADCs are read at 1kHz and the current code takes 80us to read the ADCs and compute the filters. The looped code does ((16-1)x4) more reads of the ADC, I just tested it and it spends 850us in the ADC loop which only leaves 15% of the time for the esp32 to do other things.

It would be better to define an additional filter for extra smoothing for the calibration and add it to the switch case. There is already a super slow one defined in filter.h that was going to be used for vbat smoothing but it currently not used for anything.

@AlessandroAU AlessandroAU merged commit 6994649 into AlessandroAU:master Apr 10, 2019
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

Successfully merging this pull request may close these issues.

2 participants