tft display raspberry pi gpio made in china

3.5inch RPi LCD (A) and 3.5inch RPi LCD (B) are hardware compatible with each other (uses different driver), and can be mutually substituted in most cases. (A) for low cost ver. while (B) for IPS ver. with better displaying.

Why the LCD doesn"t work with my Raspbian?To use the LCD with the Raspberry Pi official image, driver (SPI touch interface only) should be installed first. Please refer to the user manual.

The PWR will keep on and the ACT will keep blinking when the Raspberry Pi starts up successfully, in case both of the two LEDs keep on, it is possible that the image was burnt incorrectly OR the TF card was in bad contact.Which power supply should I use?It is recommended to use a 5V/3A power adapter for the Raspberry Pi other than USB connection, otherwise the Pi may failed to start up because the PC"s USB port might have not enough power.

Since the first-generation Raspberry Pi released, Waveshare has been working on designing, developing, and producing various fantastic touch LCDs for the Pi. Unfortunately, there are quite a few pirated/knock-off products in the market. They"re usually some poor copies of our early hardware revisions, and comes with none support service.

tft display raspberry pi gpio made in china

A number of people have used a Motorola Atrix Lapdock to add a screen and keyboard with trackpad to RasPi, in essence building a RasPi-based laptop computer. Lapdock is a very clever idea: you plug your Atrix smart phone into Lapdock and it gives you an 11.6" 1366 x 768 HDMI monitor with speakers, a keyboard with trackpad, two USB ports, and a large enough battery for roughly 5 hours of use. The smart phone acts as a motherboard with "good enough" performance. The advantage over a separate laptop or desktop computer is that you have one computing device so you don"t need to transfer files between your phone and your desk/laptop.

Unfortunately for Motorola, Lapdock was not successful (probably because of its US$500 list price) and Motorola discontinued it and sold remaining stock at deep discounts, with many units selling for US$50-100. This makes it a very attractive way to add a modest size HDMI screen to RasPi, with a keyboard/trackpad and rechargeable battery power thrown in for free.

Lapdock has two connectors that plug into an Atrix phone: a Micro HDMI D plug for carrying video and sound, and a Micro USB plug for charging the phone and connecting to the Lapdock"s internal USB hub, which talks to the Lapdock keyboard, trackpad, and two USB ports. With suitable cables and adapters, these two plugs can be connected to RasPi"s full-size HDMI connector and one of RasPi"s full-size USB A ports.

The RasPi forum has a long thread on Lapdock with many useful suggestions, photos, and links: I made a Raspberry PI Laptop. There"s also a good "blog entry at element14 with photos and suggestions of where to get cables and adapters: Raspberry Pi Laptop. TechRepublic has a tear-down article with photos of Lapdock internal components here: Cracking Open the Motorola Droid Bionic Lapdock. Paul Mano has a wealth of photos of Lapdock innards at Motorola Atrix Lapdock mod projects.

Lapdock uses the HDMI plug to tell if a phone is plugged in by seeing if the HDMI DDC/CEC ground pin is pulled low. If it"s not, Lapdock is powered off. As soon as you plug in a phone or RasPi, all the grounds short together and Lapdock powers itself on. However, it only does this if the HDMI cable actually connects the DDC/CEC ground line. Many cheap HDMI cables do not include the individual ground lines, and rely on a foil shield connected to the outer shells on both ends. Such a cable will not work with an unmodified Lapdock. There is a detailed "blog entry on the subject at element14: Raspberry Pi Lapdock HDMI cable work-around. The "blog describes a side-benefit of this feature: you can add a small power switch to Lapdock so you can leave RasPi attached all the time without draining the battery.

