NBTV to tape using FM

Forum for discussion of narrow-bandwidth mechanical television

Moderators: Dave Moll, Andrew Davie, Steve Anderson

NBTV to tape using FM

Postby dominicbeesley » Fri Dec 12, 2014 1:25 am

Hello all,

It's my birthday today and as its too cold to play in the garage or the workshop I decided to treat myself to some NBTV play time.

I've been wondering about recording to tape for a while and the idea that recording an FM encoded signal might be a goer.

As a first go I've been messing around with some maths software (GNU octave) and I've had a go at encoding an FM signal. The parameters:
- baseband filtered to 10kHz (butterworth 3rd order)
- FM centre frequency 10kHz
- Deviation ~1kHz
- Syncs on high frequency side.

The decoding is done digitally but it should be possible to do it with a 4046. Digitally I just apply multiply by I and Q 10kHz sine waves to get an SDR type signal then I've used a simple FM decoder (like the simple one here: http://www.embedded.com/design/configur ... lgorithms-)

This is very much narrow band FM and has not been thought about much in terms of the best parameters to tweak but is a first try - out.

The picture below shows the results - not great and very bouncy but proves the idea. The signal seems to be _very_ noisy even though this is a good tape deck - I suspect some playing around with levels and the centre frequency should make for some big improvements. Watching a moving picture actually looks better than a still as your mind can quickly integrate out the noise - for example the bottom grating is more distinguishable and the greyscales at the side more clear

If there's interest I'll keep experimenting with levels, Dolby, FM parameters and better decoding algorithmm.

D
Attachments
nbfv_dec.wav-[NBTVA Standard]-Diamond - 1 lines wide, 2 lines high Klaas.jpg
nbfv_dec.wav-[NBTVA Standard]-Diamond - 1 lines wide, 2 lines high Klaas.jpg (15.37 KiB) Viewed 14022 times
User avatar
dominicbeesley
Anyone have a spare straightjacket?
 
Posts: 685
Joined: Sat Sep 13, 2008 11:32 pm
Location: Hebden Bridge

Re: NBTV to tape using FM

Postby Steve Anderson » Fri Dec 12, 2014 1:34 am

I've been playing around with demodulating SSTV in recent times, the NBTV baseband runs to 10kHz as opposed to just over 1kHz for SSTV. Otherwise there is a great deal in common for both formats.

This may be of conceptual interest...

http://www.agurk.dk/bjarke/projects/dsp ... 20sstv.htm

Steve A.
User avatar
Steve Anderson
"Fester! Don't do that to 'Thing'"
 
Posts: 5402
Joined: Fri Mar 30, 2007 10:54 pm
Location: Bangkok, Thailand

Re: NBTV to tape using FM

Postby dominicbeesley » Sat Dec 13, 2014 12:07 pm

Thanks Steve,

That's pretty much identical to what I've been doing. I had a bit more of a play this evening and discovered the rather stupid driver software for my soundcard is applying RIAA demodulation to my line in sockets. I'm now back to using the bog-standard motherboard soundcard and it's behaving much better!

This is my latest quick effort, deviation 2kHz this time but since spotting my sound card problems I need to have a play with recording levels and to find out if Dolby NR is a good or bad thing...

Anyway looking better with far fewer sync bounces!

Next up will be to add "colour under" a la VHS - it might work...
Attachments
20141213-1257-10k2-dolbyB8.jpg
20141213-1257-10k2-dolbyB8.jpg (13.55 KiB) Viewed 14001 times
User avatar
dominicbeesley
Anyone have a spare straightjacket?
 
Posts: 685
Joined: Sat Sep 13, 2008 11:32 pm
Location: Hebden Bridge

Re: NBTV to tape using FM

Postby dominicbeesley » Mon Dec 15, 2014 4:36 am

I've played a round a bit more with this. I discovered a few things:

1) Recording on the L channel and playing back from the R channel was not helping! I'm surprised it worked at all but the cross-talk between the channels was enough to get a useable picture!

2) Dolby B doesn't seem to help with noise that much though it does reduce the sensitivity to recording level

