ESP8266 01 uploading easy easy firmware

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
tvasudev007
Normal user
Posts: 23
Joined: 20 Nov 2015, 10:53

ESP8266 01 uploading easy easy firmware

#1 Post by tvasudev007 » 20 Nov 2015, 11:23

:roll:
I recently bought esp8266 01 modules similar to URL : http://www.electrodragon.com/product/es ... fi-module/

I came across easy esp8266 firmware which is awesome. I want to some guidance on how to upload firmware onto esp8266 01 . I tried all the steps mentioned in the tutorial on uploading firmware using Arduino IDE at easy esp website. I'm able to see "done uploading " message on Arduino IDE.
But i'm not able to find any ESP access point on my smart phone . Should I change any wiring ? Do I require any additional buttons ? In few sites I've seen that we require push buttons to change modes on esp8266 . is it required? Am i doing in the wrong way? please help me. :(

Software : Arduino 1.6.5 , R039 files from sourceforge

Wiring:

RX -> TX
TX -> RX
CH_PD -> 3.3V
GPIO 0 -> GND
VCC -> 3.3V
GND -> GND
easy_esp.PNG
easy_esp.PNG (32.28 KiB) Viewed 17367 times

Martinus

Re: ESP8266 01 uploading easy easy firmware

#2 Post by Martinus » 20 Nov 2015, 17:25

Could you start the serial monitor in Arduino and set the baud rate to 115200. Then power on the ESP and check the output on serial monitor.
Post the results here, so we can have a look at the boot process.

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

Re: ESP8266 01 uploading easy easy firmware

#3 Post by chrille » 20 Nov 2015, 22:25

tvasudev007 wrote: Wiring:

RX -> TX
TX -> RX
CH_PD -> 3.3V
GPIO 0 -> GND
VCC -> 3.3V
GND -> GND
GPIO 00 connected to GND put's the module in programming mode. The pin needs to be high (preferable pulled up with a 10k resistor) for the module to boot (you might get away with having the pin floating)

- Jan
Jan Chrillesen, Denmark

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

Re: ESP8266 01 uploading easy easy firmware

#4 Post by tvasudev007 » 23 Nov 2015, 05:49

Martinus wrote:Could you start the serial monitor in Arduino and set the baud rate to 115200. Then power on the ESP and check the output on serial monitor.
Post the results here, so we can have a look at the boot process.
RX -> TX
TX -> RX
CH_PD -> 3.3V
GPIO 0 -> floating (Didnt connect to anything)
VCC -> 3.3V
GND -> GND
serial_monitor.PNG
serial_monitor.PNG (15.08 KiB) Viewed 17302 times

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

Re: ESP8266 01 uploading easy easy firmware

#5 Post by tvasudev007 » 23 Nov 2015, 05:51

chrille wrote:
tvasudev007 wrote: Wiring:

RX -> TX
TX -> RX
CH_PD -> 3.3V
GPIO 0 -> GND
VCC -> 3.3V
GND -> GND
GPIO 00 connected to GND put's the module in programming mode. The pin needs to be high (preferable pulled up with a 10k resistor) for the module to boot (you might get away with having the pin floating)

- Jan
Do you mean to say that I need to place a button ? While uploading program GPIO 0 should be connected to GND . After Uploading It should be either HIGH or Floating (no connection). ?

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

Re: ESP8266 01 uploading easy easy firmware

#6 Post by chrille » 23 Nov 2015, 08:07

tvasudev007 wrote:Do you mean to say that I need to place a button ? While uploading program GPIO 0 should be connected to GND . After Uploading It should be either HIGH or Floating (no connection). ?
Exactly. The recommend design is pulling up GPIO 00 and GPIO 02 with a 10k resistor to 3.3V, but directly to 3.3V or even floating works. I suggest you add a 10k resistor, and a jumper, or similar, to connect to GND while programming.

- Jan
Jan Chrillesen, Denmark

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

Re: ESP8266 01 uploading easy easy firmware

#7 Post by tvasudev007 » 23 Nov 2015, 15:37

chrille wrote:
tvasudev007 wrote:Do you mean to say that I need to place a button ? While uploading program GPIO 0 should be connected to GND . After Uploading It should be either HIGH or Floating (no connection). ?
Exactly. The recommend design is pulling up GPIO 00 and GPIO 02 with a 10k resistor to 3.3V, but directly to 3.3V or even floating works. I suggest you add a 10k resistor, and a jumper, or similar, to connect to GND while programming.

- Jan
As mentioned above I'm able to upload esp firmware to esp8266(i guess , status shown on Arduino IDE) . After uploading , I disconnect GPIO pin(floating) and power esp8266 module but I'm not able to view any access points that has to hosted by esp8266 ? could this be anything related to power (i power up these modules using FTDI module-Laptop's USB) ? circuit connections issue?

vmfs1968
Normal user
Posts: 42
Joined: 18 Oct 2015, 23:51

Re: ESP8266 01 uploading easy easy firmware

#8 Post by vmfs1968 » 23 Nov 2015, 16:49

Hello
already I had this problem and resolved
goes here
Attachments
1.jpg
1.jpg (196.92 KiB) Viewed 17262 times

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

Re: ESP8266 01 uploading easy easy firmware

#9 Post by Backbone » 23 Nov 2015, 19:08

FTDI proggrammers connected to USB cant supply enough power to run ESP8266 moduls.
Use seperate power supply and test again in run mode.

Paco

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

Re: ESP8266 01 uploading easy easy firmware

#10 Post by tvasudev007 » 24 Nov 2015, 12:35

vmfs1968 wrote:Hello
already I had this problem and resolved
goes here
Thanks a ton buddy :) :) . Finally able to config my esp8266-01 .