The Lapdock Micro USB plug is the upstream port of Lapdock"s internal USB hub, and connects to one of RasPi"s full-size USB ports. Lapdock is not USB compliant since it provides upstream power on its Vbus pin. Lapdock uses this to charge the Atrix phone. You can use this feature to power RasPi if you have a newer RasPi. The original RasPi rev 1 has 140 mA polyfuses F1 and F2 to protect the USB ports, which are too small for powering RasPi using upstream power. Newer RasPis replace F1 and F2 with zero Ohm jumpers or eliminate them entirely, which allows Lapdock to provide power. If you don"t mind modifying your original RasPi, you can add shorting jumpers over F1 and F2 or replace them with higher-current fuses.

What gets powered on depends on whether Lapdock is open or closed. If it"s open, the screen and all Lapdock USB ports are powered. If you close Lapdock, the screen and full-size USB ports are powered down, but the Micro USB still provides upstream power. This is for charging an Atrix phone. When you open or close Lapdock, the Micro USB power switches off for about a second so if your RasPi is connected it will reboot and you may have a corrupted file system. There"s discussion about this at the RasPi forum link, and someone has used a supercapacitor to work around the problem: Raspberry Pi lapdock tricks.

When you do not connect a HDMI monitor, the GPU in the PI will simply rescale (http://en.wikipedia.org/wiki/Image_scaling) anything that would have appeared on the HDMI screen to a resolution suitable for the TV standard chosen, (PAL or NTSC) and outputs it as a composite video signal.

The Broadcom BCM2835 only provides HDMI output and composite output. RGB and other signals needed by RGB, S-VIDEO or VGA connectors are however not provided, and the R-PI also isn"t designed to power an unpowered converter box.

Note that any conversion hardware that converts HDMI/DVI-D signals to VGA (or DVI-A) signals may come with either an external PSU, or expects power can be drawn from the HDMI port. In the latter case the device may initially appear to work, but there will be a problem, as the HDMI specs only provide in a maximum of 50mA (@ 5 Volt) from the HDMI port, but all of these adapters try to draw much more, up-to 500mA, in case of the R-PI there is a limit of 200mA that can be drawn safely, as 200mA is the limit for the BAT54 diode (D1) on the board. Any HDMI to VGA adapter without external PSU might work for a time, but then burn out D1, therefore Do not use HDMI converters powered by the HDMI port!

The solution is to either only use externally powered converters, or to replace D1 with a sturdier version, such as the PMEG2010AET, and to replace the power input fuse F3 with a higher rated one, as the current one is only 700mA, and the adapter may use 400mA itself. Also notice that the R-PI"s power supply also must be able to deliver the extra current.

Alternatively, it may be possible to design an expansion board that plugs into the LCD headers on the R.Pi. Here is something similar for Beagleboard:

The schematics for apples iPhone 3gs and 4g suggest they speak DSI, thus they can probably be connected directly. The older iPhones use a "Mobile Pixel Link" connection from National Semiconductor. The 3GS panel (480×320) goes as low as US $14.88, while the 4G one (960×640, possibly the LG LH350WS1-SD01, with specifications) can be had for US $17.99 or as low as US $14.28. The connectors used might be an issue, but this connector might fit. Additional circuitry might be necessary to provide the display with required 1.8V and 5.7V for operation, and an even higher voltage for the backlight.

The Raspberry Pi provides one clock lane and two data lanes on the S2 connector, as can be read from the schematics. It is currently unknown whether this is enough to drive the iPhone 4G screen, as that screen seems be driven with three data lanes in its original application.

I2C/SPI ADC can be used to interface 4 pin resistive Touch Screens, For example STMPE812A. Texas Instruments has a solution for 4 or 8 wire touchscreens using their rather cheap MSP4309.

Parallel interface displays can be found in many sizes, usually up to 7" and more. Parallel interfaces are usually 8 or 16-bits wide (sometimes 18 or 24-bit wide), plus some control-lines. The Raspberry Pi P1-connector does not contain enough GPIOs for 16-bit wide parallel displays, but this could be solved by borrowing some GPIOs from the CSI-connector or from P5 (on newer Raspberry Pis). Alternatively, some additional electronics (e.g. shift-registers or a CPLD) can be used, which could also improve the framerate or lower the CPU-load.

AdvaBoard RPi1: Raspberry Pi multifunction extension board, incl. an interface and software for 3.2"/5"/7" 16-bit parallel TFT-displays incl. touchscreen with up to 50 frames/s (3.2", 320x240)