3) Recording at a lower than normal level seems to help (around -8 to -6db) - I'm not sure that this might be a function of the VU meter being confused by the signal

4) Applying riaa equalisation helps
Applying RIAA (i.e. HF cut) before recording stops the high frequencies from overloading. This is to defeat the equalisation in the tape deck which we don't want here.
It is not necessary to apply the reverse when decoding but it does very slightly improve the quality.

5) Better synchronisation was needed in NBSC Player
- I've now implemented proper Frame and Line sync PLL's instead of the ad-hoc mess that was there before. It will now lock much better to dodgy signals.

6) Signal to noise is poor
I'm not sure why the signal to noise ratio is so poor and doesn't seem to alter much with recording level. I suspect that the rather simplistic FM demodulation scheme is more prone to noise than it needs to be.

7) I've got colour working
- It's very much at the expense of the the B&W bandwidth at the moment but I should be able to improve it considerably.
In this picture B&W is on an FM carrier at ~12kHz with ~2kHz deviation - the bandwidth of the actual modulating signal is ~6kHz
The colour signal is a down-converted "SECAM" signal (FM modulated carrier with alternate lines carrying B-Y and R-Y signals) this has a band width of ~1.5kHz the FM is centred on 3kHz

8) Real life pictures are better
The graininess and colour errors tend to cancel out over several frames making actual "off air" pictures seem better than a screen capture.



There's still some real improvements to be made. Synchronisation is poor, especially frame, though it is good enough to get a fairly reliable lock. I'm going to depart from the club standard I think and go for a more robust "real" half-line frame sync pulse
Attachments
nbfv_dec.wav-[NBSECAM]-Diamond - 1 lines wide, 2 lines high Klaas.jpg
nbfv_dec.wav-[NBSECAM]-Diamond - 1 lines wide, 2 lines high Klaas.jpg (30.01 KiB) Viewed 13982 times
User avatar
dominicbeesley
Anyone have a spare straightjacket?
 
Posts: 685
Joined: Sat Sep 13, 2008 11:32 pm
Location: Hebden Bridge

Re: NBTV to tape using FM

Postby Klaas Robers » Mon Dec 15, 2014 8:22 am

Dominic, there had been done a lot of work on recording of NBTV on Compact Cassette, as well as on reel to reel tape. Read the NBTV Newsletters of 10 years ago and further back. The best system is to record an FM carrier of say 15 - 20 kHz directly on the tape, that is without RF bias magnetisation. The recorded carrier servers as an erasing signal as well. This is the way in which video recorders work as well. Jeremy made a recorder-player for this system. The problem is that the normal electronics in the recorder should be removed, so you make a special purpose recorder. In this way all video is recorded in the higher frequencies and that is needed. Circuit diagrams are published as well.

One of the problems of RF-bias recording for audio is that the high and the low frequencies in the signal are delayed with a different delay time. This is inhaerent to this way of recording. This affects the wave form considerably. Graham did experiments to avoid this problem by double recording, where in one of the recording steps the signal was recorded with the tape direction reversed and the NBTV signal reversed in time as well. In the second recording step the timing errors of the first step were compensated by the reversal.

A problem of the HF FM-recording was that the frequencies on the tape become very high and the precise adjustment of the azimut of the recording / playback head is crucial. This makes interchangeability of tapes to different recorders difficult.

But please read the old Newsletters. That is the reason that they are written. We have to learn from the past.
User avatar
Klaas Robers
"Gomez!", "Oh Morticia."
 
Posts: 1656
Joined: Wed Jan 24, 2007 8:42 pm
Location: Valkenswaard, the Netherlands

Re: NBTV to tape using FM

Postby dominicbeesley » Mon Dec 15, 2014 10:45 am

]Hello Klaas,

Yes, I have read a few of those articles you've mentioned (I found some in the newsletter archive DVD a while back). However, I'm just experimenting...that's the part of this hobby that I enjoy.

