How to connect and upload

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
DMeekelenkamp
Normal user
Posts: 35
Joined: 11 Nov 2015, 13:52

How to connect and upload

#1 Post by DMeekelenkamp » 24 Nov 2015, 23:00

Hello

I am trying to upload the espeasy r039 to a esp-12e module but I keep getting a error in the arduino ide.

Error: espcom_open failed

I am using 1.6.5
And a bare esp module with the white board.


Vcc> 3.3v
Ch_PD> 3.3v
Gnd> gnd
Gpio 0> gnd
Tx> rx
Rx> tx

I am using the usb to serial converter and a separate power supply for the esp module with grounds connected

I selected usbasp in the ide and esp8266 boards

Can somebody explain me what I do wrong?

chrille
Normal user
Posts: 88
Joined: 26 Aug 2015, 15:11
Location: Horsens, Denmark

Re: How to connect and upload

#2 Post by chrille » 25 Nov 2015, 08:57

DMeekelenkamp wrote:I am trying to upload the espeasy r039 to a esp-12e module but I keep getting a error in the arduino ide.

Error: espcom_open failed

I am using 1.6.5
And a bare esp module with the white board.

Vcc> 3.3v
Ch_PD> 3.3v
Gnd> gnd
Gpio 0> gnd
Tx> rx
Rx> tx

I am using the usb to serial converter and a separate power supply for the esp module with grounds connected

I selected usbasp in the ide and esp8266 boards

Can somebody explain me what I do wrong?
The programmer setting (USBASP) doesn't matter when programming the ESP8266 from Arduino IDE. On ESP-12/12E (and other modules that exposes GPIO 15) you need to connect that pin to GND. How are you powering the module? The 3.3V power from USB serial adaptors are not sufficient to power the ESP module - you need an external, stable 3.3V power supply

- Jan
Jan Chrillesen, Denmark

DMeekelenkamp
Normal user
Posts: 35
Joined: 11 Nov 2015, 13:52

Re: How to connect and upload

#3 Post by DMeekelenkamp » 25 Nov 2015, 10:19

I am using a separate power supply for the esp module with grounds connected between the power supply and serial programmer. The esp module feels like it is working because it gets nice warm (not hot).

Gpio15 is allready connected to ground with a 10k resistor on the breakout board.
http://tinyurl.com/pbna4v9


I will try tonight with a other esp12e module maybe this one is faulty.

I have this programmer:

https://encrypted-tbn0.gstatic.com/imag ... M5ym3asDQg

I set it to 3.3v with the jumper. Are the rx tx lines then also 3.3v?

Or did I blew up my rx tx lines on the esp. because I don't use a level shifter. The first attempt the rx and tx leds started flickering on the programmer but after 3 seconds it stopped flickering and only the tx led was slowly flashing. I tried the programmer in a pro mini and that still works.

Backbone
Normal user
Posts: 106
Joined: 06 Oct 2015, 22:12

Re: How to connect and upload

#4 Post by Backbone » 25 Nov 2015, 17:28

Use an other power supply to feed the 3.3 volt.
I had similar issues where I found out two things.
Serial monitor was giving rubbish only due to defective (not enough current) 9 volt adapter.
Also when the serial monitor is open it cant flash to the module and gives this error.
let us know.

Paco

DMeekelenkamp
Normal user
Posts: 35
Joined: 11 Nov 2015, 13:52

Re: How to connect and upload

#5 Post by DMeekelenkamp » 25 Nov 2015, 20:33

I already use a separate power supply

arduino ide
https://www.dropbox.com/s/mpypfr8qpvulm ... 4.png?dl=0

battery is used as power supply with a converter 3.3v ams1117
https://www.dropbox.com/s/qmgja1zljldlg ... 4.jpg?dl=0

https://www.dropbox.com/s/qi5wli3bin23k ... 0.jpg?dl=0

Programmer i use (is this the problem???)

https://www.dropbox.com/s/exk53dekr2sn0 ... 5.jpg?dl=0

I reinstalled arduino ide but nothing changes.
Tried a other esp-12e module nothing changes

gpio 15 extra gnd no change

For some reason i get explanation marks at the folder. I dont think this is the problem...

https://www.dropbox.com/s/jq86h31y4mhst ... 1.png?dl=0

https://www.dropbox.com/s/bxmvxs320y1n9 ... 6.png?dl=0

At this moment i really don't have a clue what the problem is :(

DMeekelenkamp
Normal user
Posts: 35
Joined: 11 Nov 2015, 13:52

Re: How to connect and upload

#6 Post by DMeekelenkamp » 25 Nov 2015, 21:23

Do I have to pull gpio2 high?

