Pages: 1 [2] 3 4 ... 7   Go Down
Author Topic: Crius OLED display  (Read 35071 times)
0 Members and 1 Guest are viewing this topic.
Malaysia
Offline Offline
Sr. Member
****
Karma: 3
Posts: 260
Stay calm and call batman!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hmmm just to be sure its on the A4 and A5 right?
Logged

The Netherlands
Offline Offline
Edison Member
*
Karma: 50
Posts: 1713
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It should be, that's what is mentioned in the coments in the sketch.

I had some more success taking a picture during daylight, so here is what my display shows.
This happens immediatly after powering up, but not if the display has been off for a while.
Then it takes a second or so before something appears.
Looks like both units have a memory problem.
I can control the functions like inverse and scroll, so Arduino communicates and this communication is processed.
I read somewhere about a reset problem and soldering a SMD capacitor and resistor to pin 14 of the flatcable (after disconnecting that pin) might help in such case.
This is a very small pitch connector (to me), yet i'll have a try at that some time.
I think i'll look for the command set for this ssd1306 chip to see if i can send some command instead before i get destructive.


* Crius Garbage.JPG (476.54 KB, 1108x1024 - viewed 140 times.)
Logged

Have a look at "blink without delay".
Did you connect the grounds ?
Je kunt hier ook in het Nederlands terecht: http://arduino.cc/forum/index.php/board,77.0.html

Nova Scotia
Offline Offline
Full Member
***
Karma: 4
Posts: 204
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I just plugged mine in now and the screen is garbage like yours. Strange. I took a working screenshot this morning and it was fine. Tried tweaking the delays in the init and it started working, and then not. Right now i'm not sure what the problem is. Maybe the pullup resistors are necessary, decoupling caps or it might be something in the code. I'm using another display with great results. The Crius one isn't very good. I'd trash it and get pretty much anything else.
Logged

Germany
Offline Offline
Edison Member
*
Karma: 137
Posts: 1526
If you believe something is right, you won't see what's wrong (David Straker).
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

When i worked with u8glib on a Seeedstudio 96x96 OLED, i noticed that the chip is very sensitive to wire size and I2C speed. 100kHz is already the limit for this controller. I2C fast mode (400kHz?)was never working with my OLED.

Another reason for not beeing able to communicate with the controller could be the look state. A library should send an unlook sequence (0x0fd, 0x012) as first command.

Oliver
Logged

The Netherlands
Offline Offline
Edison Member
*
Karma: 50
Posts: 1713
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@olikraus: That's way over my league, but i know communication is not completely gone while this sketch is running.
As stated, i can see different stages.
Sometimes i can even see some blinking dots at the moment data is sent.
I put some 2 second delays between the senStr commands as a debug help, and can see a pause in the blinking dots at respective delay points.
The display inverts and gets back, inverts again and then starts scrolling.
This is a clue (to me) that communication works, but the buffer that holds the screen content, doesn't erase on startup or is in another way corrupted.
Is there a way to set the I2C speed to a lower (but more reliable) rate ?
Logged

Have a look at "blink without delay".
Did you connect the grounds ?
Je kunt hier ook in het Nederlands terecht: http://arduino.cc/forum/index.php/board,77.0.html

The Netherlands
Offline Offline
Edison Member
*
Karma: 50
Posts: 1713
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

