Friday, 26 December 2014

Digital Video Processing with HD CCTV: Noise reduction

Digital Video Processing with HD CCTV: Noise reduction

In this post I examine some of the sophisticated technology used in digital high definition CCTV cameras, including a the powerful underlying SOC electronics, and the similarities with audio noise reduction in audio, as used in amateur radio.

Noise reduction in HD CCTV

I read very widely and like to see or create connections between apparently disparate ideas and technologies. From an earlier post on working with a Pentax lens I have, I read about the image processing abilities of some Pentax lenses.
 
Pentax/Richo have an award-winning image processing system, PENTAX Atmospheric Interference Reduction (PAIR). http://www.ricoh.com/fa_security/security/pair/ The results are amazing:
 
 
 
From a first reading, the processing seems to be done in the lens itself, something that had me mystified as to how such spectacular results are possible with just optics. However, on closer reading, the output of the camera is fed into the lens and the main output is from the lens. As such, the lens has on-board processing of the captured images, making such image processing more plausible, compared to doing it with optics as I first thought. The connection are shown:
 
 
The lenses are expensive, for CCTV lenses, at about $10,000. Having realised the PAIR system uses the raw images from the camera, then it is easier to see how it might work; it is very difficult to find technical information on the PAIR system, secrecy can be better than patents for protecting intellectual property, something I have experienced myself during my career with technology transfer.
 
On the other hand, Texas Instruments, who make a very sophisticated system on a chip (SOC), video processing system (VSP), has an interest in telling the world of its possibilities, in order to sell more chips; even a Wiki: http://processors.wiki.ti.com/index.php/Category:DaVinci.
 
The TI Da Vinci SOC is essentially a video camera on a chip plus powerful VSP. The block diagram of a "reference design" networked camera: http://www.ti.com/lit/wp/spry224/spry224.pdf
 
 
 
With this SOC, it is possible to produce very powerful CCTV cameras at low cost. I purchased such a camera, with a 2K UHD sensor, but no lens, for about $170 from http://www.aliexpress.com/. It was purchased to investigate DATV over networks and UHD DATV, subjects of earlier posts. However, with the DSP, there are other possibilities. Taking the lid off the camera revealed a very simple construction. The main SOC is obscured by a heatsink, while the other chips were memory or auxiliary.  
 
Low-light noise is a bug-bear of CCTV security systems. Using the TI SOC, noise reduction is possible: http://www.ti.com/lit/wp/spry224/spry224.pdf (Nov 2012, so close to state of the art)
 
 
Looks familiar to Pentax PAIR technology? TI's solution is to put the DSP in the camera and use conventional lenses, whereas Pentax's solution is to put the DSP in the lens. TI go on to discuss the algorithms.
 
Amateurs are fairly familiar with noise, with much of it being random, likewise with video. TI identify two techniques to remove noise: spatial and temporal filtering (see pdf for details). The essential approach is to compare a number of frames (typically collecting 25 or 30 frames per second), with little motion. What is in one frame, but not another is usually noise and can be removed. This is very similar to noise-cancelling with audio and radio where two different sources (two antenna, two microphones) are used and the differences discarded as noise.
 
Temporal filtering is more complex as it is used with moving images and needs to differentiate noise between frames as well as motion between frames; a two level system with different time regimes.









 
 

Saturday, 6 December 2014

BlackMagic Design ATEM TV Studio problems with 1080p; a hardware limitation?

BlackMagic Design ATEM TV Studio problems with 1080p; a hardware limitation?

In this post, I think I have discovered the problem of the ATEM TV Studio not accepting 1080p input, a hardware limitation. Alternatives are then considered.

BlackMagic Design ATEM TV Studio

As noted in earlier posts, I use BlackMagic Design ATEM TV Studio as the main component of my DATV studio to connect multiple cameras and other video sources. Overall it performs brilliantly well allowing for most features needed in a professional TV switcher, and with nothing else even remotely in the price range; $1000. http://vk4zxi.blogspot.com.au/2014/06/datv-dvb-t-blackmagic-designs-atem-tv.html
 
 

No 1080p input, despite being common format for cameras

However, it has one very annoying problem, it will only accept 1080i input, not 1080p, which to a point is reasonable as 1080i is the highest resolution for broadcast TV. The big problem is that almost all cameras output 1080p in live mode, including BlackMagic's own pocket cine camera and DSLRs like my Canon 70D (although at different frame rates!!....).
 
As such, the "cheap" solution is to use 1080p to 720p converters for each camera at under $100 each, and to run the switcher at lower resolution 720p. Converters from 1080p to 1080i are expensive, >$600, and uncommon. Annoying to have full HD cameras running at HD because of limitations of the ATEM TS Studio switcher.
 
I had wondered if the problem was firmware or hardware based. Not wishing to disassemble the device, there seems to be an important clue in examining its related product, the BlackMagic Intensity Pro PCIe HDMI capture card. Being a card that fits inside a computer, all its chips are visible.
 

Hardware limited to 1080i?

The Intensity Pro uses a member of the TDA9975 chip family, in production since about 2003. It has two HDMI inputs as well as for analogue inputs. However, the main problem is that the chip only works to 1080i. This is not surprising given the age of the chip design; 1080i was a dream when it was first adopted in the 1990s, but technology has overtaken it. It is possible that there are two of these chips in the ATEM TV Studio to give its four HDMI inputs; why reinvent the wheel, having done it for the Intensity Pro and to keep costs down?
 
As such the 1080p limitation seems to be hardware, with nothing possible to get it to accept 1080p unfortunately. It did seem very odd for a video switcher not to directly accept the company's own cameras, but this seems to be the answer. Similarly, it explains the difficulties I had trying to capture live HDMI video for my 70D DSLR with the Intensity Pro, to use with the HiDes UT-100C DVB-T dongle, before I found out that the 70D was outputting 1080p.
 