Texy"s 2.8" TFT + Touch Shield Board: HY28A-LCDB display with 320 x 240 resolution @ 10 ~ 20fps, 65536 colors, assembled and tested £24 plus postage, mounts on GPIO pins nicely matching Pi board size, or via ribbon cable

tft display raspberry pi gpio made in china

A parallel RGB interface up to 24 bits is available on all Raspberry Pi boards with the 40-way header (A+, B+, Pi2, Pi3, Zero) and the compute module. This interface allows to connect parallel RGB displays to the Raspberry Pi GPIO either in RGB24 (8 bits for red, green and blue) or RGB666 (6 bits per color) or RGB565 (5 bits red, 6 green and 5 blue).

This mode is accompanied by new overlays, which allow to produce an RGB signal thanks to the VGA666 (get the 666 passive VGA adapter for Raspberry-Pi B+ : code and hardware).

tft display raspberry pi gpio made in china

Raspberry Pi OS provides touchscreen drivers with support for ten-finger touch and an on-screen keyboard, giving you full functionality without the need to connect a keyboard or mouse.

The 800 x 480 display connects to Raspberry Pi via an adapter board that handles power and signal conversion. Only two connections to your Raspberry Pi are required: power from the GPIO port, and a ribbon cable that connects to the DSI port on all Raspberry Pi computers except for the Raspberry Pi Zero line.

tft display raspberry pi gpio made in china

SunFounder is a company focused on STEAM education with products like Open-source robots, Arduino&Raspberry Pi Kits, Display screens, and other smart devices. Learn More

tft display raspberry pi gpio made in china

WF70GTIFGDHTV is a 7 inch medium-sized for HDMI signal TFT-LCD display, made of resolution 800x480 dots. This 7 inch TFT Display comes with a board which supports HDMI signal interface and a 40-pin connector on it; WF70GTIFGDHTV is designed to make Raspberry Pi usage become easily. This WF70GTIFGDHTV TFT display has a USB interface Resistive Touch screen overlay on TFT panel. Also the Capacitive Touch Panel is available for option. We designed a connector part no. WWHDMI-00# for option, the customers can use it to connect WF70GTIFGDHTV module with your Raspberry Pi directly. If customers do not require a 40-pin header connector on board, please choose WF70GTIFGDHT0.

You can simply use this medium-sized TFT display with your Raspberry Pi, and also you can use it as computer display with any device which supports HDMI signal output. This 7" TFT display is 800x480 resolutions, which is just enough to run most software, but still small enough that it can be used in portable or embedded projects without the bulk. Please note, this part no. WF70GTIFGDHTV does not include any HDMI connector or USB cable.

WF70GTIFGDHTV#: with a 40-pin header connector on board, supports up to Raspberry Pi 3B+ (contain Pi 4B) version. If customers choose Raspberry Pi 4 version, please note the interface is Micro HDMI; customers need to use the Micro HDMI to HDMI cable for this series products.

tft display raspberry pi gpio made in china

Long time enjoyer of this driver. Truly awesome. Generally I"m using it with an ILI9341 generic from Hiletgo Amazon, However I just got a new screen from China (an ST7789 according to specs) that"s an 8 pin SPI TFT OLED display. No matter my wiring or my command lines, it just does not want to work. I"ve got to the point where the Reset pin will light up the backlight but it wont" go any further.

Command: cmake -DST7789=ON -DGPIO_TFT_DATA_CONTROL=25 -DGPIO_TFT_RESET_PIN=24 -DGPIO_TFT_BACKLIGHT=23 -DSPI_BUS_CLOCK_DIVISOR=40 -DUSE_DMA_TRANSFERS=ON -DDISPLAY_BREAK_ASPECT_RATIO_WHEN_SCALING=ON ..

