IBM PS/2 Color Display 8512 - TFT 2.8 inch + ESP32 mod

2.8 inch TFT screen remix for IBM PS/2 Color Display 8512
12
22
0
483
updated December 5, 2024

Description

PDF

Finally I had time to update the model with a 2.8 inch TFT that looks pretty much neat. I will not delete the 2.4 inch version because it is much easier to assemble for those who don't have even basic knowledge in electronics and don't want to solder wires.

The updated model introduces new features:

1) Touch panel (possibility to control the software by touching the screen).
2) Optional possibility to control the TFT backlight brightness from the software using PWM.
3) Optional realistic green power indicator using a green LED.

DEMO AND ASSEMBLING INSTRUCTIONS.

PRINT SETTINGS.

You need to download and print all the files from the standard version, except CRT and FRONT-GRAY-FRAME, they are replaced with the files from this remix.

CRT:
first layer 0.28 mm (this is IMPORTANT!!!)
other layers 0.20 mm

GRAY FRAME:
all layers 0.12 mm

PARTS TO BUY.

I provide the aliexpress links to the cheapest items I could find. The price I mention here already includes shipping fees to my country and it may differ from shipping fees to other countries. Depending on your country, maybe you can buy it cheaper in ebay, amazon, or even in local electronics stores, so look in different shops and compare prices...

1) ESP32 30 pin DevKit
$3.5: https://aliexpress.com/item/1005002410521023.html?sku_id=12000028255222863
Any other MCU can be used if you redesign the mount for it manually.

2) HP28008 IPS 2.8 inch 40PIN SPI TFT LCD RGB565 ST7789V GT911 IC 240(RGB)*320
$16.1: https://aliexpress.com/item/1005004628969756.html?sku_id=12000029895642483
The model can be compatible with other 2.8 inch TFT screens, but you will have to slightly adjust the hole and the central adjustment for your TFT manually because different 2.8 inch screens have slightly different dimensions and view area alignment. The difference may be in just 1-2 mm, but still you will have to redesign the hole for it in order to position the view area exactly in the center of the model. It's not a big problem because most suppliers provide a PDF with specifications where all the dimensions are shown (you can request the specs from the seller). In case you don't have specs, you can measure the dimensions yourself using a caliper. To say the truth, it's not the best IPS screen that I saw because it changes contrast in different view angles, so if you find anything better for affordable price, let me know and maybe I'll also buy it :) Just in case this TFT is not for sale anymore, here are other models that I wanted to try. They work in SPI mode only and have 18 pin cable instead of 40 pin cable, so you will have to buy a 18-pin adapter for it and redesign the mounts for it in the model.

NONAME ST7789-IPS-With CTP (SPI only, 18 pin cable).
$11.09 https://aliexpress.com/item/1005007275702692.html?sku_id=12000040032820461

DUOWEISI HC28030 (SPI only, 18 pin cable).
$12.31 https://aliexpress.com/item/1005004767497545.html?sku_id=12000030398703987

UICPAL IPS HC28030-DCT (SPI only, 18 pin cable).
$14.72 https://aliexpress.com/item/1005005432779886.html?sku_id=12000033054052972

SURENOO SHP0280B-240320 (SPI only, 18 pin cable).
$20.67 https://aliexpress.com/item/1005004826120182.html?sku_id=12000030631067183

There are also many others, I listed just a few of those that are stated to be IPS (non-TN) screens. I don't recommend to buy TN screens for this model: they are really cheaper, but they are all designed for vertical orientation and they look rather unattractive in horizontal orientation (distort colors).

3) 40 pin 0.5mm FFC FPC to DIP 2.54mm adapter.
6 pin 0.5mm FFC FPC to DIP 2.54mm adapter.

You need only one 40 pin (or 18 pin if you buy a SPI-only TFT) and one 6 pin for the touch panel. Buy it without headers for soldering or with headers for dupont female wires.

$2.93: https://aliexpress.com/item/1005001634274130.html?sku_id=12000016912613219 (5 pcs 40-pin, without headers)
$1.25: https://aliexpress.com/item/1005001634274130.html?sku_id=12000016912613223 (5 pcs 6-pin, without headers)

$3.12: https://aliexpress.com/item/1005007004032863.html?sku_id=12000039019188615 (40 pin, with headers)
$2.03: https://aliexpress.com/item/1005007004032863.html?sku_id=12000039019188627 (18 pin, with headers)
$1.22: https://aliexpress.com/item/1005007004032863.html?sku_id=12000039019188619 (6 pin, with headers)

4) Wires: use anything you can find. I used a few D0.5mm copper wires to feed TFT backlight circuit and cheap 26awg D0.4 mm wires for anything else.

Optional:

5) Micro SD card reader module.
$0.62: https://aliexpress.com/item/1005007614788940.html?sku_id=12000041509875477
The 3D model is compatible with both long version (TF card module) and short version (mini TF card module). I bought the mini version because it's twice cheaper and it has unsoldered headers, so you can solder wires at once. If you buy the long version, use plastic spacers to mount it (the short version does not need spacers).

