Notifications
Clear all

Upload speed Arduino vs serial programmer

31 Posts
4 Users
7 Likes
1,227 Views
douwebakker
(@douwebakker)
Member
Joined: 1 year ago
Posts: 58
Topic starter  

Hi, I'm experimenting today with uploading an ESP8266-01. First I uploaded a simple program (blink) with a serial programmer. That takes 35 seconds. Then I uploaded the same ESP8266-01 via an Arduino-uno. That takes 5.5 seconds. Have you noticed that too. Can anyone explain that big difference?
 

This topic was modified 1 year ago by douwebakker

   
Quote
Inq
 Inq
(@inq)
Member
Joined: 2 years ago
Posts: 1900
 

I would say the main reason is even the smallest ESP-01 has 512 KB of flash memory (ESP-01S 1MB). Most other ESP8266 have 4 or 16MB. An UNO only has 32 KB. It simply takes time to erase flash memory before the writing process. Size of program doesn't really come into it.

However, even the blink sketch will have the WiFi low level code in it from Espressif, no matter whether your using WiFi or not. You'll note the binary is a lot larger than the Uno version.

Are you using the best upload speed for the ESP? I always use: 921600. I have seen some computer/ESP combinations that can use the 3,000,000 baud rate... at which point is upload even a full-blown WiFi app in short order.

3 lines of code = InqPortal = Complete IoT, App, Web Server w/ GUI Admin Client, WiFi Manager, Drag & Drop File Manager, OTA, Performance Metrics, Web Socket Comms, Easy App API, All running on ESP8266...
Even usable on ESP-01S - Quickest Start Guide


   
Dazza reacted
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6482
 
Posted by: @douwebakker

Hi, I'm experimenting today with uploading an ESP8266-01. First I uploaded a simple program (blink) with a serial programmer. That takes 35 seconds. Then I uploaded the same ESP8266-01 via an Arduino-uno. That takes 5.5 seconds. Have you noticed that too. Can anyone explain that big difference?
 