Everything compiles just fine and even turns on the backlight, but there still is a black screen. The only thing I"ve changed in config.h was to uncomment // #define UPDATE_FRAMES_WITHOUT_DIFFING and completely rebuild the build file.

tft display raspberry pi gpio made in china

Well, I bought a Chinese LCD TFT touchscreen, 3.5 inches, but I cant get it working, because I cant find the drivers. The only thing it says in the back is www.mcufriend.com, but the page is not available. I tried following this tutorial, but the screen only appears white.

tft display raspberry pi gpio made in china

In the previous article, I described the steps needed to install an LCD touchscreen on the Raspberry Pi. In this article, I will show you how to adjust the screen rotation of the LCD to landscape mode, and will show you how to calibrate the touchscreen pointer for optimal accuracy. Just follow the steps below to compete the process of setting up your Raspberry Pi LCD touchscreen:

1. First we need to change the setting for screen rotation in the /boot/cmdline.txt file. This setting is called fbtft_device.rotate=X. By default, this is set to X=0, which results in a portrait mode screen orientation. In order to switch the orientation to landscape mode, change fbtft_device.rotate=0 to fbtft_device.rotate=90. Enter sudo nano /boot/cmdline.txt at the command prompt. There should only be one line in this file. Go to the end of it and you will find the fbtft_device.rotate=X setting. Change the value from 0 to 90:

After the Pi finishes rebooting, you should notice that when you move your finger across the touch screen, the pointer should follow correctly in both axes. If you are using the Raspberry Pi 2 Model B, you will need to complete the calibration steps below before the pointer follows your finger correctly (and make sure that you have enabled startx to load automatically – see step 6 in this article).

You can rotate the screen 90 degrees (as we did in this tutorial) and the power connector will be at the bottom of the screen, but you can also rotate it 270 degrees so that the power connector is at the top of the screen. To do this, simply enter fbtft_device.rotate=270 in the /boot/cmdline.txt file. Then change the DISPLAY=:0 xinput --set-prop "ADS7846 Touchscreen" "Evdev Axis Inversion" 0 1 line in the /etc/X11/xinit/xinitrc file to DISPLAY=:0 xinput --set-prop "ADS7846 Touchscreen" "Evdev Axis Inversion" 1 0. All you need to do is switch the values of the 0 and 1 at the end of this line.

4. Now we can use ts_calibrate. Enter ts_calibrate at the command prompt (make sure you are still in root mode) to run the ts_calibrate program. The program will consecutively display five crosses on different parts of the screen, which you need to touch with as much precision as possible:

tft display raspberry pi gpio made in china

We add toRaspberry Pi a TFT touch screen to display the system console,movies and favorite photos or control a relay board … at your fingertips, literally!

To avoid using an HDMI monitor the cost well above that of Raspberry Pi, in previous articles we have always gone the way of connecting remotely to the microcomputer, using tools such as Putty and WinSCP. This approach has always bound to use Raspberry Pi in a “server” mode. Therefore we have always presented applications with user interface built to be accessible by web browser. What to do when we want to have an interface in traditional style, accessible directly from the desktop? Simple, you connect a monitor, a keyboard, a mouse and then you can code a standard desktop application using the classical languages ​​and libraries for creating graphical user interfaces. Yeah, but this way we transform Raspberry Pi in a PC with all devices attached, making it a traditional “cumbersome” uncomfortable device.

The solution we introduce instead of the “classical”, allows you to create graphical user interfaces using a nice 2.8-inch TFT color monitor with a touch resistive interface. No monitor, no keyboard and no mouse. The display board has more or less the same Raspberry Pi size, is already assembled and is compatible with all Raspberry Pi versions: A, B and B +. In this post we have adopted the model B + that provides a greater number of I / O pins than previous versions. The monitor has a resolution of 320 x 240 pixels with 16 bits color depth. The mini display is connected to Raspberry Pi through its SPI bus and can be used to redirect the console, or as a monitor to display the Raspbian X desktop, photos, video and user applications graphical interfaces. So far, so good. The downside is that the drivers are not included in Raspbian kernel.