To eliminate wire length, i removed the I2C jumper wires and used an angular header (or whatever it's called) and plugged the original wire directly to the board.
Both ollikraus and 0miker0 spoke of a possible problem with that
Makes no difference at all.

I removed the endless while loop and added an end to the scroll, so this way i see that commands keep coming in.
The contents of the display seems to be always the same on each display, but each screen has its own pattern (so the 2 displays show a different picture).

Still seems to me that the buffer / memory isn't erased and filled so that present data is displayed.


* Hooked up.JPG (3617.69 KB, 3600x2400 - viewed 263 times.)
Logged

Have a look at "blink without delay".
Did you connect the grounds ?
Je kunt hier ook in het Nederlands terecht: http://arduino.cc/forum/index.php/board,77.0.html

Germany
Offline Offline
Edison Member
*
Karma: 137
Posts: 1526
If you believe something is right, you won't see what's wrong (David Straker).
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Is there a way to set the I2C speed to a lower (but more reliable) rate ?

This must be programmed into the ATMega. For example see lines 120ff in http://code.google.com/p/u8glib/source/browse/csrc/u8g_com_i2c.c

Oliver
Logged

The Netherlands
Offline Offline
Edison Member
*
Karma: 50
Posts: 1713
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Got it !

It is an initialisation problem.
Searching the interrnet brought me to a page i visited already.
I tried everything on there except cutting and resoldering 1 pin of the flatcable to a RC network.
None of that worked, but this must have been a problem in the examples.
So i read all over there and found a tip which is very easy to try:
Add a 100 Ohm resistor between the power supply and the module.
The resistor and the capacitance of the leads on the board are assumed to make just enough delay for the driver to finish the reset.
So i tried again, and voila !

Both displays work correctly now.
Have a look at the photo.
Tip in case someone likes to make a photograph of his display: dim it a lot or else your camera has trouble focussing, set it to 20h or less (i used 08h).


* Crius working.JPG (924.1 KB, 1536x1024 - viewed 527 times.)
Logged

Have a look at "blink without delay".
Did you connect the grounds ?
Je kunt hier ook in het Nederlands terecht: http://arduino.cc/forum/index.php/board,77.0.html

The Netherlands
Offline Offline
Edison Member
*
Karma: 50
Posts: 1713
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Played around some more.
Just tried to connect both displays at the same time.
The first one is connected to pins A4 and A5 using those jumper pins.
The second one connected to the SDA and SCL pins next to the reset button, using 6 centimeter jumper wires.
Power supply of the second display connected via 100 Ohm to vcc pin of the ICSP connector (don't know if that is a good idea).
This results in damaged data on both displays, and removing display 1 still gets damaged data to display 2, so the wire length of 6 cm is already too much.
Wouldn't expect that, maybe splitting the I2C wires an other way will solve this.

So @desmondttm123: try wires as short as possible, like 0miker0 did.
And try the 100 Ohm resistor.

I guess this means this display can't be used together with other I2C devices.
That would be a shame, i was planning on using it to display ADXL345 results.
Logged

Have a look at "blink without delay".
Did you connect the grounds ?
Je kunt hier ook in het Nederlands terecht: http://arduino.cc/forum/index.php/board,77.0.html

Nova Scotia
Offline Offline
Full Member
***
Karma: 4
Posts: 204
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

That would be interesting if long wires were the problem all along. I'll cut my wire length way down and try this on mine as well on Monday. I have a project board with a different display and a bunch of other i2c sensors on it. The length from the microprocessor to the OLED is only 1". Each sensor on the board has a different i2c address. The i2c address for the display is 0x3C so i'm guessing you cannot have two exact displays working if they both have the exact same i2c address of 0x3C.
Logged

The Netherlands
Offline Offline
Edison Member
*
Karma: 50
Posts: 1713
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Didn't you do that already ?
In your pic above it seems you removed the female plug and soldered pins to the original wires.
That's essentially the same as what i did, but my little attempt saved some time because i didn't have to solder.

I know about I2C addresses, but figured that a display is an output and connecting 2 outputs with the same address would result in displaying the same stuff twice.
There would be a problem when data is supposed to go 2 ways, like when using some sensor.
Does the display answer to the data from Arduino ?

By the way:
The ssd1306 datasheet mentions a way to select an other address.
I have no idea if this can be set different with this crius board.
« Last Edit: April 14, 2013, 04:58:27 am by MAS3 » Logged

Have a look at "blink without delay".
Did you connect the grounds ?
Je kunt hier ook in het Nederlands terecht: http://arduino.cc/forum/index.php/board,77.0.html

The Netherlands
Offline Offline
Edison Member
*
Karma: 50
Posts: 1713
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have just extended the wire length to about 44 centimeter by using 2 male - male jumper wires and a female-female jumper wire.
Works just the same.
To confirm i changed the text a bit and this change was also OK.
Extending it this way to a total of over 1 meter resulted in display of garbled data.
So you don't need to use extremely short wires and can extend wires when needed.
But like always, don't use wires longer than they need to be.

I also have an I2C 1602 display.
I'll have a try at using these 2 together soon.
Can't try the ADXL345 yet, waiting for the ttl to 3 volt converter to arrive (has been on its way for 3 weeks now so hope to have it next week).

By the way: this display doesn't seem to answer to Nick Gammon's I2C scanner, the 1602 does.
« Last Edit: April 14, 2013, 05:00:06 am by MAS3 » Logged

Have a look at "blink without delay".
Did you connect the grounds ?
Je kunt hier ook in het Nederlands terecht: http://arduino.cc/forum/index.php/board,77.0.html

Nova Scotia
Offline Offline
Full Member
***
Karma: 4
Posts: 204
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I thought you meant cutting the wires in half or so to reduce the wire length but you removed the connector on the end and soldered a male header on. I understand now.
You can get the ADXL345 working right now! No need to the logic converter. I'm using them in my project. See http://bildr.org/?s=Adxl345 where the Adxl345 is powered by 3.3v on an Arduino running at 5v. The library link on that site is too big so grab the library at the Adafruit site. They just created a new adxl345 breakout board and have a smaller, tighter library. You will also need another sensors library to go with it. I can send you them if you have trouble.
Logged

The Netherlands
Offline Offline
Edison Member
*
Karma: 50
Posts: 1713
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Nope not even that.
I didn't use my soldering iron, just used some stuff i have around here.
Have some 90 degrees male jumper headers and used that.
This way i could plug the cable directly to the Arduino board, and still use a jumper wire and the resistor to power the display
So the cable is still intact.

I'll have a look at using the ADXL345 as is with my UNO R3, thanks for the link.


* Angle.JPG (460.26 KB, 1536x1024 - viewed 193 times.)
Logged

Have a look at "blink without delay".
Did you connect the grounds ?
Je kunt hier ook in het Nederlands terecht: http://arduino.cc/forum/index.php/board,77.0.html

Germany, BW
Offline Offline
Sr. Member
****
Karma: 7
Posts: 311
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

After 4 hours of searching, i got my display working.
I had the same problem with the random dots. Ive read a lot about RC circuit for reset fix...

But the wohle time i couldnt understand why the display is working with the commands and only the ram write access wont do.
My last attempt was brute force. I was very bugged and i tried the last attempt before prime time smiley-grin
After the brute force i saw vertical lines an i thought i damaged the OLED but after power up, my code works 100%.  smiley-eek smiley-eek smiley-eek

The solution:
Code:
  for(uint8_t i=0;i<255;i++)
   {
   Serial.println(i);
   setXY(1,3);
   for(uint8_t j=0;j<40;j++) i2c_writeReg(OLED_address, i, 0xf0);
   for(uint8_t j=0;j<255;j++) i2c_writeReg(OLED_address, i, j);
   }



* CRIUS CO-16.jpg (245.14 KB, 776x654 - viewed 278 times.)
« Last Edit: May 10, 2013, 02:12:57 pm by mde110 » Logged

Pages: 1 [2] 3 4 ... 7   Go Up
Jump to: