By continuing to use this site, you agree to our use of cookies. Find out more
Forum sponsored by:
Forum sponsored by CML

LCD cockpit displays

All Topics | Latest Posts

Search for:  in Thread Title in  
dave windymiller25/11/2020 23:27:36
avatar
162 forum posts
164 photos

Hiya Nick. The displays use spi bus so it may possible to have multiple displays. Obviously the two display programs would have to fit into the arduino memory. Similarly, one display could display two images one after the other or switched memory permitting? For two displays I would have one arduino each and these could be connected by i2c bus to talk to each other if req. Lot of effort? Yes but interesting.

Roger Adams26/11/2020 10:26:16
95 forum posts

Nick, the answer regarding multiple displays is probably.

The display does not use the i2c bus which would allow each display to have different address but uses SPI serial interface. Some st7789 devices have a chip select (CS) pin, with these devices you can connect multiple devices but only communicate with one at a time by setting the CS pin low on the target and high on the other(s).

At least that is the theory. I’ve never done this but understand the theory. Googling around there is a short video demonstration of an arduino controlling 2 displays, but no explanation of how. I also found an unanswered forum question where somebody had set up 2 displays but could not get them to work other than individually. Each worked on its own but neither worked when the other was plugged in. My immediate thought on this problem is that the arduino may not provide enough power from its VCC pin to control the additional display, but that is pure speculation.

Personally I think it should be perfectly possible but will need an understanding of how the library controls the CS pin, and may need to be powered other than by the arduino.

with regard to to processing capacity of the arduino, in the example of this thread the arduino is basically doing nothing most of the time. With static displays like this the arduino is drawing the display(s) then folding its arms. Even making the displays dynamic, the arduino will not be very busy and re-drawing is not time critical. This is basically a trivial loading for the arduino. As has already been said the only real limit is the programming space within the arduino. This is in practice quite significant, however it’s usage is affected very much by programming technique.

My advice would be get a few fly leads, and maybe a bread board so you can experiment with the wiring, and play. The help of somebody who understands C++ coding to use as a mentor would be very useful.

Former Member26/11/2020 11:36:08
2077 forum posts

[This posting has been removed]

Andy Joyce26/11/2020 14:30:09
avatar
426 forum posts
69 photos

Given 1 inch displays will be too large for the majority of installations are these LCD displays available in smaller sizes?

dave windymiller26/11/2020 20:08:55
avatar
162 forum posts
164 photos

The only smaller display i know about is 0.96" but more rectangular with 160 x 80 pixels (much lower res!).

The best bet is to partially cover up the 1" 240x240 screen !

 

There is a 0.91" display but at 128 x 32 and mono colour (Blue or white!)

 

Edited By dave windymiller on 26/11/2020 20:12:35

FlyinFlynn27/11/2020 11:26:05
avatar
208 forum posts
102 photos

If a 1" display is too large then perhaps you could do what the flight simmers do with their home cockpits - have a single display with instruments displayed in different positions on the screen and mask them with a cover -

display.jpg

Your problem then becomes resolution of the display! Those 0.96" displays are only 128x64 pixels ....barely enough for even a single instrument. A 7" panel would do though typically 1024x600 pixels...several instruments all driven from a single Arduino .

Andy Joyce27/11/2020 12:17:51
avatar
426 forum posts
69 photos

Thanks All, just confirms what my brief search found on ebay for these types of display. Will continue to watch this thread with interest.

Do like the look of your flight sim Flynn. Briefly looked at the new MS flight sim package the other day but my PC is not close to the minimal requirements for the code.

FlyinFlynn28/11/2020 15:30:44
avatar
208 forum posts
102 photos

....it's not my simulator Andy.....just a photo off the web. My simulator is based on small jets so it has an FMS and autopilot panel....this one is based on an old 172 Cessna ...pre G1000.

dave windymiller28/11/2020 20:43:55
avatar
162 forum posts
164 photos

After a good attempt at programming the weather, i decided it wasnt the way. Instead, i used an imported bitmap (despite my initial comments re such methods!)