Here I'm really just experimenting with what can be done with a "standard" cassette recorder - it's too cold to go into my workshop and start pulling tape recorders to pieces. Also, for the average experimenter that is not really a viable proposition.

I didn't find any newsletter articles about recording colour onto tape but maybe I missed them.

I did some more experimenting with the filters and got the ringing and some of the more annoying artefacts away, the bad colour at the edges of the picture are down to my SECAM encoding/decoding scheme trying (and failing) to clamp the colour signals.

Dom
Attachments
4.jpg
4.jpg (29.31 KiB) Viewed 13977 times
5.jpg
5.jpg (26.84 KiB) Viewed 13977 times
User avatar
dominicbeesley
Anyone have a spare straightjacket?
 
Posts: 685
Joined: Sat Sep 13, 2008 11:32 pm
Location: Hebden Bridge

Re: NBTV to tape using FM

Postby AncientBrit » Mon Dec 15, 2014 7:25 pm

Morning Dom,

I have to say that your results are very good.

One thing I'm unclear about with FM is what is the effect of tape speed instability, ie wow and flutter, particularly the latter.
Do rapid small speed variations get demodulated as noise and degrade the S/N?

Keep on experimenting,

Cheers,

Graham
AncientBrit
Green padded cells are quite homely.
 
Posts: 858
Joined: Mon Mar 26, 2007 10:15 pm
Location: Billericay, UK

Re: NBTV to tape using FM

Postby dominicbeesley » Mon Dec 15, 2014 9:40 pm

Thanks Graham,

Yes, wow/flutter would come out as frame tilt and tends to make the syncs jiggle a bit - there is a bit of this but doesn't noticeably degrade the picture.

The main problem seems to be hiss and a poor signal to noise ratio at the moment. The pictures are still a bit grainy and the colour a bit flickery....just like real VHS!

Poor tape speed also leads to sync issues - I've not tried this with my mechanical televisor yet - too cold in the workshop and a lot of "tidying" to be done before it can be dug out!

The tape deck I've been using for my experiments is a very good Yamaha one with a very good drive, it remains to be seen what the results are like on less elaborate equipment...my next candidate is one of those all in one TV, radio, cassette jobbies then I'll need to go digging through the junk to see if I can locate an old Walkman or similar.

Cheers

D
User avatar
dominicbeesley
Anyone have a spare straightjacket?
 
Posts: 685
Joined: Sat Sep 13, 2008 11:32 pm
Location: Hebden Bridge

Re: NBTV to tape using FM

Postby AncientBrit » Mon Dec 15, 2014 10:31 pm

Dom,

Are you using any form of limiting before attempting to decode the FM signal?

Cheers,

Graham
AncientBrit
Green padded cells are quite homely.
 
Posts: 858
Joined: Mon Mar 26, 2007 10:15 pm
Location: Billericay, UK

Re: NBTV to tape using FM

Postby dominicbeesley » Mon Dec 15, 2014 11:21 pm

Hi Graham,

That's a good question. I did try limiting - in software but the results were disappointing - I did hard limiting in audacity and then filtering back down to a sinewave. This resulted in a very unpleasant noisy picture with very limited greyscale resolution.

In effect this had the effect of making the signal into a square wave and that meant that the sampling resolution became the limiting factor and introduces jitter.

The traces below illustrate what I mean. I take a sine wave that is not an exact multiple of the sampling frequency limit it to a square wave and as can be seen it "jumps" between samples causing jitter. This causes all sorts of sidebands to appear on the spectrograms...which show up as patterning and sparkles in the picture. An analogue limiter might well work better...I'll have to have a go at building one. I'm not sure how best to approach that.

limit-wav.png
(9.46 KiB) Not downloaded yet

limit-spec.png
(18.18 KiB) Not downloaded yet


I also tried some soft limiting and applying compression but it made little or no difference (or not enough to show up through the noise). The algorithm for decoding the FM signal:

y(n) = (i(n-1)*q(n) - q(n-1)*i(n)) / (q(n)*q(n) + i(n)*i(n))

does compensate for errors in amplitude quite closely though.

