1

I was wondering what product would work best for my application. I need a web server interface to control several digital outputs connected to my board, and it needs to be as polished as it can be.

In the past I have extensively used ESP32 Dev boards with async web server and often used the integrated memory to save both html and image files to make the web server interface nicer. I was going to buy an ESP32 Dev board once again but then the uno R4 came out and now I am a bit confused on what to choose. In short, my questions are:

  • can I load a source file alongside images and html files on the new uno like I did with the ESP32 (since from what I understand you could not do that in previous revisions of the uno)?
  • can I use the uno R4's ESP32 GPIO pins alongside the ones already provided on the uno?
  • is there any real advantage of the uno R4 over the ESP32 Dev board for the application I described? Thanks in advance and sorry if the question is ill posed, I am not really practical with some of the hardware concepts involved!
1
  • first of all, the Uno R4 has a 5 V MCU and esp32 is a 3.3 V CPU. The Uno R4 WiFi has esp32-s3 as second MCU, but only as a WiFi adapter with AT firmware. (the Uno R4 Minima doesn't have WiFi.)
    – Juraj
    Jul 4 at 9:10

1 Answer 1

1

I did not test the UNO R4 yet, so this is completely based on the technical documents.

For a polished web interface, you will need some space to save all the data. Remember you need some space for the code, too, so these numbers are an upper bound and free space for HTML, CSS and images is a good portion less.

  • Standard ESP32 Dev Board: mostly 4 MB flash ROM (but can be 8 or 16).
  • UNO R4: 256 kB Flash ROM on the main chip, 384 kB ROM on the ESP32-S3-Mini-1-N8 that is used for WiFi.

This suggests that you do have way more space on the ESP32 DevBoard, making it more future-proof.

Another point that may be of interest is interrupts. WiFi does not like to be blocked by interrupt handlers, so if your code relies on interrupts, you may like multiple cores: That way, your code is not hampered by transferring the website.

  • The ESP32 has two cores, but you may need to keep an eye on which threads run on which cores. (I sometimes do have problems with time-critical applications like updating a string of WS2812b LEDs while loading the control website.)
  • The UNO R4 has completely separate chips for your sketch and the WiFi stack, but to run the web interface completely from its ESP32-S3-Mini-1-N8, I assume that you have to re-flash it with your own sketch. This probably (again, I'm interpolating from datasheets) means that you have program the UNO R4 as if it has two completely separate chips on it; and you'd have to create their communication protocol by yourself.

For your needs, this sounds as if you're better off using ESP32 DevBoards; maybe two if you run into the same problem as me.

Now, to directly answer your questions:

  • For serving files via webserver from Arduino UNO R4, I did not find much. Presumably the LittleFS filesystem works on Arduino UNO; and "just serving files" on ESP8266/ESP32 requires them to be in SPIFFS or LittleFS (to my knowledge). It may be that library support for this use case will improve with the release of the UNO R4, but for now, it looks like ESP32 is your best bet.
  • You may be able to use the GPIOs of the ESP on the UNO R4, but I'd assume that you will have to provide your own sketch/firmware for the ESP. Also, keep in mind that the UNO itself has 5V GPIOs, while the ESP has 3.3V GPIOs and you must not mix those voltages.
  • The only advantage of the UNO R4 over a ESP32 that I can see for you is: The GPIOs have 5V and you can run the board on 7-24V or USB. This makes the board more compatible with a lot of modules sold "for Arduino".

In the end, I probably would go for ESP32 and design every periphery on 3.3V or with level shifters; and add a second ESP32 if you run into the problem of the web interface interfering with your basic operation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.