I opened up the image in post2 cut down it down to just the weather, removed the lines, text etc and saved it as weather.jpg with a size appropriate to the display.

weather.jpg

Using this site you convert the .jpg to a bitmap text file with a ".c" format (other sites are available!!!)

Rename the file weather.h,

Copy it into the arduino directory with the files for the display,

From the arduino program, use Sketch - Add file - then select weather.h. This adds the file as an additional tab which you can open.

Add the line to the main program

#include "weather.h"

below the other #include lines

Add (below the line tft.fillScreen(BLACK); )

tft.drawImageF(137,46,103,88,weather) ;

137, 46 is the location of the top left of the corner of the bitmap, 103,88 is the size of the image (get this from looking inside weather.h).

My file is 103 by 88 which results in 99% space being used when it compiles. Any bigger and the compile fails saying memory space exceeded!!

pb284254.jpg

As we drew the bitmap early on in the code, the programmed lines are on top. As you can see i have had to shrink my storm to fit the arduino memory (its still 40 miles across if i understand the display correctly)! Thats the good thing about storms, they vary! If i used an ATmega arduino, i could have had a bigger storm.

You can see the black dots that made up the dashed lines. All i need to do is change them from black to suit the background which might not be be not "green" but a variation of (the image editing software used may tell you the RGB colours).

Nearly there!

 

Edited By dave windymiller on 28/11/2020 20:53:21

Edited By dave windymiller on 28/11/2020 21:07:24

Gary Manuel28/11/2020 20:51:05
avatar
2475 forum posts
1564 photos

Forgive me fellas. Apart from being a very satisfying passtime, is there any advantage of using an Arduino / LCD screen over an inkjet printed display?

Gary Manuel28/11/2020 20:55:53
avatar
2475 forum posts
1564 photos

PS following and learning.

dave windymiller28/11/2020 21:02:09
avatar
162 forum posts
164 photos

Disadvantages and advantages. In bright sunlight a inkjet one would probably win!

Its not that difficult to make the screen change eg make numbers or lines flash different colours or even move things about. Not being a pilot my knowledge of such displays is limited but im sure someone out there can produce some clever stuff.

I was going to introduce that next!!!

dave windymiller28/11/2020 21:17:58
avatar
162 forum posts
164 photos
Posted by Steve J on 26/11/2020 11:36:08:

I would suggest that you consider moving to a 32 bit processor, e.g. an ESP32 dev board or STM32 'Blue Pill' with an external 3.3V supply. They are a significant step up from the Uno/Nano in terms of processing power, flash and RAM.

Sorry Steve, i meant to comment earlier. Thanks i will look at these as a new toy to play with! Certainly look cheap!

 

Cheers

Dave

Edited By dave windymiller on 28/11/2020 21:19:35

Gary Manuel28/11/2020 21:18:05
avatar
2475 forum posts
1564 photos

I'm no pilot either. What you've done so far looks great to me. You've hit the nail on the head by adding movement or changing (flashing) the image. That's something that you can't do on a printout. That's what will impress the observer.

Gary Manuel28/11/2020 22:17:16
avatar
2475 forum posts
1564 photos

How about a sweeping line, like a windscreen wiper traversing the screen. That would look great. Apologies to purists.

Ron Gray29/11/2020 06:29:35
2533 forum posts
1013 photos
Posted by Gary Manuel on 28/11/2020 20:51:05:

Forgive me fellas. Apart from being a very satisfying passtime, is there any advantage of using an Arduino / LCD screen over an inkjet printed display?

Here’s the one on my SIG Rascal, nowhere near as clever as Daves’!

Lights off

fullsizeoutput_1409.jpeg

Lights on

fullsizeoutput_140a.jpeg

FlyinFlynn29/11/2020 11:46:28
avatar
208 forum posts
102 photos
Posted by dave windymiller on 28/11/2020 20:43:55:

