cancel
Showing results for 
Search instead for 
Did you mean: 

Microcontroller requirements to implement an embedded web server using WebSocket, JS, and HTML5

Ehab
Associate

Hi,

I'm developing a new product, and one of the design requirements is to implement an embedded web server on the microcontroller. The web pages should be responsive and dynamic like single page application (SPA) web pages and there are 3 pages to be implemented with light images and graphics.

I plan to pick out a microcontroller from the STM32 range, and my questions are related to the hardware design part :

  1. what are the minimum Microcontroller requirements to implement an embedded web server in terms of performance and memory?
  2. what is the approximate size of the used memory for the lwIP stack, web server, and client-side code?
  3. where to store the webpages? internal Flash, ROM, External Flash?
  4. And finally, what is the complexity level of the implementation in comparison to the traditional HTTP request?

Thanks,

18 REPLIES 18
clock.1166
Senior

I've already got the hardware - I just want to know whether the above board is the right choice

for 3 small web pages as per Ehabs post or should I choose a different variant?

I have the LWip/netconn/rtos demo working, but it seems very complex (for me anyway).

I dont want to spend weeks on it and find that I should have chosen a different solution.

Chris

Check your requirements. If the client will have a decent browser that supports client side scripts, decompression (for static files), web sockets or fetch, STM32 MCUs may be capable to serve few clients.

> I dont want to spend weeks on it

Unfortunately, this is *at least* the expected time for such project om STM32 MCU. Unless you find somebody with a ready prototype.

clock.1166
Senior

Thanks, but 'STM32 MCUs may be capable to serve few clients.'.... Which ones are most suited?

Should I continue with STM32H743?

Can anyone help me with a ready prototype?

I'm quite willing to spend time and money - I just need direction.

As I've said, I am not as experienced as most of the contributors here in- 'client side scripts, decompression (for static files), web sockets or fetch,'........

but I'm also willing to learn.

Thanks,

Chris

> Should I continue with STM32H743?

This of course depends on what do you want to achieve exactly. Is there any "controller" (hard real time) side to the project, or do you want to use the STM32 simply as a suitable "small computer"? Is the web-side of the project to be fancy, or is flat HTML OK? What is the expected "other side" (i.e. network and browser issues)?

I don't offer help here, I'm just merely saying that these are probably the most basic questions for which you have to have very clearly formulated answers prior to talking to anybody for further help.

You may want to have a look at/post on the lwip users mailing list, too.

JW

> Should I continue with STM32H743?

Let's see. As you already know, there's a problem with ordering. Do you have H743 in stock?

H743 has 2 MB of internal flash. This can be enough for the code, but for website data you may need external memory.

What kind of network connection do you want?

H743 has only plain ethernet. For wi-fi or cellular you will need external chips/modules.

On the other hand, you can connect a WIZnet to any other MCU without ethernet controller, and it will even do TCP/IP.

Seems like a Raspberry Pi would be a much better solution for this. Why use a microcontroller instead? It’s certainly doable, but will take much more time to develop and will be much slower and harder to maintain.
If you feel a post has answered your question, please click "Accept as Solution".
clock.1166
Senior

Thanks all for the info.

I just thought that I would have more control over the whole thing if I used a microcontroller and also I would learn a lot more.

I have several H743 boards.

I dont need wifi or cellular, just a LAN connection.

I can see that it may be easier using a Pi, but then you have the whole complication of a big O/S to consider.

Surely, it would be simpler to use an STM32 board?

However, the wiznet device looks interesting - I will check that out.

I presume that you could then use a low level F103 type board?

Chris

My previous post answers all of your questions...

clock.1166
Senior

Thanks everybody. Everything I appear to need is present in the project 'LwIP_HTTP_Server_Netconn_RTOS', and I

am finding this very difficult to understand, especially as my 'C' needs brushing up, - but I am slowly getting there.

Unlike most of you, I knew hardly anything about ethernet 3 months ago, so you may think that my questions

are somewhat simple!!

I am going to investigate the wiznet area as well.

My ultimate objectives are to gain knowledge and to have a cheaply produced

web server that will run the above project.

Chris