TV output - Page 1
Forum section: electronics / projects

author: carveone
author_rank: Contributor
timestamp: August 09, 2011, 11:14:56 pm
content: Hi all,Outputting TV signals was pretty easy until recently when things started to get a bit more complex and digital. And there lies the question - if you want something a bit more up to date: widescreen handling, HDMI, lower expense, things get hairy.Just wondering has anyone done any project with more recent components. Like the Analog devices AD717x series amongst others.As an example of a straightforward NTSC/PAL output - one method is to output digital RGB and then convert to composite through an A to D. Even 8 bits per pixel - 3:3:2 video RGB output - feed that to an R-2R DAC, and then fed to the three analog inputs of an AD725 will look just fine as far as it goes.The big problem here, at least as far as I'm concerned, is that an AD725 is rather expensive. $10 or so. Plus you need to do the D to A which is slightly annoying. And what about widescreen signalling? I think you can get better value for money with more features with newer parts.But on the other hand, the modern parts look rather complex requiring YCrCb clocked digital inputs. And converting to HDMI looks rather scary :-)Conor.

author: carveone
author_rank: Contributor
timestamp: August 09, 2011, 11:51:42 pm
content: For the experimenters out there, I note Rossum of "Rossum's posterous" had a little project on an ARM LPC which used an R-2R ladder for the luma and a single bit for the chroma to produce NTSC S-Video. The chroma bit was the output from the SPI port - so it's a 1 bit DAC. Very interesting - I'd never seen that before. The SPI on the ARM has a 16 byte fifo which helps.Bet the source is a bit complex though...

author: westfw
author_rank: Super Contributor
timestamp: August 10, 2011, 12:17:02 am
content: VGA output is pretty easy, and many of the newer displays have some sort of VGA input. Wider screens mean faster bitrates, though, making those SW bit-banged hacks more difficult.

author: carveone
author_rank: Contributor
timestamp: August 10, 2011, 12:01:34 pm
content: Actually that's a point - looked at the back of my parent's TV and it has 2 HDMI and a VGA input. Interesting point that. The advantage of bitbang hacks is that it is cheaper. An ARM LPC1100 is much cheaper than an AD725. Which is just silly when you think about it.As for widescreen, I think you can just send the appropriate info on line 23. Hey, there's a wikipedia entry on it - that makes me hate my local idiot broadcasters even more for sending the widescreen signal when it's 4x3 and not sending it when it's 16x9. Idiots.The "more pixels" problem still applies for anamorphic widescreen - which analog WS will be. If you have text at 4x3 and send the WS signal, the TV goes wide and the text looks like crap. You have to boost the horizonal pixel rate (or make a whole new non mashed font)...

author: Entropia
author_rank: Regular Contributor
timestamp: August 17, 2011, 05:52:56 pm
content: For outputting HDMI/DVI video, you might want to look at chips like AD9889B. They generate a HDMI signal from RGB input. Some detect the frame size and refresh rate automatically, others need SPI/I2C bus to tell them what to expect in input and what to output. That AD9889B can also send audio along the HDMI if you give it an I2S or S/PDIF stream.I recently sampled TFP410 from TI which is a DVI transmitter, but as we know DVI should work just fine with HDMI connector too. Haven't had a chance to design a board for that one yet.http://www.analog.com/en/audiovideo-products/analoghdmidvi-interfaces/ad9889b/products/product.htmlhttp://focus.ti.com/docs/prod/folders/print/tfp410.html

author: NiHaoMike
author_rank: Super Contributor
timestamp: August 19, 2011, 01:28:21 am
content: At least in the US, LCDs with VGA input are a lot more common than those with composite/S-video input, unless you're only interested in LCDs smaller than 15" or so.

author: Unknown
author_rank: Unknown
timestamp: August 19, 2011, 02:06:40 am
content: Quote from: carveone on August 09, 2011, 11:14:56 pmThere is quite a few options for direct connection. The major stumbling block I'm yet to overcome is affordable options for Digital RF modulation. I can get really robust PAL analogue modulators for no more than a couple of hundred dollars, yet I'm looking at thousands for a digital equivalent. I've seen some software efforts done by hacking a graphics card but nothing that you could practically use.Has anyone tinkered with Digital over RF?

