Hello, new and questions about Hackrf etc.

Digital ATV - The latest generation, cutting edge ATV - Please discuss it all here.
Forum rules
This forum is run by the BATC (British Amateur Television Club), it is service made freely available to all interested parties, please do not abuse this privilege.

Thank you
Post Reply
AdrianH
Posts: 33
Joined: Thu Jul 18, 2019 2:46 pm

Hello, new and questions about Hackrf etc.

Post by AdrianH » Thu Jul 18, 2019 6:44 pm

Hello to the group. I am new to this and will have lots to read up on as I am sure there are many posts and articles that I need to understand.

I have been away from Amateur radio for years, but I finished work recently so can come back to the interest, I did do 70cms AM TV back many years ago, have a W&D 50MHz IF board sat on the shelf but none of the original gear. There is a small amount of ATV activity in my area as I have found, but articles in Radcom on the QO-100 sat has piqued my interest,

I have now got a MiniTiouner-express managed to pick up a 1m Sat dish 2nd hand and can receive pictures and sound via the downlink. So that is one side sorted, now to the expensive and more technical side.

I have played with the gnu radio software and a Hackrf one I have, I am using the example from gnu-radio to send DVB-S2 signals and can do this in a very controlled manor with SR5000K, SR2000K and SR500K. all is OK streaming a video in a simple loop.
But if I put the system into my spectrum analyzer an old HP 853A then I notice it is not a clean transmission. The flowgraph and GUI sink look very clean as does the main carrier on the HP but there are side spurs less than 20 dB down on carrier.
5Meg SR rate, trace 5MHz per div
5Meg SR rate, trace 5MHz per div
SR5M 5MHz per div.jpg (20.92 KiB) Viewed 843 times
2Meg SR rate trace 5 MHz per div
2Meg SR rate trace 5 MHz per div
SR2M 5MHz per div.jpg (22.32 KiB) Viewed 843 times
500K SR rate, trace2 MHz per div
500K SR rate, trace2 MHz per div
SR500K 2MHz per div.jpg (21.51 KiB) Viewed 843 times
I am not sure if this is because of the 8 bit A2D converter or some other restriction. I know from other articles that the Hackrf prefers to have a sample rate over 8MHz to stop aliasing, possibly only on RX as I believe it is down to the A2D. But can not try it by independently change the sample rate without changing the modulation in gnuradio.

So to my initial questions has anyone tried with Hackrf one and have they been successful or is the unit just not good enough? Does the 12 bit A2D of the Pluto or Lime solve the issue, or is the flowgraph I am using outdated?

Also is there any software package that I can try using a computer to drive the unit direct rather than using a Rasp PI and other extras for it. I have a few HP thin clients that can run Ubuntu and Debian. They only draw 10 to 16 Watts power and are small units so can be put into an enclosure.

It must be better to ask then try and figure out on my own.

Cheers

Adrian

g0mjw
Posts: 981
Joined: Sat Sep 20, 2014 9:15 am

Re: Hello, new and questions about Hackrf etc.

Post by g0mjw » Fri Jul 19, 2019 8:06 am

Hi Adrian

I think the hackRF has been used successfully. What I see in your images appears to be a failure of the filtering. It might be worth posting the flowgraph so we can look at it. Perhaps you need more taps or there is some other problem.

I am afraid with Gnuradio, despite all the attempts to make it easy to use, you do still need to understand a bit of DSP theory to hack it. I did some experiments with it back in 2014 https://flic.kr/p/o9qbBS This was DVB-T but you can see similar effects and I saw the same with DVB-S. I think I cured this but it was five years ago and I don't recall.

Mike

G4GUO
Posts: 629
Joined: Tue Feb 16, 2010 12:51 pm

Re: Hello, new and questions about Hackrf etc.

Post by G4GUO » Fri Jul 19, 2019 9:27 am

You need to interpolate the signal before you send it to your hack-rf sink as the sample alias products are inside the bandwidth of the analogue anti-alias LPF filter in the hack-rf.

- Charles

AdrianH
Posts: 33
Joined: Thu Jul 18, 2019 2:46 pm

Re: Hello, new and questions about Hackrf etc.

Post by AdrianH » Fri Jul 19, 2019 1:12 pm

Hello to Mike and Charles, I see I have a lot to learn and understand about SDR.

I have just finished reading the CQ-DATVcompendium that gives me a slightly better insight. Charles the Mini-Tiouner-express is working well.

OK a flow graph first. This is virtually straight out of GRC examples, but I set the SR rate to be 1M and set the FEC to be 1/2, I was hoping to figure a variable to set all the rate blocks at the same time but could not figure it. Roll off is 0.2 default the FFT filter is as default and the sample rate is symbol_rate x 2.
1msr.png
1msr.png (109.86 KiB) Viewed 774 times
Charles, I will happily show ignorance here, when I got the Hackrf I went through the tutorials for the hackrf one in which there are 11 but they seemed to stop and never continue, even bought a book called Practical signal processing by Mark Owen, but to be honest found some of the maths and explanations to be above my capabilities without guidance.

I believe you are saying I have to add signals to the signal, so that would be after the FFT filter and before the source. I am guessing here?

I think I need to go back through the examples and learn a bit more, thanks for your assistance.

Cheers
Adrian

Does anyone on the forum give lessons?

G4GUO
Posts: 629
Joined: Tue Feb 16, 2010 12:51 pm

Re: Hello, new and questions about Hackrf etc.