You can see the black dots that made up the dashed lines. All i need to do is change them from black to suit the background which might not be be not "green" but a variation of (the image editing software used may tell you the RGB colours).

Nearly there!

Would it not be easier to just go back and delete the relevant black blobs rather than re-painting them green? You also may not have the memory room to make new green circles. I notice that the white dashes need to stay visible.

Brilliant solution to the storm...I couldn't see a way of generating the fuzzy edges either.

dave windymiller29/11/2020 20:44:00
avatar
162 forum posts
164 photos

If i just delete the blobs, the white line become continuous. All i did was change the colour of the blob as originally programmed to match what was below, not re paint them a second time!

Ive finished this display and figured out how to get a better photo too!

pb294255.jpg

The problem i have re animation is knowing what should change and how fast etc. Im sure theres video available to assist such projects.  To give a small amount of (made up) animation i have made the 84 and the green arrow toggle red/green on a 1 sec basis by adding this code to the void loop() area

void loop() {

// green 84
tft.setTextColor(GREEN); tft.setTextSize(2) ;
tft.setCursor(200,15)
tft.println("84" ) ;

// red arrow
tft.drawLine(10, 35, 25, 45, RED) ;
tft.drawLine(10, 35, 12, 41, RED) ;
tft.drawLine(10, 35, 17, 35, RED) ;

delay (1000) ;

// Red 84
tft.setTextColor(RED); tft.setTextSize(2) ;
tft.setCursor(200,15) ;
tft.println("84" ) ;

// green arrow
tft.drawLine(10, 35, 25, 45, GREEN) ;
tft.drawLine(10, 35, 12, 41, GREEN) ;
tft.drawLine(10, 35, 17, 35, GREEN) ;

delay (1000) ;
}

This approach is simple but limited as the program is governed by 1 second waits. A better way is by use of the Millis() command (see here) rather than delay which would allow various and independent flashes or other timed events.

As for moving or sweeping, older weather displays i understand used to sweep and the monochrome "weather" would be re-brightened as the radar beam line swept past it. Its possible to do this but would be hard work with a bitmap involved. If my mig 144 (or similar given that its still secret!) has such a display i would have a go. In the mean time ive got several other projects including a 1/7 f86 sabre which of course has no such displays (dohh!)

Hopefully theres enough info in this thread for others to have a go and get even better results!. Feel free to post results here.  

There are real time compass chips, xyz accelerometers and all sorts of other fancy modules that are available.  You could even build a working attitude display! Skys the limit!

Cheers Dave

 

Edited By dave windymiller on 29/11/2020 21:15:41

Max Z30/11/2020 07:40:44
avatar
568 forum posts
251 photos

Hi Dave,

I am following your efforts with interest. A while ago I have been dabbling with monochrome displays, and at some point came across THIS useful internet tool to convert pixel pictures into a matrix of hex codes that could be used directly with the drawBitmap command (U8glib library).

Maybe it is also useful with the colored images you are creating?

Keep up the good work, cheers,

Max.

dave windymiller30/11/2020 21:14:39
avatar
162 forum posts
164 photos

Hiya Max. Thanks, i will look at it. Looks like a very similar tool to what i used.

One thing i wanted to add to this thread is the list of commands available can be found in:-

**LINK**

Cheers Dave

All Topics | Latest Posts

Please login to post a reply.

Support Our Partners
Slec
Sussex Model Centre
electricwingman 2017
CML
Subscribe now
Advertise With Us
Sarik
Latest "For Sale" Ads
NEW POLL - has the pandemic altered your event safety perceptions?
Q: Has the covid pandemic deterred you from attending shows and events in 2021?

 No, I'll be attending just as many as I usually do
 No, but I'll choose my event with greater care
 Yes, I'll attend fewer events going forward
 Yes, I wont attend any where previously I have

Latest Reviews
Digital Back Issues

RCM&E Digital Back Issues

Contact us

Contact us

Magazine Locator

Want the latest issue of RCM&E? Use our magazine locator link to find your nearest stockist!

Find RCM&E!