I've also attached a spectrogram of the combined colour under SECAM signal. The stuff below 5kHz is the colour FM and the stuff above is the B&W signal. This signal has the syncs at high frequency. It seems to work better as otherwise the colour signal tends to crash the syncs but is less noticeable on whites.

signal.png
signal.png (29.43 KiB) Viewed 13962 times


Cheers

D
User avatar
dominicbeesley
Anyone have a spare straightjacket?
 
Posts: 685
Joined: Sat Sep 13, 2008 11:32 pm
Location: Hebden Bridge

Re: NBTV to tape using FM

Postby AncientBrit » Mon Dec 15, 2014 11:42 pm

Hi Dom,

You've lost me there with all the maths!

I still think your results are very promising.
Steve A may be able to help you with a self biassing limiter although from your sim. it looks as though hard limiting will make things worse.

I suspect it may be because you are using a low modulation index, 1kHz deviation on a 10kHz carrier is pretty narrowband.

Kind regards,

Graham
AncientBrit
Green padded cells are quite homely.
 
Posts: 858
Joined: Mon Mar 26, 2007 10:15 pm
Location: Billericay, UK

Re: NBTV to tape using FM

Postby Steve Anderson » Tue Dec 16, 2014 1:19 pm

AncientBrit wrote:You've lost me there with all the maths! Graham

The maths isn't that bad when it's a human armed with a calculator...but for a simple micro to do this (especially an 8-bit device) that nasty division right in the middle is a real headache. If there's one thing simpler micros hate, it's division...

y(n) = (i(n-1)*q(n) - q(n-1)*i(n)) / (q(n)*q(n) + i(n)*i(n))

...it can be done but it's a long, slow process, and it these speeds it's awkward to say the least...but for a PC-based solution it should be a doddle.

With this method of demodulation it's required that the input is preferably a sine-wave as this is broken down into at least four values, taking sub-cycle values to generate the demodulated output. Limiting/squaring removes that information and introduces unwanted harmonics though filtering prior to demodulation should remove most of them.

In this instance it may be a worthwhile exercise to raise the PCs audio sampling rate if possible - all in the name of science...

I'm looking at this from an external box arrangement, i.e. not using a PC to do the number-crunching, or even to be used as a display device.

Steve A.
User avatar
Steve Anderson
"Fester! Don't do that to 'Thing'"
 
Posts: 5402
Joined: Fri Mar 30, 2007 10:54 pm
Location: Bangkok, Thailand

Re: NBTV to tape using FM

Postby dominicbeesley » Wed Dec 17, 2014 12:06 am

Hi Steve,

Yes the division is a pain - not too bad on a PC but something to be considered on a uController. If there are no filters that affect the magnitude of the sinewave then that term can be replaced with a constant - hence my initial interest in limiters.

I've done some experimentation with sample rates - increasing by a factor of 4 helps the "digital hard limiting" problem but it is still far too noticeable. If the FM carrier and sample rate were a lot higher than the modulation frequency then this wouldn't be a problem as the noise due to sampling jitter does filter out - but here the carrier frequency ~10kHz is quite close to our frequencies of interest.

Where increasing the sampling rate helps is in removing some other noise. Firstly without any soundcards involved there is a fair bit of noise introduced due to aliasing at the top ends of our band of interest. This appears as moving patterning and noise around sharp transitions (Especially towards the HF end of the range)....

I will, when I get the chance, look at re writing my encoder/decoder to up sample to 192kHz and see what improvements that brings.

The next step though is to try and get my head around the filters - at the moment I'm just using simple butterworth filters for everything and they are not the best as to get a decent cut off introduces unacceptable phase errors. I don't seem to be able to get Bessel filters to work in GNU Octave though...

Anyway, I've bought a DSP / filters book, to try and refresh my memory

D
User avatar
dominicbeesley
Anyone have a spare straightjacket?
 
Posts: 685
Joined: Sat Sep 13, 2008 11:32 pm
Location: Hebden Bridge


Return to Mechanical NBTV

Who is online

Users browsing this forum: No registered users and 114 guests