stanga
Posts: 43
Joined: Thu Sep 19, 2013 9:13 pm

3.2" TFT LCD + touchscreen + five buttons

Fri Sep 20, 2013 4:47 pm

We have designed the LCD-PI32 shield for the Raspberry Pi (RPi), which provides a 3.2” display for the RPi. It features a 3.2” TFT LCD 320x240 resolution display, 65k colors, a touchscreen and five push buttons.

Image

The LCD-PI32 connects directly to the GPIO connector of the RPi which provides everything the LCD-PI32 requires. It uses only SPI pins and one GPIO pin. The rest of pins are free for other use. Push buttons require no additional pins, their status can be read over SPI. LCD-PI32 uses the following pins from the GPIO connector:

SCLK - LCD controller and touch screen controller
MOSI - LCD controller and touch screen controller
MISO - reading push buttons, touch screen controller
CE0 - LCD controller, for reading push buttons
CE1 - touch screen controller
GPIO17 - touch screen controller (interrupt)
GPIO18 - backlight control (optional)
+5V - backlight power (75 mA typ.)
+3.3V - logic power (20 mA typ.)
GND - common ground

The rest of pins are free for other use. The shield also includes 4 mounting holes for easy mounting.

Image

Main LCD-PI32 features are:
- 3.2” TFT LCD Display, 320x240 Resolution
- 5 push buttons, status available over SPI
- Linux framebuffer driver, no special software required for working with display
- Mounting holes for standard M3 screws/bolts to fasten the display
- Powered directly from the Raspberry Pi (logic from 3.3V, backlight from 5V), no additional power required

You can see it in action here: http://youtu.be/S3Lh_vuZ1u0

Modules can be bought on http://hwlevel.com/shop/index.php?main_ ... oducts_new or on eBay.
Last edited by stanga on Mon Feb 10, 2014 8:06 pm, edited 13 times in total.

zmogas
Posts: 6
Joined: Sun Nov 03, 2013 1:06 pm
Location: Lithuania

Re: 3.2" TFT LCD + touchscreen + five buttons

Sun Nov 03, 2013 1:14 pm

Hello,

are these buttons mapped to standard keyboard buttons? To which buttons?

raspifari
Posts: 197
Joined: Wed Mar 20, 2013 6:11 pm
Location: France

Re: 3.2" TFT LCD + touchscreen + five buttons

Sun Nov 03, 2013 6:52 pm

What's the model of the lcd module ? Because I have already bought this http://cgi.ebay.fr/ws/eBayISAPI.dll?Vie ... 1497.l2649 you think I may use the lcd of my board and sold it on yours, if of course I can buy only the board.
Do you intend to crowdfund your project on kickstarter ?

stanga
Posts: 43
Joined: Thu Sep 19, 2013 9:13 pm

Re: 3.2" TFT LCD + touchscreen + five buttons

Tue Nov 05, 2013 2:21 pm

Hi, zmogas. Buttons are not mapped to keyboard buttons. Their status can be read over SPI using an ioctl call. There is an example in driver_examples_src folder which shows how to use the ioctl call.

raspifari: please check your pm.

zmogas
Posts: 6
Joined: Sun Nov 03, 2013 1:06 pm
Location: Lithuania

Re: 3.2" TFT LCD + touchscreen + five buttons

Tue Nov 05, 2013 8:05 pm

Hello,

thanks for answer. There are few more :)
- in schematic I see pin "PWM" for backlight. Are there possibility to control brightness of backlight? How?
- how touchscreen is handled? Are there "/dev/input/event*" node for it appears?
- "kernel_update" copies precompiled kernel. How about future versions of kernel? Are there instructions how to integrate driver in future kernels?

Thanks.

stanga
Posts: 43
Joined: Thu Sep 19, 2013 9:13 pm

Re: 3.2" TFT LCD + touchscreen + five buttons

Wed Nov 06, 2013 10:01 am

Hi,

-touchscreen: there is ADS7846 compatible touchscreen controller. It is connected to SPI and uses standard driver.
-driver: there is driver source in driver_src folder. I don't have a diff file at the moment but driver compiltion is standard. compile driver, modify board file so the kernel loads the driver (also included in driver_src folder)...
-PWM: the first byte of each SPI tranfser from RPi to LCD-PI32 also controlls the backlight (please check the driver source for details). If bit 4 in the first byte is 1 the backlight is on, 0 means backlight is off. There is no hardware supported PWM, but it could be possible to simulate PWM with periodic SPI transfers.

Best regards.

User avatar
simonmcc
Posts: 177
Joined: Mon Aug 19, 2013 10:07 pm

Re: 3.2" TFT LCD + touchscreen + five buttons

Wed Nov 06, 2013 11:47 am

Are you planning to make more of these boards available?
simonmcc.blogspot.com/search/label/pi