Can you please tell my the circuit connections for esp8266-12E ?

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

Re: ESP8266 01 uploading easy easy firmware

#11 Post by chrille » 24 Nov 2015, 15:18

tvasudev007 wrote:Thanks a ton buddy :) :) . Finally able to config my esp8266-01 .

Can you please tell my the circuit connections for esp8266-12E ?
Wiring is the same on ESP-12E as on ESP-01 - except that you need to pull GPIO 15 low (both for programming and normal operations). This can be also be done with a 10k resistor. If you buy one of the white breakout boards, there's already a resistor in place for this. If you use the module directly you need to pull GPIO 15 low.

- Jan
Jan Chrillesen, Denmark

vmfs1968
Normal user
Posts: 42
Joined: 18 Oct 2015, 23:51

Re: ESP8266 01 uploading easy easy firmware

#12 Post by vmfs1968 » 24 Nov 2015, 22:36

tvasudev007 wrote:
vmfs1968 wrote:Hello
already I had this problem and resolved
goes here
Thanks a ton buddy :) :) . Finally able to config my esp8266-01 .

Can you please tell my the circuit connections for esp8266-12E ?
I'm glad to help
It is to serve the forums

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

Re: ESP8266 01 uploading easy easy firmware

#13 Post by tvasudev007 » 27 Nov 2015, 05:50

chrille wrote:
tvasudev007 wrote:Thanks a ton buddy :) :) . Finally able to config my esp8266-01 .

Can you please tell my the circuit connections for esp8266-12E ?
Wiring is the same on ESP-12E as on ESP-01 - except that you need to pull GPIO 15 low (both for programming and normal operations). This can be also be done with a 10k resistor. If you buy one of the white breakout boards, there's already a resistor in place for this. If you use the module directly you need to pull GPIO 15 low.

- Jan
Thanks Jan for your prompt response. I have weird problem .I am using esp8266-01 to switch relays using openHAB mqtt. When I power on the circuit with relays connected , relays will be in ON state by default. With the same circuit , if I connect LED to gpio pins of esp8266-01. By deafult they are in OFF state. In my circuit I haven't used any resistors , capacitors etc.

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

Re: ESP8266 01 uploading easy easy firmware

#14 Post by tvasudev007 » 27 Nov 2015, 05:51

I have weird problem .I am using esp8266 01 to switch relays using openHAB mqtt. When I power on the circuit with relays connected , relays will be in ON state by default. With the same circuit , if I connect LED to gpio pins of esp8266. By deafult they are in OFF state. Did any of you encountered this ?

kr0815
Normal user
Posts: 136
Joined: 18 Nov 2015, 18:24

Re: ESP8266 01 uploading easy easy firmware

