Are all my ESP8266 fried?

Hi, I have had a ESP8266 running during half a year with a DS18b20 and the Blynk function, which is great by the way. Now wanted to move to a new place and thus a new wifi ssd and pw, I reprogrammed it with the new SSD and Password and it worked... Then decided to resolder the connections to the DS18b20 since I had them originally on the breadboard connectors. But then it started "acting"... The serial connection pops up and down, then eventually blue screen in the Windows 7 I was using, then tested on a windows 11, same thing (not awaited to blue screen..). So Then I cant reprogram it, even with the "blink" program, since the arduino programmer doesnt get the "hook" on the serial port.... So then I went and bought a couple of new ESP8266, could program them with "blink" and they worked fine. Then I program each of them with the attached and nothing seems to happen. Then I connect the DS18b20 (black to ground, red to 5v, and yellow to D5) and the 4,7 between 5v and D5 cable. Even tried to old connection using the breadboard connectors.... same problem....

I now have 3 ESP8266 that I cant get to connect to any computer, they all create this "on and off" of the serial port.

Wanted to find a way to "reset" it hardware reset it, if that is possible, if it is the sketch that gets it to crash... But due to the "catch 22" I can get it connected to use any of the methods I have read about to reset it...

#define BLYNK_TEMPLATE_ID "TMPLxxxxxzhDZf"
#define BLYNK_DEVICE_NAME "Temperatur xxxxxst"
#define BLYNK_AUTH_TOKEN "tBH1avxxxxxxxCf9y1gLO0A91jxH"

// Comment this out to disable prints and save space
#define BLYNK_PRINT Serial

#include <OneWire.h>
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>

char auth[] = BLYNK_AUTH_TOKEN;

char ssid[] = "BrxxxWiFi";
char pass[] = "xxxxxxxx";

BlynkTimer timer;

// This function is called every time the Virtual Pin 0 state changes
BLYNK_WRITE(V0)
{
  // Set incoming value from pin V0 to a variable
  int value = param.asInt();

  // Update state
  Blynk.virtualWrite(V1, value);
}

OneWire  ds(D5);  // on pin D4 (a 4.7K resistor is necessary)
WidgetLCD lcd(D7);
#define TRIGGERPIN D7
#define ECHOPIN  D5
// This function is called every time the device is connected to the Blynk.Cloud
BLYNK_CONNECTED()
{
  // Change Web Link Button message to "Congratulations!"
  Blynk.setProperty(V3, "offImageUrl", "https://static-image.nyc3.cdn.digitaloceanspaces.com/general/fte/congratulations.png");
  Blynk.setProperty(V3, "onImageUrl",  "https://static-image.nyc3.cdn.digitaloceanspaces.com/general/fte/congratulations_pressed.png");
  Blynk.setProperty(V3, "url", "https://docs.blynk.io/en/getting-started/what-do-i-need-to-blynk/how-quickstart-device-was-made");
}

// This function sends Arduino's uptime every second to Virtual Pin 2.
void myTimerEvent()
{
  // You can send any value at any time.
  // Please don't send more that 10 values per second.
  Blynk.virtualWrite(V2, millis() / 1000);
}

void setup()
{
  // Debug console
  Serial.begin(115200);
  pinMode(TRIGGERPIN, OUTPUT);
  pinMode(ECHOPIN, INPUT);
  Blynk.begin(auth, ssid, pass);
  timer.setInterval(1000L, myTimerEvent);
}

void loop()
{
  byte i;
  byte present = 0;
  byte type_s;
  byte data[12];
  byte addr[8];
  float celsius, fahrenheit;
 
  if ( !ds.search(addr))
  {
    ds.reset_search();
    delay(250);
    return;
  }
 
 
  if (OneWire::crc8(addr, 7) != addr[7])
  {
      Serial.println("CRC is not valid!");
      return;
  }
  Serial.println();
 
  // the first ROM byte indicates which chip
  switch (addr[0])
  {
    case 0x10:
      type_s = 1;
      break;
    case 0x28:
      type_s = 0;
      break;
    case 0x22:
      type_s = 0;
      break;
    default:
      Serial.println("Device is not a DS18x20 family device.");
      return;
  }
 
  ds.reset();
  ds.select(addr);
  ds.write(0x44, 1);        // start conversion, with parasite power on at the end  
  delay(1000);
  present = ds.reset();
  ds.select(addr);    
  ds.write(0xBE);         // Read Scratchpad
 
  for ( i = 0; i < 9; i++)
  {          
    data[i] = ds.read();
  }
 
  // Convert the data to actual temperature
  int16_t raw = (data[1] << 8) | data[0];
  if (type_s) {
    raw = raw << 3; // 9 bit resolution default
    if (data[7] == 0x10)
    {
      raw = (raw & 0xFFF0) + 12 - data[6];
    }
  }
  else
  {
    byte cfg = (data[4] & 0x60);
    if (cfg == 0x00) raw = raw & ~7;  // 9 bit resolution, 93.75 ms
    else if (cfg == 0x20) raw = raw & ~3; // 10 bit res, 187.5 ms
    else if (cfg == 0x40) raw = raw & ~1; // 11 bit res, 375 ms
 
  }
  celsius = (float)raw / 16.0;
  fahrenheit = celsius * 1.8 + 32.0;
  Serial.print("  Temperature = ");
  Serial.print(celsius);
  Serial.print(" Celsius ");

 lcd.print(V1, 1, celsius);
 Blynk.virtualWrite (V7, celsius);


  Blynk.run();
  timer.run();
 
}

Stop, stop. Right now, your blood is boiling and we can't fix that.

When you feel calmer, go read the forum guide in the sticky post. Then edit your post and fix it so it doesn't break the forum rules.

The forum rules are not there to annoy you. They are there to enable us to help you.

2 Likes

That's not correct. An ESP8266 is a 3.3volt-logic processor. Supply and pull up of the DS18B20 must be connected to the 3.3volt pin of the ESP. Not saying that's the reason, but...
Post a diagram and/or picture of the layout.
Leo..

Oups, sorry, will for sure try to find and read the sticky!

I used the 5v in the earlier setup, that worked, so I do not think that is the culprit...



Hi PaulRB, am not very sure about what wrong I did in my first post but have now read and tried to rectify with at least tagging the code correctly.

Yeah, that better, thanks.

But its hard to tell if you have the { and } in the right places, which can be critically important in C code, because your indentation is all a mess. Please click Tools->Auto Format and post it again in your next post.

1 Like

What does that mean, exactly? What did you resolder?

I see a small PCB in your photos which seems to have 3 PCB header pins and 3 screw connectors. You resoldered something there?

Sounds like an intermittent short circuit. Maybe your resoldering caused that?

What do you mean by the "Arduino programmer" ? Can you post a photo of that?

I see a Wemos d1 Mini in your photos. That is a board which uses an esp8266, but there are other types. Are all your "esp8266" actually Wemos d1 Mini or something different?

I also see in your photos that you seem to be trying to connect your sensor to the d1 Mini by pushing male Dupont connectors into the holes. That won't make reliable connections. You need to solder PCB pins to the D1 mini and connect female Dupont connectors to those. Better still, solder the D1 mini to stripboard or tripad board and solder the sensor wires to that also, or solder more PCB pins to the stripboard and connect female Dupont connectors to those.

1 Like

You connected a 4k7 resistor from 5V to a 3.3V input pin?
DS18B20 works fine on 3V3, doesn't need 5V

That is like saying I drove across the freeway at night without any lights and nothing happened. Some times you can get lucky.

1 Like

No, connected it between 5v and D pin

Hehe, good comparasion, will go 3v instead.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.