Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Help interfacing ESP8266

Status
Not open for further replies.

thebadtall

Full Member level 6
Full Member level 6
Joined
May 17, 2012
Messages
339
Helped
12
Reputation
24
Reaction score
12
Trophy points
1,308
Location
Hellas
Visit site
Activity points
3,605
Hello friends

I have spend around 10 hours trying to make a web server using atmega2560 and ESP8266 with no success.

The esp8266 is communicating successfully through serial at 9600
I have used more than 20 sample codes for arduino that I have found.
The problem seems to be that 8266 cannot get IP address from the router.
I have tried 3 different routers.
I have tried to link mac address to IP adreess

No luck.
Do you have any suggestions ? Thank you
 

Can the 3v3 power supply source supply enough current to the board (about 350mA bursts I think)
Which version of esp8266 board do you have and what firmware does it run?
Are you using a 5v to 3v3 level translator? (assuming 5v AVR)
Is GPIO pin 2 pulled up?
Are you able to connect to the wifi using a serial terminal commands from the PC?
 

The power supply is 200mA for the 3v3 rail.
I have used 2x 3300uF / 6v polarised capacitors and 2.2uF non polarised

I dont know wich version it runs, I will check that tomorrow

I am not using level shifter - however I used all sample codes on atmega328 - 3v3 - 8MHz with same results.

GPIO 2 is pulled up

I am successfully connected to a wifi router using AT commands. I can successfuly read data from local or remote web servers. Router identifies the mac address of the 8266 and also provides IP.

But is still not "self aware" of its ip address.

Maybe should I buy a reliable router ?

If that problem persists I plan to do manual routing, using ipcop.

That chip is very stubborn.
 

Try to avoid connecting 5v signals directly in the ESP8266 inputs, that can damage the chip.

I'm using V922 firmware in my boards () and the module version I have is ESP-01 (https://41j.com/blog/wp-content/uploads/2015/01/esp8266module_types.jpg) with 9600bps
There is also a newer version 0.95 but I have not tested it (https://www.electrodragon.com/w/Wi07c#Latest_firmware)

Have you tried a serial debug to echo all replies of ESP8266 back to a terminal, that could help you identify at which stage things go wrong.
 

I use serial2 of the atmega2560 to communicate with 8266 and serial3 to ftdi usb/ttl to read debug.
The error message is usually "busy" while trying to obtain IP using AT+CIFSR command.

From the 500 times that I have tried different combinations of code cuts&pastes and from directly commanding the 8266 through atmega328 - 3.3v only 1 time i received ip address.
After running many times the same code, I never managed to get IP address again.
Do you think that using 5v signals instead of 3v3 could be responsible for that ?
I will continue testing tonight, using 1A 3v3 supply, and will attemp to reflash/update the firmware.
 

I'm not sure where the "busy" reply comes from. The firmware that I use has some idle time after the AT+CWJAP command and gives an OK reply when connected.

I had problems while using a 5v signal for the Tx -> Rx in the form of garbage characters.
A 1k resistor between the transmit line AVR Tx -> 1K -> ESP8266 Rx or a level translator like mosfet_level_converter.jpg fixed the problem for me.

In the opposite direction I have the ESP8266 Tx line connected directly to the 5v AVR input.
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top