Some say yes some say it doesn't matter.

Backbone
Normal user
Posts: 106
Joined: 06 Oct 2015, 22:12

Re: How to connect and upload

#7 Post by Backbone » 25 Nov 2015, 22:16

Explanation marks are there not for nothing.
What makes me thinks is that not all arduino files are with an explanation mark. So this makes you think why.
Are they blocked or managed by any restriction.
Regularly explanation marks are no good.
Do you have an other PC to try?


For IDE are you using this as additional board manager?
See http://www.esp8266.nu/index.php/Tutoria ... are_Upload

http://www.esp8266.nu/index.php/File:Tu ... o_IDE2.png

Your USB to serial converter is good I use this too in same configuration.
I would advise to use a simple wall plugable adapter minimum 500 ma current.
That it shows 3.2 volt does not say the battery can deliver the current needed.

GPIO-2 does not do anything for uploading.

GPIO-0 needs to be low.
GPIO-15 needs to be low.
CHIP-EN needs to be High.
All other pins are not of any influence during upload.

Debug with other PC?

Paco

DMeekelenkamp
Normal user
Posts: 35
Joined: 11 Nov 2015, 13:52

Re: How to connect and upload

#8 Post by DMeekelenkamp » 26 Nov 2015, 10:38

I will try it tonight on my old laptop.

The 3.2v showing is not accurate because the led voltmeter is not calibrated, on the multimeter I measured 3.34volt the battery can deliver more than enough power. I also tried it with a 5v 2A phone supply but it didn't make a difference.

I also tried it with 2x ams1117 in parallel but that would deliver 1.6A still no difference.

Also I cannot see anything in the serial monitor...

Backbone
Normal user
Posts: 106
Joined: 06 Oct 2015, 22:12

Re: How to connect and upload

#9 Post by Backbone » 26 Nov 2015, 11:38

Let us know with other laptop.

DMeekelenkamp
Normal user
Posts: 35
Joined: 11 Nov 2015, 13:52

Re: How to connect and upload

#10 Post by DMeekelenkamp » 26 Nov 2015, 21:57

With my laptop i dont have the explanation marks but still no luck!

same error over and over again.

I tried all power supply's i could find, tried 4 different esp modules, 2 different pc's and still nothing.

I'm getting a little frustrated by the fact that all pro mini's i have 3.3v and 5v work with my programmer and the power supply's i used. So for now i'm going to stop with espeasy for a while. Thanks for your help Paco.

Greetings Dennis

Backbone
Normal user
Posts: 106
Joined: 06 Oct 2015, 22:12

Re: How to connect and upload

#11 Post by Backbone » 26 Nov 2015, 22:17

Sorry to hear Dennis.
I can feel your frustration.

There must be something so simple go wrong.
Let me know if I can help you to get you and easy esp going.
I can send you a programmed esp201 at cost price to get you going!
Send me a PM if needed.

Paco

DMeekelenkamp
Normal user
Posts: 35
Joined: 11 Nov 2015, 13:52

Re: How to connect and upload

#12 Post by DMeekelenkamp » 27 Nov 2015, 10:43

I think the wiki should be updated with a good tutorial for connecting of different boards there usable gpio's and how the firmware upload sequence works.
I had no luck with uploading my esp-12e module but there is also not enough information on the wiki.
I know how to use a microcontroller like the arduino and rpi. But this module is new too me and I had no clue where to start. Hope the moderators will edit the wiki with some pictures and tutorials otherwise it is again a project that develops fast but lacks information.

Thumbs up for the team and keep on going.

Cheers Dennis

DMeekelenkamp
Normal user
Posts: 35
Joined: 11 Nov 2015, 13:52

Re: How to connect and upload

#13 Post by DMeekelenkamp » 01 Dec 2015, 12:53

Finally got my esp-12e working.

The nice chinese who made my breakout boards forgot to connect a trace from the vcc pin to the vcc esp pin :evil:

After I found that out uploading went easy.

For people that can't upload this is the connection and sequence.

Connect pins:

Vcc to 3.3v
Ch_pd to 3.3v
Gpio15 to gnd
Gnd to gnd
Rx to Tx
Tx to Rx

For uploading power the board with connections above.

Then connect gpio 0 to gnd (keep this connected during uploading)
and connect reset to gnd for 2sec led will blink when released.

In the arduino ide I used: generic esp8266 boards

After uploading disconnect rx tx gpio 0 and again connect reset once to ground. Led will blink and your okay to go.

Watch out with your fingers on the contacts of the esp module it is very sensitive when powered. I allready killed one after it was uploaded and running.
Last edited by DMeekelenkamp on 03 Dec 2015, 10:23, edited 1 time in total.

