Hi i have this board ATmega328p+ESP8266 from robotdyn, could you please help me to control it. Thank you all
Start with a site search for “Robotdyn”.
Hi,
I did spend quite some time to get the Robotdyn UNO with ESP8266 to communicate correctly.
The ESP8266 on these boards from Robotdyn (I have the UNO version but there is also available MEGA version) seem to have sketch similar to autoconnect Example from WiFiManager, which creates webserver on ip-number 192.168.4.1 which brings forward web-page which can be used to connect/configure the access-points.
This sketch seems to hinder the ESP8266 to receive and reply to AT commands.
At least it did not respond to any AT commands through serial monitor.
See also discussion here where it is stated that WifiManager does not work when ESP8266 is used in Shield mode.
I flashed new official firmware from here: https://espressif.com/en/support/download/sdks-demos
I used version v1.5.4 and patch V1.5.4.1 Patch_20160704
I used Flash Download Tools v3.4.4 tool from here: https://espressif.com/en/support/download/other-tools
I used instructions from here: http://remotexy.com/en/help/esp8266-firmware-update/
In the bin folder coming from the .zip file are the files needed to flash the ESP8266.
Please note that in the folder from the patch is a newer esp_init_data_default.bin file to be used.
In the AT folder under the bin file are folders and files.
In the README.txt file are instruction on what file to store where in the ESP8266 memory location.
As the Robotdyn UNO + WiFi has ESP8266 which is stated to be 8Mb I used:
Which means files from the 512+512 were used.
After flashing the ESP it finally started to reply to AT commands.
I then used the ESP8266_Shield from the Blynk examples as a base for Sketch for the Arduino.
My board being Uno, with only one hardware serial means that it has only one communication mode at any given time:
- USB -> UNO
- USB -> ESP8266
- UNO -> ESP8266
Which means that I am not able to use Serial monitoring when the Uno and ESP8266 are connected.
I therefore needed to change EspSerial definition in the sketch from Serial1 to Serial:
(#define EspSerial Serial1 - > #define EspSerial Serial)
And comment out the console serial communication:
// Set console baud rate
// Serial.begin(9600);
// delay(10);
And set serial speed to 11520.
Please note that changes to the dip-switches needs to be done depending on with which part you are communicating (Uno og ESP part) and them again to let the Uno communicate with ESP.
After this work, these boards have worked flawlessly for me.
I hope this helps
Regards
BB
Sir, hello. May I ask sir how did you set the esp in firmware mode, to flash it? From the site you posted, they made use of esp 8266-01, but with robotdyn uno+wifi, what will be the connections?
I am so sorry I am so new with this module. thank you sir in advance.
Hi,
If you have Robotdyn Uno + Wifi it has 8 switches on the board which control how communication flow between the MCU, USB and ESP.
Swith 5 and 6 connect USB serial input to the ESP.
Swithc 7 sets the ESP in flash mode.
So to flast the ESP you would set pins 5, 6 and 7 on ON.
Others on OFF.
You of course need to change the switches again to let the MCU communicat to the ESP.
There is a table on the AliExpress and Robotdyn sites for the module, which explains in what position each switch needs to be in for communication mode.
Don’t give up on the modules. They work very well once flashed with the standart AT-capable firmware.
Let us know how it goes.
BB
It worked already sir. I can now input AT commands on ESP. I am just wondering if what codes are applicable as I connect ATmega and ESP. I mean, If for example I would want to turn a led on that is connected to the arduino, how will the esp transfer the command to the arduino? Thank you sir.
Hi bjorg,
I followed your instruction and flashed my robotdyn uno + wifi ESP8266 (32Mb) with the wrong flash setting. The one I have is a 32Mb flash memory version. How do I get the instruction to flash it correctly for 32Mb version?
Here is what I did
- I toggle the switch 5,6,7 to on to put the robotdyn into ESP8266 upload mode
- I followed the instruction on remotexy and put the required address (for 8MB)
- I flashed the required files and the software completed successfully
- I placed the robotdyn switch 5,6 on ON mode
- Then I plug the USB and open up arduino IDE serial connection
- I try to query AT command but there was no response from ESP8266
Update:
I found some info on the correct map address for my module (32Mbit = 4MB), as follows. I reflashed with the following address download
https://espressif.com/en/support/explore/get-started/esp8266/getting-started-guide
Download addresses
Binaries 4096
ESP_init_data_Default.bin 0x3FC000
blank.bin 0x3FE000
However, when I put my robotdyn switch 5,6 to ON and try to query AT on Arduino IDE serial connection, it still returns error message only. Baudrate is set at 115200
Any help is much appreciated. Thank you
Here is the link of the robotdyn board that I bought
Hi,
Your board seems to be similar to what I have used.
What I flashed onto the ESP8266 was firmware .
In the Readme text file there were following instructions on addresses:
Flash size 32Mbit: 512KB+512KB
boot_v1.2+.bin 0x00000
user1.1024.new.2.bin 0x01000
esp_init_data_default.bin 0x3fc000 (optional)
blank.bin 0x7e000 & 0x3fe000
Where of one of the blank.bin addresses is different than in your screenshot. (You have an address 0x81000 for something.)
You might therefore be overwriting something with it.
After the flashing, the download tool looked like this:
I see that on your screenshot you did not mark the SpiAutoSet.
Is there a reason for that?
Did you get the green Finish button in the end, which would indicate that the download tool successfully flashed?
Regards
BB
Hello,
did you get the answer to your last question, because I am wondering about the same right now.
(How will the uno know that the esp has some information for it… even when pin 1 and 2 are ON)?
This combo board is the same as any separate Arduino with ESP as shield… The Arduino is what you program and is what does all work.
The Arduino doesn’t even know the ESP is there… it is just communicating to the Blynk Server through serial and the ESP justs acts like a simple Serial to WiFi adapter, nothing more.
Not Blynk Specific issue… information is available for reading, no need to troubleshoot further hardware issue in this forum.