For hardware junkies, like me, the block diagram of the chip shows the HDMI inputs at the bottom left, the analogue inputs at the top right and the video and audio streams to the PC at the top right.
 
 
 

Alternatives?

Depending on intended use, the BlackMagic ATEM Production Studio 4K switchers (at $1600 plus)seems to be the answer as they will accept 1080p and higher resolutions to 4K. However, unlike the TV Studio, they do not have the H-264 encoder, not a cheap device if purchased alone. I plan to get a now have a Production Studio 4K and sell sold the ATEM TV Studio; not much more money; sunk cost... (PS4K not without problems!!; elaborate in another post)
 
An advantage of the Production Studio 4K is that I can experiment with UHD, 2K to start then 4K. DVB-T 4K modulators are not currently available, but may be in 2015.
 
 
 

1080i not supported by all DVB-T modulators?

For my purposes, the Production Studio 4K as a frontend for a DATV system is not a problem, as the DVB-T modulators include a H-264 encoder. The HiDes HV-202EN that I have been using does accept 1080p on HDMI and SDI and has an encoder, but cannot modulate at 1080i, only 1080p. That may be a firmware issue, as it is mainly intended for HD-CCTV where 1080p is the norm. However, I do have an unused, Digicast modulator that claims to be able to output both 1080i and 1080p. I have yet to try it. (this stuff is not simple!!)
 
 
 
 
 
 
 
 
 

Saturday, 1 November 2014

Achieving 4K UHD DATV- very draft


Achieving 4K UHD DATV- very draft

Perhaps a little early, but 4K DATV may be more achievable than I first thought. It would be a bit of a technological coup if amateur radio can do 4K before regular free-to-air broadcast TV. 4K video cameras and monitors are already relatively inexpensive. 4K TV capture/switchers are available and not too expensive. The missing link are modulators, transmitters and receivers, but may be possible using inexpensive SDR TRX; they can already do DVB-T/S.

As far as I am aware, broadcast TV is still struggling with Full HD digital TV in some countries, notably the USA with a very large number of small TV stations and the not insignificant cost of having to replace virtually everything, other than their antenna. I suspect the same across some of Europe and Asia. For both terrestrial and satellite, while they may have digital TV, most of it is SD (standard definition) or HD (high definition 720p), rather than wide-screen Full HD (1080i; wish it was 1080p).

While I raise the possibility of 4K DATV, the other technology for the future that I raise, networked, internet-linked DATV is probably a greater personal objective. However, others may be interested in low-cost 4K. I can see a real need for 4K in CCTV, where definition matters; it is not just technology bling.

4K DATV is a good use of the numerous UHF bands/spectrum that amateur radio has, but only makes limited use of. In many countries there is pressure to take amateur radio spectrum and use it for other purposes. Use it or loose it?
I will start with the easy bits and progress toward the more difficult aspects.

4K UHD TV Standards: 2160p

Fortunately there is a 4K UHDTV standard, 2160p, (3840 x2160)  http://en.wikipedia.org/wiki/Ultra-high-definition_television, http://en.wikipedia.org/wiki/2160p. It is similar but not the same as the video standard used in cinemas with digital projectors.
It is interesting that it is progressive, 2160p, not interlaced, 2160i. While those who developed digital TV standards a couple of decades ago, 1080i would have been virtually unachievable, but like so many computer standards, it has been surpassed. Further, I suspect that the step will be straight to 2160p TV, with 1080p languishing. 1080p is needed for recording, but not likely to be used live. It is difficult to buy a 1080p to 1080i converter, well, relatively expensive at $600+ per camera; my current dilemma.

4K UHD Displays/TVs

4K PC 28” displays are common and fairly cheap, about $600. I have a Samsung one, but don’t use it as a PC monitor. They use older-style TN LED screens that are good straight on, but are poor for angle viewing. Sitting 500mm from the PC monitor, the sides are blurry.  Tried it for a month, great for reading PDF magazines, but tiring otherwise. I went back to my 28” 2K IPS LED monitor. Still much better than Full HD 1080p!

I use a Panasonic plasma for the little bit of TV I watch, and have a Full HD projector, that gets even less use. Both get around the side-view problem of LCD.

Apple has announced a 5K monitor since I started writing this post. 4K IPS LCD panels are available, but still a bit expensive.

4K UHD cameras

There are a range of 4K UHD cameras on the market, starting with the Hero action cameras, about $450, a number of consumer 4K DSLR, the cheapest currently  Panasonic Lumix DMC-GH4, about $1500 body only, BlackMagic Studio Camera 4K, about $3000 body only. The costs are likely to drop quickly, as it did for the 1080p cameras.
One caveat with 4K UHD cameras is that while they can record at 4K, I am not sure what they stream live. It may be 2160p, but it wouldn’t surprise me if it is still 1080p, with the exception of the BM Studio Camera 4K, it has no record function and will stream live 4K. The GH4 streams 4K too. To be investigated further.  All the same, the cheaper cameras can record at 4K. An amateur 4K system is likely to start with recorded media then move to live.

4K Production switcher

Perhaps not essential, but likely kit even for a Full HD DATV station, the BM ATEM Production Studio 4K, about $1700, allows the use of multiple HDMI and SDI cameras and other devices (recorded media, PC) https://www.blackmagicdesign.com/products/atem/techspecs/W-APS-04.

HDMI devices negotiate connection standards that can be problematic when connecting devices in ways other than what the manufacturer intended. The switchers handle those problems well.
HDMI is not the preferred interface for 4K, the switcher can output UHD SDI, potentially making the interface with the modulator much simpler.

4K Compression standards

There is a 4K compression standard: H-265: http://en.wikipedia.org/wiki/High_Efficiency_Video_Coding. Not a simple subject, but amazing technology.