I am confused, how do you upload to an esp8266-01 with an arduino uno? AFAIK you upload with either an FTDI or USB both connected to a PC/Mac/*nix.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PLI/1, Pascal, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
Dazza reacted
ReplyQuote
douwebakker
(@douwebakker)
Member
Joined: 1 year ago
Posts: 58

   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6482
 

@inq I just learned something.

In the past, all I did was click the icon in the Arduino IDE for 'Upload'. Now I went looking for where to change Upload speed, found it.

Default is 115,200 and the blink sketch reports 17.3 secs at 122.7 kbits/sec while 

               921,600                               reports 5.1 secs at 419.7 kbits/sec

I have USB4/TB4 (40 GBS) ports but the 3,000,000 failed.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PLI/1, Pascal, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
Dazza reacted
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6482
 

@douwebakker Ah, I didn't realize it was one of those tiny modules. I have a bunch of them but haven't played with one yet. I also have an ESP01-S and an adapter board but I don't have a Boards entry for it so can't test it. What did you use for board selection?

EDIT I forgot to mention my adapter board got fairly warm so maybe I fried something? Just noticed a voltage regulator so might be ok, but still no idea how to select board.

IMG 7239
IMG 7238

 

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PLI/1, Pascal, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
MrRemedy reacted
ReplyQuote
(@davee)
Member
Joined: 3 years ago
Posts: 1538
 

Hi @douwebakker,

I don't have any ESP8266, so I'll keep out of the main course of this discussion, but I think it would be helpful if you specified with drawings, etc, the precise rigs and procedures that you are comparing.

-----------------------------------------

For example, you say " I uploaded the same ESP8266-01 via an Arduino-uno" ... so I Googled how to do that .. and found a method:

https://create.arduino.cc/projecthub/harshmangukiya/how-to-program-esp8266-with-arduino-uno-efb05f

which states in procedure to perform the ESP programming  "Reset pin is grounded to bypass the Arduino. It will disable Arduino Board and upload code directly to the ESP8266."

so the only part of the Uno that is actually contributing is the auxiliary processor (ATMEGA8U2-MU) which performs the USB to serial interface. (The main 'user' microcontroller that you would normally program is totally unable to run any program whilst the ESP chip is being programmed.)

This function on a so-callled "FTDI" USB to serial card is  usually performed by a dedicated chip. The first well-known supplier of such chips was called FTDI, and hence the commonplace usage of the name, but there are many alternates and clones, e.g. CH340, now in use.

Which chip your "FTDI" card is using will be down to luck, unless you specifically chose it ... and because of the mass cloning, even the markings on the chip may be "fake".

-----

These leaves me to wonder if your experiment is actually just comparing the two chips (UNO auxiliary processor (ATMEGA8U2-MU) versus CH340 or similar) performing the USB to serial interface task.

As @inq has already mentioned, one maybe operating at higher baud rate, or otherwise quicker at handling the data.

----------

You may have made a useful discovery, which may become more important if programs continue to grow, but, without being able to review the two configurations in detail, and compare them, all anyone can do is speculate.

Best wishes, Dave


   
ReplyQuote
Inq
 Inq
(@inq)
Member
Joined: 2 years ago
Posts: 1900
 
Posted by: @zander

@douwebakker Ah, I didn't realize it was one of those tiny modules. I have a bunch of them but haven't played with one yet. I also have an ESP01-S and an adapter board but I don't have a Boards entry for it so can't test it. What did you use for board selection?

EDIT I forgot to mention my adapter board got fairly warm so maybe I fried something? Just noticed a voltage regulator so might be ok, but still no idea how to select board.

IMG 7239
IMG 7238

 

I believe you have that in backwards.  My ESP-01 will hang over toward the USB port.  But maybe it's a different Chinese Vendor.  Mine do have an extra header outside so you can wire stuff to it easily.

3 lines of code = InqPortal = Complete IoT, App, Web Server w/ GUI Admin Client, WiFi Manager, Drag & Drop File Manager, OTA, Performance Metrics, Web Socket Comms, Easy App API, All running on ESP8266...
Even usable on ESP-01S - Quickest Start Guide


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6482
 

@inq I reversed it and got a LED flash. I have no labels to guide me and didn't even think of such a simple thing. However, It needs a programming switch, it just times out now.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PLI/1, Pascal, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
douwebakker
(@douwebakker)
Member
Joined: 1 year ago
Posts: 58
Topic starter  

@zander I choose the generic ESP8266 Module


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6482
 

@douwebakker Yep, got that but I have no way that I can see to get the esp01 to accept an upload. I probably need to take GPIO00 to GND but no pins are exposed.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PLI/1, Pascal, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
douwebakker
(@douwebakker)
Member
Joined: 1 year ago
Posts: 58
Topic starter  

@zander I connected it like this.

afbeelding

 


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6482
 

@douwebakker I am not using UNO, also not using normal FTDI, I posted my setup. I am working on a way to connect GPIO0 to G.

EDIT I tried but no go. Back to the drawing board.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PLI/1, Pascal, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
douwebakker
(@douwebakker)
Member
Joined: 1 year ago
Posts: 58
Topic starter  

@zander, You don't have to use arduino either. Just make sure RX and TX are available. Use an attenuator to turn 5V into 3.3V.
RX to TX and TX to RX. But that goes without saying.

This post was modified 1 year ago by douwebakker

   
ReplyQuote
(@davee)
Member
Joined: 3 years ago
Posts: 1538
 

Hi @douwebakker et al,

Your last note reminded me that ESP266 is 3.3V .... so this is my apology for referencing an article in a message above, albeit as an example of methods suggested on the web, not a recommendation, without noticing the mistakes the author had made.

I failed to notice that the logic levels from the UNO board would be closer to 5V than 3.3V ... and that obviously a level conversion method should have been used.

I also notice he used a voltage regulator to provide the 3.3V, but omitted to add in the capacitors which are normally recommended with linear regulators.

Apologies for any confusion.

Best wishes, Dave


   
ReplyQuote
Page 1 / 3