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

HackRF One RX spectrum #109

Closed
scateu opened this Issue Feb 24, 2014 · 11 comments

Comments

Projects
None yet
3 participants
@scateu
Copy link
Contributor

scateu commented Feb 24, 2014

I use a walkie talkie to transmit 455.550MHz signal.

on version f9ffe90 ,

osmocom_fft -f 455M

good

but when using firmware on latest version 7f34c6c,

bad

I think the IQ was swapped, actually in gqrx, I can enable "Swap I/Q" to temporarily "fix" it.

@mossmann

This comment has been minimized.

Copy link
Owner

mossmann commented Feb 24, 2014

Did you update the CPLD? Firmware? libhackrf? gr-osmosdr? All should be up to date. This will be mentioned in the release notes of the upcoming release.

@scateu

This comment has been minimized.

Copy link
Contributor

scateu commented Feb 24, 2014

After I update CPLD and gr-osmosdr , it seems to be right again.

But DC spurs in 40MHz/50MHz/100MHz seem terrible, which didn't seem so bad in version f9ffe90.

40mhz
100mhz
50mhz

@scateu

This comment has been minimized.

Copy link
Contributor

scateu commented Feb 24, 2014

and terrible spur around 1221MHz
1221mhz

and ... don't know what to say... 1275MHz

1275mhz

@mossmann

This comment has been minimized.

Copy link
Owner

mossmann commented Feb 24, 2014

The extreme spurs you are seeing are due to harmonic relationships among the LO, RF, and/or IF. They can be avoided by configuring the IF differently. We could use some better code in the firmware to automatically select a better IF and LO.

I would be interested to see a comparison of the 40MHz/50MHz/100MHz spurs between versions.

@scateu

This comment has been minimized.

Copy link
Contributor

scateu commented Feb 25, 2014

on version f9ffe90 (older one)
40m
50mhz
100mhz
1277mhz
1707m

on version 7f34c6c (newer one)
40mhz
50mhz
100mhz
1277m
1706m

40MHz/50MHz/100MHz spurs seem not to have difference.
But 1277MHz and 1706MHz are so different.

@mossmann

This comment has been minimized.

Copy link
Owner

mossmann commented Feb 25, 2014

The difference at 1275 MHz and 1706 MHz is because the default IF changed. The old version had the same symptom but at different frequencies (e.g. 1300 MHz).

@scateu

This comment has been minimized.

Copy link
Contributor

scateu commented Feb 25, 2014

Is default IF changed to 2560MHz?

1300mhz
oops..

So, how can we choose the right IF automatically?
Actually I did not find out the law of the frequency of those big spur, could you give me any hint?

PS: Do you think to seperate MAX2837 apart from RFFC5072 using a shield could do any better?

@scateu

This comment has been minimized.

Copy link
Contributor

scateu commented Feb 25, 2014

Center = 1277MHz
IF = 2560MHz

When Sampling Rate = 20M:
Spur = 2560 - 1277 = 1283MHz
20m

When Sampling Rate = 10M:
1277 + 10/2 = 1282 < 1283
then it is subsampled:
Spur = 1277 - [10 - (1283 - 1277)] = 1277 - 4 = 1273 MHz
10m

When Sampling Rate = 8M:
1277 + 8/2 = 1281 < 1283
so it is subsampling:
Spur = 1277 - [ 8 - (1283 - 1277) ]= 1277 - 2 = 1275 MHz
8m

NOTE: the spur can be filtered by MAX2837 bandwidth filter.

8m-filtered
10m-filtered
20m-filtered

@mossmann

This comment has been minimized.

Copy link
Owner

mossmann commented Feb 26, 2014

It looks like you're getting the hang of it, but here is an answer to your earlier question about how to predict the bad spurs.

The IF is the intermediate frequency the MAX2837 is tuned to. The RF is the radio frequency of interest at the antenna port. The LO is the local oscillator frequency of the RFFC5072. (Technically there is another LO in the MAX2837, but it is the same frequency as IF. When I refer to LO, I am talking about the LO in the RFFC5072.)

RF = |IF+LO|
or
RF = |IF - LO|

Which one (the sum or the difference) depends on the configuration of the image reject filter stage.

Bad spurs occur when LO or an integer multiple of LO is within 10 MHz (or half of your baseband filter bandwidth) of RF. This happens due to leakage of the LO into the RF side of the RFFC5072.

Bad spurs occur when LO or an integer multiple of LO is within 10 MHz (or half of your baseband filter bandwidth) of IF. This happens due to leakage of the LO into the IF side of the RFFC5072.

To be safe, it is probably best to keep LO harmonics 20 MHz or further away from RF or IF. Right now our automatic tuning code (which is already fairly complicated) does not take LO leakage into account.

@mossmann

This comment has been minimized.

Copy link
Owner

mossmann commented May 20, 2014

Automatic spur avoidance was implemented in release 2014.04.1. Further improvements are anticipated when we implement high side injection in the future.

@palaksyi

This comment has been minimized.

Copy link

palaksyi commented Jul 27, 2016

May I know how can I get the IF or LO frequency? IF is a fixed frequency right. Based on RF frequency we tune to PLL gives right LO frequency to get the required IF frequency.
Is the function 'hackrf_rffc5071_read' provided the LO frequency ? If so what is the value for the parameter 'register_number'?
If I am wrong, please correct me.
Awaiting for your valuable comment.

Thanks & Best Regards,
Yeshaswini

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment