Welcome! Log In Create A New Profile

Advanced

DIY Tiny OLED I2C full graphics controller

Posted by enif 
Re: DIY Tiny OLED I2C full graphics controller
June 01, 2019 03:55AM
@war6000:
I have downloaded and compiled your version of Marlin as is. I can hook up the 0.96" and the 1.3" OLED and both work fine right away, and they stay visible and stable.


So from all I can see, there is no problem with your Marlin configuration...
Re: DIY Tiny OLED I2C full graphics controller
June 01, 2019 04:38PM
@enif
Wow!! Thanks for the quick reply and all your help, much appreciated. Btw which version of the graphics library are you using. I’m using [github.com]
Re: DIY Tiny OLED I2C full graphics controller
June 01, 2019 05:24PM
@enif
THANK YOU very much since you assured me the marlin was not the issue I went ahead and uninstall arduino deleted all libraries then got me a portable arduino ide and downloaded 1.18.1 library and now is working. I then switched to 1.19.1 and got the flashing issue. I'm assuming there is something different in the latest version of the library. Again thank you very much for your help

Re: DIY Tiny OLED I2C full graphics controller
June 02, 2019 02:13AM
@war6000: You are very welcome! smiling smiley)) I am glad that it works now!
Re: DIY Tiny OLED I2C full graphics controller
July 27, 2019 04:40AM
Hello everyone.

Thankyou enif for your inspiration.

I am very practical, soldering, connecting no problem but coding and arduino is not a strong point for me, i can just about fumble my way through a marlin sketch.
I have upgraded my ender 3 to a MKS GEN L motherboard (RAMPS based) and replaced the stock display with a MKS TFT touchscreen but i miss some of the features of the original controller so i wanted to make your tiny OLED I2C project for my printer.
I bought the parts and started to work out what pins to connect everything to but what i have found is that there are no pins available for the I2C on my motherboard so ive been trying to work out another option.

There is an off the shelf product by MKS called the MKSoled12864, it even has entries in the latest version of marlin to make configuration easier. I could buy this but i want mine to be as compact as possible, i dont want a beeper or SD card reader.
So by trying to copy the MKSOLED, taking inspiration and guidance from the OG post here, and hoping to achieve a "MKSOLED-lite" i have come up with the attached diagram.
Could someone who is familiar with this sort of thing have a look and see if i have made any major mistakes please? I would be very grateful.

One thing i am not sure on is SH1106 or SSD1306.
I think this is the "language" the OLED panel speaks so do i just need to select the correct one for my panel? will it be stated on the OLED panel description when i buy it? is one better than the other?
Attachments:
open | download - OLED lite.jpg (897.7 KB)
Re: DIY Tiny OLED I2C full graphics controller
July 27, 2019 07:13AM
When I read your message, I first could not believe that the MKS GEN L board does not provide the I2C pins D20 and D21 - but indeed it looks that way sad smiley

So if you want to use I2C with your board (and since you say that connecting and soldering is not a problem for you), the only possibility I can think of is to solder very thin wires (such as wirewrap) directly to the corresponding pins 43 (SCL) and 44 (SDA) of the ATmega2560 chip...

Here a link to a drawing of the ATmega2560 pinout where you can see which pins have to be connected.

As for the SPI based OLEDlite I am sorry, but I cannot really help you.
Re: DIY Tiny OLED I2C full graphics controller
July 27, 2019 08:12AM
Thanks for the reply, im not sure i am confident soldering such tiny traces but i think i am going to try a spi based project of my own design, this ,, "SPIOLED-lite" as i call it. i think all of the theory checks out and the MKSOLED is configured this way so i will give it a go and et you know how it turns out.
Re: DIY Tiny OLED I2C full graphics controller
July 30, 2019 04:38PM
i'm stuck on adapting this too. i was trying to use this with the MKS BASE 1.3 that is the controller for my Turnigy Fabrikator Mini V1.5, a Tinyboy derivative.

There are no I2C pins that I can identify on the board. What sucks is that google thinks its smarter than me and INSISTS that I must mean that I want SBASE not BASE pinouts. This is the best I have found so far-



I got excited when I saw D20 and D21, but then realized my mistake that those are not pins 20 & 21. sad smiley

if the OLED controlle could do ST9720, then it would work as an SPI LCD I think. At least that is how I am using a RRD 12864 GLCD on LPC port of RRF.

Edited 1 time(s). Last edit at 07/30/2019 04:38PM by sinned.
Re: DIY Tiny OLED I2C full graphics controller
July 30, 2019 08:03PM
You do want D20 (SDA) & D21(SCL) these are physical pins 44 and 43 on a mega2560 chip

[www.arduino.cc]
Re: DIY Tiny OLED I2C full graphics controller
July 31, 2019 08:47PM
I can not get this figured out, it's driving me nuts. I don't remember it being this hard.
This is the board I am using -

