September 28

Motorcycle Picture Frame: Parts

The parts used in this project were taken from the attempt at the incorporating electronics into the jewelry box armoire project. Without recreating the blog posts, I’ll condense the information for what was used, along with any changes to the overall project.

Microcontroller

Arduino Mega

Given the size of the sketch, I have to use the Arduino Mega. Quadruple in flash storage, I can provide other options to image displays, and messages to show on the OLED display. While the libraries and sketch remained the same, the Arduino Mega has more pins, along with different pin allocations for SPI and I2C connections.

 

Comparison Overview

Board Specs

Arduino Pro Mini Arduino Uno R3 Arduino Mega 2560
Processor ATmega328P ATmega328P ATmega2560
CPU Speed 16 MHz 16 MHz 16 MHz
Analog In/Out 6/0 6/0 16/0
Digital IO/PWM 14/6 14/6 54/15
Flash (kB) 32 32 256
USB Type B Type B

 

I2C and SPI Pins

Arduino Pro Mini / Arduino Uno R3 Pin Arduino Mega 2560
A4 SDA D20
A5 SCL D21
D4 CCS D4
D9 D/C D9
D10 CS D10
D11 MOSI D51
D12 MISO D50
D13 CLK D52

 

 

Displays

2.8″ TFT LCD

To enable SPI mode, there are bridges that need to be soldered. On the back of the display board, there are 4 jumpers below the microSD card reader: M0-M3. Only M1-M3 need to be bridged with solder. With the other components added to the Arduino, I’m limited on pins, making SPI a better option instead of 8-bit or 16-bit DBI connections. It’s slower, but I’m not doing video output.

From the Adafruit site on their TFT display (ILI9341):

This display has a controller built into it with RAM buffering, so that almost no work is done by the microcontroller. The display can be used in two modes: 8-bit and SPI. For 8-bit mode, you’ll need 8 digital data lines and 4 or 5 digital control lines to read and write to the display (12 lines total). SPI mode requires only 5 pins total (SPI data in, data out, clock, select, and d/c) but is slower than 8-bit mode. In addition, 4 pins are required for the touch screen (2 digital, 2 analog)

TFT Pinout

TFT Pin Name Arduino Pin
GND Ground GND
Vin Voltage in 5v
CLK Serial Clock D13
MISO Master In Slave Out D12
MOSI Master Out Slave In D11
CS Card Select D10
D/C Data/Command selector D9
CCS Card Chip Selector D4

 

0.96″ OLED (128×64)

The SSD1306 comes in various colors, but this one has a yellow banner above the blue text area. Yellow is from (0,0) to (127,15), and blue is then (0,16) to (127,63). I like this display, as I can have one message above in yellow, and other text in blue. In this case, the yellow text will be static, while the blue will be dynamic, based on our time together (days, months, or years). Sending the text, be it static or dynamic, will be redrawn as one display, and it’s the display itself using yellow on blue.

This I2C display has 4 pins: power, ground, Serial Data (SDA), and Serial Clock (SCL). Using its device ID (0x3C), I can ensure my text goes directly to this I2C device. The device ID needs to be updated in the library itself, along with the 128×64 dimensions of the display.

 

 

Components

Real-Time Clock (RTC)

Similar to the 0.96″ OLED display, the RTC uses I2C connection for the transfer of data. Setting up the current time on the RTC itself, and ensuring the attached coin battery is still good, I can refer to the time, and check if today is July 17 (anniversary), the 17th of any other month (monthiversary), or any other day in any month to count the days since July 17, 2016. The time is accurate to when it is setup. It takes about 3 seconds to set the current time, including upload, which is an insignificant issue when counting days. If the project loses power through the Arduino, which supplies power to the components, the RTC’s coin battery will continue to keep track of time.

 

MicroSD Breakout Board

This is mostly honorable mention, but I’m separating the microSD card reader from the TFT display itself, making it easier to access the microSD card as needed. Instead of using the Card Select pin on the TFT display, it will go to the microSD breakout board, which will have the images on the microSD card. The code will remain the same, but cables will route to the breakout board, instead of the TFT display.

 

Conclusion

All of the parts were tested and functioning, but now it’s a matter of building around it, making a scene that focuses on the pictures. Once the design starts to come together, the layout of parts can be determined, and production can start.

Tags: , , , , , , , ,
Copyright 2025. All rights reserved.

Posted 2019-09-28 by Draik in category "Arduino", "Motorcycle Picture Frame", "Project