Monday, 18 April 2016

Back to my Diversity SDR project

4 Channel Diversity Hardware

Vivado Block Diagram

I finally took some time out from DATV-Express to work on my SDR.
The hardware consists of a Digilent Zedboard (Zynq 7020) an Analog Devices
interposer board (which required a slight modification) and an Analog Devices
AD9253 ADC evaluation board. The Zedboard was bought used from a
seller on eBay so I paid about half the retail price but as I didn't get the
Xilinx licence I am using the free webpack version.

The OS I plan to run is FreeRTOS I think I have the FPGA code just about
finished and am now starting on the C code for the ARM part of the Zynq.
This will primarily just be taking data DMAed from the PL (FPGA) fabric
and sending it out over Ethernet. 

The board is currently running a demo program that uses the lwIP
stack which I plan to use as a framework for my own application.
I am calling it Diversity4SDR (because it has 4 channels).

The AD9253 is a 4 channel 125 MS/s 14 bit ADC. The FPGA code which uses
mainly free Xilinx AXI4 IP blocks decimates the 125 MS/s into 4x 1MS/s
channels so they will fit over 1Gbit Ethernet.

As SDRs are pretty simple to do I am using this as a training exercise to
get up to speed with Xilinx Vivado . Eventually I plan to use Vivado
to implement a DPD system.

What has spurred me on to get back to this is the excellent work done by
Pavel Demin examining what he has done has help tremendously with the
FPGA code.

Now you know why I seldom ever get on the radio.

Thursday, 11 February 2016

Express DVB-S Transmitter

A couple of days ago I released a preliminary version of the software on the
BATC Forum. Results so far have been encouraging. A couple of bug fixes
down the road and it seems we have something usable.

Top picture is the control panel of the software itself. The picture below is a
smugshot of me transmitting an MPEG2 SD picture using vMix and vMix
social media. The signal is being received using DVB Dream software.

I would like also to say that the program does not need vMix to work, it
can take video from a range of capture devices including webcams but
the SD version of vMix is free and makes for a very professional looking

It still needs some rough edges sorted out and I still have to make a lot
of fundamental design decisions, like should I add support for the Intel video
compression toolkit which provides hardware acceleration on Haswell
chipsets for the codecs.

For ease of use this will probably become the preferred solution for
my DATV station and I am even thinking of building a bespoke PC
dedicated to it.

Monday, 1 February 2016

Complete DVB-S Transmitter Windows Application

DVB-S Transmitter Application
Now that I have reached a stage were things are starting to work I thought
I would give you all a preview of the program I am currently working on.

It looks simple but a lot of work has gone into this. What is it you ask?

Well it is a Windows based program that can capture video/audio from a source,
compress it using the FFMPEG codec libraries, turn it into a valid MPEG2
Transport Stream and then send it to the DATV-Express board where it is
turned into DVB-S by the FPGA and then transmitted.

Currently it supports H.262 (MPEG 2), H.264 (MPEG4-AVC / MPEG4 part 10 )
and H.265 HEVC. At the moment it only supports MPEG1 Layer II sound although
I will be adding AAC.

I have tested it with 2 different Webcams, an Ezcap capture dongle and of course vMix.
It supports the usual range of symbol rates 200K to 8M and the usual frequency range
65 MHz to 2.48 GHz.

The capturing is done using Windows DirectShow so in theory just about any device
that has DirectShow support will work with it. In practice there is bound to be some
device format I don't have support for.

I am currently doing the boring stuff, adding GUI support via the menus to configure
the large range of parameters.

On my reading list at the moment is the DTG D-Book 7 which describes the standards
that digital TV works to in the UK. Part A covers terrestrial transmission, the majority
of the spec is taken up with standards for connected TV, something that is not really
relevant to Amateur TV.

Everyone on the DATV-Express team is on holiday (except me) at the moment so not
much is happening. Hopefully I will have an  initial version of the software available
in about 2 weeks time. 

Monday, 11 January 2016

Initial H.264 and HEVC transmitter testing


A couple of pictures this time. These are the results of both H.264 and HEVC
testing using Express_gui and a DATV-Express board.

The error information shown in the pictures is erroneous as I didn't reset the values
between tests.

The H.264 testing went well, the transmitter continued to operate in HD for over 4 hours.
Eventually the receiver software crashed. The receiver I used was DVB Dream and a
USB DVB-S2 dongle from China. The model allows most current DVB-S2 modes
including 32 APSK.

HEVC testing was not so successful as I have not got the correct settings yet.
The CPU load was 2x that of H.264 and it was too high for me to transmit HD.
HEVC appears to look over many frames when doing its compression which means
there is a significant lag and the picture takes many seconds ~10 before it recovers from
a loss of signal. Both these things may severely limit it's usefulness on Amateur TV.
However it is possible that with better setting these limitations may improve.  

Saturday, 9 January 2016

That old black magic

Just a quick note on what I have been doing the last few weeks.
I am now back working on support for software codecs in express gui.

I believe that because of patent reasons the standard version of FFMPEG shipped
with most Linux distributions does not contain the required MPEG4, HEVC
and audio encoders.

This has meant I have had to build from source my own special version of FFMPEG
that includes the required codec support.

I have also downloaded and installed the Blackmagic DeckLink SDK so I can
capture video and audio from the DeckLink HDMI mini Recorder card I have.
Unfortunately it seems the audio block sizes are dependent on the video frame
interval. This means they are the wrong size for the audio codec so some
buffering is required to get the sound blocks the correct size.

So far I have been able to capture video from a Webcam, HDMI input and some old
SD video capture cards (based on SA7134 and SA7113 chips).  When it works the
Transport Stream looks very good (compared to the one from the Hauppauge) as the
PCR/DTS/PTS clocks are exactly how they should be.

The are so many options and combinations of parameters available now that it is
likely going to be very difficult to configure correctly. With the huge range of video
sources and formats available it is going to be extremely difficult to support.

For the time being the software codec support will not be made available in the
.deb distribution, if people want to use it they will have to build everything from
source (both Express and FFMPEG) themselves.

I have no idea of when the source code for codec support will be finished.
Currently I am still working on it and learning an awful lot about video as I go.
This is primarily a personal project.

In my next post I hope to do a write up on the 10 GHz VNA adapter I am making.

Thursday, 19 November 2015

Using Time Domain Reflectometry to align filters

Time Domain

Frequency Domain
Here is my first attempt at using TDR to align a 437 Mhz BPF filter.
The technique is described in Agilent AN 1287-8
The dips in the Time domain represent the resonators in the filter, S11 from one
end of the filter and S22 from the other. TDR allows you to see
the results of adjusting each resonator fairly independently of the others.
The aim is to increase the dips as much as you can. The peaks are related to
the inter resonator coupling. For a full explanation you need to read the Appnote.

As you can see from the frequency domain plot my efforts were not perfect
but I suspect practice will make perfect. The tune elements were 6 mm brass
studding and these were not the easiest thing to adjust. After I had done the
measurement I got a warning saying the calibration had been aborted. I had been
at it for about 30 mins and was getting cold, there is no heating in my workshop.
I will however try again. The filter is adequate for my 70 cms DATV station.

Sunday, 8 November 2015

First steps with amplifier distortion investigation

Power Sweep
This is my first tentative steps at looking at distortion in PAs using the HP8753E.
Tentative really is the most appropriate word as one slight error and the VNA could
be compromised. The maximum input power the receivers can accept before
damage is only 20 dBm. It is important to have a lot of attenuators in place.

The above graph is that of a RA60H1317M operating at 146.5 MHz.
The output starts at around 12 watts  and ends around 70 watts.

The top trace is the phase difference across the power sweep and the bottom trace
the gain. I didn't calibrate the gain to take into account the 30 dB attenuator or the
effects of the directional coupler so it is a relative value rather than an absolute one.

The drive was also too high, next time I attempt this I will use the 70 dB stepped
attenuator in the test box and I will also properly calibrate for the attenuators
and couplers.

To measure the output I used a 20 dB directional coupler and a 30 dB Narda
attenuator which reduces the 70 watts (48 dBm) down to about - 2 dBm.
The maximum measurement input level of the VNA's receivers is 0 dBm, above
that they start to go into compression.