#15 Post by kr0815 » 27 Nov 2015, 08:24

what Kind of relays is it? are you using a Transistor ? you Need either a pull-up or pull-down resistor.
Is it one of These chinese relays board? most of them have a Jumper to select if low-on or high-on

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

Re: ESP8266 01 uploading easy easy firmware

#16 Post by tvasudev007 » 27 Nov 2015, 09:44

It is similar to : http://www.ebay.in/itm/1-Channel-Isolat ... 4897.l5659 .

I am not using any external devices.

my connections are

CH_PD -> 3.3V
GPIO 0 -> Input to relay 1
GPIO 2 -> Input to relay 2
VCC -> 3.3V
GND -> GND

How to connect pull up /pull down resistors & where ?

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

Re: ESP8266 01 uploading easy easy firmware

#17 Post by Backbone » 27 Nov 2015, 10:58

I ordered a board with 4 relays that uses opto couplers at the input.

http://www.ebay.nl/itm/270872712821?_tr ... EBIDX%3AIT

When I connected it to the 3.3 volt and put the ESP low (these boards have reverse logic) I saw the LED of that relay light up..........but the relay did not switch.
So I started to troubleshoot with the schemaics and measured around the board.
I found out the the 3.3 volt from the ESP is not sufficient to open the transistor at the other side of the opto coupler pin 3 and 4.
So the emitting diode of the opto does not open the transistor.
With 5 volt at the input it worked perfectly so I placed the wire coming from the ESP to the emmiter of the opto coupler transistor which is the base of the transistor that is switching the relay. Probem solved but a hack I do not like.
99% of the relay boards are 5 volt logic and it might work or might not depending on the tolerance of the three parts in the first line.
I have one that worked with an optocoupler with same specs.
The input line pin 1 and 2 of the optocoupler has a resistor that need to be lower in value to get this line working on 3.3 volt.
You can try to solder a 470 ohm resistor in paralel with the SMD resistor in the first line to see if that works.
So take care if you stumble on this.
I am now only ordering relay boards with only transistors at the input and not with an opto coupler.

http://www.ebay.nl/itm/131199730319?_tr ... EBIDX%3AIT


Paco

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

Re: ESP8266 01 uploading easy easy firmware

#18 Post by tvasudev007 » 27 Nov 2015, 12:29

I think you didn't get my question. I am able to drive relay with 3.3 v input . My problem is ,

Case 1 :

esp8266 01 gpio 00 connected to LED positive terminal
gpio 02 conneted to LED2 positive terminal

I use openhab to switch on/off gpio pins .

When I power on esp8266.

default state of LED's = OFF

I am able to switch ON/OFF LEDS properly.

Case 2:

esp8266 01 gpio 00 connected to input terminal of relay1
gpio 02 connected to input terminal of relay2

When I power on esp8266
default state of Relay is HIGH ( Gpio pins are high) without switching ON in openhab

but after 30-45 seconds I am able to switch relay ON/OFF properly. But as soon as I power esp8266 Relay's will be turned ON.

Is that anything to do with current surge ? back emf ? problem with esp8266 ? How should I protect esp gpio pins from all these negative effects ??

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

Re: ESP8266 01 uploading easy easy firmware

#19 Post by Backbone » 27 Nov 2015, 13:28

OK step by step.

For all ESp module if you switch it on and there is no code chaching state of the output the pinoutput is LOW!!!!!! or not active or what you want to call it.

LEDS only.
You are switching VCC by the ESP pin!!!!! not GND so you use current sourcing.
ESP is swithed OFF.
You connect led with serial resistor between ESP pin and gnd.
LED is OFF as the pin is LOW.

ESP is switched ON.
LED is OFF as output is active LOW.
Now with OPEN HAB you can send HIGH signal to ligth up LED (active HIGH) and send LOW signal to dim LED (active LOW).
SO HIGH is LED ON and LOW is LED OFF.
opto2.jpg
opto2.jpg (14.46 KiB) Viewed 17699 times
Relay only.
You are switching GND by the ESP pin.
ESP is swithed OFF.
Your relay board first needs a VCC 3.3volt and a GND connection to work at all.
And you connect an input wire pin of relay board to an ESP pin.
Relay is OFF.

