0

Hi

I used this shield before well. But it didn't work when I wanted to work with him last night!

this is my wireing :

enter image description here

Now I want to know how to test that it is healthy? Is i2c address missing or not?

I tried this code to find i2c address but no answer appeared on Arduino Serial monitor !! nothing ..

and i uploaded any more example code on Uno but OLED not worked .

//     ~~~~~~~~~~~ i2c Address Scanner ~~~~~~~~~~~

#include <Wire.h>

void setup() {
Serial.begin (115200);

while (!Serial) {}

Serial.println ();
Serial.println ("I2C scanner. Scanning ...");
byte count = 0;

Wire.begin();
for (byte i = 8; i < 120; i++){
Wire.beginTransmission (i);
if (Wire.endTransmission () == 0){
  Serial.print ("Found address: ");
  Serial.print (i, DEC);
  Serial.print (" (0x");
  Serial.print (i, HEX);
  Serial.println (")");
  count++;
  delay (1);  
   } 
  } 
  Serial.println ("Done.");
  Serial.print ("Found ");
  Serial.print (count, DEC);
  Serial.println (" device(s).");
  }  
  void loop() {}

. .

What is the problem ?

  • As the Wenos D1 is a 3.3V device and the Uno a 5V device, you might get in trouble when using I2C between them without level conversion – chrisl Mar 15 at 20:44
  • When you write "nothing", do you mean, that you really see nothing on the serial monitor, not even the "I2C scanner. Scanning..." message? – chrisl Mar 15 at 20:49
  • I mean it doesn't find an address and therefore doesn't show anything as an address.@chrisl – navid Mar 15 at 21:30
  • Does this mean if I use 3.3v the problem will be resolved? Can you tell what connection the i2c has to the supply voltage?@chrisl – navid Mar 15 at 21:32
  • whats this mean the 3.3v ground must be the same for both until i2c connections is done! if is 5v , what happen doesnt work i2c connections? @chrisl – navid Mar 15 at 21:43
1

The main problem is, that the module does not get any supply voltage. You connected the Unos 5V to the OLED boards 5V. But this pin doesn't seem to be connected on the OLED shield. It is marked with 5V there, because this board is a shield to be stacked onto the Wemos D1. When you do this, you have 5V on this pin from the Wemos and can access it on the OLED shield for adding further components. (This is the principle of shields. Making even unused pins available on the shield, so that these pins don't get covered by the shield)

The shield needs to be supplied through the 3.3V pin, as it is a 3.3V device and it does not have an own voltage regulator (see the schematics of the shield).

Thus the shield cannot be found, because it is not turned on. It does not have a supply voltage.


That said, you may also get into trouble because of the communication voltage. The Uno works with 5V on the I2C lines, while the OLED shield works with 3.3V. The shield might get damaged by the higher voltage. The schematics the shield don't mention part names, so I cannot know, if they are 5V tolerant (there are 2 ICs in the schematics).

If the shield is not 5V tolerant on the I2C lines, you need to use a bidirectional level converter for both lines (or you can build your own with 2 MOSFETS for each line).

| improve this answer | |
  • Yes you're right. I connected the 3.3v to the OLED , upload a sketch on Uno and OLED worked.@chrisl – navid Mar 17 at 14:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.