Great news : Lemaker just released their touch-enabled displays. These displays come in 3 sizes : 3.5″ (320×240), 5″ (800×480) and 7″ (1024×600). They are available on their web-shop, Lenovator.
Today I’m reviewing the 3.5″ version :
|
|
Specifications
Here are the official specifications, taken from Lenovator page :
LCD size | 3.5 inch(Diagonal) |
Interface | Parallel RGB |
Resolution | 320 x 3(RGB) x 240 |
LCD driver element | a-Si TFT active matrix |
Dot pitch | 73(W) ×219(H) um |
Surface treatment | Glare |
Color arrangement | RGB-stripe |
View direction | 6 o’clock |
View angle (CR≥10) | 9 o’clock: 50°~60° 3 o’clock: 50°~60° 12 o’clock: 40°~50° 6 o’clock: 45°~55° |
Touch screen IC | FT5316 |
Power | 5V/250mA |
Active area | 70.08 (W) × 52.56(H) mm |
Dimension | 76.9(W) ×65.3(H) × 3.26(D) mm |
Not mentionned on these specifications : the touchpanel is a capacitive one, and touchpanel IC supports 5 points multitouch (working only in Android, not supported by Linux driver). It means the touchpanel is very finger-friendly and doesn’t need any calibration.
Installing the display
Physical installation is very easy, and I will re-use my own previous guide.
Before using the display, we have to install the ribbon cable.
1- Gently pull the brown lock on the connectors, on both BPi and display.
2- Insert the cable in the display connector CN3, contact pins facing the display. Secure the cable pressing the connector lock.
3- Insert the cable in the board connector CON2, blue side of the cable facing the ethernet port. Secure the cable pressing the connector lock.
The display connector CN3 uses a 40 pin FPC flat ribbon cable with 0.5mm pitch (mouser ref : 538-15020-0435)
The display has mounting holes that allows it to be mounted on top of the Banana Pi board.
Installing the driver
This part is also easy. From a fresh Raspbian :
sudo apt-get update
sudo apt-get upgrade
cd /boot
This is the same touchpanel driver for 3.5″, 5″ and 7″ versions, but bin files are different. Check https://github.com/LeMaker/fex_configuration to get the right bin file for your board / display combo.
For Banana Pi and 3.5″ display :
sudo wget -c https://raw.githubusercontent.com/LeMaker/fex_configuration/master/bin/banana_pi_35lcd.bin
sudo cp banana_pi_35lcd.bin script.bin
For Banana Pro and 3.5″ display :
sudo wget -c https://raw.githubusercontent.com/LeMaker/fex_configuration/master/bin/banana_pro_35lcd.bin
sudo cp banana_pro_35lcd.bin script.bin
sudo nano /etc/modules
uncomment ‘lcd’ (remove the ‘#’ in front of it), and add ‘ft5x_ts‘ (touchpanel driver) on a new line.
sudo reboot
Your display should start. There’s no need for touchpanel calibration, because it’s a capacitive panel.
Display quality
Quality is on par with the non-touch version : display is still really sharp, contrast is great and colors are really vibrant :
Viewing angles are still great for such a small display :
Conclusion :
Like the non-touch version, I really like this tiny display. Build and display quality are great, touchpanel is very reactive, precise and finger-friendly.
This display is perfect for embedded projects such as handheld video games, handheld instrumentation, media player, etc.
Tips & tricks
Controlling the backlight
Controlling the backlight is actually very easy.
If we analyse /boot/bananapi/script.bin file, here is what we could find :
lcd_pwm_used = 1
lcd_pwm = port:PB02
So TFT backlight pin is PB02 on A20 SOC.
First, download the updated RPi.GPIO for BPi python library :
For Banana Pi :
git clone https://github.com/LeMaker/RPi.GPIO_BP -b bananapi
For Banana Pro :
git clone https://github.com/LeMaker/RPi.GPIO_BP -b bananapro
Now install it :
sudo apt-get update
sudo apt-get install python-dev
cd RPi.GPIO_BP
python setup.py install
sudo python setup.py install
This updated RPi.GPIO adds a new RAW mode which enables to use any GPIO, using its A20 name. This is very convenient and we will use this mode.
So if we want to switch off backlight using Python :
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.RAW)
GPIO.setup(GPIO.PB+02, GPIO.OUT)
GPIO.output(GPIO.PB+02, 0)
If we want to switch it back on :
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.RAW)
GPIO.setup(GPIO.PB+02, GPIO.OUT)
GPIO.output(GPIO.PB+02, 1)
Running Pygame or framebuffer console applications
Actually, Pygame don’t seem to run on the TFT, from the console, but it works in X. So it seems to be an issue with framebuffer SDL driver.
There’s a workaround. It’s possible to execute a script from the console, using X dependancies, but without actually starting the full desktop.
Let’s say we want to execute /home/bananapi/my_script.py pygame script. It won’t run from console on framebuffer.
Make a /home/bananapi/script_launcher.sh bash script with :
python /home/bananapi/my_script.py
inside it
Now execute it with xinit :
xinit /home/bananapi/script_launcher.sh
Important : use the complete directory in both bash script and xinit command !
Your pygame script should now run in the console !
4 réflexions au sujet de « [Banana Pi] 3.5″ touch display module »