Backbone
Normal user
Posts: 106
Joined: 06 Oct 2015, 22:12

Re: How to connect and upload

#14 Post by Backbone » 01 Dec 2015, 15:20

Good to hear it works now, I said it must be something simple.
Enjoy the EASY ESP functions.

Paco

tvasudev007
Normal user
Posts: 23
Joined: 20 Nov 2015, 10:53

Re: How to connect and upload

#15 Post by tvasudev007 » 03 Dec 2015, 16:10

@ DMeekelenkamp : thanks for the post man. I was desperately looking for proper circuit connections.I'll update the status once I test it. :)

Naythan
New user
Posts: 4
Joined: 10 Feb 2016, 04:07

Re: How to connect and upload

#16 Post by Naythan » 10 Feb 2016, 04:21

I finally figured out that I needed to switch the TX and RX pins.
Now I get these errors in the Serial Monitor.
Any ideas?
Thank you kindly
Attachments
Untitled-2.jpg
Untitled-2.jpg (225.41 KiB) Viewed 18595 times

tozett
Normal user
Posts: 734
Joined: 22 Dec 2015, 15:46
Location: Germany

Re: How to connect and upload

#17 Post by tozett » 10 Feb 2016, 08:08

look like you had an exeption, but than it is running normal.
now go to the next step:

the wiki has a start-page for this:
http://www.esp8266.nu/index.php/EasySetup

or in short:
type in "settings" (only this word, means only the letter) on top in the command-line of the serial monitor..
check with a smartphone/tablet, if there is a wlan ESP_0 / ESP_1 ?
connect to it with default wifi password "configesp"

there a some threads around here, where people found the same problem and the same help
hope this helps. :roll:

Naythan
New user
Posts: 4
Joined: 10 Feb 2016, 04:07

Re: How to connect and upload

#18 Post by Naythan » 11 Feb 2016, 02:31

I almost logged onto it, then it continues to reset itself. Not sure how to fix this.
Attachments
Untitled-3.jpg
Untitled-3.jpg (219.93 KiB) Viewed 18569 times

Deennoo
Normal user
Posts: 158
Joined: 07 Sep 2015, 13:03

Re: How to connect and upload

#19 Post by Deennoo » 11 Feb 2016, 09:53

Once your upload is down did you remove gpio0 from gnd ?

As Martinus already say by the past, the price differences between an esp12e nude and a dev board like nodemcu or wemos is so minime, and you win a lot of comfort with.

tozett
Normal user
Posts: 734
Joined: 22 Dec 2015, 15:46
Location: Germany

Re: How to connect and upload

#20 Post by tozett » 11 Feb 2016, 13:30

maybe you help us helping with showing an image of your setup/wiring?

Naythan
New user
Posts: 4
Joined: 10 Feb 2016, 04:07

Re: How to connect and upload

#21 Post by Naythan » 12 Feb 2016, 03:31

I'm wired up according to this setup
http://rancidbacon.com/files/kiwicon8/E ... _1.0.4.pdf
I have a OSEPP FTDI for power, set to 3.3v.
I flashed the eps again, this time it did the same, but I managed to connect for about 4 seconds, I got to the first screen to add my router password ect. When I pressed submit the esp had rebooted again. I'm looking at getting a better power supply setup. What else could be causing the problem?

tozett
Normal user
Posts: 734
Joined: 22 Dec 2015, 15:46
Location: Germany

Re: How to connect and upload

#22 Post by tozett » 12 Feb 2016, 07:55

Naythan wrote: I'm looking at getting a better power supply setup.
could be a good start... may we wait here for your new results ..? :)

Naythan
New user
Posts: 4
Joined: 10 Feb 2016, 04:07

Re: How to connect and upload

#23 Post by Naythan » 13 Feb 2016, 13:21

It is a power problem. The USB cable I was using is defective. As soon as I changed to another USB cable it works fine. This project will need to be completely wireless so I do need to switch the power to batteries, but for now this is great! Thanks for putting up with me.

tozett
Normal user
Posts: 734
Joined: 22 Dec 2015, 15:46
Location: Germany

Re: How to connect and upload

#24 Post by tozett » 14 Feb 2016, 10:10

sounds to me that the thread could be marked as SOLVED...

Gorgo
Normal user
Posts: 20
Joined: 14 Feb 2016, 11:40

Re: How to connect and upload

#25 Post by Gorgo » 14 Feb 2016, 13:36

Hi folks,

it seems I have some sort of a similar problem. Uploading anything successfully to my ESP-07 is totally accidental.