Compression is a key to usable 4K, to reduce the storage space and data rate but keep the quality; a contradiction. There has been considerable progress in compression, the move from MPEG-2 to H-264 for Full HD being a recent example.

4K Transmitter/amplifier

Compressed 4K UHD will fit in a standard 6, 7 or 8 MHz ATV channel. I think DATV in some countries are restricted to 2 MHz, but that may only be for lower UHF bands such as 70cm. The bandwidth and modulation parameters determine the necessary data rate, which clearly will be higher than for Full HD. In Australia we can use 7 Mhz on 70cm up, at the same standards as free-to-air broadcast TV.

DVB-T at 7 MHz bandwidth has the capacity to handle 4K UHD, but always needs a very linear amplifier. I am not sure what data rates are possible with DVB-S.
As such any good DVB-T transmitter/amplifier should be able to handle 4k; to a point the content is not relevant, although modulation parameters can make greater demands on the TX linearity.

4K modulator/encoder

Ok, now we are into the curly stuff. Current 4K modulators are expensive broadcast devices ($10000+).
However, Nuand BladeRF SDR TRX, a FPGA-based device, may be able to be programed for 4K UHD, linked by USB3 with a PC, networked to the BM ATEM TV Studio for digital and audio inputs. As noted in my last post, the BladeRF has been used for DATV DVB-T: http://yo3iiu.ro/blog/?p=1191, http://www.irrational.net/2014/03/02/digital-atv/. They may be interested in the challenge of 4K UHD DATV with GNU radio. Developing the modulation/encoding It is beyond me.

4K UHD CCTV with dedicated chips per HiDes/ITE DVB-T devices??

optical-astronomy: reducing interference: noise cancelling

…. To be continued ….

My journey in DATV and the future: 4K UHD or internet-linked DATV repeaters; Not that crazy? Draft


My journey in DATV and the future: 4K UHD or internet-linked DATV repeaters; Not that crazy? Draft

In this post I want to briefly outline my DATV journey and a quest for Full HD DVB-T. I have achieved this in a relatively short time and out of some of my difficulties, have wondered if first, 4K UHD DATV and, second, network-linked DATV repeaters, are possibly not that distant.

In this post I will outline my journey, as the future is path dependent, history matters!
In the following two posts I will consider ways to achieve 4K UHD and internet-linked DATV repeaters.

My DATV journey: Live Full HD DVB-T

Personally, coming late to DATV at the beginning of 2013, with a 40 year break in my amateur radio activities (see my first post), I have not had to put in the extreme effort and expense of either analogue TV or digital TV, particularly over the last decade, such as by the DATV Express team, among many others.

Before returning to amateur radio I had spent considerable time and money on home cinema, both PC-based and stand-alone, with both terrestrial and satellite TV, together with an interest in photography and video. As such, I had some knowledge of digital TV, particularly its reception.

After briefly wondering if anything had changed in amateur radio in my 40 year absence, with Japanese-made TRX on HF, I found software-defined radio (SDR) and a place to re-start my adventures. While I enjoy working with SDRs, there were some pauses as I waited for new hardware and software to be released, notably BladeRF (which I will return to), that lead me to find DATV.
After paying a couple of thousand for a good HF TRX, I was reluctant to spend much on DATV, but came across the HiDes DVB-T dongles from Taiwan. I bought the cheapest dongle for less than $200. Getting it going was a bit of a challenge, recorded video was fairly easy, as were webcams, but HDMI capture from a digital SLR camera (DSLR) was very difficult. However, I wanted high quality video, as that is what I had pursued in home cinema and I saw composite analogue video with digital TV as a bit of a contradiction. After spending quite a bit of time and money on PC-based video capture, I thought there must be a better way.

I achieved live, Full HD DVD-T quite quickly with the HiDes DC-100, a Full HD CCTV-based DVB-T camera and modulator, at a very modest cost of $250 plus lens. The DC-100 must be the most over-looked device in DATV. It is simple and cheap to get good quality Full-HD; the lenses have to be higher quality just to match the quality from the camera sensor. HD-CCTV may be an important path to 4K, to be discussed later. As good as the DC-100 is, I was working alone, so wasn’t too concerned only being able to transmit a few hundred metres, I still wanted DSLR quality video.

