I really like small displays. They allow to build some very nice embedded devices.
Lemaker released a line of LCD displays for their Banana Pi Board. They come in 3.5″, 5.0″ and 7.0″ sizes.
5.0″ and 7.0″ also exist with a touch panel, but the 3.5″ is not touch enabled yet (it should be released in a few weeks).
Edit (02.2015) : touch versions have been released on Lenovator (Lemaker web-shop) !
So, today I’m reviewing the 3.5 inch LCD (non touch) Lemaker people kindly sent to me.
Banana Pro/Pi 3.5 inch RGB LCD Module
|LCD size||3.5 inch (Diagonal)|
|Resolution||320 x 240|
|Driver element||a-Si TFT active matrix|
|Dot pitch||73(W) ×219(H) um|
|Connector||40 Pin FPC to the Display Sensor Interface (DSI)|
|View direction||6 O’Clock|
|Active area||70.08 (W) × 52.56(H) mm|
|Dimension||76.9(W) ×63.9(H) × 3.26(D) mm|
The display connector CN3 uses a 40 pin FPC flat ribbon cable with 0.5mm pitch (mouser ref : 538-15020-0435) Please note U1 SOIC-16 trace on the back of the display. With the 2 decoupling capacitors and the 4 pin CN2 FPC connector, this display will support a touch controller.
Installing the display
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 has mounting holes that allows it to be mounted on top of the Banana Pi board.
Installing the driver
This part is easy. From a fresh Raspbian :
sudo apt-get update
sudo apt-get upgrade
sudo wget -c https://raw.githubusercontent.com/LeMaker/fex_configuration/master/banana_pi_35lcd.bin
sudo cp banana_pi_35lcd.bin script.bin
sudo nano /etc/modules
uncomment ‘lcd’ (remove the ‘#’ in front of it)
Let’s check the viewing angles :
Horizontal viewing angle is much better. Image starts to degrade at ~70°.
Overall, this tiny display has a very good quality.
Here are the planned prices of the displays :
|LCD size||Resolution||Sample price|
(each, USD) plus shipping and handling
I really like this tiny display. Build and display quality are great.
This display is perfect for embedded projects such as handheld video games, handheld instrumentation, media player, etc.
I can’t wait for the touch version release. As usual, Lemaker support is excellent, they answer to each of my questions about this display.
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.
The following part has been updated here.
If we look further in the file, we find :
gpio_pin_54 = port:PB02 So it means TFT backlight is actually set on gpio 54. So if we want to switch off backlight using Python :
import RPi.GPIO as GPIO
If we want to switch it back on :
import RPi.GPIO as GPIO
Unfortunately, this pin doesn’t seem to be controllable as a hardware PWM ouput. It works with software PWM, but it is not very stable (flickering).
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 :
Now execute it with xinit :
Your pygame script should now run in the console !