author: NiHaoMike
author_rank: Super Contributor
timestamp: August 19, 2011, 04:20:51 am
content: You don't need to "hack" a graphics card to output to a modern TV as long as it has DVI, HDMI, or DisplayPort. (Unless by "hack" you mean dealing with incorrect EDIDs...) Connecting a low cost microcontroller to HDMI is asking a little much, but VGA (at least for low resolutions) is surprisingly easy. There are enough old computers with only VGA that the VGA port isn't going away anytime soon.As for sending digital data over RF, there are almost too many affordable ways to do it. Wifi quickly comes to mind, as does Bluetooth, Zigbee, and many other options in the ISM bands. 802.11n works very well even for full HD video. If you just need to send a little data to be displayed on a TV, any low speed system combined with some sort of local frame buffer would be a better option. (Of course, spending thousands on some high speed FPGA boards is a possible option, but trying to be like Tiffany Yep isn't easy. It only makes sense if you're doing it for research or have very special needs.)

author: Unknown
author_rank: Unknown
timestamp: August 19, 2011, 04:49:07 am
content: Quote from: NiHaoMike on August 19, 2011, 04:20:51 amNever said you did, I was referring to creation of DVB-T signal.QuoteI will rephrase my suggestion/question to via MATV distribution then. Sure there are lots of ways to distribute video but low cost ways to provide digital modulation via preexisting MATV cables are few to non existent. If a digital tuner can be produced for a couple of dollars some DVB-T guru may just be able to create something between broadcast spec and nothing.

author: NiHaoMike
author_rank: Super Contributor
timestamp: August 19, 2011, 01:17:16 pm
content: Perhaps hack a cable modem to work as a modulator? Or maybe a hacked 802.11 card with a frequency converter.In theory, it's a lot easier to generate a signal than to receive and interpret it. Since you only want to generate a signal, the "Tiffany Yep" way with a FPGA, DAC, and upconverter might actually be an affordable option. A TV channel is only 6MHz or so wide so the minimum DAC bandwidth would be 12Msps or so. (In practice, you'll use a faster DAC.)

author: deephaven
author_rank: Frequent Contributor
timestamp: August 19, 2011, 02:02:40 pm
content: QuoteI will rephrase my suggestion/question to via MATV distribution then. Sure there are lots of ways to distribute video but low cost ways to provide digital modulation via preexisting MATV cables are few to non existent. If a digital tuner can be produced for a couple of dollars some DVB-T guru may just be able to create something between broadcast spec and nothing.Digital tuners are made by the million. DVB-T encoders considerably fewer because they're at the sending end and also their job is a lot more difficult. If you really wanted to go that way you might be able to pick up a surplus unit at a flea market, but expect a largish rack-mounted unit.

author: Unknown
author_rank: Unknown
timestamp: August 19, 2011, 02:38:37 pm
content: Quote from: deephaven on August 19, 2011, 02:02:40 pmI guess that was what I was asking being too lazy to go look up how DVB-T signal is encoded. I understand how economies of scale affect pricing but the same comparison could be made of analogue modulators yet I can get those for a few dollars to a few hundred dollars.QuoteTo some degree my hands are tied, given I'm looking at a charity job, rewiring and lots of new equipment is out of the question.The scenario is retirement village, old people and old equipment. RF modulators provide some video and information channels to the residents. Shiny new TVs generally have Analogue and Digital tuners and are no problem.Old folks, old ideas and for many of them a modern TV is just too much to take on.Settop boxes are popular they resolve the reception issues and soon will be the only way these folks can use their TVs. The problem is almost all have no analogue tuner. The locally broadcast signal is unavailable via STB.I can get DBV-T modulators but nothing that suits a charity budget, they sure as hell aren't broadcast quality and don't look like $800 worth of electronics. Looking through a few AV forums I see the same question being asked perhaps its just a matter of waiting till some Asian manufacturer fills the niche. Doesn't look like any open source modulator designs are likely to surface any time soon.I guess what I was asking was, is it really so much more difficult to modulate a digital signal, or is it just a lack of demand that has set prices high?

