1

After flashing the blink sketch to the ESP8266, I removed all the unnecessary wires from flashing - and my setup to try and run the sketch looks like this:

enter image description here

Something to note about flashing - it would take anywhere from 10-50 tries before it would flash successfully, the other times it just failed to upload and spit out the espcomm failure to connect message, or it got halfway through the upload and quit. This is the only clue to me that maybe my board is just bad, and it won't be able to run any sketch - I ordered another ESP8266, but I'm still wondering if I could be doing something wrong, it seems fairly straight forward, and I have done a lot of research about this up until this point. This is my first arduino project, other than the starter projects.

Also not represented in the diagram are the female to male jumper cables I am using to connect to the ESP8266. Those connect to the breadboard, and then I plug another wire into the breadboard on the same row to attach it to what it needs to be attached to. I figure none of this stuff matters - as long as it is powered (red LED) it should be working.

Any ideas why the onboard LED isn't blinking? Or is the sketch not running at all? Does the upload problem matter...could it be producing a false positive result? The only other idea I have where something could be different is an output capacitor for the voltage regulator, I have been told that a 10mF capacitor is what I would use (but I have also been told it doesn't matter...and neither does the filter capacitor, I just put it in anyway).

CODE (straight from Arduino IDE / ESP8266 examples):

/*
 ESP8266 Blink by Simon Peter
 Blink the blue LED on the ESP-01 module
 This example code is in the public domain

 The blue LED on the ESP-01 module is connected to GPIO1 
 (which is also the TXD pin; so we cannot use Serial.print() at the same time)

 Note that this sketch uses LED_BUILTIN to find the pin with the internal LED
*/

void setup() {
  pinMode(LED_BUILTIN, OUTPUT);     // Initialize the LED_BUILTIN pin as an output
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(LED_BUILTIN, LOW);   // Turn the LED on (Note that LOW is the voltage level
                                    // but actually the LED is on; this is because 
                                    // it is acive low on the ESP-01)
  delay(1000);                      // Wait for a second
  digitalWrite(LED_BUILTIN, HIGH);  // Turn the LED off by making the voltage HIGH
  delay(2000);                      // Wait for two seconds (to demonstrate the active low LED)
}

Mike pointed out my regulator matters (because of dropout voltage) - I am using this one:

http://www.nteinc.com/specs/1900to1999/pdf/nte1904.pdf

  • not all esp-01's ive used correctly map led_builtin, or you have a pin mode that conflicts with it. the board may also be flaky or have thermal issues. – dandavis Sep 26 '17 at 0:57
1

The ESP8266 is power hungry, the Arduino may not have enough output current to power it. Also, which voltage regulator you're using matters, as some have higher dropout than others.

  • Thanks for your answer, the red LED is on...so its getting power? I am using the NTE1904 nteinc.com/specs/1900to1999/pdf/nte1904.pdf - what is dropout? – ewizard Sep 21 '17 at 2:18
  • Could lack of power be causing my upload problem? (infrequent success) – ewizard Sep 21 '17 at 2:20
  • dropout voltage is very low (0.45V) so shouldnt be an issue? how can i test if the arduino is giving enough current? – ewizard Sep 21 '17 at 2:28
  • 1
    @ewizard Okay, yeah, the dropout on that v-reg is low. Are you able to run the ESP from a real power supply? Normal current draw is around 100mA, which might be too much for the Arduino. And peak current draw can be three times that. How are you powering the Arduino?...That matters. – Mike Sep 21 '17 at 3:13
  • 1
    Power hungry, I have measured 270mA in the peeks and the Arduino can't supply near that. I have had the same issue! – MatsK Sep 21 '17 at 4:18
1

Here's how you test your voltage regulator setup:

  1. Disconnect the ESP8266.
  2. Connect a 10 ohm 1 W (or higher) resistor across the output of the v-reg. One end goes to the output, the other goes to ground.
  3. Measure the voltage across the resistor. If it stays regulated close to the expected 3.3V, then you're fine. If not, then this setup can't supply enough current for the ESP8266.
  • so do you think that there isnt enough power after the power goes through the regulator? – ewizard Sep 21 '17 at 21:03
  • Ive tested the voltage coming out of the regulator (+ side on voltage regulator output, - side on ground coming out of esp8266) and it reads 3.3v or 3.27 maybe...is that close enough? – ewizard Sep 21 '17 at 21:06
  • @ewizard Yes, that's close enough. But is that with a load on it? That's why I suggested the test above. – Mike Sep 21 '17 at 23:00
  • so the resistor simulates the load? how close does it have to be to 3.3v? im going to go get a 10 ohm 1 watt resistor – ewizard Sep 22 '17 at 0:03
  • @ewizard It has to be at least the minimum voltage required for the ESP8266 to run. You'll have to find that spec. – Mike Sep 22 '17 at 0:15
0

Some ESP8266 - V01 boards won't blink integrated led (only works with GPIO2), so connect it to a resistor (~150 ohms), in series with an external led to ground. I don't know why... is just the way that it is...

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.