MythTV

MythTV is a project I've worked on and off as a hobby (first working install was about 3 years ago). It is comparable to a digicorder but then completely open source linux distribution running a MythTV qt application and with many more capabilities/features. It has automated recording and show shifting (pausing live tv) but it can also play my dvd's, write recordings to dvd, play divx, play mp3, rip cd's to mp3, copy fotos from digital cam and view them in galleries, play emulated games on mame, psx-emu (playstation emulator), amiga emulator etc.

my MythTV

So basically it is just a regular PC in a nice (homemade box) that fits snugly under the tv, using lirc it is controlled with a regular tv remote. But I've played with the idea of using a wii-mote instead since it has excellent linux support as well. With main advantages over other harddrive based recorders being more codecs, cheaper parts, more features and easier to extend its features etc... The bios wake-on timers are also supported so the system wakes up even when turned off to record showings (unfortunately the xml feed with the belgian tv programs sometimes fails but this is due to the site teeveeblad.be which is sometimes down).

Introduction, Building a MythTv box

The box itself is a regular old pc desktop system with a new front panel that was spray painted several times then coated several times and sanded again until a glossy finish was achieved.

  • This is an extension to the Myth TV tutorial on this site.
There are some good tutorials but this one shows how to connect a hd44780 lcd display that will work even when the pc is turned off (using software shutdown)! Basically it uses the power from the ps/2 port, since the keyboard/mouse are the only things that keep getting 100mA even when the pc is turned off.

Connecting the hardware

  • When I have time I will post a graphic schematic here, for now use the tables (they are much easier to follow and less prone to making mistakes anyway...)

  • I find in practice it's easier to use tables, here are the pins you must connect from parallel port
to the lcd to transfer data:

DB 25 connector Pin Number LCD Pin Number LCD Pin Description
1 6 Enable
2 7 Data 0
3 8 Data 1
4 9 Data 2
5 10 Data 3
6 11 Data 4
7 12 Data 5
8 13 Data 6
9 14 Data 7
14 5 Read/Write
16 4 RS

  • Now this leaves pins 1,2,3,15 and 16 left open on our lcd.
    • The first two are power for the control chip and 15,16 are for the backlight.
    • Pin 3 is contrast control just connect it to pin 1 for full contrast.

We are going to get power from the ps/2 port, here is a schema of the male connector:

ps2 connection

6-pin Mini-DIN (PS/2):
1 - Data
2 - Not Implemented
3 - Ground
4 - Vcc (+5V)
5 - Clock
6 - Not Implemented

  • Connecting the power :
ps/2 connector(male) pin LCD Pin Number LCD Pin Description
3 1 Ground
4 2 +5V
3 16 Backlight Ground (K)
4 15 +4.2V (max 5)

This is the most important table, check and double check the +5 and Ground lines because switching them the wrong way round will KILL your LCD!!! Also double check the specification of your lcd to see if the pins noted above are the same for yours. Most have the same layout but don't come crying if you happen to have one with different pin layout because switching these will make you some nice smoke and then leave you with a broken lcd!!!

If you don't have a backlight just ignore the connections to pins 15 and 16 but you already must have figured that out . Also without backlight the lcd uses much less power (around 2mA) and this is good if you might be afraid of frying something (see next paragraph).

The ps/2 port specification says it must provide at least 100mA of power, my lcd uses 120mA. Which is a bit more but it works fine for me. Tested it on 2 different motherboards, an AS Rock K 47 T+ and a MSI K 7 T board. I mention this because if your lcd uses a lot more than 120mA be cautious and test it first on a board that you can miss . Getting a PLED display will be a better choice if you have the cash because this uses less than 100mA and will guarantee that your PS/2, hence Motherboard, will supply enough current and not blow up in smoke...

As a final note before soldering away make sure you have a multimeter and double check every line that you solder. Check the lines and also check if nothing is shorted by checking if two lines next to eachother are not connected (for newbies, you do this by switching your cheap but good ol' analog multimeter to measuring resistance and when the needle goes to the right there is a connection ) When you have to go to a store to buy a multimeter (which I had to do because I lost mine when moving into my new home), the guy at the counter might start asking all kindsa stuff and offer you meters for 100euro or more. Allthough these are good you'll probably never need them. Just a plain old analogue meter like the one in my first picture below is more than enough for many DIY projects (and believe me I've already done quite a few). You can get it at a local shop for about 10euro...

  • Connecting contrast :
Last but not least we need to solder one more wire from pin 1 to pin 3 on the LCD (this is for fixed contrast, see other tutorials for variable contrast using pods or whatnot):

Sorry below pictures and scripts are lost because we moved to a new server and apparantly forgot to migrate the directory containing these files... Might digg this up but for now don't have time, more important things to do like PhD and S.I.T. related stuff

LCD Pin Number LCD Pin Number Description (of second column)
1 3 Contrast

Software

  • Well now you have your lcd and you switched on the computer and if all went right the backlight goes on and you see some squares (these are all black characters, or inverted spaces ).

  • Since this is for mythboxes, I'm only gonna talk about software for linux (more specific knoppix linux). Go and get the latest .tar.gz from http://lcd-linux.sourceforge.net. Read the documentation which basically says you need to have your kernel sources installed correctly and then you do a 'make' and as root a 'make install'.

  • Now for some scripts that show the next recording, the time and the disk usage. It's a little wsbasic script (my own scripting language because I don't like the bad syntax in bash ). If anyone writes an equivalent in bash please mail it to me walle@nerdhero.org !

Pictures

  • Proof of concept, running lcd on old Motherboard for first time using only ps/2 power:

ps/2 power connection

  • The working display (yeah and the mythbox already collected some dust while paint was drying in my garage ):

lcd display showing date

  • Close up:

  • My mythbox (almost finished apart from last paintjob) with display still outside, the display will eventually go in bottom right where the clear viewing window is:

before final paint job

  • My mythbox finished, with logo nice and shiney and lcd built in :

after final paint and sanding

  • and a close-up fits nice and snug under my tv ofcourse I mostly use it with my projector nowadays which is a BenQ 6100 (good lumens, low noice and been working fine in a smokers environment for 2 years now so its got my thumbs up).

finished MythTV