Jump to content

LCD cockpit displays


Recommended Posts

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 .

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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!!!

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 2 weeks later...

Hi Dave,

My display came today. Thanks very much for the sketch files you emailed across. I flashed it to the arduino and it fired up straight away. My phone camera doesnt do it justice (cant get rid of the glare) but looks exactly the same as yours.

Is it possible to drive more than one screen from a single arduino to have the different cockpit displays running at once?

Craig

img_5776.jpg

Link to comment
Share on other sites

A few have asked if its possible to get the arduino to do 2 screens. Normally devices are activated with a CS or chip select signal. These displays have a CS signal but its not connected to the pins you can access. Its possible to hack them but thats not for the light hearted see **LINK**

The other issue is both displays have to fit onto the aduino so the weather display i did cannot share another display due to the size of the weather bitmap used!

However:-

I have been playing and found out that two displays connected to the same set of pins will both display an image (comms only going one direction to the screen !)

By adding a 4.7k resistor in circuit of one of the displays SDA lines (to pin 11 of the arduino), the display isnt affected. If i now connect another pin say pin 3 to the other end of the resistor (directly to the SDA of the display), i can effectively short it down to 0v stopping the display responding to further instructions.

Using code like this, a second display can be written but the first screen continues to display the first display

void setup(void)
{

pinMode(3, INPUT);

// draw first image to both screens

pinMode(3, OUTPUT);
digitalWrite(3, LOW);

// draw second image to only one screen

}

Initially, pin 3 is set to be an input eg is open circuit (so doesnt affect the drawing of both screens)

after the first display is drawn, the pin is changed to be an output and set to 0v

the second display only updates onto the second screen!

Obviously, only the second display can do animation as the first one is fixed!

This is a rough and ready way to achieve this (im sure there are more elegant ways!)

Here is both the horizon and weather displays (less the .bmp to make it smaller) on one arduino!

20201216_171939.jpg

Link to comment
Share on other sites

Ive looked into the dual spi thanks Mike but at this stage its a bit deeper than i can manage with editing display library routines. Until recently, the last processors i played with were Z80 and 8088 chips some 30 yrs back - im a bit rusty!!

The previous way to get 2 screens would appear to be Arduino type sensitive with at least one person who couldnt get it to work when a resistor was used in the D11 line. Ive tried a variety of approaches with no extra hardware but found them unreliable and screen type sensitive (having two different screens myself).

Below is another method circuit diagram thats a bit more elegant and robust ! It needs a slight code change and a 74HC00 chip which is only some 50p! I personally think its easier to have one screen per arduino!

Happy xmas folks

------------------

void setup(void)
{

pinMode(3, OUTPUT);

digitalWrite(3, HIGH); // enable D11 to both screens

// draw first image to both screens

digitalWrite(3, LOW); // turns off D11 to one screen

// draw second image to only one screen

}

2screens.jpg

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...