Close
0%
0%

Arduino Oled Picture Frame

0.95" Oled display, SD card and arduino display bitmaps

Similar projects worth following
OLED 0.95", SSD1331, 96x64 display driven by Arduino Uno or Nano to display pictures from SD card. The SD is interfaced by the main ATMEGA ISP and the Oled interfaced by USART as ISP. The code reads the SD 96 bytes at a time and streams them to the Oled. Inline C is used to set up the USART ISP, the code also initialize the Oled.
The code displays all bmp files on the SD for 10 sec each. bmp files are 96x64 16 bit color (5:6:5)
1K resistors are to reduce 5V outputs of Arduino to 3.3V Oled input.

To setup the SD:

Format the card with FAT32.

Create image file using MS Paint or another program, image size 64 pixels high by 96 pixels wide.

Name the files "1.bmp", "2.bmp", etc.

Save the files as 24 bits bmp.

Convert bitmap to 16 bit BMP file, 5:6:5 top to bottom. I used the online converter: https://online-converting.com/image/convert2bmp/

Add the files to the root folder of the card (don't use a directory).

ino - 4.03 kB - 07/28/2021 at 18:15

Download

  • 1
    Circuit diagram

View all instructions

Enjoy this project?

Share

Discussions

projecter wrote 08/10/2021 at 20:01 point

Thank you Starhawk.

For 640x480 pixels the screen  is at least 3.5". With this 0.95" screen the max size is 96x64.  The Arduino Nano isn't powerful enough to convert jpg nor gif to a bitmap, or shrink a bitmap, you will need Raspberry Pi or 32 bits microcontroller.

  Are you sure? yes | no

Starhawk wrote 08/12/2021 at 09:17 point

OK, no worries about JPG / GIF -- I'd expected that. Can you make your code work with the *second* circuit here --> https://dqydj.com/arduino-640x480-vga/

(The circuit I'm specifically asking about is in the section, "An Updated, Improved Bill of Materials".)

Also -- if you don't hit "reply" (tiny, dark gray text on a nearly black background) under my comment to reply to it, or @-mention me (eg @projecter @Starhawk -- type @ then start typing someone's username here, arrow keys to highlight and press {ENTER] to select, when you see it), it won't tell me that you've replied to me. Half the time the notifications already don't work right; please use 'reply' or @-mentions if you can :) but no worries this time!

  Are you sure? yes | no

projecter wrote 08/12/2021 at 14:26 point

Thank you for explaining about reply.

I don't understand how the VGA circuit works so I can't comment on that. VGA was designed for analog CRT screens, OLED is digital only.

In my project it takes 2 seconds to read one picture from the SD card which is much slower than 60 pictures per second that you need.

  Are you sure? yes | no

Starhawk wrote 08/12/2021 at 23:36 point

@projecter It's an odd but clever circuit. He's using an Arduino Nano (ATMega328) and outputting its clock signal on D8. The 74LS04 (IC1) and 74F86 (IC2) are a clock-doubling circuit -- the 74x04 inverter (NOT Gate) -- introduces a slight delay in the signal, and sending the delayed, inverted signal as well as the original signal through an XOR Gate (74x86) produces a signal that's *roughly* 32MHz instead of 16MHz.

From there it gets a bit confusing, he's got the wrong pinout displayed for the 74F257 latch (IC3). The 32Hz signal is actually clocking the Select input, which determines which signal inputs of a set (which pin of the pairs of 2/3, 5/6, 14/13, and 11/10) gets connected to the output. The Blue color output switches between D1 and D5 on the Arduino using Pin 2/3 inputs on the '257 (Pin 2 = D5, Pin 3 = D1, Pin 4 = Output); Green color out switches between D2 and D6 (Pin 13 = D2, Pin 14 = D6, Pin *12* = Output); and Red color out switches between D4 and D7 (Pin 10 = D4, Pin 11 = D7, Pin *9* = Output). D3 outputs Horizontal Sync (HSync) signal; D5 outputs Vertical Sync (VSync) signal.

Explanations are at https://dqydj.com/arduino-640x480-vga/ in the section "Download and Run the Code" as well as https://dqydj.com/how-to-double-clock-frequency-using-only-digital-logic/

I am not a programmer... I understand the concepts at an abstract level, but pretty much everything I've ever created when sat in front of an actual programming environment should be gathered up and burnt for the good of mankind. It's... bad stuff. Like "if there isn't a line in the Geneva Conventions about this, there ought to be...!" kinds of bad.

It *seems to me* that you ought to be able to just replace your output code with his, and put something in between that holds onto that picture loaded from SD card, and splats it out to the screen repeatedly at the speed necessary, until a new picture comes from the card. (This may require a framebuffer memory; I'm not sure.) Changing the picture every *ten* seconds would be about right for me, to be honest.

  Are you sure? yes | no

projecter wrote 08/13/2021 at 19:24 point

This project works in the way you want, it displays sequentially all the 6 pictures on the SD card and for 10 sec each. I was mean with words describing it because I assume everybody got an electronic picture frame about ten years ago.

The oled display has a microcontroller with a RAM for all the pixels 96x64=6144 . 2 bytes for each pixel (12288 bytes) that contain the RGB color (5:6:5 bits). The Arduino reads from the SD 96 bytes at a time and then sends them to the oled RAM it takes 2 sec to transfer 1 picture. The oled mcu updates the leds color from the RAM at 60Hz. During the 10 sec between pictures the Arduino is idle and the oled mcu keeps on reading the RAM 60 times per second.  The Arduino cannot move faster because of the method it reads the SD.

If you want to use a cheaper or larger LCD TFT display you can find more projects on my website http://www.moty22.co.uk/sd_bmp.php

  Are you sure? yes | no

Starhawk wrote 08/13/2021 at 19:43 point

@projecter (The 'reply' button allows far too few layers of replies as well... annoyingly.)

The irony here is so thick it's almost magnetic (irony... iron... get it? Dumb joke.)...! I actually was inspired to ask, because of a digital picture frame I'd gotten secondhand, fixed, and then found to be really awful. Being the sort of person I am, I decided I wanted to turn pocket televisions (I have a few Casio models and a Sony Watchman) into digital picture frames instead... but they all need composite video input instead of SPI.

Thus my request.

  Are you sure? yes | no

projecter wrote 08/14/2021 at 18:43 point

You probably already know that you can connect a Media Player to your pocket TV and get a good picture frame. To make a project of media player is more than I can do.

  Are you sure? yes | no

Starhawk wrote 08/10/2021 at 13:38 point

This is really cool!

Pardon the question -- I am NOT a programmer (tl;dr, I 'get it' on an abstract level but ohhh dear God do NOT let me anywhere near an editor or IDE!) -- how hard would it be to modify this for composite output at ~NTSC resolution (I'm thinking 640x480 input, maybe... but that's VGA, not NTSC)? (I know the TVOut library does that fairly easily... I think?) Also, I assume that adding *.jpg and *.gif support would be non-trivial (i.e., quite a headache)...?

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates