<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel>
        <title>DIY miniature OLED controller with SPI interface.</title>
        <description> Hi Guys, 

I was originally inspired by Enifs post about a DIY OLED controller working off I2C.

I have an Ender3 running off a MKS GEN L motherboard with the TFT32 touch screen interface but i liked the original controller and wanted to bring it back but as a much smaller OLED version. Enifs post was almost perfect, i dont want the SD card reader or a beeper, just the encoder and a screen but the issue is that there are no I2C pin headers on the GEN L so i needed to find another solution.
MKS offer an OLED controller but it has an SD card reader, is a little more bulky than i had wanted and i was having issues finding where to buy it from so i started looking in to this as a DIY build project.

[attachment 112384 Controller.jpg]

Parts list.
[www.ebay.co.uk] 
[attachment 112378 encoder.JPG]
[www.amazon.co.uk]
[attachment 112379 OLED.JPG]
Printed enclosure.
[attachment 112380 enclosure.JPG]
6 M3 bolts
6 M3 threaded inserts
10 pin EXT1 cable

Assemble the wiring loom as follows.
[attachment 112383 Wiring.jpg]
NOTE: 
My encoder had 3 resistors soldered on to the rear, bridging between the CLK pin and the rotation direction pins. I removed the top and bottom one to resolve the unusual encoder behaviour.
Perhaps there is a better encoder to use out there but i wanted one pre-mounted to a board and i got it working without too much issue. 

MARLIN.
*configuration.h
Define MKS_12864OLED as your controller

*Pins_RAMPS.h (may vary for your board)
--------------------------------------------------------------------------------------------------------
   #if ENABLED(MKS_12864OLED) || ENABLED(MKS_12864OLED_SSD1306)
        #define LCD_PINS_DC     25   // Set as output on init
        #define LCD_PINS_RS     27   // Pull low for 1s to init
        // DOGM SPI LCD Support
        #define DOGLCD_CS       16
        #define DOGLCD_MOSI     17
        #define DOGLCD_SCK      23
        #define DOGLCD_A0       LCD_PINS_DC
      #else
        #define LCD_PINS_RS     16
        #define LCD_PINS_ENABLE 17
        #define LCD_PINS_D4     23
        #define LCD_PINS_D5     25
        #define LCD_PINS_D6     27
      #endif

      #define LCD_PINS_D7       29 CHANGE TO 33