The HiDes HV-200E, at $660, my third DVB-T modulator in less than a year finally did everything I wanted. With HDMI and SDI (Serial Didital Interface- http://en.wikipedia.org/wiki/Serial_digital_interface), the broadcast TV standard interface, I could TX live, Full HD DVB-T at the highest quality I was prepared to pay for a camera and lens (lens are dearer than camera bodies!).

The HiDes devices use dedicated video chips from ITE Technology, also in Taiwan (see my post on the HV-200E where I describe each chip in the box). The boxes use firmware upgrades. ITE's main market is HD CCTV and consumer electronics, but through HiDes are very helpful to amateur DATV. Dedicated chips, while expensive to develop, are cheap in large volumes.  The alternative is a FPGA and a CPU/PC. HD CCTV uses either coaxial cable or network, so modulators need to cater for DVB-T on coax and network streaming; a win-win for DATV.
At around the same time I came across the BlackMagic Design ATEM TV studio 19” rack hardware, about $1100, but worth every penny. I had dabbled with PC-based TV production switching, as I fancied being able to TX live and recorded video, while working with the DVB-T USB dongle. The ATEM device is incredible; PC-controlled network-based, broadcast TV quality, multiple HDMI and SDI camera inputs, the HDMI inputs doubling as inputs for any HDMI devices, specifically a Western Digital TV live media player for recorded media and HDMI video from a PC. See my earlier posts. The device has HDMI, SDI and network outputs, all of use to DATV.

However, the BM ATEM TV Studio has a significant glitch, all sources must use the same broadcast TV video standard, fair enough, but only the most common, most problematic being 1080i but no 1080p. The big problem is that all digital cameras output 1080p and can’t be plugged into the device! It is a complete mystery why, as even BM’s own cameras can’t be connected. I used everything at 720p, requiring converters for each camera. The cameras can be connected directly to the HV-200E as it supports 1080p. Not all Full HD monitors or TVs support 1080p.
I started looking around for solutions, the simplest being the BM ATEM Production Studio 4K at $1800. I though, sell the old one for $1000 and it’s only an extra $800… It was then that I realised 4K may not be too hard.

Other approaches to DATV I have examined

I have a DATV Express, with external analogue video capture. I tried it briefly and suggested to the group to try digital input via HDMI, but they want to run it on cheap Linux computers instead. Without digital cameras, it was not what I wanted.

I have a “consumer grade” $600 HDMI-in DVB-T modulator from a very large Chinese manufacturer of broadcast DVB equipment, a Digicast DMB-9592. I haven’t needed to try it, but it is based on a FPGA, like the DATV Express, but includes a built-in input for HDMI and analogue inputs. It is stand-alone and does not require a PC, similar to the HiDes HV-200E.

Another approach to DATV, that I have the hardware, but have not pursued the DATV software, is the Nuand BladeRF. I use it with SDR software as a spectrum analyser. I use improvised test equipment as I have little dedicated gear. However, others have programmed it as a modulator for most of forms of DVB with GNU radio, DVB-T, DVB-S etc. See http://yo3iiu.ro/blog/?p=1191, http://www.irrational.net/2014/03/02/digital-atv/

The BladeRF a FPGA-based device, similar to that used by DATV Express and the Chinese Digicast modulator I have. It may be possible to program it for 4K UHD, linked by USB3 with a PC networked to the BM ATEM TV Studio for inputs.

Conclusion

So in one year, I have five or six DVB-T modulators, the three from HiDes, a DATV Express, a Chinese device, plus a BladeRF SDR TRX. I achieved my initial goal with the HiDes HV-200E, and went to a full DATV DVB-T studio with the BlackMagic ATEM TV Studio, allowing the best cameras I could afford.

In terms of the future, 4K UHD may be achievable with the BladeRF and BlackMagic 4K Production Studio, and both the HiDes HV HV-220E and the BlackMagic ATEM TV Studio are capable to network streaming out and possibly in.

Wednesday, 1 October 2014

Converting CCTV lens from video auto iris to DC auto iris

 

Converting CCTV lens from video auto iris to DC auto iris

Summary

It seems relatively easy to convert a video auto iris CCTV lens to DC auto iris and for a modern camera to control the lens correctly. I was able to convert a sophisticated expensive CCTV lens to DC auto iris, which otherwise was unusable. 
 
However, I give no guarantee that it will work with any other lens, although I think the principle is the same.
 
If camera control is not possible or desired, it is possible to at least open the lens's iris with a voltage through a series resistor applied to the drive motor with the correct polarity.

The problem

I had bought a Pentax motorised zoom and focus lens for use in my amateur TV studio with the idea of using it on a remote-controlled tripod as part of a one person operation. Motorised lens are not cheap ($600), but I bought a new, but old stock, lens cheap (<$100).
 
The main problem was that the lens used video auto iris, rather than DC auto iris, that is the standard on digital CCTV cameras. If not used, the video auto iris closes the lens, so at a minimum I needed to open the iris to use the lens. DV CCTV cameras can use lenses with an open iris or no iris or a manual iris.
 
I am a complete novice with CCTV, just learning as I go ( and over-whelmingly impressed with what is possible with digital CCTV now). However, I am a radio amateur, VK4ZXI, and a graduated engineer with some knowledge of electronics.

How auto iris works

Lens can use video auto iris (common with old analogue lenses), DC auto iris (common for most modern lenses) or no iris (cheap lenses).
 
The connection diagram for my lens shows the video auto iris and the two control coils for the auto iris, a motor drive and a "galvanic" coil. The motor drive proportionally opens and closes the lens. The galvanic coil measures the rate of change and is used as feedback for the control system for the lens.
 
 
For video auto iris, a video signal from the image sensor (I don't know what format) is feed to the lens and some control circuitry (EE AMP) generates the required signals for the motor and galvanic coils.
 
For DC auto iris, there are just the four wires for the motor and galvanic coils. The camera does the iris control instead of it being in the lens.
 
With some trepidation, I removed the lens cover and removed the EE AMP circuit board, leaving just the four wires for the two windings. Fortunately I had a cheap DC auto iris lens that I could dismantle and to salvage the auto iris connector that suited my HD CCTV camera.
 
I measured the resistance of the coils on both lens. The lower resistance I presumed was the motor coil and the higher one, the galvanic coil.
 
I then applied a variable voltage from a power supply, though a series resistor to limit current (1000 Ohm I think). It was possible to open the lenses with either coil, but polarity was important on both (I discovered, but not surprising). The iris would open with about 5 V DC at less than 10 mA. Eventually I had identified the polarity of the coils and which was the drive motor and which was the galvanic coil, per my diagram below. The left diagram is measured at the connector for the cheap lens, the right is for the Pentax lens.
 
Measuring on the connector gave me the connections to the camera, some vital information. As can be seen, I originally misinterpreted which was the drive motor and which was the galvanic coil.
 
 
 The next step was to see if the camera could control the lens. I cut off the connector from the cheap lens and connected it to the lens with jumper leads per my connections above. With some trepidation of blowing up both, I turned it on and it worked perfectly!
 
 
The Pentax lens is attached to a HD CCTV camera. The composite output is fed to a 7" focus screen (HDMI input not SDI). The cheap lens is at bottom left and not connected to anything. The EE AMP green circuit board is to the bottom right of the cheap lens and not connected. The black connector, centre bottom, is for the motorised focus/zoom and has wires to control them (5 - 12 V DC), which works. The image is of the kitchen range hood and a box of "ALL-Bran" in the cupboard next to the range hood. The camera is not easy to move with all the jumper leads connected! The minimum focus distance of the lens is about 2 m, with the range hood about 5 m distant. There is glare on the monitor from a screen door.
 
The photo was taken during the day with the lights on. At night, with the kitchen lights off, the monitor image was better than visual, indicating that the auto iris was working well.
 
As a side note, the iris settings can be changed with the camera menu, allowing creative control over depth of field etc, if used as a cheap full HD SDI cinema camera with remote recording or live.

Conclusion

The bottom line is that it is relatively easy to convert a video auto iris lens to DC auto iris and for a modern camera to control the lens correctly. (the opposite is difficult) I was able to convert a sophisticated expensive CCTV lens to DC auto iris, which otherwise was unusable. 
 
However, I give no guarantee that it will work with any other lens, although I think the principle is the same.
 
If camera control is not possible or desired, it is possible to at least open the lens's iris with a voltage through a series resistor applied to the drive motor with the correct polarity.
 
 
 
 

Monday, 8 September 2014

DIY aluminium washers for cavity resonator


DIY aluminium washers for cavity resonator

In many cavity resonators, the input and output coils are rotatable to adjust the degree of coupling and/or transmission losses. Most mount the coaxial connector for the coil on a large washer, so it can rotate, then use screws to hold it in position. Sounds so easy, but where do you get the washers??

After wasting a few hours in off-line shopping at bolt and plumbing shops, I found that I would have to make them. Working with thin metal sheet is usually not easy. However, I devised a simple technique to quickly make them. Any metal that can be cut by a hole saw or step drill could be used, aluminium, brass, copper, even thin steel, (per my post on using galvanised steel buckets)



The photo shows the process.
  1. Using the hole saw, cut the first blank. Subsequent blanks are started with the sheet over the hole in the wood made by the first and drilling from underneath (hands away from hole), then cutting the blank from above.
  2. Use three "TEK" self-treading screws to hold the blank in place, and use a step (Christmas-tree) drill to cut a hole for the coaxial connector, taking care to get the correct diameter for the first. Subsequent ones use the hole in the wood as a guide.
  3. Remove finished washer and clean off burrs. For thin sheet, hand files are sufficient and don't damage the washer, unlike angle grinders or what ever is at hand!
The finished washer and rotatable connector is shown in place on the cavity resonator, along with a fixed connector and a spare washer. The two TEK screws holding the washer are loosened a little to rotate the coil inside. The second cylinder top shows the size of hole needed for the connector to rotate.


The step drill was used to make the holes for the other cavities in the duplexer, although with 6 mm plate, the holes need to be drilled from both sides.

The general form of the duplexer with just the first cavity working. I used just one cavity for experiments; more in another post.


Sunday, 7 September 2014

Cheap GPS-disciplined 10 MHz oscillator- preliminary-updated


Cheap GPS-disciplined 10 MHz oscillator- updated 5/10/2014


This post is for a cheap GPS-disciplined 10 MHz oscillator. It is a work in progress, while the links are still active; life is a work in progress...

I had earlier set up a Trimble reference, but they are a bit stone-age , but work well! http://vk4zxi.blogspot.com.au/2014/02/gps-disciplined-clockoscillator.html. Modern Trimble gear is too expensive for my purposes.
 

Update 5/10/2014:

Introduction

I first came across the idea from https://groups.yahoo.com/neo/groups/rtlsdr/conversations/topics/1254. I am not sure it can be accessed unless you belong to the Yahoo group. Edit: Via the sdr-radio-com group, a page on using the device: https://sites.google.com/site/g4zfqradio/u-blox_neo-6-7
Basically it uses three components, a GPS module, a USB interface for the module and the manufacturer's software to set it up:
The devices per the eBay seller's (goodlucksell) site (note: the four wires between the two devices are not direct and need to checked)
 
 
 
 
The software gives comprehensive GPS data and mapping as well. Useful as GPS receiver alone, with a serial NMEA stream. Interfaces with Google Earth.
 
The interface with no device connected:
 
 

 
From the NEO-7M documentation, the device normally outputs a 1 pps pulse (at the point shown in the screen snip), but can be programmed to output a harmonic-rich 10 MHz. Presumably once programed, is standalone oscillator. 
I have ordered the bits ($33 from China)  and had a quick look at the software and data sheets. All quite neat, simple and cheap. The thing should be accurate enough for most purposes.
A lot simpler, cheaper and compact compared to an old Trimble GPSDO, per my earlier post.
 
The only trouble is antenna needs to see the sky. It may possible to use a different external antenna. The other way I was thinking to get an inside GPS signal was to use an external GPS antenna and run coax to a little dipole in the ceiling above where I wanted the signal. I haven't tried it, but it should work.
 
To be updated in a couple of weeks when the bits arrive.
 

Update (late September)

Bits still not here.
 
Spirited discussion on https://groups.yahoo.com/neo/groups/sdr-radio-com/conversations/topics/23602, mainly about merits of different frequency references.
 
A site that has already setup the board for 10 MHz reference: https://sites.google.com/site/g4zfqradio/u-blox_neo-6-7
 
There is a NEO evaluation board with the NEO-7N, with TXCO, SMA antenna connector and built-in USB port for ~$82. It has a point marked "time" in photo.
 
Serendipitously, there is an article in the latest issue (Sept-Oct) of the ARRL QEX (just arrived by post in Australia!) on the "Calibration and monitoring of frequency standards-Phase method". It makes for good reading for those interested in frequency references. It does stress the difficulty in measuring accuracy of references.
 
Table 2, p14 is relevant to this discussion:

Relative Accuracy of Various Frequency References
Reference     Modification                  Accuracy Range
Crystal                                                  1 to 100 ppm
Crystal         TCXO                            ~ 0.1 ppm
Crystal         Ovenized OXCO             0.001 - 0.1 ppm
Crystal         Double Oven                   ~ 50 ppt (parts per trillion)
Crystal         GPS supervised OXCO  ~ 5 ppt
Rubidium                                            ~ 50 ppt
Rubidium     GPS supervised              ~ 5 ppt   
Cesium                                               0.01 to 0.1 ppt
Hydrogen Maser  Passive                  1 ppt
Hydrogen Maser  Active                      0.0007 ppt
ppt= parts per trillion, one part in 10(-12) = ns
 
 
 
 
 

Friday, 15 August 2014

Homebrew cavity resonator/duplexer for 2m repeater

Homebrew cavity resonator/duplexer for 2m repeater

There has been some interest in the club establishing another 2m repeater, but lacked a duplexer. A couple of old cavity resonators were discovered in the back shed. We were able to tune these very quickly and easily using the new Chinese KC901H network analyser (more about that in another post).

Why and how they work: an antenna in a box!

Up to that point I had heard of cavity resonators but had little idea of how they worked or how they were made. Similarly, so was my knowledge of repeater. However, as I started to learn about them, I became quite intrigued with the technical finesse of being able to transmit and receive with the same antenna simultaneously, albeit on different frequencies. Further, as desirable repeater sites are restricted in number, many repeaters share the same site, again on different frequencies and bands.

The solution to the repeater problems is in using very selective band-pass and/or notch filters, which is what cavity resonators do. For a 2m repeater, the TX and RX signals are 600 kHz apart, very close at VHF, there expensive. The receiver needs band-pass for RX but a notch filter for TX. As such a duplexer consists of a series of cavity resonators to give the necessary rejection of the TX signal relative to incoming RX signals.

On initial reading, cavity resonators were complex mechanically and electrically, needing silver-plated copper cylinders and intricate adjustment mechanisms. However, I came across an article on the commercial use of aluminium beer kegs as the basis of cavity resonators for FM radio stations, to minimise spurious emissions: http://www.ingenia.org.uk/ingenia/articles.aspx?Index=240 .

On closer examination, a cavity resonator is just a 1/4 wave antenna in a closed conducting space. Sometimes a capacitive loading hat is used to mechanically shorten the antenna. Effectively, the cavity resonator uses an antenna as a RF short-circuit at its resonant frequency, with the Q of the circuit being as high as possible, typically around 8000 to 9000 to give a sharp 30 or 40 db notch. Two or more together gives the desired 80 db or there about.

From: http://www.comprodcom.com/Products/notch/filters-a-general-overview-cavity-filter-design_56__329/

The design of cavity resonators then seemed more a compromise between size, complexity, cost and performance.

Building one

I thought the only way to learn about them and possibly develop a usable low-cost device was to build one. I went down to the local hardware super store with an open mind about what I could use, although after something that didn't require a lot of detailed metal work. Galvanised gutter pipe seemed like an idea, as I could solder it. However most guttering and roofing is zincalum, a alloy of zinc and aluminium that can't be soldered, but should have good RF conductivity. The copper plumbing section was an initial target.

The solution was a bit unexpected, but that was the idea of just looking; creativity versus paralysis by analysis (or good old procrastination). While a galvanised rubbish bin looked good, it seemed a bit big. However, two galvanised steel buckets seemed to have the most promise. In the commercial resonators, they used a large diameter base for the antenna and a smaller section for the adjustable part. I thought, why not just use a large section for the whole antenna. A piece of hard-drawn 3/4" copper pipe and a brass compression fitting with a copper olive seemed a good start.

So I set to work to build it. I had to file out a small lip in the fitting so the pipe would slide through. The pipe has a piece of galvanised steel soldered on the end as a capacitive hat. The pipe slides through the compression fitting, with some thick braided copper wire to stop the copper olive being compressed to much during initial adjustment. I used a UHF connector with solid insulation for attaching the input loop, again a piece of electrical power cable, about 200 mm long; I didn't have much idea of how it was designed, other than what I had seen. In all, about an hours work; I didn't have much daylight and wanted something to test.

It lives!

 


The first draft looks pretty rough; it is. Everything was done quickly and just tack-soldered. I should have taken a photo of the inside but was in too much of a hurry; maybe latter. Not very optimistically, I connected a RigExpert antenna analyser to it with a very wide range, as I had little idea of where it may be resonant. A disappointingly small dip in SWR was present; better than nothing I though. Reducing the range gave me a deeper and deeper notch, to the point that it seemed to be working quite well at a random frequency. After dinner, and inside, I tried adjusting it to a specific frequency, 146.1 MHz. It was a bit sensitive, but possible.



After tuning the device I tried it with the KC-901H network analyser. It shows a notch of about 30 db, (uncalibrated but good enough). I was pretty impressed as the commercial ones only achieve a little more than that. So, I use three resonators rather than two, not a big deal at about $40 to make. While quite a deep notch, it is quite sharp. The red cursor is 600 kHz away and well clear of the green cursor on the notch. The Q seems quite high. I could probably calculate it, but at the moment it seems quite sufficient for its purpose of proof-of-concept.


What I learned: big is better?

On reflection, commercial cavity resonators seem to be a major compromise between size in particular. The bigger the cavity, the less importance of surface conductivity and hence silver plating; that is probably why the beer kegs worked. However, in most commercial repeater sites, space is at a premium. I suspect the capacitive hat is used to reduce size as well; that it partly why they are used with antenna, as per my posts on the TET-Emtron antenna. I will try my device without the hat. I think it will reduce sensitivity in tuning as well, which is a good thing.

Stability is a problem, the steel bucket bottom flexes. There were heavy-duty buckets, but they were $5 more than the $10 ones I used (poor man pays twice). The problem is not the cavity, rather the top were the pipe is attached. I can fix that using a thicker piece of galvanised sheet from an ant (termite) cap or a nailing brace; all the weird sources of galvanised steel sheet. The thermal stability may poor; commercial materials with opposite thermal properties are normally used to compensate. Again, a larger size may reduce the problem. Similarly the sunny Gold Coast only has a temperature range from about 5 to 35 degrees, rather than the -30 to 45 degrees in some places (like inland Canada).

Where next?

I will compare my device with the twin cavity duplexer at the club to get a benchmark. I could make another one out of a pair of heavy-duty buckets, but I am more inclined to try the steel rubbish bin. It is larger again, but easier to use and experiment with, such as attaching the input loop. I would like to try it as a band-pass filter, with input and output loops.

Wednesday, 16 July 2014

HD DVB-T HiDes HV-202E ATEM TV Studio DVB-T DATV all working

HD DVB-T HiDes HV-202E ATEM TV Studio DVB-T DATV all working

Finally, I have all the pieces connected for a high-quality, live DVB-T TV studio and TX. My interest has been in establishing a high quality, video and audio, DATV system. This post covers the full working system, albeit small-signal. The details of each of the components are covered in earlier posts.

The main components of the system are:

The front of the operator console. The ATEM TV Studio is PC-based and is mounted in a small stand, just viable behind the laptop screen. The ATEM uses up to eight live video and recorded video sources via HDMI or HD-SDI. The recorded video is via a WD TV Live network media player via HDMI (white dot behind remotes), streaming content via network from main media server. The system is connected direct to a TV via an attenuator, hence the media. The stand is made from square section aluminium, plastic joiners and plywood, making the system semi-portable. The source screen for the ATEM is a cheap 16" TV with HDMI input is attached via VESA mount. I intend to add a very small monitoring screen of the final transmitted signal, just to check for gremlins.


 
The back view shows the components more clearly. The ATEM TV Studio and the WD TV Live are network devices, connected via a switch or router/switch. Only the HD-CCTV camera is being used in this shot. The DSLRs connect via HDMI. The HV-202E is bottom right, with its lid off. The whole thing is on our camping table in the spare lounge; very tolerant of my wife.

 
 
What a rats' nest of cables and wall-warts! Everything runs on 12V so I may use one power supply and individual switching.
 
 
 The final product, a view outside the lounge window. Trivia: The 240V socket used in Australia is only used in New Zealand and apparently China, but originally patented in the USA in 1922.
 
 
The on-screen info is just to show sources.
 
So, a basic, semi-professional TV studio and modulator/TX for around $2000. ATEM TV Studio ~$1000, a bit expensive but much better than HDMI capture cards. HV-202E 4-Band professional DVB-T modulator/TX ~$660, again a lot simpler than USB devices. HD-CCTV cameras ~$130 each plus lenses, but even good ones are cheap. Audio deck and microphones, not shown, but starting around $200. DSLR cameras can be used, but they start to blow the budget, however, a Canon M series running Magic Lantern firmware for a clean HDMI video feed ~$350.
 
To go on-air, a Darko 70cm 10W amplifier (~200 Euro) and possibly a pre-amp (~$100) then cabling, antenna etc. As per any DATV DVB-T system.
 
As a footnote, the system originally was set to use H.264, but the six year old TV couldn't decode it. Setting the system back to MPEG2 fixed the problem. The newer TV in our main lounge could receive H.264.  

BladeRF transverter with SDR# on Windows

BladeRF XB-200 transverter working with SDR# on Windows

Software to support the BladeRF XB-200 transverter is beginning to emerge, however, the information is spread across a number of sources. In this post I have amalgamated the various bits of information to get the devices working on Windows 8.1.

Connecting the cables

It is not entirely obvious how the various connectors are used. The information is provided in the BladeRF GitHub:   https://github.com/Nuand/bladeRF/wiki/Getting-Started:-XB200-Transverter-Board

For RX only:


Windows SDR# software for BladeRF 

SDR# software to support the BladeRF and Transverter is available at the time of writing at: http://www.scan-ne.net/bladerf/sdrsharp.zip, per http://nuand.com/forums/viewtopic.php?f=6&t=3600. However to create the latest version of SDR# and the BladeRF plugin from Jean-Michel at https://github.com/jmichelp/sdrsharp-bladerf and install as described. Download the latest version of SDR# at http://sdrsharp.com/ It is worth following the discussion at  https://uk.groups.yahoo.com/neo/groups/SDRSharp/conversations/topics/14986 .

The software currently only supports USB2. It is ok to use the blue USB3 connector for USB2. Plug in BladeRF, with transverter, and run NUAND installer: http://nuand.com/downloads/bladerf_win_installer.exe.

Start SDR#, there should be no error messages and BladeRF should be the selected SDR. The setup allows the loading of the FPGA. The sampling rate needs to be restricted due to USB2; it stutters otherwise. 5 MSPS seems to work ok. The transverter filters can be used, although "auto" seems to use the appropriate filter for the set frequency. The transverter can be bypassed to allow the BladeRF to access its native frequency range.

The setup panel in front of SDR# and BladeRF on a portion of the local FM band.

The future

Very good to see the BladeRF working with its transverter on SDR#. It is early days for SDR software to support the full capabilities. Simon Brown, the author of SDR-Console, anticipates a beta for RX in the coming weeks; and TX a little further. It is worth following the NUAND forum, the Yahoo SDRSharp group and the BladeRF GitHub.

Edited 17 July 2014 re SDR# and BladeRF plugin per help from Scott on Nuand forum.




Tuesday, 8 July 2014

HiDes HV-202E DVB-T self-contained transmitter: Quality all digital live DATV from DSLR camera at last!

HiDes HV-202E DVB-T self-contained transmitter: Quality all digital live DATV from DSLR camera at last!


The HiDes HV-102E DVB-T self-contained transmitter has arrived at US$660 delivered. I ordered the USB version of this professional HDMI/HD-SDI 4 band (100 MHz - 2.5GHz) DVB-T TX originally, but upgraded to the stand-alone box instead. (see why latter). It works perfectly out of the box and is easily configurable for any modulation or media parameters.

I had a good experience with the HiDes DVB-T HD CCTV camera transmitter; see earlier post. As such I thought I would try their HDMI input DVB-T TX. Surprising similar, as will be explained.

The impressive specifications per HiDes:








There isn't much this box can't do! Any frequency (up to 2.5 GHz!), any band-width, any media modulation parameter. There isn't anything that comes close, at any cost.

I set it up on a channel my little 16" TV could receive (by cable with an attenuator) and connected up a Cannon 70D SDLR camera via HDMI and turned it all on. Tuned the TV and there was the picture of my very-messy study in all its digital video glory. See picture of box in action. I will discuss the hardware latter.



However it was not in Full HD, just SD. I had to fix that. The HV-202E connects to a PC via USB for configuration. Perhaps, not surprisingly it was the same procedure as the DVB-T HD CCTV camera. It seems so old-fashioned, but the interface is via a virtual com port. The modulation and media boxes are shown.




Australian amateurs can use a 7 MHz band-width with the same modulation parameters as our free-to-air TV, so that is what I wanted; and got. Similarly, with all that bandwidth, I wanted Full-HD 1080i at 30 fps. With a bit of fiddling, I had it: the TV and camera, although in poor light at night.


The white rectangle is an artefact of the 70D camera's auto-focussing. I discussed the problems of getting live clean video from a DSLR in an earlier post. Eventually Magic Lantern will release firmware to fix the problem; the 70D is not long released and a very popular DSLR for video as it has a very effective new auto-focus system.


TX box hardware

Not being backward at opening up new equipment to see how it works, see earlier posts, and noting there was a new version of firmware, the lid was off pretty quick.

The internals were initially a surprise, there was the HiDes USB version of the TX (the brown rectangular board complete with USB connector), as a daughter board to a box made for another purpose. The main box seems to be designed to input HDMI or HD-SDI sources, plus audio and output it as HD-SDI; consistent with a device for HD CCTV. The HiDes board takes what was the SDI output and converts it to DVB-T instead, just as it does with the HiDes HD-CCTV box camera via a daughter board. Very neat. Why design everything from scratch when a modification can be made to existing sophisticated hardware?

There is not much documentation on the HiDes board's chips. The key ones are made by ITE Tech, another Taiwanese company specialising in HD-CCTV and digital multimedia chips: http://www.ite.com.tw/EN/company.aspx. The main chip that can be seen is a IT9518, a member of the IT9500 series of transmitters for CCHDTV cameras via DVB-T, not surprisingly. The other chip has a cover or heat-sink obscuring its details.

The main box has a awesome array of very powerful, highly integrated, digital media chips (Google each for details):
  • ITE IT9507 transmitter for CCHDTV camera, presumably SDI,
  • ITE IT6604 HDMI receiver for HDMI input
  • GENNUM/SEMTEC GV7601 Serial Digital Video Receiver for SDI input
  • TI DM368ZCE ARM SOC Digital Media Processor
  • TI AC31061 Stereo CODEC for audio input 
  • Micron D9MTJ 2Gb DDR2 SDRAM
I was staggered by the capabilities of these devices; it used to take racks of equipment to do what this little box does. Intel CPUs have only incrementally improved over the last 5 years or so, whereas devices based around the ARM CPU imbedded SOC leap forward, as do the dedicated function chips.

The British ARM company http://www.arm.com/index.php is a story in itself that I won't go into here; eventually it fill be a case study in my other (neglected) blogs (see via profile)

Incidentally, there is a SD card socket under the daughter board for firmware updates.

Why not USB?

As noted at the start, I originally ordered the USB version of this HiDes TX, about $270, but changed my mind and spent the extra on the stand-alone box I describe here. The reason? Live capture of HDMI on a PC is a major hassle and is more expensive. HDMI is very complex, as is most things to do with digital video (and audio) in any form, including HDMI, HD-SDI and DVB. The capture cards or USB boxes are not cheap, around $250, and are not easy to use. Further, a fairly powerful PC is needed as much of the processing is done in software. To compound the problem, Windows 8.1 makes life difficult for small volume devices due to its improved and more secure device driver requirements, a necessity given the problems with cyber security. The live HDMI feed from DSLRs further complicates matters, as noted in earlier blogs.

I started with a HiDes UT-100C USB dongle, see earlier post. It works fine with a webcam, but I spent ages and money trying to get it to work with HDMI capture cards.

The stand-alone HiDes HV-202E TX works with no dramas. It is physically simpler to have a little box that does everything, than a collection of PC-based gear to do the same thing.

Where to next?

To a point, the HiDes HV-202E allows me to achieve my original goal of high quality digital video and audio, via a DSLR camera, to a DVB-T TX on 70cm. For that, I am very happy.

Next? I have spent more time writing this post than using the HV-202E; I still have much to learn.

My plan is to use the Black Magic Design ATEM TV Studio as the HDMI input, to allow the use of multiple cameras and media sources, as discussed in an earlier post. This will give me a very usable TV studio and DVB-T modulator in a very small package, maybe portable.

1 mW isn't going to get me very far. I have a 10W DVB-T amplifier from Darko in Austria. Using my improvised instrumentation, particularly the BladeRF as a spectrum analyser, I hope to get a clean, usable signal. I have the bits to make up an antenna and a mast to mount it, although still needing work to get the rotator operational.

Then there is the HiDes DVB-T repeater that has been gather dust... And a 4W 23cm amplifier, also from Darko. Then to get a RTL DVB-T dongle to work as a 23cm receiver.