mdave
Posts: 9
Joined: Wed Jul 04, 2012 11:55 am

PAL-decoder?

Wed Jul 04, 2012 2:25 pm

Hi guys!

I would really love to add one of those cheap ~2-3" china lcd displays to my raspi, so I did a little brainstorming what options I have.

I maybe could access the framebuffer somehow within linux and push it out through SPI or an other interface.
Problem: I don't know anything about linux programming, so getting that to work might take quite a while.
It also puts some load on the cpu which I don't want.

DVI could be interfaced with reasonable efford with an cheap FPGA with fast differential inputs like spartan 3a.
But building that without a custom pcb just on an qfp adapter might not be that enjoyable.

So, there ist the option to decode the cvbs signal. Software decoding with an mcu might be a nice project, but one would have to build the analog frontend for the adc etc.
On the other hand, there are some video decoders like TVP5150AM1 which are in the 5€ price range. They include the analog frontend and output 4:2:2 formatted data, sync signals etc. Combined with a cheap mcu (arm, avr32 ..) for reformating the data and interfacing the lcd controller, one could probalby build such a device for less than 15€ on some qfp->dil adapter pcbs. When I have a litte spare time i'll think about the memory needs of the mcu . . .

So I wonder if someone has experience with those decoders or any other thoughts on interfacing a small low resolution display.

Greetings,
David

mdave
Posts: 9
Joined: Wed Jul 04, 2012 11:55 am

Re: PAL-decoder?

Wed Jul 04, 2012 4:14 pm

Since I cannot find an edit-button I have to reply to myself. :)