6) 2.54 Female Single Row Pin Header
$1.15: https://aliexpress.com/item/1005001914815306.html
It may be useful to quickly attach/remove ESP32 DevKit during assembly and maintenance.

7) D3mm green LED and 70-277 Ohm resistor.
$0-0.3: I soldered the LED out from a broken car DVR, so it's free for me and I don't know its exact model. If you don't have green LEDS, try find something here:

https://aliexpress.com/wholesale?SearchText=3mm+green+led&isFreeShip=y&SortType=price_asc

My LED works well within 1.9-2.2V voltage range. Different LEDS require different voltage. Before connecting it, always find out the working voltage in the LED specs. If you don't have the specs, test it starting from 0V and gradually increase the voltage to reach required brightness. If the green LED turns yellow, reduce the voltage immediately! If you feed a 2V LED from a 3.3V ESP32 pin, use a resistor to drop the voltage:
LED:
2.0V  4.7mA    R=277 Ohm
2.1V  9.7mA    R=124 Ohm
2.2V  15.6mA   R=70.5 Ohm
I tested it with various voltages and found that something around 2.0V looks the most authentic for indoor use:
2.01v 5.85mA   R=220 Ohm
2.02v 6.40mA  R=200 Ohm
So I used a 200 Ohm resistor. Later you will be able to reduce its brightness even more using PWM, so it's better to make it slightly brighter than too dark at this point.

You can even use a multicolor LED if you want to add more notification features and don't care about the authentic look of the monitor (the original LED is green only). Read update at the end of this page.

8) Logic-level MOSFET with 150+ mA current + 100 Ohm resistor + 10KOhm resistor. This TFT is rather bright for indoor use at 3.3V and it will strain the eyes in the evening, so I recommend you to add the brightness control. You will control the LCD backlight brightness with PWM using a MOSFET as ESP32 allows only 40mA current per pin while the TFT backlight requires 90mA.  Besides, the producer suggests 3.1V as the optimal voltage for the TFT backlight, so the MOSFET will drop the voltage from 3.3V to 3.0-3.1V with its internal resistance and thus prolong the backlight life. I used a 2N7002K MOSFET because it's the cheapest I could find in local stores ($0.16), but it's a really small SMD component that is not easy to deal with, so I recommend you to try something bigger like 2N7000 that is basically the same, but bigger and easier to work with. I've bought my MOSFET in a local store, but you can find some on aliexpress:

https://aliexpress.com/wholesale?SearchText=2N7002K&SortType=price_asc
https://aliexpress.com/wholesale?SearchText=2N7000&SortType=price_asc

PARALLEL VS SPI INTERFACE.

This TFT supports both SPI and 8/16 bit parallel interfaces. ESP32 supports only SPI and 8-bit parallel mode. Initially I thought that setting the TFT to parallel and Micro SD to SPI will increase performance, but I was surprised that I was wrong (there is no performance gain in loading and showing JPG files from a micro SD card), so I ended up with the SPI solution. However, you may gain 1.5-2 times better performance if your software works with graphics a lot, for example draws text, rectangles, circles, etc. Here are my benchmark results.

Parallel 8-bit:

Show 320x240 image from memory: 31329 microseconds.
Read and show 240 lines of a JPG 5.5 Mb 8 Megapixel from a micro SD card: 1.606 sec.
Read and show a JPG 35 Kb 320x240 from a micro SD card: 0.371 sec.

10:27:41.749 -> Bodmer's TFT_eSPI library Test!
10:27:42.314 -> Benchmark                Time (microseconds)
10:27:45.635 -> HaD pushColor            279351
10:27:45.834 -> Screen fill              20140 (0.020s, 50fps)
10:27:46.963 -> Text                     8531
10:27:47.195 -> Pixels                   143457
10:27:47.527 -> Lines                    160324
10:27:47.660 -> Horiz/Vert Lines         9607
10:27:47.759 -> Rectangles (outline)     6115
10:27:48.158 -> Rectangles (filled)      241322
10:27:48.290 -> Circles (filled)         29224
10:27:48.423 -> Circles (outline)        13772
10:27:48.523 -> Triangles (outline)      10035
10:27:48.755 -> Triangles (filled)       80880
10:27:48.888 -> Rounded rects (outline)  9876
10:27:49.253 -> Rounded rects (filled)   242111
10:27:49.353 -> Done!

SPI 40Mhz:

Show 320x240 image from memory: 44082 microseconds.
Read and show 240 lines of a JPG 5.5 Mb 8 Megapixel from a micro SD card: 1.582 sec.
Read and show a JPG 35 Kb 320x240 from a micro SD card: 0.376 sec.