stanga
Posts: 43
Joined: Thu Sep 19, 2013 9:13 pm

Re: 3.2" TFT LCD + touchscreen + five buttons

Wed Nov 06, 2013 12:32 pm

there will be more boards available in a few days.

Codiak
Posts: 3
Joined: Thu Nov 07, 2013 5:59 am

Re: 3.2" TFT LCD + touchscreen + five buttons

Thu Nov 07, 2013 6:05 am

This there perhaps a waiting list one can jump on?
If so I'd love to pickup a couple!

stanga
Posts: 43
Joined: Thu Sep 19, 2013 9:13 pm

Re: 3.2" TFT LCD + touchscreen + five buttons

Thu Nov 07, 2013 12:34 pm

you can drop me an email to [email protected] and I will notify you when the modules are available.

raspifari
Posts: 197
Joined: Wed Mar 20, 2013 6:11 pm
Location: France

Re: 3.2" TFT LCD + touchscreen + five buttons

Thu Nov 07, 2013 9:47 pm

Hi, what's the cpu and ram usage of the driver ? And can I show an openGL ES 3D content with hardware acceleration ?

zmogas
Posts: 6
Joined: Sun Nov 03, 2013 1:06 pm
Location: Lithuania

Re: 3.2" TFT LCD + touchscreen + five buttons

Fri Nov 08, 2013 11:34 am

Hello,

I got my LCD today.
I tried touchscreen in X. Cursor movement is very erratic: I moved stylus (or fingernail; trough protective film or protective film removed) in straight line, but cursor is constantly zipping around (distance - around 5% of screen width), if I double-click on icon then that sometimes triggers movement or "move file" dialog. Some advice how fix that?

stanga
Posts: 43
Joined: Thu Sep 19, 2013 9:13 pm

Re: 3.2" TFT LCD + touchscreen + five buttons

Fri Nov 08, 2013 1:37 pm

raspifari:

memory usage: arround 300kB.
Framebuffer is basically a block of memory which is displayed on the screen. The driver only transfers this block (or part of block which was changed) over SPI into another buffer in LCD controller. This is a very simple task and therefore CPU load is very low (haven’t measured it) and depends on the SPI triver. If SPI driver uses DMA the CPU load will be even lower. I have no experiences with openGL and HW acceleration but openGL is higher level and its task is to render the image into the framebuffer.

zmogas:

touchscreens are very susceptible to noise a lot of which comes from the power supply. Try powering RPi from another power supply. The noise can also be removed with filtering (but too much filtering decreases the responsiveness). Filtering is configured in board file:

static struct ads7846_platform_data ads_info = {
.model = 7846,
.swap_xy = 1,
.x_min = 280,
.x_max = 3830,
.y_min = 190,
.y_max = 3830,
.vref_delay_usecs = 100,

/* For a 8" touch-screen */
// .x_plate_ohms = 603,
// .y_plate_ohms = 332,

/* For a 10.4" touch-screen */
// .x_plate_ohms = 611,
// .y_plate_ohms = 325,

.x_plate_ohms = 576,
.y_plate_ohms = 366,

.pressure_max = 15000, /* generally nonsense on the 7843 */
.debounce_max = 1,
.debounce_rep = 0,
.debounce_tol = (~0),
.get_pendown_state = ads7846_pendown_state,
};