I read something promising about DGA (Direct Graphics Architecture) extensions.
I have to read more when I get some free time, but it might be an easy way to get the image information from the x-server.
So, getting video data out through e.g. SPI might actually be an option. (at least for my 320x240 2.4" lcd)

TommyboyNL
Posts: 48
Joined: Mon Jun 18, 2012 4:37 pm

Re: PAL-decoder?

Wed Jul 04, 2012 8:19 pm

Why don't you want to use a $20 640x480 composite display, available on eBay?

mdave
Posts: 9
Joined: Wed Jul 04, 2012 11:55 am

Re: PAL-decoder?

Wed Jul 04, 2012 9:27 pm

Interesting. Last time I checked ebay, there barely was something under 50€. (which was 1-1.5 years ago)
Now there are actually some 3.5" for sale in the 20€ range.
On the other hand, they do not come with touchscreen, are bulky and maybe need to be modified to work with 5V or less.
(and it's probably less fun than building some stuff. ;-) )

Thank you for your input!
It's an interesting option, and I have to think some time about that.

TommyboyNL
Posts: 48
Joined: Mon Jun 18, 2012 4:37 pm

Re: PAL-decoder?

Thu Jul 05, 2012 8:41 am

My 3,5" screen is with my neighbours now (I wasn't at home when the mailman tried to deliver it). One I've got it in my hands, I'll dismantle it, and report on its hackability, such as power/voltage requirements, exact screen size (so I/we can start looking for a cheep touch panel), etcetera.
I paid 30 dollars for mine, but in the meantime, I have found them for 20 dollars...
Anyway, I'll get back to you!

TommyboyNL
Posts: 48
Joined: Mon Jun 18, 2012 4:37 pm

Re: PAL-decoder?

Thu Jul 05, 2012 9:25 am

Neighbour just got home, and I just got my display. Unfortunately, the seller was a little bit optimistic in his description: The display is only 320x240, and NOT the advertised 640x480... Anyhow, it works, but NOT as good as I wanted. I'm leaving the display in one piece, until I have resolved this issue with the seller.

mdave
Posts: 9
Joined: Wed Jul 04, 2012 11:55 am

Re: PAL-decoder?

Thu Jul 05, 2012 11:03 am

I'm sorry to hear that!
Nothing is more disappointing than waiting for a nice gadget and getting the wrong one. :-(
I am very curious how these higher resolution screens work out.
I don't know exactly how ntsc works, but at least in pal I expect some interferences with the color carrier at higher resolutions.

TommyboyNL
Posts: 48
Joined: Mon Jun 18, 2012 4:37 pm

Re: PAL-decoder?

Thu Jul 05, 2012 11:30 am

After playing with some values in config.txt, I managed to get the console to almost fill the screen. The text is even semi-readable!
I used the following settings:

Code: Select all

disable_overscan=1
sdtv_mode=2
sdtv_aspect=1
overscan_left=27
overscan_right=27
overscan_top=16
overscan_bottom=4
framebuffer_width=640
framebuffer_height=480
So it works, sort of, but I still want a better screen!

TommyboyNL
Posts: 48
Joined: Mon Jun 18, 2012 4:37 pm

Re: PAL-decoder?

Thu Jul 12, 2012 1:27 pm

Al right, got a 10 dollar refund from the ebay seller, so the display is now completely nude.
I have good news, and bad news. The 12V input is used to power two switching regulators: One provides 5V for almost all the electronics, and one produces 21V for the LED backlight. There are also two LM1117 regulators on the board, one produces 3V3 from the 5V rail, and one produces 1V2 from the 3V3 rail.
I still need to reverse-engineer the LED power supply, but it should be OK to bypass the 5V regulator.
On a side-note: none of the inputs are mirrorred, so using the dispaly for a rear-view camera, is not recommended.

TommyboyNL
Posts: 48
Joined: Mon Jun 18, 2012 4:37 pm

Re: PAL-decoder?

Thu Jul 12, 2012 2:23 pm

All right: correction: The 21V backlight DC-DC convertor is ALSO powered from the 5V rail, and seems to be controlled by the main MStar MST703-LF chip; the feedback signal leads to a via very close to the IC, and also the Gate/Base signal leads to a via very close to the IC.
The 5V step-dowm regulator is a XL1509. I'll try decoupling the 5V regulator and powering the display from 5V tomorrow at work.

mdave
Posts: 9
Joined: Wed Jul 04, 2012 11:55 am

Re: PAL-decoder?

Thu Jul 12, 2012 11:22 pm

Nice to hear you go a refund! :-)
I don't mind 320x240. I play some old 320x200 games even today. And It is enough for some basic console output.
I am pretty sure 640x480 on composite would look really bad if you actually use the resolution. At least with PAL.
(Because of the 4.33MHz pal color carrier. Maybe you have seen TV shows from the 70s where the checked patterns on the coats caused really bad interferences with the carrier and colors went crazy)

That sounds really great!
I am not afraid of modifying a device, but it is nice if you can actually get away with only using the 5V rail. (I had a display once requiring a lot of supply voltages - including something odd like -11V. That was a pain. ;-) )
I am kind of in a hurry now because I will go on vacation tomorrow for one week.
So if I don't write it is because of that, I did not lose interest in the topic.

Good luck with the display!

Best regards,
David

TommyboyNL
Posts: 48
Joined: Mon Jun 18, 2012 4:37 pm

Re: PAL-decoder?

Fri Jul 13, 2012 11:04 am

All right, just continued with the display. I removed a 2R2 resistor, which was in use as a fuse, from the PCB, to disconnect the on-board 5V regulator, and soldered a wire to the correct pad of the fuse. I am now powering the display from the GPIO header of my Pi, and it is working!
One drawback: If I connect both the GND of the composite conenctor to the LCD board, and the GND from the GPIO header, the Pi seems to crash or something, and starts booting when I remove the GPIO GND connection. I will continue tinkering!

Enjoy your holiday!

Shalnoff
Posts: 1
Joined: Tue Sep 11, 2012 3:14 pm

Re: PAL-decoder?

Tue Sep 11, 2012 3:44 pm

Hi TommyboyNL,
could you please make a picture and/or give some details of wiring of it and removed resistor?

I've purchase the same one on ebay (as I think). It is based on MST703-LF too. Would like to try to combine with RPi.

thank you in advance!

Return to “HATs and other add-ons”