This cute display allows us to introduce, in more detail than we have done up to now, the build of an embedded GNU / Linux system. In the “professional” field, embedded GNU / Linux distribution are the leanest possible, including only device drivers and essential applications to the basic microcontroller operation. This is to minimize the distribution memory footprint and maximize the target system performance. This approach allows the use of a reduced performance chip, with final solution physical dimensions as low as possible and minimum power consumption in order to allow battery operated solutions.

The downside is that you must customize the distribution kernel with the device drivers that you want to use, such as WiFi dongle, USB devices, LCD and LED panels. One of the advantages using Raspberry Pi has always been the ease of use, not having to deal with these issues. Being an “educational” microcomputer, Raspbian already includes a huge amount of drivers that meet automatically (plug and play) the most needs. This time, however, the TFT LCD drivers are not included. Fortunately, Adafruit (display producer) has provided a Raspian kernel, already compiled, that includes the required driver.

This avoid us having to customize Raspbian. We are still planning to propose a series of posts about the topic, because the continuous presence of new devices on the market requires fronting this issue definitely. In the Adafruit solution, there are in fact two problems. What to do when we have to connect a second device whose specific drivers are not included on the Linux kernel? Although the manufacturer makes available a “compiled” kernel for its device, we will lose other drivers integrations. The only solution is that we must configure and compile the kernel by our own, adding all the drivers requested. Second problem. Using the precompiled kernel, customized with the addition of a specific driver, it binds us to the kernel version used for compilation. In this condition, we will not be able to adopt new distributions with most recent kernels, unless the device manufacturer itself does not release a new version.

But back to our graphic displaybased on TFT LCD module ILI9340,which comes pre-assembled andequipped with GPIO connector, presenton all Raspberry Pi models: A, B and B +.The board includes the display controller STMPE610 communicating with Raspberry Pi through the SPI bus and then engages the corresponding GPIO connector pin (SCK,MOSI,MISO,CE0,CE1)in addition to GPIO25 and GPIO24 pins.The four additional buttons present on board are connected to pins GPIO23,GPIO22,GPIO21,and GPIO18.All other pins are unused and may be used for other needs. In this case it is appropriate to solder a connector onhousing present onthe right side of the card and use a flat cable extension.Be careful to follow therightpin matching.The GPIO pin number 1 issignedon the back of the board with a square shape and a small white arrow silkscreened.

Now it is better not to install the display on the connector,we will do it after you install the software. To perform the installation process it is necessary that Raspberry Pi is connected to the local network so you can “see”Internet.You also need to access to Raspberry Pi to use a terminal window and a file manager.As always,but especially in this case,we prefer to remotely access via SSH using (inWindows)Putty and WinSCP.Of course, you can alsoconnectto the console via serial cable.We login to Raspberry Pi with the user “root”and start the installation process with the usual commands to update the distribution:

We remove the power plug;insert the display on the GPIO connector, making surethat there is nofalsecontact with anyotherRaspberry Pi connector or component and then we power on.Do not worry,on the small screen,for the moment,nothing will appear.We reconnect to Raspberry Pi with Putty and WinSCP.To test display operation we can quickly load the driver from the command line and launch Raspberry Pi desktop.We type the following commands in the order,as visible in figure:

You can also use the menu bar and applications in “touch” mode.If all goes well the most important step has been made.Now we make sure that everything will start automatically when you turn on Raspberry Pi.We close the graphical desktop (actually theX server)from the terminal window by simultaneously pressing .We open the following file from WinSCP:

Save and close the file.We insert password to save.One moment,we’re not done,we have to add a configuration file to customize the display rotation and image refresh rate parameters.Open the file:

0 corresponds to the vertical display,with the lower side towards the printed markings on the base;90 corresponds to the horizontal display,with the bottom towards the buttons;180 corresponds to the vertical display,with the top sidetowards theprinted markings on the base;270 corresponds to the horizontal display,with the top side towards the buttons.

