Elektroda.com
Elektroda.com
X
Elektroda.com

What's the ESP8266 (ESP8266MOD) version?

shel82 5742 20
This content has been translated flag-pl » flag-en View the original version here.
  • #1
    shel82
    Level 18  
    Hello, the question is exactly as in the topic, and more precisely, what is the model version of the system - ESP12E or F or S or Q, etc?

    The system is described as ESP8266MOD, note that the AI-Thinker inscription is missing.
    Using the descriptions on the manufacturer's website, I presume that it is a clone, but I don't know
    https://www.esp8266.com/wiki/doku.php?id=esp8266-module-family#esp-12

    The problem is that not all programs are properly handled by this board, e.g. the flagship "blink" works ok, others do not and it throws an error:

    12: 34: 32.637 -> ets Jan 8 2013, rst cause: 2, boot mode :( 3.6)
    12: 34: 32.637 ->
    12: 34: 32.637 -> load 0x4010f000, len 1392, room 16
    12: 34: 32.637 -> tail 0
    12: 34: 32.637 -> chksum 0xd0
    12: 34: 32.637 -> csum 0xd0
    12: 34: 32.637 -> v3d128e5c
    12: 34: 32.637 -> ~ ld
  • #2
    Gienek
    Level 37  
    This is a WeMos D1 mini - 4MB clone
  • #3
    shel82
    Level 18  
    Gienek wrote:
    This is a WeMos D1 mini - 4MB clone


    Ok, the question is, what firmware and what to upload there from?
  • Helpful post
    #4
    Gienek
    Level 37  
    It depends what you want to build on this module.
    For example, to control a color display:
    The WeMos D1 mini module included in this kit has an embedded 4MB SPI flash memory. 3MB of that will be reserved to host a SPIFFS file system. If you select the correct board in the IDE the flash mode and flash size settings should get auto-configured. Verify the settings are as follows:
    in Tools > Flash Size select "4M (3M SPIFFS)"
    The application might fail to transfer or fail to start if the flash options are not configured properly. Make sure the menu under Tools looks like this:

    What's the ESP8266 (ESP8266MOD) version?
  • #5
    shel82
    Level 18  
    I am trying to run the program for the dust sensor (GP2Y1010AU0F), but the problem is that I have an error on various boards selected from the manager:
    
    12:34:32.637 -> ets Jan 8 2013,rst cause:2, boot mode:(3,6)
    12:34:32.637 ->
    12:34:32.637 -> load 0x4010f000, len 1392, room 16
    12:34:32.637 -> tail 0
    12:34:32.637 -> chksum 0xd0
    12:34:32.637 -> csum 0xd0
    12:34:32.637 -> v3d128e5c
    12:34:32.637 -> ~ld
    

    I suppose this is a FW problem, because it works ok for others?

    
    #define MIN_VOLTAGE     600 // mv - próg dolnego zakresu napięcia dla braku pyłu
    #define VREF           5000 // mv - napięcie referencyjne komparatora
    #define PIN_LED           16 // numer pinu ILED (dla Wemos pin16 (GPIO16) - D0), a było 8 dla Arduino Uno
    #define PIN_ANALOG        8 // numer pinu AOUT (było 3)
    #define MAX_ITERS        10 // liczba pomiarow do sredniej
     
    int ADC_VALUE; // odczytana wartosc A0
    int ITER; // numer pomiaru
    float VOLTAGE; // wartosc napiecia
    float DUST; // wynik
    float AVG_DUST; // sredni wynik
     
    void setup(void)
    { 
      //analogReference(INTERNAL);
     
      Serial.begin(9600);
     
      pinMode(PIN_LED, OUTPUT);
      digitalWrite(PIN_LED, LOW);
    }
     
    float computeDust()
    {
      // Blyskamy IR, czekamy 280ms, odczytujemy napiecie ADC
      digitalWrite(PIN_LED, HIGH);
      delayMicroseconds(280);
      ADC_VALUE = analogRead(PIN_ANALOG);
      digitalWrite(PIN_LED, LOW);
     
      // Przeliczamy na mV. Calosc mnozymy przez 11, poniewaz w module
      // zastosowano dzielinik napiecia 1k/10k
      VOLTAGE = (VREF / 1024.0) * ADC_VALUE;
     
      // Obliczamy zanieczyszczenie jesli zmierzone napiecie ponad prog
     
      if (VOLTAGE > MIN_VOLTAGE)
      {
        return (VOLTAGE - MIN_VOLTAGE) * 0.2;
      }
     
      return 0;
    }
     
    void loop(void)
    {
       AVG_DUST = 0;
       ITER = 0;
     
       while (ITER < MAX_ITERS)
       {
         DUST = computeDust();
         // Do sredniej liczmy tylko prawidlowe pomiary
         if (DUST > 0)
         {
           AVG_DUST += DUST;
           ITER++;
           delay(50);
         }     
       }
       
       AVG_DUST /= MAX_ITERS;
       
       Serial.print("D = ");
       Serial.print(AVG_DUST);
       Serial.println(" ug/m3");    
     
       delay(500);
    }


    and board settings:
    What's the ESP8266 (ESP8266MOD) version?
  • #6
    khoam
    Level 41  
    shel82 wrote:
    The problem is that not all programs are properly handled by this board, e.g. the flagship "blink" works ok, others do not and it throws an error:

    The problem may result from too high speed when loading the program to ESP (some copies have this or you have a poor quality USB cable) and errors in Flash. Reduce the speed from 921,600 to a lower speed. Set the remaining parameters of the board according to post # 4.
  • #7
    shel82
    Level 18  
    khoam wrote:

    The problem may result from too high speed when loading the program to ESP (some copies have this or you have a poor quality USB cable) and errors in Flash. Reduce the speed from 921,600 to a lower speed. Set the remaining parameters of the board according to post # 4.


    I don't think that's it - I thought so too ...
    I reduced the baud rate, but the current Arduino IDE v1.8.10 has different board settings:
    What's the ESP8266 (ESP8266MOD) version?

    I checked a dozen other settings and still have the same error:
    load 0x4010f000, len 1392, room 16 
    tail 0
    chksum 0xd0
    csum 0xd0
    v3d128e5c
    ~ld
  • #8
    khoam
    Level 41  
    Set "Erase Flash: All Flash Contents" and "Exceptions: Disabled" and try to load the program.
  • #9
    Gienek
    Level 37  
    It seems to me that you are setting Flash Size wrong. In my post (in English) it was mentioned. Translating it into Polish:
    ".... select" 4M (3M SPIFFS). The application may not transfer or start if the flash options are not properly configured .... "
    Therefore, you should set the option "4MB (FS: 3MB OTA: ~ 512kB)"
  • #10
    shel82
    Level 18  
    I changed according to your suggestions to:
    What's the ESP8266 (ESP8266MOD) version?

    and then the problem occurs:
    load 0x4010f000, len 1392, room 16 
    tail 0
    chksum 0xd0
    csum 0xd0
    v3d128e5c
    ~ld


    It seems to me that this is a problem with the memory of the ESP8266 itself or the firmware, but the question from #post - what to upload to it?
  • #11
    khoam
    Level 41  
    It was supposed to be "" Exceptions: Disabled ", the image says" Exceptions: Enabled ".
  • #12
    shel82
    Level 18  
    khoam wrote:
    It was supposed to be "" Exceptions: Disabled ", the image says" Exceptions: Enabled ".


    I also tried with "Exceptions: Disabled" - same effect.
    Not this prt.sc. I pasted ;)
    What's the ESP8266 (ESP8266MOD) version?
  • #13
    khoam
    Level 41  
    In such a situation, I would try to upload the AT firmware to this ESP and check if it works. In my footer there is a link to the post that contains information about the AT firmware and a firmware uploader (Flash Download Tool) is included.
  • #14
    shel82
    Level 18  
    khoam wrote:
    In such a situation, I would try to upload the AT firmware to this ESP and check if it works. In my footer there is a link to the post that contains information about the AT firmware and a firmware uploader (Flash Download Tool) is included.


    I downloaded "AT_V1.1_on_ESP8266_NONOS_SDK_V1.5.4_official_espressif" - like everything works, normally responds to AT commands:
    ready
    AT
    
    
    OK
    AT+GMR
    
    AT version:1.1.0.0(May 11 2016 18:09:56)
    SDK version:1.5.4(baaeaebb)
    compile time:May 20 2016 15:06:44
    OK
    


     ets Jan  8 2013,rst cause:2, boot mode:(3,7)
    
    load 0x40100000, len 1856, room 16 
    tail 0
    chksum 0x63
    load 0x3ffe8000, len 776, room 8 
    tail 0
    chksum 0x02
    load 0x3ffe8310, len 552, room 8 
    tail 0
    chksum 0x79
    csum 0x79
    
    2nd boot version : 1.5
      SPI Speed      : 40MHz
      SPI Mode       : DIO
      SPI Flash Size & Map: 32Mbit(512KB+512KB)
    jump to run user1 @ 1000
    
    ⸮⸮s⸮$⸮l⸮⸮$`⸮⸮{⸮l⸮l⸮d`⸮⸮s⸮$⸮
    Ai-Thinker Technology Co. Ltd.
    
    ready
    


    I will play "Blink" - it works, I will play the program from post # 5 - it does not work ??
  • #15
    khoam
    Level 41  
    How did you connect the LED to GPIO 16 in this module?
    Code: c
    Log in, to see the code
  • #16
    shel82
    Level 18  
    khoam wrote:
    How did you connect the LED to GPIO 16 in this module?
    Code: c
    Log in, to see the code


    Yes:
    What's the ESP8266 (ESP8266MOD) version?
  • #17
    khoam
    Level 41  
    Did other ESP modules work properly with the program from post # 5 and in this configuration, as above?
  • #18
    shel82
    Level 18  
    khoam wrote:
    Did other ESP modules work properly with the program from post # 5 and in this configuration, as above?


    Yes, but they were compiled under an older version of the Arduino IDE (also on a different PC) and here the problem is probably buried ...

    I wrote another code on foot and it works:
    int pin_pomiarowy = 0;
    int zasialnieLED = 4;
    
    float pomiar=0;
    float napiecie=0;
    float pyl=0;
    
    void setup(){
      Serial.begin(9600);
      pinMode(zasialnieLED, OUTPUT);
    }
    
    void loop(){
      digitalWrite(zasialnieLED,LOW);
      pomiar=analogRead(280);
      delayMicroseconds(40);
      digitalWrite(zasialnieLED,HIGH);
      delayMicroseconds(9680);
      napiecie=pomiar*(5.0/1024.0);
      pyl=170*napiecie-0.1;
      Serial.print("pyl = ");
      Serial.print(pyl); 
      Serial.println(" ug/m3");
      delay(1000);
    }
  • #20
    crbjsfso
    Level 7  
    shel82 wrote:

    Code: c
    Log in, to see the code



    I am just struggling with the same code. You probably used the code from this page which is made for Arduino and above all there are other pins and a different voltage divider which I can see has been completely removed from your code. For WEMOS D1, the mini voltage divider is built with a 220k and 100k resistor, more you can read on this page in the "Analog inputs" section. For PIN_LED it is safe to use: GPIO 4 (D2), 5 (D1), 12 (D6), 13 (D7), 14 (D5), if you do not plan to use for example MISO or MOSI in the future, because you are programming via Arduino IDE:

    WEMOS PIN FUNCTION ESP PIN-8266
    D2 IO, SDA GPIO4
    D1 IO, SCL GPIO5
    D6 IO, MISO GPIO12
    D7 IO, MOSI GPIO13
    D5 IO,SCK GPIO14

    And choose the right voltage meter, in my case the code below works quite properly, i.e. it generates some results, but when I change the voltage divider 3.2, which I think it should be for WEMOS D1 mini, the serial port monitor is also full of errors. I do not use D1 and D2 because I want to connect an oled display and a temperature, pressure and humidity sensor to them.
    Code: c
    Log in, to see the code
    The problem seems to me to be in the code itself.
  • #21
    pasiu76
    Level 2  
    Witm.
    For me, I have a web server on this system and the program is uploading, but I cannot change the network name - the name from the cube remains :D