Jump to content

Using LCD/OLED displays


Madsing

Recommended Posts

I played around with it for a bit but couldn't get it to compile. I was waiting for some displays to arrive in the mail and they just came yesterday so I'll give it a honest try this weekend.

Link to comment

I just added "my" ST7789 libraries to the Github repository. That display was not supported by Adafruit when I wrote the application, so I used these libraries that I modified to improve the bitmap transfer speed (the new function is void Arduino_ST7789::pushColorBuf(void *buf, size_t count))

 

Link to comment
On 8/16/2019 at 9:25 PM, Madsing said:

I just added "my" ST7789 libraries to the Github repository. That display was not supported by Adafruit when I wrote the application, so I used these libraries that I modified to improve the bitmap transfer speed (the new function is void Arduino_ST7789::pushColorBuf(void *buf, size_t count))

 

 

Madsing - are all wires covered up by the roof top while being powered on? I did see in your photo that you did have a lot of wires sticking out of the roof..

 

Thanks

Link to comment

Yes. The photos showing wires were taken during developm ent but I eventually put back the top plastic covers of the four buildings (they are each secured with two screws). Everything fitted under the roof, with the exception of a connector that was slightly too high but did not prevent attaching the tracks of the overhead station.

 

IMG_6075.thumb.JPG.191f9ff8d7a86140028773fa7586bf93.JPG

  • Like 2
Link to comment

Hi...You either use setCursor(x, y) with each print() Or you use one setCursor(x, y) and print(), println() to move to the next line.For a small display,  you might just use trial and error.
In practice,   you draw a screen once. Then update a small number of fields.Different libraries have different facilities for formatting and overprinting a field.
The simplest is to repaint the field background and print the fresh contents.
 

us pcb assembly

Edited by VerlaHiltz
Link to comment

@Madsing was about to start ordering the pieces listed and then had second thoughts of my ability to actually do this lol.  Maybe you  should start selling these...I'd be a buyer

Link to comment

I have started other projects using small LCD displays. First is a tourist information display such as this one: https://www.shibuyabunka.com/blog.php?id=882&wovn=en

The good news is that more powerful modules are now available and I have been able to make it with much less components:

  • An ESP32 (Lolin32) module. It is much more powerful than the chip used in Arduinos, but it is compatible with the standard Arduino IDE. With 4BM flash memory directly on the module, I have been able to upload small short videos with no need for an additional SD card.
  • A 0.96" 80x160 RGB IPS display with ST7735 driver (only the top 80x80 pixels are used and visible)

Both modules are available from AliExpress for a few dollars.

 

This is the result:

 

 

  • Like 5
  • Thanks 1
Link to comment

The next project will be a "huge" display for the Marui building (from Kato).

 

IMG_1993.thumb.jpeg.72783f3104a102be937a20bc040d689a.jpeg

 

I will use:

  • A 2.2" 320x240 (240x320 portrait) ILI9341 TFT display

  • A Raspberry Pi Zero W

The Raspberry Pi is much more powerful than Arduinos, but the "Zero" is still very compact. The Raspberry Pi is able to drive TFT displays and play mp4 videos natively, no difficult programming is required.

 

 

  • Like 8
  • Thanks 1
Link to comment

Oh wow.... After you truly amazed us with your skills at the bus layout this brings it up another notch! Man your skills are really impressive! Wished i had some moving displays like yours too! That tourist board is very neat indeed, and those head/ tail lights on the vehicles with the blinking lights on the work zone.... simply... wow.... 

Link to comment

Really late to the game but my Tomix overhead station arrived in the mail so I'm finally getting around to this project. I'm curious how you managed to separate the display from the PCB. They're cheap so it wouldn't kill me if one broke but I'd love to figure this out with no sacrifices. haha

Link to comment

Ah, very good question! I have tried many ways, none of them proved easy and safe, so you have to be patient and extra careful, but I didn’t break any display along the way (a good sign). This is what I have tried:

  • Use a knife to cut the double side tape on the edge. You don’t have to be afraid of damaging the PCB under the display, there is usually no track there. It works ok on very small displays, not with larger ones. 
  • Use a flat piece of styrene, or painting spatula. This didn’t really work.
  • Use a toothpick. Insert it between the display and the PCB on one end, then careful rotate it so that it moves by itself slowly towards the other end of the display. This worked very well for me, I recommend you try this first.

