Baud rate for Wemos D1

Forum for posting topics and questions about anything.
monahan@vitasoft.org
Posts: 6
Joined: Tue Feb 01, 2022 5:25 am

Baud rate for Wemos D1

Post by monahan@vitasoft.org » Tue Feb 01, 2022 5:39 am

I'm a new member!
I find this site very confusing as to how to post a question. I have a Wemos D1 (ESP8266 WiFi module). Your ESP8266 section does not offer me a new posting,

Unlike almost everybody here I would like to interface it directly through the UART Rx and Tx pins not via Arduino etc. .
Hitting the reset always seem to return garbage indication I don't have the correct baud rate
I see numbers all over the map on web sites.
Two questions:-

1. What is the correct baud rate for this module (right out of the box - unaltered).
2. With a power input of 5V can I run Rx and Tx from a 5v supply UART (Z8035)

Thanks in advance for help
John Monahan

andrew
Site Admin
Posts: 1383
Joined: Sun Aug 05, 2012 4:15 pm

Re: Baud rate for Wemos D1

Post by andrew » Tue Feb 01, 2022 1:36 pm

I find this site very confusing as to how to post a question. I have a Wemos D1 (ESP8266 WiFi module). Your ESP8266 section does not offer me a new posting,
If you we're trying to post in the product sections of this forum note that you are not able to create a new product thread. This is to stop multiple threads being created for the same product so that the correct thread is easy to find. There should however be an existing thread for each product which can normally be found by searching the product SKU. For the D1 the correct thread is here:

viewtopic.php?f=111&t=2125

It can also be found under the Wemos category on the front page. Any questions about this product can be posted to the above thread. Alternatively, if you have a question about an existing product and you cant find its thread, you can just start your own thread in the general discussion section of the forum like you have done here.

Hope that helps.

1. What is the correct baud rate for this module (right out of the box - unaltered).
It's 115200 BAUD. After a reset you will still see some garbage but at the end of it you will see the word 'ready'

2. With a power input of 5V can I run Rx and Tx from a 5v supply UART (Z8035)
If you are using a separate serial adapter then its Tx & Rx pins will need to be at 3.3V logic levels as the ESP8266 on the D1 is not 5V tolerant.
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

monahan@vitasoft.org
Posts: 6
Joined: Tue Feb 01, 2022 5:25 am

Re: Baud rate for Wemos D1

Post by monahan@vitasoft.org » Tue Feb 01, 2022 6:50 pm

Thanks on answering questions. Wish somewhere the datasheet has said the Rx and Tx pins are 3.3 only even if you are supplying 5v.

Are you 100% sure about the Baud rate on the actual Wemos D1. I know the USB is 115200 but I see other discussions on the web that the D1 is higher.
For example see here
https://github.com/espressif/esptool/issues/435

Again thanks

John

andrew
Site Admin
Posts: 1383
Joined: Sun Aug 05, 2012 4:15 pm

Re: Baud rate for Wemos D1

Post by andrew » Wed Feb 02, 2022 2:46 pm

When flashing via the USB port it is definitely 115200. The USB interface is just a CH340 based USB to serial adapter that connects to the ESP8266s Tx & Rx pins and so there is no reason why the baud rate would be different if directly interfacing to the Tx & Rx pins.

One thing the CH340 interface on the D1 does do though is automatically rest and put the ESP8266 onto boot mode just before flashing it. You'll have to do that manually if you're externally interfacing to it. Could this be your issue?
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

monahan@vitasoft.org
Posts: 6
Joined: Tue Feb 01, 2022 5:25 am

Re: Baud rate for Wemos D1

Post by monahan@vitasoft.org » Thu Feb 03, 2022 3:05 am

I don't think/I'm flashing the unit. what would do that BTW?

I just want to send AT commands directly over the Rx & Tx pins.
I'm using a Zilog Z8530 (with 74VLC245 for 3.3V) directly. I'm sure I have the baud rate correct (I assuming 8 bits, 1 stop bit and NP - is that correct?). When I hit the reset button I get garbage back every time.

andrew
Site Admin
Posts: 1383
Joined: Sun Aug 05, 2012 4:15 pm

Re: Baud rate for Wemos D1

Post by andrew » Thu Feb 03, 2022 11:22 am

I just want to send AT commands directly over the Rx & Tx pins.
Oh, out of the box the D1 does not have pre-loaded firmware that supports AT commands as it's not really ideal for that. It's intended to be used as an Arduino compatible alternative. If you wanted to use it in that way you'd first need to flash the appropriate firmware into it first.
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

monahan@vitasoft.org
Posts: 6
Joined: Tue Feb 01, 2022 5:25 am

Re: Baud rate for Wemos D1

Post by monahan@vitasoft.org » Thu Feb 03, 2022 5:37 pm

Now that is a revelation. Thanks. Wish the docs made that clear , would have saved me much time.
Can you point me to a web demo showing how to flash AT commands into the unit.

John

monahan@vitasoft.org
Posts: 6
Joined: Tue Feb 01, 2022 5:25 am

Re: Baud rate for Wemos D1

Post by monahan@vitasoft.org » Thu Feb 03, 2022 8:01 pm

Have been thinking more about it Andrew.
If I connect the D1 to a USB/PuTTY terminal, after reset, I can run immediately AT commands such as
AT+CIFSR

I know its not the Rx/Tx pins, but it seems the code is already there.

What has me further confused is that after reset even the USB connection sends a stream of garbage first before sending OK.
John

andrew
Site Admin
Posts: 1383
Joined: Sun Aug 05, 2012 4:15 pm

Re: Baud rate for Wemos D1

Post by andrew » Fri Feb 04, 2022 11:36 am

Have been thinking more about it Andrew.
If I connect the D1 to a USB/PuTTY terminal, after reset, I can run immediately AT commands such as
AT+CIFSR
Hmm odd, they aren't supposed to be shipped with the AT firmware.

What has me further confused is that after reset even the USB connection sends a stream of garbage first before sending OK.
This is some information the bootloader outputs after a reset. The board rate for it is different because at that point it doesn't know what frequency crystal it's using. The D1 uses a 26MHz crystal so if you want to see the information it's outputting try setting your terminal to 74880 BAUD and then reset the D1.

After it's booted the firmware sets the correct crystal frequency and should then start communicating at 115200 baud.
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

monahan@vitasoft.org
Posts: 6
Joined: Tue Feb 01, 2022 5:25 am

Re: Baud rate for Wemos D1

Post by monahan@vitasoft.org » Fri Feb 04, 2022 5:41 pm

Thanks again Andrew, but what about the need to reprogram for AT commands. They seem to be OK with a USB connection. Should they also work for a Tx/Rx connection

John

Post Reply

Return to “General Discussion”