You can try these values (from another forum - haven't tested them myself):

.debounce_max = 20,
.debounce_rep = 4,
.debounce_tol = 5,

I am not sure whether this will be enough for using the touchscreen with raspbian GUI since it is supposed to be controlled with a mouse. Touchscreen oriented GUIs like android are quite different...

zmogas
Posts: 6
Joined: Sun Nov 03, 2013 1:06 pm
Location: Lithuania

Re: 3.2" TFT LCD + touchscreen + five buttons

Sat Nov 09, 2013 12:46 pm

Hello,

about "erratic cursor": I found that to "calm down" the cursor I simply must apply more pressure to toushcreen - maybe this is nature of this touchscreen.

stanga
Posts: 43
Joined: Thu Sep 19, 2013 9:13 pm

Re: 3.2" TFT LCD + touchscreen + five buttons

Sun Nov 10, 2013 9:09 am

Hi, meanwhile I have also tested the values from the previous post. They eliminate almost all of the noise (double clicks work ok) but also make touchscreen a little less responsive.

some modules are available now, I have updated the link in the first post.

raspifari
Posts: 197
Joined: Wed Mar 20, 2013 6:11 pm
Location: France

Re: 3.2" TFT LCD + touchscreen + five buttons

Thu Nov 14, 2013 8:14 pm

Hi, I've got a little problem, I can't create the new frame buffer (fb1). I have followed the instruction on http://www.hwlevel.com/PI32/index.html however it still doesn't work. Do you have any suggestions ?

stanga
Posts: 43
Joined: Thu Sep 19, 2013 9:13 pm

Re: 3.2" TFT LCD + touchscreen + five buttons

Fri Nov 15, 2013 4:40 am

you are most probably using the newest raspbian and the precompiled kernel image is for 2013-07-26 version. Since there is not much difference between them I suggest using the 2013-07-26 version.

raspifari
Posts: 197
Joined: Wed Mar 20, 2013 6:11 pm
Location: France

Re: 3.2" TFT LCD + touchscreen + five buttons

Fri Nov 15, 2013 5:27 am

Thanks for the reply, but is that possible to downgrade raspbian ? because I won't start from zero again. And with the raspbian with precompiled kernel when I do ./startx the dock bar doesn't appear, I've got only 4 icons and the screen is cropped. Any idea ?
PS : I can't shutdown the raspberry too, when I type "sudo halt" the prompt stay on will halt now and nothing happens.

stanga
Posts: 43
Joined: Thu Sep 19, 2013 9:13 pm

Re: 3.2" TFT LCD + touchscreen + five buttons

Sat Nov 16, 2013 8:18 pm

there is a new package on http://hwlevel.com with kernel 3.6.11+ and modules. It works with latest raspbian. It is possible to set DPI for the GUI, then the icons should become smaller: FRAMEBUFFER=/dev/fb1 startx -- -dpi 60

raspifari
Posts: 197
Joined: Wed Mar 20, 2013 6:11 pm
Location: France

Re: 3.2" TFT LCD + touchscreen + five buttons

Tue Nov 19, 2013 7:03 pm

Hi, I've news problems with your new package.
- black screen at startup, no shell visible
- The value of DPI change only the scale of the text, how to change the general resolution ?
- my bluetooth keyboard stops working after the kernel update

stanga
Posts: 43
Joined: Thu Sep 19, 2013 9:13 pm

Re: 3.2" TFT LCD + touchscreen + five buttons

Wed Nov 20, 2013 9:07 am

-to enable boot console add this to the end of the line in /boot/cmdline.txt
fbcon=map:10 fbcon=font:VGA8x8

see https://github.com/notro/fbtft/wiki/Boot-console

-lxde (raspbian gui) is by default configured for higher resolution screens. You will have to change a lot of settings for it to be usable on a 320x240 screen. For icon size: connect you RPi to a HDMI monitor, run file manager and go to Edit->Preferences->Display->Size of big icons. (also set all other icon sizes to minimum and google for lxde configuring).

-there must be a specific module missing. Please do dmesg and search for errors. When you find the missing module, I can (probably) compile it for you.

raspifari
Posts: 197
Joined: Wed Mar 20, 2013 6:11 pm
Location: France

Re: 3.2" TFT LCD + touchscreen + five buttons

Wed Nov 20, 2013 3:54 pm

- thank you, it worked great ! but I don't understand why
- Why I cannot change the general screen resolution like in /boot/config.txt "framebuffer_width and framebuffer_height"?
maybe I had to specify the framebuffer fb0 or fb1 but how ?
- I don't see any error just those few line about bluetooth

Code: Select all

usb 1-1.2.1.1: Manufacturer: Broadcom Corp
[ 1349.565230] usb 1-1.2.1.1: SerialNumber: 000272331046
[ 1349.746632] usbcore: registered new interface driver btusb
[ 1351.748691] Bluetooth: hci0 command 0x0c14 tx timeout
[ 1353.748697] Bluetooth: hci0 command 0x0c25 tx timeout
[ 1355.748715] Bluetooth: hci0 command 0x0c05 tx timeout
[ 1357.748703] Bluetooth: hci0 command 0x0c16 tx timeout
there is the complete prompt :
dmesg.txt.zip
(9.59 KiB) Downloaded 351 times
and how to assign a command to a button ? it's possible in the precompiled kernel ?

mendhak
Posts: 9
Joined: Mon Apr 01, 2013 2:51 pm

Re: 3.2" TFT LCD + touchscreen + five buttons

Mon Nov 25, 2013 12:27 am

Sorry for the naive question - is this only to display the Raspbian desktop?

Or can I ignore all that mirroring and just do something basic, such as draw a line. So imagine I only want to draw shapes or write text on the LCD. Is that possible? Can you point me at how I would do this?

Codiak
Posts: 3
Joined: Thu Nov 07, 2013 5:59 am

Re: 3.2" TFT LCD + touchscreen + five buttons

Mon Nov 25, 2013 1:17 am

Yes you can write directly to the framebuffer and draw graphic primitives. There are several libs available,just google framebuffer graphics raspi

mendhak
Posts: 9
Joined: Mon Apr 01, 2013 2:51 pm

Re: 3.2" TFT LCD + touchscreen + five buttons

Fri Dec 06, 2013 3:28 pm

Is there a way I can turn the backlight off or on myself? I want to be able to toggle it from code. Is this possible? (I am using Python)

Return to “For sale”