onsdag den 27. februar 2013

Why not have a 2.5" TFT display attached directly to your Raspberry Pi?

This post describes how I added a 2.5" colour display to my Raspberry Pi. The benefits are that the display is mounted directly onto the cabinet, which makes it looks pretty cool, and all cables are inside the box. Another cool feature is that the Raspberry Pi provides the power for the display so no extra power source is needed.


This is how it looks when the machine boots with Rasbian, which is a modified version of Debian linux


And a Raspbmc Boot




First of all you need some parts

1.  Raspberry Pi (SD-card, Power adaptor), which can be purchased from Farnell (Delivery 1-2 days)


The Pi in all its glory


2.  A shell. I recommend this Stealth Black Case for Raspberry Pi from RaspberryBits as I know the display controller fits without touching the other components. A black box is also recommended because the display leaks some back-light, which would make a white or transparent case light up.



Stealth Black case - good at hiding light and adding a touch of ninja to the weekend


3.  A display which works with Composite video. I used the NTSC/PAL (Television) TFT Display - 2.5" from Adafruit (A025DL02 TFT Display). They exist in different sizes but 2.5" fits the box quite well.


The screen and controller-board from Adafruit


Optional: If you don't want to solder directly on the Raspberry Pi's GPIO interface, I would recommend buying some Female-to-Female Jumper Wires.


Lesbian Jumper Wires


Optional: You might also need a little RCA coupler, Male-to-Male for the prototype / testing, also available through Adafruit. An external power supply, 4.5-15VDC or a 9 voltage battery for the prototype / testing, would also be a good addition.

You also need soldering equipment so you can solder it all together.


Let's get started

First thing I did was to make a prototype without soldering, in case it for some reason didn't work properly.

1. Connect the display and the Raspberry Pi with the RCA coupler. The connectors should fit together so no modification is needed yet.

2.  Connect the power supply or the battery to the black and red power wire for the display. Ensure to connect (+) to the red wire and (-) to the black, otherwise you will damage your display.

3.  Then power on the Raspberry Pi with a pre-installed OS. It could be Raspbian or Raspbmc or another OS for your Raspberry Pi.

4.  I mounted the display on top of the case simply with some double-sided tape on the back side. Be careful when you remove it again as you could damage the components on the screen's controller-board.


This is how my prototype looked


Let's build the real thing

1.  First I de-mounted the screen from the screen controller board - Be careful, it can break quite easily.

2.  Next I put the display where I wanted it to be (right bottom corner of the top of the case),  to see where the flat screen cable should go through.

3.  Then I sawed, with a small hacksaw, a 2 cm long crack from the bottom right corner and up the shorter side, (see red line in the image below).


2cm long crack for the flat cable to pass through (red line)


4.  I then tried to temporarily put it together to see that is fits and that the flat cable could still go through the crack and into the screen-controller board.

5.  After that I glued the screen onto the box. Ensure the screen is flush with the case and the right and bottom sides. Fast drying glue is recommended.  Don't use tools to keep it together as you could damage the screen.

6.  After the glue dried I connected the screen to the screen controller board again with the flat cable.

7.  After which I glued the screen controller to the inside, as shown in this picture, below.


Screen controller glued to the inside of the shell


8.  To protect the Raspberry Pi and the screen controller from short-circuiting each other, I glued a little piece of plastic on the the screen controller board. Remember to only glue on the plastic parts and not the components!

*It's a good idea to check if it's still working throughout the process, so you know where, in the process, you might have done something wrong.


Here it is, connected up again


9.  The screen and the screen controller are now mounted and it's time to lose the external cables.

     9a.  First of all, cut off the Composite plug from the white and the yellow cable, then put them through the hole on the Raspberry Pi print-card.

     9b.  Next, solder the cable to the underside of the yellow Composite plug on the backside of the Raspberry Pi, as shown below. It's very important that you do it exactly as shown in the picture, as faulty soldering could damage both boards. It's always a good idea to put some solder on the exposed cable before heating, as this will make it easier to solder, because two objects with solder on them are easier to solder together.


The cable to the underside of the yellow Composite plug on the backside of the Raspberry Pi


10.  Now, when the video cable is connected I recommend that you try to power-on the two boards, just to see if it still works.

11.  It's now time for connecting the power wire for the screen board controller to the GIPO interface on the Raspberry Pi. The screen needs 4.5 volts, and that is exactly what we can get from pin 2 (+) and pin 6 (-) on the GIPO.

12.  I took two Jumper Wires and cut them in the middle. Then crimped the plastic in the middle with a pair of pliers, so as to bend it into an "L" shape, (this way it won't protrude too much and take up too much space).


Jumper Wire cut in the middle


13.  You then have to solder the two Jumper Wires to the two power cables from the screen controller board. Ensure that the colour fits, you wouldn't want to hook the power up wrongly, as that will damage the boards.

14.  After soldering, put some tape around the exposed solder to ensure that it won't touch any other electric parts.


Pin guide for the Raspberry Pi



It should like like this.


15.  Now it's time to finally put it all together! Fit all of the cables in carefully and don't use too much force when you close the box.


It's time for a test!

Connect the mouse, keyboard and network cable (if you need it), and then connect the power. You should see something like this:


Jubiii, this is what success looks like!


Happy Geekend!


This blog post has been proofread by a Technical Writer before being published.

1 kommentar:

  1. A very interesting idea. It can be released separately, and most interestingly, it fits the principles of MVP, which means it will be sold.

    SvarSlet