I have an FTR232RL (3.3V) USB/Serial, separate PSU at 3.5V/1A (common grounds with USB/Serial) -actually I have two of these, tried both with multiple USB cables
Rx-Tx crossed, Gpio0 and 15 pulled to ground directly.
I have made breadboard friendly pins soldered onto the ESP board made of male pin headers, so connection seems OK.

1 out of 10 attempts I can successfully upload a sketch ('blink' for example), the next 10 attempts fail...

Yesterday I've managed to upload EspEasy via your flasher (not Arduino IDE), the AP ESP 16122334 (some long number but not ESP_0) appeared for a few seconds on my 'radar' but not anymore...

Now I tried to use Arduino IDE following your tutorial, and I get the following error messages:

"writing flash
............................................................................................................ serialport_receive_C0: D0 instead of C0
warning: espcomm_send_command: didn't receive command response
warning: espcomm_send_command(FLASH_DOWNLOAD_DATA) failed
serialport_receive_C0: 01 instead of C0
warning: espcomm_send_command: didn't receive command response
closing bootloader
flush start
setting serial port timeouts to 1 ms
setting serial port timeouts to 1000 ms
flush complete"


Thank you for your advice and ideas in advance.

tozett
Normal user
Posts: 734
Joined: 22 Dec 2015, 15:46
Location: Germany

Re: How to connect and upload

#26 Post by tozett » 14 Feb 2016, 16:07

Gorgo wrote: I have an FTR232RL (3.3V) USB/Serial, separate PSU at 3.5V/1A (common grounds with USB/Serial)
may you check this twice. exchange with another usb-serial (other chip?),
or try from raspberry/Linux, if possible.

some people exchanged usb-cable, which helped. may try this?

and maybe try to flash nodemcu with the nodemcu-flash-tool?
descriptions here in the forum and on the nodemcu website. may give this a try to get more information about the malfunction?

Gorgo
Normal user
Posts: 20
Joined: 14 Feb 2016, 11:40

Re: How to connect and upload

#27 Post by Gorgo » 14 Feb 2016, 20:39

tozett wrote: may you check this twice. exchange with another usb-serial (other chip?),
or try from raspberry/Linux, if possible.

some people exchanged usb-cable, which helped. may try this?

and maybe try to flash nodemcu with the nodemcu-flash-tool?
descriptions here in the forum and on the nodemcu website. may give this a try to get more information about the malfunction?

Tried two similar USB-Serial, probably I will buy a differend one. Do you have any suggestion which to choose?
I have no access to a Pi... yet.
Tried about 4 USB cables.
Never played with nodemcu yet but I think I will give it a go, thank you.

But I think tomorrow I will try to upload something to the ESP through an UNO first. Just to see if it's still operational or not any more.

tozett
Normal user
Posts: 734
Joined: 22 Dec 2015, 15:46
Location: Germany

Re: How to connect and upload

#28 Post by tozett » 15 Feb 2016, 07:38

you could use google picture search to get some wiring diagrams to flash esp through uno..

https://www.google.de/search?q=flash+es ... MQ&dpr=1.1

i tried prolific und ftid usb-to-serial adapters. real ones and chinese clones.
a bit fiddling to get this working with the clones. all worked without any hassle from my pi/linux...

good luck! :)

Gorgo
Normal user
Posts: 20
Joined: 14 Feb 2016, 11:40

Re: How to connect and upload

#29 Post by Gorgo » 15 Feb 2016, 14:47

For the record:

OK, I tried with my lab PSU adjusted to 3.4V. The board draws 0.21A, but no success with uploading anything, so I stepped back to the first board I used which is soldered to a board with headers, and supplied it DIRECTLY from the FTDI with a 470uF cap, and it worked like a charm. No external PSU...

Now that EspEasy is uploaded, been able to connect to ESP_0, my only problem is that I can't reach the "captive portal hosted by the ESP module". I know it is a different topic but... is there an IP address for this welcome screen?

tozett
Normal user
Posts: 734
Joined: 22 Dec 2015, 15:46
Location: Germany

Re: How to connect and upload

#30 Post by tozett » 15 Feb 2016, 15:41

192.168.4.1

:-)

Gorgo
Normal user
Posts: 20
Joined: 14 Feb 2016, 11:40

Re: How to connect and upload

#31 Post by Gorgo » 15 Feb 2016, 17:26

Thanks, I've found it in the "Using the flashtool to upload the ESP Easy firmware" tutorial accidentally, and having no doubt that I'm a noob at this, but is that IP obvious? ;)
Perhaps I've missed something important.

Anyway, thank you for your effort, it is working now!

Post Reply

Who is online

Users browsing this forum: No registered users and 125 guests