44 thoughts on “Raspberry Pi with a 3.2″ TFT with Touch control (Part 2)”

  1. it is the same circuit of valdodov? if yes how to connect the saint smart display? the circuit is available? regards

  2. Hey Mark,
    i love your work with the Sainsmart TFT.
    I´m looking forward to get it work by myself, but i get stuck at the wiring.
    The Cicuit you use is “almost” the same as on Valdodvs page but with little differences. (@valdorov its not the Sainsmart 40 Pin Interface).

    I Dont know where to put fe. the BL_CNT wire @ the display connector.

    Could you pls be so kind and Post the whole Circuit you have used for your 40 Pin Sainsmart?

    It would be great.

    Greetings Pete

      1. Hey Mark, First of I would like to say this is awesome and exactly what I was looking for. That being said I am trying to recreate your design and I think I have everything hooked up correctly but I do have a question about your comment about pin 16 on the TFT. you mention it should be connected to pin 23 on the Pi but your schecmatic shows pin 29 (TouchP_CLK) on the TFT connected to pin 23 (SPI_SCLK) on the PI and pin 3 (CLK) on all 3 Shift Registers. Do I also need to add it to pin 16 (N.C.) on the TFT? TIA

      2. Hi Mike
        The above is old information, my apologies. I’ll remove that posting.
        The schematic is correct.
        Pin 29 on TFT and Pin 3 on Shift registers all connect to SPI_SCLK.
        Ping 16 on TFT should stay not connected.

      3. Thanks Mark for the quick reply. One last question (hopefully) I have read the blog from “Valdodov” and he has uploaded folders to replace, do I need to worry which OS I’m running. I have the newest version of Raspian and I’m new to the RasPi and Linux. Do you have more current files that I need to use or will the ones that Valdodov has work?

      4. I don’t have more current.
        I still use Valdodov’s.
        I do know it works with 2013-09-25-wheezy-raspbian
        But if you use a later version, it should still work. As when you copy the files over it also copies over a new Kernel. (which is most likely older than what you are using). But this shouldn’t be an issue.
        Make sure you backup your SD card beforehand.

      5. I posted on the raspberry Pi forum regarding this setup that the files and folders that are on my SD card in the lib/Firmware folder are not the same as the ones that I downloaded and I’m not sure if I should move them over or if they are supposed to replace existing files and folders. Would you be willing to upload a version of the OS that this setup works with so that I could flash my SD card with that and see if it works. I am very new to the raspberry Pi and linux but I am trying to learn. I just flashed raspian from the NOOBS setup so I have nothing that I would loose. Thanks again.

      6. Thanks again for the fast response Mark. I did everything you said, double checked my connections and turned on the Pi. I get a white screen then I see all the lines scrolling by as it is going thru the boot process. Everything looks OK but then it goes to just a blank screen with a fast blinking cursor in the upper left corner and doesn’t continue on to the GUI as I set when I originally setup raspian. Is there something that I am missing?

      7. Mmmm… not sure about that problem.
        I have never used the raspberry Pi tools to enable auto login to the X windows.
        I usually SSH into the Pi from another PC and then start X with this command from the command line “sudo FRAMEBUFFER=/dev/fb1 startx — -dpi 60”

        If i want to enable auto login, I edit this file;

        sudo nano /etc/inittab

        Comment at the line below and then added the replacement;

        #1:2345:respawn:/sbin/getty --noclear 38400 tty1
        1:2345:respawn:/bin/login -f pi tty1 /dev/tty1 2>&1

        Auto startx: modify file /etc/rc.local

        su -l pi -c "env FRAMEBUFFER=/dev/fb1 startx -- -dpi 60 &"

      8. Thanks again for all your help Mark. I again did as you mention and I didn’t use the raspian utility to enable auto login and that work…somewhat. I can boot into raspian command line and everything works as expected however when I try to use the command “startx” or even the way you mention by SSHing in from another computer I get a “Server terminated with error” and then it gives up and goes back to the command line. I tried this before i replaced all the file with valdodov’s files and it worked fine but not after set up to use the TFT LCD. I’m not sure of what is happening but here is the readout in the terminal.

        xauth: file /root/.Xauthority does not exist

        X.Org X Server 1.12.4
        Release Date: 2012-08-27
        X Protocol Version 11, Revision 0
        Build Operating System: Linux 3.2.0-2-mx5 armv7l Debian
        Current Operating System: Linux raspberrypi 3.6.11 #41 PREEMPT Wed Mar 13 11:19:55 EET 2013 armv6l
        Kernel command line: dma.dmachans=0x7f35 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2708.boardrev=0xe bcm2708.serial=0x6116678d smsc95xx.macaddr=B8:27:EB:16:67:8D sdhci-bcm2708.emmc_clock_freq=250000000 vc_mem.mem_base=0x1ec00000 vc_mem.mem_size=0x20000000 dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait fbcon=map:1 fbcon=font:ProFont6x11
        Build Date: 18 December 2013 05:20:52PM
        xorg-server 2:1.12.4-6+deb7u2 (Julien Cristau )
        Current version of pixman: 0.29.3
        Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
        Markers: (–) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
        (==) Log file: “/var/log/Xorg.0.log”, Time: Tue Feb 11 04:08:35 2014
        (==) Using system config directory “/usr/share/X11/xorg.conf.d”

        Fatal server error:
        AddScreen/ScreenInit failed for driver 0

        Please consult the The X.Org Foundation support
        at http://wiki.x.org
        for help.
        Please also check the log file at “/var/log/Xorg.0.log” for additional information.

        Server terminated with error (1). Closing log file.
        xinit: giving up
        xinit: unable to connect to X server: Bad file descriptor
        xinit: server error

      9. Yes, I actually tried it 2 different ways. The first way I SSH’d into the PI and used “sudo FRAMEBUFFER=/dev/fb1 startx” the second was by typing “startx” directly from the PI and both ways gave me the same result.

      10. ALX – no I didn’t try SSH -X. I’m new to Linux and logging in remotely using SSH so just to be clear I SSH into the PI and type “-X” or do I type “SSH -X” directly from the PI.

      11. Mike… I have no idea what is wrong.. sorry.

        I do know that from a fresh install of 2013-09-25-wheezy-raspbian it works, i did it two days ago for a friend.

        In brief this is what I did;
        1. Install image 2013-09-25-wheezy-raspbian.img
        2. Run sudo raspi-config.. changed password and expanded file system/
        3. Reboot
        4. mkdir display_kernel
        5. cd display_kernel
        6. wget http://valdodov.com/tft_lcd/src/raspberry-pi.tar.gz
        7. tar xfv raspberry-pi.tar.gz
        8. rm raspberry-pi.tar.gz
        9. sudo cp -r * /
        10. sudo reboot

      12. Mark, I just wanted to let you know that I got it working. I went to valdodov’s site and his site says to use “FRAMEBUFFER=/dev/fb1 startx” for X windows and that worked. So by leaving off the “sudo” and the “dpi 60” is what was needed to get it to work. Thanks again for all your help.

      13. Another question for you. Is there a way that you can hook the PI back up to a HDMI monitor and display there without have to change any of the files back?

      14. Mark, would you happen to have the raspberry-pi.tar.gz file from Valdodov’s site? His website is not accessible at this time and I deleted it off of my pi. If you don’t have that do you know where I can get the source files so I can compile it myself. I have some friends that are interested in doing the same thing and they are software engineers so they would be able to figure out what I can’t. TIA

  3. Hi,

    in the schematic i see 1 Resistor and because of the box for all chips 4 caps.

    But in the Pictures on this site i see 2 Resistors and 4 caps (maybe 5 im not sure what that is in the top right)

    I would like my setup to be like the one on this page.

    A part list would be nice, im completely new to this kind of stuff but im not afraid to try out some stuff.

    1. you do see extra resistors.. I should have taken these off the breadboard. They were used for testing. I would connected a led(through a resistor) to the pins on the ICs to confirm that they were working.
      I also had a resister for the back light connection. But this is not needed, the back light can be connected directly to 3.3v
      so.. its 5 caps and 1 x 10k resister needed.

  4. Thanks for the Feedback, i will look into buying the needed parts and then get down to soldering.

    Wish me luck 🙂

  5. Sorry for the double comment (i cant find an edit feature)

    just read your response again and you say 5 caps.

    But if im reading the schematic correctly it should be 4 caps.
    1 for the 4040 and one each for the 4094, where do i need to connect the 5th one?

  6. Hello there! This is fantastic work, well done to you.

    I am very new to properly playing around with the Raspberry Pi and Linux.. very confusing lol.

    What I would like to ask, is if I wanted to use this TFT display without the touch function, would the wiring be much more simple? I have gotten the 1.8″ TFT display to work however I would like to try my hand at wiring the 3.2″ display. Would I still need the shift registers and the other IC’s to make this display work if I only wanted to use the display without the touch control?

    Kindest regards,


    1. yes, you would still need the shift registers.
      Most of the wiring is for the display, the touch only uses 5 wires. I think you if remove touch, it doesn’t remove the complication.

      1. what do I need to do to install this in NOOBS? And will this work with the other OP (OPENelec)?

  7. I create a circuit and use valdodovs driver. Everything works fine! Now i want to switch between the spi monitor and an HDMI display. I try to configure the X11 server, add a second device, that uses fbturbo. When i try to start the framebuffer, fbturbo seems to be broken. I compile fbturbo again, but the error is still there. – Did you try to connect a HDMI display?

  8. Hi,

    did you get the display working with the latest raspbian kernel?

    Im trying to use it with volumio but im not able to patch the kernel with the instructions on valdodovs site.

  9. I used your commands to install the kernel and the drivers, but after the reboot the display stays white and nothing happens. I heve the right version of raspbian. I dont know whats wrong. Please help.

  10. I used the FRAMEBUFFER=/dev/fb1 startx via ssh into the pi and the screen worked great. How to I get it to boot that way all the time? As of this writing, every time I turn the pi on, I have to ssh into it from a laptop and run the FRAMEBUFFER=/dev/fb1 startx command. Also, when I close the ssh console, it kills the screen on the pi.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.