author: deephaven
author_rank: Frequent Contributor
timestamp: August 19, 2011, 03:03:29 pm
content: Quote from: Uncle Vernon on August 19, 2011, 02:38:37 pmAnalogue TV RF modulators are pretty simple affairs as they just have to produce a UHF signal which is AM modulated by the video signal + a subcarrier generator/modulator for the sound. Digital modulation is more than just modulating the RF carrier, the video first has to be digitised at 27 MBytes/second, fed through an Mpeg encoder to compress the data rate and the encoded to usually thousands of seperate RF carriers. This is all done so that the data rate per RF carrier is very low (and therefore able to cope with reflections which may occur between the transmitter some miles away and tyhe receiver. So you can see there is a lot more complexity. It would be better to distibute at 'baseband' where that might be composite encoded video. You then just have a bank of receivers tuned to the various channels required and an analogue matrix and distribution system. Each user would then have a remote which would talk to 'their' bit of the matrix and choose the channel they want.

author: Unknown
author_rank: Unknown
timestamp: August 19, 2011, 03:10:57 pm
content: Thanks deephaven, that gives me a few ideas, nothing is easy with next to no budget. Cheers for your input.

author: NiHaoMike
author_rank: Super Contributor
timestamp: August 20, 2011, 04:48:47 am
content: DVB-T uses OFDM, same modulation as 802.11 and some kinds of DSL. (In contrast, ATSC uses the oddball 8-VSB, which is less tolerant of noise and quite disliked by Tiffany Yep, but that's another story...)http://en.wikipedia.org/wiki/OFDMQuoteMost newer TVs also support QAM, which is the modulation format used by DOCSIS. The cheap set top boxes probably don't, so that's out of the question.So it looks like downshifting the 2.4GHz output from a cheap Wifi card would be your best bet. Be sure to get one that is well supported by open source drivers and start hacking.

author: joelby
author_rank: Frequent Contributor
timestamp: August 20, 2011, 06:07:27 am
content: Fabrice Bellard demonstrated DVB-T signal generation using only the DAC in a VGA card:http://bellard.org/dvbt/. It relies on harmonics to get to the correct frequency and is a very neat hack. Unfortunately the source code isn't available but there should be enough hints to replicate it.

author: carveone
author_rank: Contributor
timestamp: August 20, 2011, 06:40:20 pm
content: Quote from: Entropia on August 17, 2011, 05:52:56 pmThanks for the link Entropia. I think I'll start simple with RGB output to VGA and then straight D to A composite (should be possible if I'm fast enough) and then tackle HDMI if I feel my target market demands it. At least that chip is available in non BGA forms for normal humans to try.I am slightly puzzled at the chroma carrier though - it's 4.43 MHz in PAL. Does that mean the luma it is sitting on cannot change too quickly? Eg: 702 pixels is 13.5MHz - I don't see how a 4.43MHz signal sits on that. Maybe I should read a book on signal analysis - I'm just a mechanical engineer dammitThe retirement village scenario is an interesting one. In the UK and Ireland, cheap set top boxes are common but I've never seen an analog+digital one. Digital + Satellite yes and LCD TVs which can handle analog and digital seemlessly (ie: Without some bizarre DIGITAL/ANALOG switch which so many DAB radios have). The EU are seeming to solve the problem by forcing everyone to go digital - no analog stations remaining.I've seen Digital/Sat boxes recommended precisely because they made the selection seemless - I can imagine your situation is going to arise more and more as we move to digital - eg: Apartments with analog front door cameras or information channels. That's a real head scratcher...

author: Unknown
author_rank: Unknown
timestamp: August 21, 2011, 01:16:57 am
content: Quote from: carveone on August 20, 2011, 06:40:20 pmThat is the problem, most can cope with selecting sources but it does add a layer of complexity.QuoteAustralia is also enforcing a shutdown of analogue TV broadcasting, mostly due to government hungry for the revenue from more spectrum sales. Current TVs with both analogue and digital tuners do provide an elegant and user friendly solution, but I am guessing with transmission ceasing the analogue tuners will soon begin to disappear from sets in a price competitive market.QuoteThat is precisely the situation and given the market penetration of both DVB-T and door cameras, security systems, TV weather station etc, I'm surprised that more options are not available. Just as with your HDMI scenario it is odd that chipsets development boards etc have not become more common place. In the case of HDMI it may well be due to licencing issues.

author: vk6zgo
author_rank: Super Contributor
timestamp: August 21, 2011, 10:02:53 am
content: Quote from: carveone on August 20, 2011, 06:40:20 pmThe luma in PAL is between dc & 5MHz.The 13.5MHz you mention is to do with the display device not the PAL standard.As I said above,the luma signal occupies a 5Mhz bandwidth--BUT it does not occupy all of it!The spectrum of a luma signal,appears as a number of "carriers" at 15.625kHz intervals,with sidebands at 50Hz & multiples of 50Hz above & below each "carrier".This is the result of the horizontal & vertical scan rates.Theoretically,the sidebands stretch out to infinity,but in reality, their levels soon become so low that they can be disregarded,so that most of the spectrum between the luma "carriers"can be regarded as "empty".The chroma signal is band limited to around 1.2MHz & quadrature amplitude modulated on a 4.43MHz subcarrier.The 4.43Hz signal is suppressed,& the resulting DSB signal has "carriers" at 15.625KHz intervals as with the luma signal,but they are offset in frequency,so that they "slot in" between the luma "carriers",in a manner that can be described as "frequency interlace"In PAL,as distinct from NTSC,the phase of the chroma modulation is changed every line,as is that of the "colour burst".I don't quite know how PAL is converted to digital, but there are obvious ways it could be done.(1) Use a comb filter to remove the chroma,leaving the luma,while at the same time passing the chroma through a bandpass filter,so separate chroma & luma signals are available to convert.(2) Do something similar to the above,but detect the chroma signal prior to conversion.(3) Decode the composite PAL signal down to RGB,& convert that.Most modern TV sets which still have an analog input are basically digital sets,so they may perform the conversion in the TV,so there are probably chips available to do this.VK6ZGO

author: vk6zgo
author_rank: Super Contributor
timestamp: August 21, 2011, 11:52:41 am
content: Quote from: Uncle Vernon on August 19, 2011, 02:38:37 pmIf your OFs have to install set top boxes,they will probably have to get used to using the "AV" function on their existing analog TVs,as most such "boxes" do not have a RF output.You could keep the"in-house" stuff on analog RF channels & connect the Rx via the RF loopthru on the set top box.The users could then select "set top box output" by switching their TVs to "AV", & "in-house" by switching to "TV".The problem then would be to send both digital & analog down the same system without getting interference.OK, it is a bit messy & it depends on how "with it" the residents are.Remember,most "oldies" these days have had around 20-30 years of experience of TV remotes,VCRs ,etc,so they may be able to handle a setup like this without bother.If you find some cheap DBV-T modulators down the track,just slot them in,& tell the residents that they don't have tochange over any more,VK6ZGO

author: carveone
author_rank: Contributor
timestamp: August 21, 2011, 02:32:29 pm
content: QuoteGoing from my parents experience, they've got used to switching sources but on their TV it happens to be obvious. As far as I'm concerned, ifI'mbrowned off with selecting sources for no good reason (which I am) then older people are going to be stymied.QuoteI think I've confused the fact that 13.5MHz is the digital sampling rate - the pixel clock on DVDs etc and thus is not the same as the analog signal bandwidth. As you say, the luma is a 5MHz bandwidth - wikipedia article on NTSC shows the ntsc spectrum but also shows the chroma signal sitting in the luma signal.If I'd done elec eng I think I'd be more familiar and comfortable with the frequency domain instead of it wrecking my head in the time domainIf I'm generating PAL video from a DAC directly though, I tend to try and visualise in that domain. However, I'll take the relevant equations and just try it: Y = USin(wt) + VCos(wt), where f = 4.43MHz.When I thought about this originally, my problem was that if Y changed fast enough, there would be issues. But I think that's right - if I generate fine enough text, the colour smears into the following area. The NTSC wikipedia picture would tend to confirm that...

author: carveone
author_rank: Contributor
timestamp: August 21, 2011, 02:40:15 pm
content: Well, what do you know. Wikipedia has some info on this:http://en.wikipedia.org/wiki/Display_resolution#Evolution_of_standardsOne of the drawbacks of using a classic television is that the computer display resolution is higher than the TV could decode. Chroma resolution for NTSC/PAL televisions are bandwidth-limited to a maximum 1.5 megahertz, or approximately 160 pixels wide, which led to blurring of the color for 320 or 640-wide signals, and made text difficult to read (see second image to right).which is what vk6zgo said above but I didn't quite get it although I understood the problem.Yup. The answer seems to be: tough, for higher resolutions you have to use RGB or S-Video

author: vk6zgo
author_rank: Super Contributor
timestamp: August 22, 2011, 03:08:59 am
content: Yes,NTSC & PAL were never intended to display single colour images of text, for instance.In normal TV picture material,the fine detail is primarily in black & white (luma).This is possible because of the characteristics of the human eye,in which the colour receptors are not capable of the same resolution as the black & white receptors.RGB,on the other hand,is only limited by the bandwidth of the signals applied,& the resolution of the monitor itself.At TV stations,the Graphics equipment normally used RGB monitors for best resolution.These days Graphics are done using PC based crud!But then again,before Graphics suites appeared,it was all done by hand with pens & brushes!VK6ZGO

author: deephaven
author_rank: Frequent Contributor
timestamp: August 22, 2011, 08:26:41 am
content: Quote from: vk6zgo on August 22, 2011, 03:08:59 amIt makes me laugh when I think back to the "pens and brushes" days when they took great trouble to illuminate the caption evenly and made sure there were no shadows. Nowadays, they add shadows, arbritrary patterns (sometimes moving) etc to the electronically generated 'perfect' image, just because they can.