EEVblog Electronics Community Forum

Electronics => Microcontrollers => Topic started by: BlogRahul on December 13, 2021, 12:26:04 pm

Title: WiFi chip to add on MCU
Post by: BlogRahul on December 13, 2021, 12:26:04 pm
I have a question in my mind which I am trying to understand practically, ESP32 is a device that has inbuilt MCU and Wifi chip

If I am going to make 10,000 devices and sell them to the public but don't want to use ESP because it's too costly. I want to make my own board that has an inbuilt MCU and Wifi chip, Is it possible? 

Theoretically, I know the Wifi chip can be connected to a microcontroller. Can the new device be made at a cost less than ESP?

Special Note - Question asked only to clear doubt it has nothing to do with real-world project
Title: Re: WiFi chip to add on MCU
Post by: agehall on December 13, 2021, 05:05:41 pm
At 10k units I think you will struggle to beat ESP32 prices unless you find a similar MCU with all the toys you need at a cheaper price. If you need to combine multiple components to make it happen, I think you will waste any potential gains in development.
Title: Re: WiFi chip to add on MCU
Post by: SiliconWizard on December 13, 2021, 06:24:44 pm
I don't really get it.
ESP32 SoCs are CHEAP. How are you going to find cheaper? Please give us hints!

Or are you maybe talking about ESP32-based BOARDS instead of just the chip? ESP32 can be bought as a chip and you can absolutely make your own board with it.
THe ESP32-S2 is about $1. Call me when you can find a solution, be it in a single SoC or as two chips, as cheap as that.
Title: Re: WiFi chip to add on MCU
Post by: DavidAlfa on December 13, 2021, 07:16:58 pm
Check LCSC (https://lcsc.com/search?q=esp32)

If you want to avoid the external parts for the esp32, you can get esp32 modules for as little as $2 at 1K quantities:
Differences between 10 and 1K are not huge, so you can make a smaller order for testing purposes.

ESP32-C3-MINI-1-N4 (https://lcsc.com/product-detail/RF-Modules_Espressif-Systems-ESP32-C3-MINI-1-N4_C2838502.html)
$1.94

ESP32-S32Mb (https://lcsc.com/product-detail/WiFi-Modules_Ai-Thinker-ESP32-S32Mb_C2764096.html)
$2.28

ESP32-S2-WROOM-I-4M (https://lcsc.com/product-detail/WiFi-Modules_Espressif-Systems-ESP32-S2-WROOM-I-4M_C967026.html)
$2.36

ESP32-SL (https://lcsc.com/product-detail/WiFi-Modules_Ai-Thinker-ESP32-SL_C2764058.html)
$2.44
Title: Re: WiFi chip to add on MCU
Post by: fchk on December 13, 2021, 08:40:59 pm
ESP is already quite cheap.

Do you really need Wifi, or do you need any wireless connection between boards?

20 years ago Infrared (IRDA) was a popular and cheap communication option.

fchk
Title: Re: WiFi chip to add on MCU
Post by: rpiloverbd on December 14, 2021, 12:19:41 pm
What about ESP-01 (https://www.theengineeringprojects.com/2019/05/introduction-to-esp-01.html)?
Title: Re: WiFi chip to add on MCU
Post by: rstofer on December 27, 2021, 03:26:15 pm
Microchip's WiFi module is at least 10x as expensive as the entire ESP32

https://www.mouser.com/c/embedded-solutions/wireless-rf-modules/wifi-modules-80211 (https://www.mouser.com/c/embedded-solutions/wireless-rf-modules/wifi-modules-80211)
Title: Re: WiFi chip to add on MCU
Post by: SiliconWizard on December 27, 2021, 05:46:49 pm
Yeah. As I said, I suspect the OP is talking either about ESP32-based dev boards, or at least ESP32-based modules (like the WROOM ones) - which are between $2 and $3. Still very cheap, but since the OP was considering directly using ICs (as I got it?), then they could as well make their own board with an ESP32 SoC (you can find them as low as $1 or so), but then they'd have to properly route it, then use a shield and take all measures to ensure it has any chance of passing conformance tests... yeah. But if they are ready and skilled to do that, why not.

There may be reasons not to use the ESP32 line for this, but cost is certainly not one.
Title: Re: WiFi chip to add on MCU
Post by: bson on December 28, 2021, 02:52:31 am
Is there any software for the ESP32 other than https://github.com/espressif/esp-at (https://github.com/espressif/esp-at)?  That is basically a bunch of binaries with a little open source stuff to collect them into the ESP-AT firmware.  I looked at modifying it to use the SPI interface instead of a serial port, and found this wasn't really feasible as the behavior is really nailed down in the .a binaries.

Also, the technical reference manual (http://espressif.com/sites/default/files/documentation/esp32_technical_reference_manual_en.pdf (http://espressif.com/sites/default/files/documentation/esp32_technical_reference_manual_en.pdf)) doesn't document the radio.  But it's a very competent little SoC otherwise, and I like the idea of the PID controller for interrupts and context switch assist in an SMP setup.  (Although I'd just assign one core to interrupts and real-time stuff, the application core can do everything else.)

The ULP coproc is a very cool idea.

The peripherals look very easy to use.

But the lack of more comprehensive documentation and example code in source form means I'd be a little hesitant to get too vested in it.
Title: Re: WiFi chip to add on MCU
Post by: lucazader on December 28, 2021, 03:34:01 am
Quote
Is there any software for the ESP32 other than https://github.com/espressif/esp-at?
The esp32 is most commonly programmed using either arduino add-ons or:
https://github.com/espressif/esp-idf
Which is a full developmnent environment with HAL rtos and lots more. As well as lots of really useful examples.
Title: Re: WiFi chip to add on MCU
Post by: I wanted a rude username on December 28, 2021, 04:21:12 am
THe ESP32-S2 is about $1. Call me when you can find a solution, be it in a single SoC or as two chips, as cheap as that.

ESP8266, 94ยข (https://www.lcsc.com/product-detail/RF-Transceiver-ICs_Espressif-Systems-ESP8266EX_C77967.html)

But supposedly the ESP8266 is even more quirky than the ESP32. If that eats into development time it may not be worth the cost saving at 10,000 units.
Title: Re: WiFi chip to add on MCU
Post by: jnz on December 28, 2021, 04:29:11 pm
Espressif Is directly supported by the Chinese communist party. They are subsidized to to be cheap and successful. You are not going to beat them at 10k units. Not in any sort of apples to apples.

There are reasons to avoid ESP, but upfront cost is definitely not one of them.
Title: Re: WiFi chip to add on MCU
Post by: I wanted a rude username on December 29, 2021, 01:35:50 am
Would love to hear any reasons not to use ESP (maybe PM me).

You probably know most of them already. Off the top of my head:


But we still use them because of their features, ease of development, and low cost.
Title: Re: WiFi chip to add on MCU
Post by: SiliconWizard on December 29, 2021, 01:44:09 am
Yep. There were a few points about that here too: https://www.eevblog.com/forum/projects/professional-docs-and-toolchain-for-esp32-in-commercial-product/ (https://www.eevblog.com/forum/projects/professional-docs-and-toolchain-for-esp32-in-commercial-product/)
Title: Re: WiFi chip to add on MCU
Post by: DavidAlfa on December 30, 2021, 09:42:42 pm
Well, only if battery-powered. Otherwise, it's the least of your worries.
Title: Re: WiFi chip to add on MCU
Post by: Davor on December 30, 2021, 11:36:31 pm
Is there any software for the ESP32 other than https://github.com/espressif/esp-at (https://github.com/espressif/esp-at)?  That is basically a bunch of binaries with a little open source stuff to collect them into the ESP-AT firmware.  I looked at modifying it to use the SPI interface instead of a serial port, and found this wasn't really feasible as the behavior is really nailed down in the .a binaries.

Anyone tried SPI interface for ESP-AT? Problems?
https://docs.espressif.com/projects/esp-at/en/latest/Compile_and_Develop/How_to_implement_SPI_AT.html
Title: Re: WiFi chip to add on MCU
Post by: bson on January 03, 2022, 08:24:08 pm
Anyone tried SPI interface for ESP-AT? Problems?
https://docs.espressif.com/projects/esp-at/en/latest/Compile_and_Develop/How_to_implement_SPI_AT.html
I looked at it, but I wanted a protocol a bit simpler and more efficient.  Like for example, hand it a complete set of configuration as a binary structure, in a single command, rather than dally around with a bazillion AT commands that effectively require sprintf or other text conversion.  Not only that, but require a lot of painful parsing to process the responses.  I'm willing to take apart their implementation and rewrite what's needed, but too much of it is proprietary closed source.
Title: Re: WiFi chip to add on MCU
Post by: SiliconWizard on January 03, 2022, 08:30:24 pm
AT commands are (were?) a popular "protocol" for controlling communication devices, and, while it makes it easy to test things interactively (for instance in a terminal), it's a royal and inefficient pain to use it .