--------------------------------------------------------------------------------------------------------
 #if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)

      #define BEEPER_PIN        37 CHANGE TO 31

      #if ENABLED(CR10_STOCKDISPLAY)
        #define BTN_EN1         17
        #define BTN_EN2         23
      #else
        #define BTN_EN1         31 CHANGE TO 37
        #define BTN_EN2         33 CHANGE TO 29
      #endif

      #define BTN_ENC           35
      #define SD_DETECT_PIN     49
      #define KILL_PIN          41</description>
        <link>https://reprap.org/forum/read.php?13,857571,857571#msg-857571</link>
        <lastBuildDate>Sat, 18 Apr 2026 13:17:37 -0400</lastBuildDate>
        <generator>Phorum 5.2.23</generator>
        <item>
            <guid>https://reprap.org/forum/read.php?13,857571,881461#msg-881461</guid>
            <title>Re: DIY miniature OLED controller with SPI interface.</title>
            <link>https://reprap.org/forum/read.php?13,857571,881461#msg-881461</link>
            <description><![CDATA[ I have a stock Ender 3 with the 4.2.2 board, and wanted to make this work. I figured out the pin layout of the lcd cable after a lot of fiddling, and was able to make the display work with Klipper firmware's software SPI. I'll try and get it to work with Marlin, but I don't have high hopes there.<br />
<br />
Thank you for the inspiration.]]></description>
            <dc:creator>properlypurple</dc:creator>
            <category>Controllers</category>
            <pubDate>Fri, 12 Feb 2021 02:45:17 -0500</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?13,857571,858049#msg-858049</guid>
            <title>Re: DIY miniature OLED controller with SPI interface.</title>
            <link>https://reprap.org/forum/read.php?13,857571,858049#msg-858049</link>
            <description><![CDATA[ Nice work.  I like to see useful projects like this.<br />
<br />
DLC]]></description>
            <dc:creator>dlc60</dc:creator>
            <category>Controllers</category>
            <pubDate>Wed, 14 Aug 2019 18:49:18 -0400</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?13,857571,857745#msg-857745</guid>
            <title>Re: DIY miniature OLED controller with SPI interface.</title>
            <link>https://reprap.org/forum/read.php?13,857571,857745#msg-857745</link>
            <description><![CDATA[ Looks good...  I am building a smaller printer so thought why not use a tiny screen...  After some google...  I found this post and Enifs posts using a tiny OLED screen.  Perfect!!  Curious if you plan on posting a link to Thingiverse or your STL files for printing?  I'd like to take a closer look at your design if you planned on sharing, if not, that's cool too.]]></description>
            <dc:creator>JayWms</dc:creator>
            <category>Controllers</category>
            <pubDate>Wed, 07 Aug 2019 15:51:10 -0400</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?13,857571,857571#msg-857571</guid>
            <title>DIY miniature OLED controller with SPI interface.</title>
            <link>https://reprap.org/forum/read.php?13,857571,857571#msg-857571</link>
            <description><![CDATA[ Hi Guys, <br />
<br />
I was originally inspired by Enifs post about a DIY OLED controller working off I2C.<br />
<br />
I have an Ender3 running off a MKS GEN L motherboard with the TFT32 touch screen interface but i liked the original controller and wanted to bring it back but as a much smaller OLED version. Enifs post was almost perfect, i dont want the SD card reader or a beeper, just the encoder and a screen but the issue is that there are no I2C pin headers on the GEN L so i needed to find another solution.<br />
MKS offer an OLED controller but it has an SD card reader, is a little more bulky than i had wanted and i was having issues finding where to buy it from so i started looking in to this as a DIY build project.<br />
<br />
[attachment 112384 Controller.jpg]<br />
<br />
Parts list.<br />
[<a href="https://www.ebay.co.uk/itm/360-Degrees-Rotary-Encoder-Module-for-Arduino-Brick-Sensor-Switch-Board/372507929416?ssPageName=STRK%3AMEBIDX%3AIT&amp;_trksid=p2057872.m2749.l2649" target="_blank"  rel="nofollow">www.ebay.co.uk</a>] <br />
[attachment 112378 encoder.JPG]<br />
[<a href="https://www.amazon.co.uk/gp/product/B07PVGK1BL/ref=ppx_yo_dt_b_asin_title_o01_s00?ie=UTF8&amp;psc=1" target="_blank"  rel="nofollow">www.amazon.co.uk</a>]<br />
[attachment 112379 OLED.JPG]<br />
Printed enclosure.<br />
[attachment 112380 enclosure.JPG]<br />
6 M3 bolts<br />
6 M3 threaded inserts<br />
10 pin EXT1 cable<br />
<br />
Assemble the wiring loom as follows.<br />
[attachment 112383 Wiring.jpg]<br />
NOTE: <br />
My encoder had 3 resistors soldered on to the rear, bridging between the CLK pin and the rotation direction pins. I removed the top and bottom one to resolve the unusual encoder behaviour.<br />
Perhaps there is a better encoder to use out there but i wanted one pre-mounted to a board and i got it working without too much issue. <br />
<br />
MARLIN.<br />
*configuration.h<br />
Define MKS_12864OLED as your controller<br />
<br />
*Pins_RAMPS.h (may vary for your board)<br />
--------------------------------------------------------------------------------------------------------<br />
   #if ENABLED(MKS_12864OLED) || ENABLED(MKS_12864OLED_SSD1306)<br />
        #define LCD_PINS_DC     25   // Set as output on init<br />
        #define LCD_PINS_RS     27   // Pull low for 1s to init<br />
        // DOGM SPI LCD Support<br />
        #define DOGLCD_CS       16<br />
        #define DOGLCD_MOSI     17<br />
        #define DOGLCD_SCK      23<br />
        #define DOGLCD_A0       LCD_PINS_DC<br />
      #else<br />
        #define LCD_PINS_RS     16<br />
        #define LCD_PINS_ENABLE 17<br />
        #define LCD_PINS_D4     23<br />
        #define LCD_PINS_D5     25<br />
        #define LCD_PINS_D6     27<br />
      #endif<br />
<br />
      #define LCD_PINS_D7       29 <span style="color:#FF0000">CHANGE TO 33</span><br />
--------------------------------------------------------------------------------------------------------<br />
 #if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)<br />
<br />
      #define BEEPER_PIN        37 <span style="color:#FF0000">CHANGE TO 31</span><br />
<br />
      #if ENABLED(CR10_STOCKDISPLAY)<br />
        #define BTN_EN1         17<br />
        #define BTN_EN2         23<br />
      #else<br />
        #define BTN_EN1         31 <span style="color:#FF0000">CHANGE TO 37</span><br />
        #define BTN_EN2         33 <span style="color:#FF0000">CHANGE TO 29</span><br />
      #endif<br />
<br />
      #define BTN_ENC           35<br />
      #define SD_DETECT_PIN     49<br />
      #define KILL_PIN          41]]></description>
            <dc:creator>Blackplasma</dc:creator>
            <category>Controllers</category>
            <pubDate>Sun, 04 Aug 2019 12:56:09 -0400</pubDate>
        </item>
    </channel>
</rss>