ESP is switched ON.
Relay is switched ON. Dang this is not what you want...... but the ESP pin is LOW at start up?!?!
Measure it with a simple DVM digital volt meter.
The pin of the ESP is LOW and if you look at the schematics this causes the LED of the opto couler to switch the transistor and so the relay ON.
The LED of the opto coupler is switch by ground not by VCC as is the regular LED in your other connection.
Now you toggle the state of the relay in OPENHAB and then an active HIGH from OPENHAB causes the optocoupler led to dim and switch OFF the relay. So reverse of what you want. And toggle will change state but in opposite way as with a cold start up.
An active LOW switch ON the relay. This is called reverse logic.
If you connect your regular LED to VCC and switch the GND you have the same reverse logic as with the relay board.

You are using current sinking.



All VCC points on the relay boards are connected so you cant reverse to positive switching as with the regular leds.

Let me know if this what you see happening and this answers the question.

Paco

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

Re: ESP8266 01 uploading easy easy firmware

#20 Post by Backbone » 27 Nov 2015, 13:43

current sinking

Could not add this pic in previous respond.
opto.JPG
opto.JPG (21 KiB) Viewed 17699 times

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

Re: ESP8266 01 uploading easy easy firmware

#21 Post by tvasudev007 » 29 Nov 2015, 06:32

That was a good explaination. I even read your artice.

My problem is

case 1:

step 1:
On powering circuit:

gpio 00 -> Led positive
common gnd

Led state-> OFF

Using openHAB I send ON command -> LED ON
OFF command -> LED OFF

step 2:

openHAB ON -> LED ON
openHAB OFF -> LED OFF

It works perfect with LED. and also with Arduino UNO . Initial reading of UNO is LOW.

Case 2:

On powering circuit:

gpio 00 -> Relay input
common gnd

Relay state-> ON . Input pin is HIGH unlike in the case of LED.By default it is in the ON state.

Using openHAB I send OFF command ->Relay OFF
ON command -> Relay ON

step 2:

openHAB ON -> Relay ON
openHAB OFF -> Relay OFF

Facing problem with relay & attiny85. Initial reading is ON unlike in case 1.

I think, I am facing this issue with the devices that do not have pull-up/pull-down resistors. I am not using any transistors etc., for switching.
Should I make changes in the circuit. ??

kr0815
Normal user
Posts: 136
Joined: 18 Nov 2015, 18:24

Re: ESP8266 01 uploading easy easy firmware

#22 Post by kr0815 » 29 Nov 2015, 10:33

could you meassure the voltage on the GPIO ?
With relays and LED, after Initial start and later, when working as expected ? Is it really 0V and 3.3V ? Or something inbetween ?

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

Re: ESP8266 01 uploading easy easy firmware

#23 Post by tvasudev007 » 29 Nov 2015, 10:53

kr0815 wrote:could you meassure the voltage on the GPIO ?
With relays and LED, after Initial start and later, when working as expected ? Is it really 0V and 3.3V ? Or something inbetween ?
Not exactly 3.3V around 3-3.1V in both the cases.

kr0815
Normal user
Posts: 136
Joined: 18 Nov 2015, 18:24

Re: ESP8266 01 uploading easy easy firmware

#24 Post by kr0815 » 29 Nov 2015, 11:25

And when in low state ? Both after boot and when switched once on and off ?

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

Re: ESP8266 01 uploading easy easy firmware

#25 Post by tvasudev007 » 29 Nov 2015, 11:43

kr0815 wrote:And when in low state ? Both after boot and when switched once on and off ?
around 0.2V

Martinus

Re: ESP8266 01 uploading easy easy firmware

#26 Post by Martinus » 29 Nov 2015, 11:48

Hmm, topic subject is about uploading ESP Easy firmware but discussion is about relays and electronic circuits...
Maybe start a new topic?

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

Re: ESP8266 01 uploading easy easy firmware

#27 Post by tvasudev007 » 29 Nov 2015, 11:51

Martinus wrote:Hmm, topic subject is about uploading ESP Easy firmware but discussion is about relays and electronic circuits...
Maybe start a new topic?
Thanks Martinus , I have already started a new topic :)

Post Reply

Who is online

Users browsing this forum: No registered users and 14 guests