Odd sized screen - just can't find an option


Well-known member
Hi all
I have a din rail enclosure that I need to install a touchscreen to the top of.
All the PCB's are designed, so I REALLY don't want to have to start all over again with a different enclosure.

There wasn't going to be a screen, so I never gave that any thought.

Ideally, I would stick a 2.4" Nextion screen in, as I like them and they take the workload off the processor, but they don't fit.

The top panel of the DIN rail is 41.8mm x 101.6mm.

Obviously, I won't find and exact fit, and nothing is going to fill that width, but has anyone got any suggestions?
I have been trawling AliExpress, Google extra for what seems forever.

Needs to be TFT or Oled. Touchscreen. SPI comms, but I can probably work whatever comms are needed. Support for Arduino/Teensy is going to be needed (as in a library or at least driver support).

Its replacing the top PCB in the attached image.
Answers on a postcard!


  • DIN.png
    261.4 KB · Views: 25
That is the inside of that top section (where the top PCB is currently sitting). I have a DIN rail blank that I could cut the aperture out of for the screen.

Just found these.... thinking outside the box...

Round screen

I could have a PCB with two of these round capacitive screens onboard. That might look nice. Not the most efficient use of space, but hey ho...
That is the inside of that top section (where the top PCB is currently sitting). I have a DIN rail blank that I could cut the aperture out of for the screen.
The Nextion display is only 1mm wider than the hole size, so you could place a panel on/in the enclosure which would allow the Nextion to be mounted on top. Given that the Nextion is only 1/2mm taller (wider?!) than the hole it should not encroach outside the outside dimensions of the enclosure, i.e. will not hang over the edge. I hope all that makes sense. I know what I mean....
I did think of that, but it would have to be bigger to actually cover the Nextion. I would not want all the edges visible.
Also, that makes the Din rail case deeper in depth which ruins the flat run of similar modules that go with this one.

I considered trying to file a 1mm piece off the Nextion PCB, but the traces, SD card are right to the edge.
I also considered releasing the TFT off the Nextion PCB and mounting the driver PCB separately, but the actual screen is too wide.

That screen in post #2 is a great fit, but after some research.... a nightmare to drive.

Currently, it's looking like a pair of round TFT's
Ok, not too expensive, probably worth a try. Trouble is delay before you get your hands on it.
I think I might have a solution for you.
Cut slots along the long edge as shown in the picture below.
This will allow a Nextion 2.8" display to be sunk into the slots.
I believe the edges of the display will not show outside the slots, though that will depend on the wall thickness of your enclosure.
The maximum width of the Nextion 2.8" is 50mm.

EDIT: Updated, improved Model.
In fact if you are into 3d printing you could make something like this:-
BuyDisplay ER-TFT034-1 is 42.6mm × 92.8mm (display itself 38.24mm × 86.02mm, so touch panel could sit on top), with IPS panel and 412×960 resolution, and a capacitive touch panel; but is difficult to drive as it expects continuously refreshed RGB data in parallel (ST7701S controller). It would use Teensy 4.x/Micromod LCD/eLCDif subsystem in DOTCLOCK mode with up to 18 LCD data pins, but they're not exposed. So that's out.

You might use two ER-TFT020-2 (34.6mm × 47.8mm, IPS, SPI, 240×320, ST7789VW) end-to-end with an ER-TCP039-1 capacitive touch panel (I²C) on top, if 1.45mm thick 40.4mm × 105.3mm touch panel is not too large/long. (BuyDisplay hasn't released a touch panel version of the 2" IPS TFT's yet.

Or, you might use one or even two ER-TFT019-1 modules with capacitive touchscreens (each 27.0mm × 49.7mm) with the ST7789P3 controller in SPI mode, each using one SPI (data) and one I2C bus (touch). This would give an essentially 640×170 IPS display with capacitive touch. (On eBay, selecting display type with capacitive touch, the price is currently USD 11.62 each.)
For the LED backlight, use 5V with and a basic transistor-based constant current sink to drive the LEDs at around 80mA (Vf ≃ 3.1V) (two NPN BJT transistors and one resistor; or one NPN BJT transistor, two resistors, two signal diodes).

I think I myself would go for the last one. With just one if the visible area suffices, two if not, rotating one 180 degrees so the unlit area in the middle is minimized. I'd definitely design a carrier board in e.g. EasyEDA with SMD pins for Teensy 4, with the display FPC connectors and the LED driving circuitry on the carrier board.
Thanks all for the great ideas. Thanks for the cad BriComp.... appreciated.
I will tinker with my options