Post by G4GUO » Fri Jul 19, 2019 1:43 pm

I am afraid I don't use GNURadio that much so I can't give you gnuradio related specifics.

I notice you have the bandwidth in the sink set to 6 MHz, try reducing that to 1.5 MHz (for example). I don't own a hack-rf but that might narrow the analogue tx filters in the hack-rf.

If you are going add an interpolator you need to do it between the FFT RRC filter and the sink.
If you interpolate x2 you will have to increase the sink sample rate by x2 as well to maintain the same symbol rate.

The DATV-Express hardware has fixed 5 MHz LPF filters after the DACs and I have to do a lot of interpolation of the signal I am transmitting to move the alias frequencies into the band reject part of the filter. Lime and Pluto have programmable filters. I am not sure what the case is as far as the hack-rf is concerned. In the Express HW when I don't have enough interpolation I get exactly the same looking spectrum that you are seeing.

- Charles

AdrianH
Posts: 33
Joined: Thu Jul 18, 2019 2:46 pm

Re: Hello, new and questions about Hackrf etc.

Post by AdrianH » Fri Jul 19, 2019 5:04 pm

OK thank you Charles again for your input. I have 'played' and changed the flowgraph to this:-
resample1.png
resample1.png (116.73 KiB) Viewed 732 times
It looks like it does prefer the sample rate to be over 8 MHz, preferably 10 MHz or above to remove the spurious aliases.So I added a resampler with a variable called 'resample'

Now this bit worked but not sure if there is a better way. I wanted to keep the Sample rate going to the Hackrf at 10Mhz or better so the formular for the resample variable is 'int(round(5e6/symbol_rate))'. So for various Sample Rates the resample value changes changes

125K is 40 so sample rate to sink becomes 10 MHz
250K is 20 so sample rate to sink becomes 10 MHz
500K is 10 so sample rate to sink becomes 10 MHz
1Meg is 5 so sample rate to sink becomes 10 MHz
2 Meg is 6 so sample rate to sink becomes 12 MHz
66K is 76 so sample rate to sink becomes 10.032 MHz
333K is 15 so sample rate to sink becomes 9.99 MHz
All seem to work giving a picture and good D numbers in RX
Lastly a couple of traces from the Spectrum Analyzer. This is a SR250K rate with 200 KHz per division:
SR250K 200K per div.jpg
SR250K 200K per div.jpg (21.26 KiB) Viewed 732 times
and lastly the same with a 10 MHz per division showing the 60DB to the base.
SR250K 10MHz per div.jpg
SR250K 10MHz per div.jpg (22.81 KiB) Viewed 732 times
Now I have to understand video rates better for each SR. Back to reading the compendium again.

All this is to understand and get it to work before I go out and buy more equipment that to be honest I may not be able to work from my location.

Cheers
Adrian

G4GUO
Posts: 629
Joined: Tue Feb 16, 2010 12:51 pm

Re: Hello, new and questions about Hackrf etc.

Post by G4GUO » Fri Jul 19, 2019 5:15 pm

Well done, you are getting somewhere. The amount of interpolation you neeed will be dependent on the analogue anti-alias filters in the hack-rf. As I don't know anything about that piece of hardware I can't advise you. I know there are some BATC members that own hack-rfs (people keep asking for it to be added to the Express software) so I am sure someone else will be able to help you.

- Charles

g0mjw
Posts: 981
Joined: Sat Sep 20, 2014 9:15 am

Re: Hello, new and questions about Hackrf etc.

Post by g0mjw » Fri Jul 19, 2019 5:40 pm

That looks good. What I don't quite follow is why the HackRF does not do that interpolation by itself or contain suitable filter banks. It appears the DAC is not specified for sample rates below 8 MHz and the baseband uses a Maxim MAX2837 chip and that has minimum bandwidth of 1.75 MHz does not have good filtering at low sample rates. Essentially at 1 MHz it would have hardly any filtering until much further out.
Capture9.JPG
Capture9.JPG (104.06 KiB) Viewed 723 times
From https://github.com/mossmann/hackrf/wiki/Tips-and-Tricks

Mike

AdrianH
Posts: 33
Joined: Thu Jul 18, 2019 2:46 pm

Re: Hello, new and questions about Hackrf etc.

Post by AdrianH » Fri Jul 19, 2019 6:44 pm

I may be wrong on this as I could not really find any information myself, but I have seen articles on the 8MHz and I actually thought it could have been in respect to the receive side A2D converter the Max chip that does the conversions has a 8 bit A2D and 10 bit D2A's I have not gone over the complete circuit of the Hackrf to see if there is a LPF after the chip on the TX path, but tests with the old Speccy seem to be good at 10 MHz and any increase in sample rate did not provide any noticeable improvement apart from consuming a lot more cpu load.

But being able to provide a cleaner signal for me was very important, there are still issues with the Hackrf in that it does not shut down properly after being in TX mode. So a command line call to Hackrf_info sorts that.
So at least if I can use the Hackrf one a few MHz band-pass filter will clean up any out of band spurs.

I have been making a 23 cms yagi as per a spreadsheet from DL6WU, again as a test to see if I can receive the GB3FT repeater. Just a short one 14 element, but it is a starting point. I think I am just out of the coverage area.

Any way playing next with Video streaming from another linux box.

Again thanks both for your help, I need guidance to point me in the correct direction most of the time.

Adrian

Post Reply

Return to “DATV - Digital ATV”