[www.diymore.cc]

I am fairly confident that I made the edits in the files right, but I get no display at all. Encoder and buzzer work-I hear clicks as i turn the encoder and button push.

I tried 2 different OLED modules and RAMPS/Mega and the MKS board.

I don't think the oleds are bad. Is there a succinct summary of the edits all in one place? I feel like somehow either I missed something or something from the multiples posts with edits is conflicting.

I will clean up my files and post snippets later.

EDIT: Do we have to assign the address of the OLED module somewhere? As its the only device, I can't imagine having to, but thought to ask.





Edited 2 time(s). Last edit at 07/31/2019 10:51PM by sinned.
Re: DIY Tiny OLED I2C full graphics controller
August 01, 2019 02:51AM
Have you made sure that the pins labeled D20 and D21 on your schematic are indeed D20 and D21, e.g. by running the blink sketch on these pins and measuring the voltage on the pins?

I read here that your diagram is from version 1.1 not 1.3. Also note that the labels on the board itself say something link "BZ" and "SS", so it would be a pity to go through all the trouble to find out at the end that the diagram you used was not correct. You can also try using the multimeter to check if you have 0 ohms between the "D20"/"D21" pins and the chip pins 43 and 44 (with no power on the MKS Base board of course...).
Re: DIY Tiny OLED I2C full graphics controller
August 01, 2019 09:19AM
Hi,
I would do two simple checks:

The first is to use a multimeter to check if the pins you are using (20 and 21) are actually SDA (44) and SCL (43) on the ATmega2560 chip.



The second is to upload the "i2c_scanner" sketch to make sure that the oled is actually connected, you can find it here: [playground.arduino.cc]

I din't understand what marlin you are using, maybe I missed it, however, with version 1.1 you can simply enable "#define OLED_PANEL_TINYBOY2" in configuration.h and eventually change the pins of the buttons in "pins_xxxxxxxx.h" if they do not correspond to the your.

Edited 1 time(s). Last edit at 08/01/2019 09:25AM by Skytter.


- Geeetech I3 Pro B "Tuning" GT2560 A+ con sesto Stepper Driver e 3 estrusori - Doppio Alimentatore e Scheda Mosfet per l'HeatBed - Dondolo per I3 Pro B - Diamond HotEnd color mixing - Mk8 Extruder 0.2 nozzle.
- TronXY X5S con Ruramps4d in fase di test.
- Progetto "MiniMaker" full stroke 200x200x180 printer in a 300x300x300 cube.

My Thingiverse: [www.thingiverse.com]
Re: DIY Tiny OLED I2C full graphics controller
August 01, 2019 10:02AM
Quick update from me on my version of this which does not require I2C.
I have received all the parts i need to build and finished my enclosure design so i will be printing later and then assembling, compiling a new firmware (using the MKS12864OLED option which is already in marlin) and testing the controller in the next couple of days.

Without having a beeper or SD card it is possible that my version could be run from a single 10 pin connector like the "Stock CR10 controller" I think i will be able to reassign the pins myself by editing a few bits of marlin but for my preliminary tests i will be running individual dupont connectors to different parts of EXP1 and EXP2.

I will be back in a couple of days to update.

Re: DIY Tiny OLED I2C full graphics controller
August 01, 2019 03:31PM
@Skytter & enif -

Quote
enif
Have you made sure that the pins labeled D20 and D21 on your schematic are indeed D20 and D21, e.g. by running the blink sketch on these pins and measuring the voltage on the pins?

That is indeed the problem sad smiley The AUX-1 header looks to be:

5V-GND-RX0-TX0
5V-GND-NC - NC

And the pins are actually connected to the FTDI. Apparently, if you try to communicate over those and USB at the same time, it does not like it.

So I need to decide if I have a steady enough hand to try soldering jumper wires to the chip to get to SDA/SCL or go a different way.

In retrospect, I think what created my false sense of possibility is intermingling of TinyBoy & Turnigy Fabrikator Mini. Looking closer at the pics from fredchan and mming1106 , they actually have ramps/mega's stuffed under their printers instead of the MKS Base board.

Edited 1 time(s). Last edit at 08/01/2019 03:31PM by sinned.
Re: DIY Tiny OLED I2C full graphics controller
August 04, 2019 11:52AM
Hi Enif,

Just wanted to say thanks again for your inspiration.
My SPI based "MarKS-OLED-lite" controller is up and running. working perfect.
I will post up my own thread showing what i did to achieve it, but big credit to you for the initial idea.
Re: DIY Tiny OLED I2C full graphics controller
August 04, 2019 01:12PM
If anyone is wanting to do this from a SPI interface because you dont have I2C headers. see this post:
[reprap.org]
Sorry, only registered users may post in this forum.

Click here to login