07:09:28.374 -> Bodmer's TFT_eSPI library Test!
07:09:28.817 -> Benchmark                Time (microseconds)
07:09:32.371 -> HaD pushColor            511204
07:09:32.604 -> Screen fill              31183 (0.032s, 32 fps)
07:09:33.767 -> Text                     15420
07:09:34.098 -> Pixels                   223975
07:09:34.563 -> Lines                    265838
07:09:34.729 -> Horiz/Vert Lines         14368
07:09:34.862 -> Rectangles (outline)     8920
07:09:35.361 -> Rectangles (filled)      324171
07:09:35.527 -> Circles (filled)         46652
07:09:35.660 -> Circles (outline)        26398
07:09:35.792 -> Triangles (outline)      16675
07:09:36.091 -> Triangles (filled)       112332
07:09:36.224 -> Rounded rects (outline)  16574
07:09:36.689 -> Rounded rects (filled)   326730
07:09:36.789 -> Done!

WIRING.

The following is for SPI mode only. For parallel connection, see example in tft_espi library, but be aware that there are not enough pins in ESP32 to connect something more that a TFT to it. If you use parallel connection, DB15=TFT32 and DB08=TFT25. 

"ANY" means that you can use any unused pin except the ones that shouldn't be used :) Pins 35, 34, 39 and 36 are input only (can't be used to dim the TFT backlight or LED using PWM). The values that I used are given in brackets.

TFT:

name    esp32    tft
GND     GND      5
VCC     3V3      6
VCC     3V3      7
CS(SS): ANY(15)  9
SCK:    18       10
DC      ANY(2)   11
MOSI:   23       13
MISO:   19       14
RST     EN       15
LED-A   3V3      33
LED-K   GND      34
IM0     GND      38
IM1     3V3      39
IM2     3V3      40

Touch:

name   esp32   gt911
GND    GND     1
RST    ANY(17) 2
INT    ANY(16) 3
SDA    21      4
SCL    22      5
VCC    3V3     6

Micro SD:

name   esp32   SD
GND    GND     GND
3V3    3V3     3V3
CS     ANY(4)  CS
MOSI   23      MOSI
CLK    18      CLK
MISO   19      MISO

Green LED:

LED Anode   - ESP32 pin ANY(32)
LED Cathode - 200 Ohm Resistor - GND

MOSFET:

Gate: ESP32 ANY(5)
Source: GND
Drain: TFT pin 34

SOFTWARE.

Start your experiments with examples from tft_espi library and some day you will understand what you want to use it for. I use it as a photo frame to show random JPG photos of my travel days from a micro SD card.

Control the TFT backlight brightness using PWM on pin 5. Control the green LED brightness by using PWM on pin 32. The most pleasant values for my eyes when using indoors are 50-100 of 255 for backlight and 128 of 255 for the green LED. Power consumption is less than 1 Watt with these values, so the device can be used continuously without increasing the electricity bills noticeably :)

UPDATES.

I decided that I need a multi-color LED in my project. So that not to change a lot in the existing printed stuff, I ordered 3 mm matte Green-Red LEDs with common cathode ($0.8 for 50 pcs pack and free shipping). The red color turned out to be much brighter than the green color in this LED, so I had to compensate it with resistors to reach approximately the same amount of light from both channels. If I'm not mistaken, after a series of tests I used 220 Ohm for the green (5.2mA) and 2.2 KOhm for the red (0.63mA).  I soldered resistors to the pins of the LED so that not to redesign my custom PCB. Now the green anode resistor goes to ESP pin 32 and the red anode resistor goes to ESP pin 33. The common cathode goes to GND. I had to enlarge the led hole a few millimeters with a dremmel because the pins of this LED are wider than the pins of standard 3 mm LEDs.

Yet another problem was that the green dummy PETG LED does not transfer the red color at all! I had to print it again from transparent PETG and paint only the visible front surface of it with a green marker (because it is really green even when the monitor is turned off). This solution doesn't prevent the red color from passing through. Good PWM values for indoor use would be 30-50 of 255 with the transparent dummy LED and the resistors mentioned above. Now I can get pure green and pure red, as well as yellow and orange colors as a mix of green and red. 

This is enough for my needs. If you need more, there are 3-colors RGB leds, but they are larger and will need major redesign of the LED hole in the model. I can recommend rectangular 2x5x5 mm RGB LEDs ($0.6 for 10 pcs pack and free shipping) as they are easier to install in this model than typical round D5 mm RGM LEDs. The values for these LEDS for 3.32V voltage to get average brightness level on all 3 channels are:
Red: 2.00V, 8.87mA, 149 Ohm resistor.
Green: 2.40V, 2.11mA, 436 Ohm resistor.
Blue: 2.72V, 2.11mA, 284 Ohm resistor.
I didn't install this LED into the model though because I'm lazy and preferred 2-colors LED as it was easier and faster to install :)
 

IF YOU MADE A WORKING DEVICE, POST A MAKE PLEASE :)

 

Model origin

The author remixed this model.

Differences of the remix compared to the original

Added 2.8 inch TFT, ESP32, micro SD card reader, power LED.

License