I hope this helps. 

  • Thanks 1
Link to comment

Great projects. Is it possible to use ESP8266 instead of Arduino Mega for station display? And how about update of Marui building display? I read your blog and very impress, and I found the details here. Many thanks for you kindly sharing.

 

 

Link to comment
On 9/3/2020 at 4:42 AM, Madsing said:

Ah, very good question! I have tried many ways, none of them proved easy and safe, so you have to be patient and extra careful, but I didn’t break any display along the way (a good sign). This is what I have tried:

  • Use a knife to cut the double side tape on the edge. You don’t have to be afraid of damaging the PCB under the display, there is usually no track there. It works ok on very small displays, not with larger ones. 
  • Use a flat piece of styrene, or painting spatula. This didn’t really work.
  • Use a toothpick. Insert it between the display and the PCB on one end, then careful rotate it so that it moves by itself slowly towards the other end of the display. This worked very well for me, I recommend you try this first.

I hope this helps. 

 

I actually used dental floss in the end and it worked perfectly. It was thin enough to fit underneath and I sawed back and forth through the tape. The floss broke once but otherwise, flawless.

  • Like 1
  • Thanks 1
Link to comment
8 hours ago, GeorgeHInch said:

I actually used dental floss in the end and it worked perfectly. It was thin enough to fit underneath and I sawed back and forth through the tape. The floss broke once but otherwise, flawless.


george that’s brilliant! Have to remember that!

 

jeff

Link to comment
19 hours ago, xten said:

Great projects. Is it possible to use ESP8266 instead of Arduino Mega for station display? And how about update of Marui building display? I read your blog and very impress, and I found the details here. Many thanks for you kindly sharing.


Yes! If I had to do it again now I would use and ESP8266 or an ESP32. They have several advantages over Arduino for this project:

  • they have more memory (more flash to store images or data and more sram)
  • their GPIOs are 3V3 compliant, so directly compatible with LCD displays
  • I would try to use the new TFT_eSPI library from Bodmer (on GitHub here: https://github.com/Bodmer/TFT_eSPI). It supports Japanese fonts and antialiasing.

I have not worked on the Marui building since the post above, but I will definitely do it one of these days and post about it.

Thanks!

Link to comment
2 hours ago, Madsing said:


Yes! If I had to do it again now I would use and ESP8266 or an ESP32. They have several advantages over Arduino for this project:

  • they have more memory (more flash to store images or data and more sram)
  • their GPIOs are 3V3 compliant, so directly compatible with LCD displays
  • I would try to use the new TFT_eSPI library from Bodmer (on GitHub here: https://github.com/Bodmer/TFT_eSPI). It supports Japanese fonts and antialiasing.

I have not worked on the Marui building since the post above, but I will definitely do it one of these days and post about it.

Thanks!

 

Thank you very much for your reply. I'm studying MCU and DCC automation and found a lot of confusing information, terms, components because my English is poor. Your layout and projects are my inspiration. 

I'm your big fan.

 

 

Link to comment

Hello xten,

Thank you 😊. Don’t hesitate to post about what you are doing and ask questions. That’s how we all learn. There are a lot of people on this forum willing to help.

 

  • Like 2
Link to comment

I'm not 100% sure what I'm doing wrong (although I for sure am doing something.) Whenever I try to compile the code as written from Github with no modifications I get an error of "unknown type name 'uint16_t'". This seems to be triggered from the array "const uint16_t yukariBmpWidth[] = {6, 18, 76, 73, 38, 76, 73, 38, 1400};" but after playing around with it for a day and reading what you've posted here I still haven't resolved this.

 

I'm not sure if I'm failing to make a selection in one of the #defines or if I'm missing a library. Any suggestions as to what my problem is would be greatly appreciated. I've included the log and a screenshot of the editor.

Screen Shot 2020-09-14 at 21.37.28.png

Arduino_log.txt

Link to comment

The log file shows that you are trying to compile the file YukariScheduleFonts9px.c. This is not correct. 

The entire Arduino code is in the two .ino files that are in the Yukari-Station-Schedule-Display folder. The file YukariScheduleFonts9px.c should not be opened or included in the project. It will be used only if you want to modify the schedule displayed. Just close it and try to compile again. 

 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...