The parameter “frequency”indicates the refresh rate of the display.The value “32000000″means 32MHz and corresponds to a frame rate of about 20FPS.If the total load of your application allows it, you can try to lower the frequency to 16 MHz (16 million).Let’s make the changes effective with a command:

A nice setting that you can do is to redirect console messages to the display instead of the standard video output.Although the screen is small, if youchoosethe rightfont you can get an area of 20 lines per 40 characters.To accomplish this we must edit the kernel configuration fileinthe file system boot partition.Open the file:

The purpose of the change done is to redirect the console from the frame buffer HDMI / TV standard /dev/fb0 to the frame buffer of the display TFT /dev/fb1.To do that go down to the directives,after the entry “rootwait”and add the statements:

You can viewonour display many video files with different extensions,if the resolution is 320 x 240 pixels.To see a video we use the package “mplayer”,if it is notalready presentin our system we install it with the command:

At the end,if we run the conversion in Windows OS, justmove the file to Raspberry Pi and run the command described at the beginning of the paragraph to play the file.

Another nice application is for displaying pictures.To do this we use the package “fbi”: framebuffer image viewer.We install it with the usual command:

The backlight of the TFT display is done through four LEDs which absorb a total of about 75 mA. If we power the board throughbattery or if you still want to turn the backlight off, the STMPE610 touch controller has two I / O pins and one of these is connected to the transistor that controls the backlight.This pin is accessible from the command line as a Raspberry Pi GPIO terminal,recognizable as GPIO 252. To access the GPIO you must export its device file with the command:

What can we do with such a nice display, other than managing Raspberry Pi console or desktop GUI? We can write our applications, to communicate with the GPIO and any other external sensors. The possibilities are so many.

But if we want to develop a very simple starting application, we have to reduce this possibilities, always doing something really interesting. We will use Python to create a graphical interface that can control the IN/OUT shield outputs. To interact with the TFT graphic display we will exploit the functionality available in pygame, the library to create video games and graphics applications in general. In recent Raspbian distributions, pygame library is already included and installed. If not, we install it through the Manared Python Package named “pip” (pips Installs Python), with the command:

Done?Check the installation by using python from the command line.We check that everything is working by typing one after another the following instructions:

Among the important instructions, see the one that sets the fb1 device as framebuffer,thepygamelibrary init.After, we set the display definition we called “LCD”with resolution of 320 x 240 pixels.The other instructions change the screen background color,using the usual RGB coding.We conclude with one last little project that allows us to command four relays with touch controls on the TFT display.We use the RELAY4CH–2846 board(available from Futura Elettronica) which hostsfour relays,is powered at 5 volts and is drivable with direct or optocoupled digital inputs:those accept voltages from 1.5 to 5V and therefore are compatible with the Raspberry Pi GPIO output.We choose the direct coupling by placing a jumper on the COM and GND terminals.Now connect the card to Raspberry Pi as in the diagram in figure.

We connect the power supply and four GPIO pins driving the relays. We chose GPIO12, 16, 20 and 21 pins, very convenient to connect on the B+ version GPIO.

To power up the board weld a strip of male connectors on the GPIO “replica” present on TFT module using pins 2 (positive) and 6 (mass) with female-female cables. In Listing 1 we see the program to drive the relays. It is always a Python program. For the graphical interface we used the pygame library, which we have just described. The list is full of comments. The code logic is the initial construction of the graphic interface. The dictionary contains the central position coordinates where we want each pin description. The “for” loop outside the main loop prepares the display area with the writings for the four pins. The word “off” is added to each pin’s “name”. The whole is colored in red and positioned so that the center corresponds to the coordinates contained in the dictionary. Finally, the display is refreshed and the text become visible. When the code is running, if you tap on a pin name the corresponding relay changes state while the text color indicates its current status: red if off and green if on, as shown in the photo of figure.

In future posts we will see how to use the display with other shields and with extended functionality,like the ability to operate a device directly from the display or from a webpage.