Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REQUEST] Add an ESP32-C6 as a "coprocessor" and radio module (making PCB have both a ESP32-S3 and a ESP32-C6) so that second SoC can be used as Thread Border Router #5

Open
Hedda opened this issue Oct 29, 2024 · 9 comments
Labels
enhancement New feature or request

Comments

@Hedda
Copy link

Hedda commented Oct 29, 2024

@FutureProofHomes @that1guy @alextrical please consider also adding an ESP32-C6 (or ESP32-H2) as a "coprocessor" module as well to the same FutureProofHomes Satellite1 Development Board, i.e. add a second radio SoC so PCB will have both a ESP32-S3 as well as a ESP32-C6/ESP32-H2.

The main real-world use case reason to add an ESP32-C6 (or an ESP32-H2) module other than just using it as a generic-coprocessor MCU SoC that could be used to offload stuff that ESP32-C6 (and ESP32-H2) has an IEEE 802.15.4 radio which means it can be used as a "Thread Border Router" (with OpenThread Border Router firmware), for a Thread network used by Matter standard fabric:

If you add this and get that working then you should be able to add Thread's Border Router icon for marketing too:

image

Adding an extra ESP32 (ESP32-C6 or ESP32-H2) does take some space on PCB however should not add that much larger BOM cost, but the additional possibilities such an extra ESP32 SoC could add should hopefully more than make up for that slightly higher cost!

You can possibly in the future alternativly also use ESP32-C6 (or ESP32-H2) on a single of them as a remote Zigbee Coordinator (also known as a Serial-over-IP Zigbee controller adapter) for Home Assistant's built-in ZHA integration (native Zigbee Gateway), see/follow this work-in-progress but note that the ESP Zigbee radio for zigpy is is still very experimental and not yet fully working with ZHA:

Another option would be to also use the ESP32-C6 as a "coprocessor" module a a dedicated Bluetooth Proxy chip with ESPHome:

Note that the reason main you want to combine ESP32-S3 and ESP32-C6 is not only to off-load those processes but more importantly so you separate Wi-Fi signals from Thread/Zigbee signals, and that is due to WiFi tendacy to overwhelm and interfer with Thread/Zigbee communication because how they both work.

Same goes by the way for WiFi and Bluetooth Low Entergy but it usually is not a great impact on user experience as for Thread/Zigbee:

Anyway, what I think what would make a product like FutureProofHomes Satellite1 perfect as a "Thread Border Router" is that a user can add multiple Thread Border Routers (TBR/OTBR) to their Thread/Matter network for redundacy (using fail-over) and a voice assistant is something that many Home Assistant users are likely to have many of and placed all over their home, so having many Thread Border Routers is one of the keys to getting a more robust Thread network.

image

As proof-of-concept of a ESP32-S3 + ESP32-H2 combination board made for this purpose check out see the "ESP Thread Border Router" board which is Espressif official SDK reference hardware for this purpose (can use used as either Thread Border Router or Zigbee Coordinator):

Development is primarily being done with Espressif's ESP Thread Border Router SDK hardware (based on ESP32-H2-MINI-1 module):

image

image

OpenThread Border Router Example as in a similar two-SoC setup combining both a ESP32-S3 and ESP32-H2 in the same solution:

image

@Hedda
Copy link
Author

Hedda commented Oct 29, 2024

Maybe this should be moved to idea under discussions instead? Or? https://github.com/orgs/FutureProofHomes/discussions

@that1guy
Copy link
Collaborator

This is a very interesting FR and something we have discussed @Hedda.

As of this moment, in order to get to beta launch quickly, we will not implement this (yet) --however I want to leave this ticket open as we may be willing to implement this in future revisions of the Sat1.

@that1guy that1guy added the enhancement New feature or request label Oct 29, 2024
@Hedda
Copy link
Author

Hedda commented Oct 29, 2024

As of this moment, in order to get to beta launch quickly, we will not implement this (yet) --however I want to leave this ticket open as we may be willing to implement this in future revisions of the Sat1.

I suspect Home Assistant's first-revision devkit won't not have it either, but could read into schematics about things to come 😜

image

Image taken from the Thread Smart Home Fact Sheet by the Thread Group. It illustrates the landscape of Matter, Thread, and Border routers. Instead of Matter, you could also see another protocol here, such as HomeKit.

Unlike other IoT protocols, Thread can use multiple border routers in a single network. This increases wireless coverage and reduces the risk of a single point of failure. Ideal for home automation, with a potentially large number of devices spread over a large area.

Slightly different image here on the threadgroup.org when they describe a Thread based Matter fabric using the same text but also mentioning that Thread Border Router can be built int many devices such as access points, smart speakers, etc.:

image

PS: Also check out this blog which better describe what a Thread Border Router actually is and why it is very good to have many:

image

@Hedda
Copy link
Author

Hedda commented Oct 29, 2024

@that1guy Oh, and in the mean-time it might be a good idea for you to order Espressif's ESP Thread Border Router / Zigbee GW:

Suposedly you can get it working with Home Assistant:

@StuartIanNaylor
Copy link

StuartIanNaylor commented Jan 2, 2025

I am not sure about the current ESP design or add another, as a thread border router would be great, but is the esp platform a good fit for that initial voice pipeline.
Apart wondering if esphome and microwakeword understand a few 101s of farfield and RiR's one of the ways to greatly improve a KW system is to learn from usage data. kahrendt/microWakeWord#28 (comment) as think the dataset creation and methods is something kahrendt has inherited from openwakeword.
https://ai.google.dev/edge/litert/models/ondevice_training provides a great way to do 'fine-tuning' but does tf4micro support those entry points.
So its great the hat potentially can sit on maybe something more substantial such as an Arm board. As with tflite all the models from https://github.com/google-research/google-research/tree/master/kws_streaming can be used and not just the one that kahrendt has done a great job untangling.
On ESP you don't have do ondevice training but on KW hit have a rolling window that will capture the KW and forward up to a device that can finetune the KWS with actual usage data. (It learns through use) and through OTA or other method update the esp model.
If tf4micro supports this or there is even the space to add rolling window capture methods I dunno, someone with esp knowledge would have to say yeah or nay. But that fine tuning on actual use data with local private training is the definitive method, even when you do actually start to create datasets of real use.

Going one step further with current advise of a minimum of a N100 is really due to using a humongeous LLM based ASR such as whisper and this really weird situation where we have to wait for a permissive licenced piece of opensource to be refactored and rebranded as the HA ASR, whilst there are many to choose from where we can credit the authors, use and feedback to the project, in a more opensource friendly manner.
If you get rid of whisper and don't shackle yourself to an LLM just to do simple intents, that a much lighter NLP toolkit would do as equally well, then a Pi5 or RK3588 board and less becomes possible.

So 2 questions here.
Is it possible to use the xmos voice processor as a USB device than a HAT? KWS even with lighter ASR than whisper are still a fraction of the process a ASR would take. On a device such as a Pi5 or N100 you could have several KWS running provided extended coverage of a zone?
The 2nd question also with current design is it possible to have active microphones on a daughter board to make isolation and positioning easy than the problems of a fixed board and hat? Even to create a balanced line driver where a small unobtrusive microphone daughter board could be some distance from the xmos board.

https://openthread.io/guides/border-router/raspberry-pi

@Hedda
Copy link
Author

Hedda commented Jan 20, 2025

@that1guy @alextrical Another reason to have another ESP32 on the same board as a co-processor is it could handle a display, or?

As a proof-of-concept, do you think it would be possible to use the FutureProofHomes Satellite1 Dev Kit (or alternativly the “ReSpeaker Lite 2-Mic Array” USB board with or without ESP32) in combination with one of these 7-inch series of capacitive touchscreen displays from Elecrow in order to make a variant of a Home Assistant Voice Satellite with a screen? ..i.e. something similar in design to Google Nest Hub and Amazon Echo Show 😉

At least these "CrowPanel Advance" display series features "replaceable wireless modules" meaning that the ESP32 module can be replaced. That is, this article says that they feature an ESP32-S3-WROOM-1-N16R8 module soldered on the back + having a pin header taking ESP32-H2, ESP32-C6 or...

Image

The specificiation does say that it also features a built-in microphone (however I assume that is rubbish) as well as a speaker connector (but no mention of a DAC).

The also have loads of different models with various sizes of screens. With the "Advanced" series all having a pre-soldered ESP32-S3-WROOM-1-N16R8 module:

Image

CrowPanel Advance ESP32 displays are available on Aliexpress from $25.99 up to $54.19 depending on the selected model and whether any of the wireless modules shown above is added as an option. But you can also purchase the displays and wireless modules on Elecrow's company’s store.

PS: @StuartIanNaylor All of what you posted above about wake-words and using FutureProofHomes Satellite1 as a USB-microphone or design is totally off-topic here (same as in the forum), please start a new discussion instead of trying to high-jack others:

@StuartIanNaylor
Copy link

@Hedda
Copy link
Author

Hedda commented Jan 28, 2025

please consider also adding an ESP32-C6 (or ESP32-H2) as a "coprocessor" module

FYI, YouTuber "GreatScott!" showed of DIY Zigbee End Device with ESP32-C6 and ESP32-H2 in some proof-of-concept setups and what is interesting related to this request is that he tested range of them and found that the ESP32-C6 had much greater range:

https://www.youtube.com/watch?v=niqtYxXy6KQ

So that is another reason why you woud want to prefer the ESP32-C6 over the ESP32-H2.

Note that the reason main you want to combine ESP32-S3 and ESP32-C6 is not only to off-load those processes but more importantly so you separate Wi-Fi signals from Thread/Zigbee signals, and that is due to WiFi tendacy to overwhelm and interfer with Thread/Zigbee communication because how they both work.

Same goes by the way for WiFi and Bluetooth Low Entergy but it usually is not a great impact on user experience as for Thread/Zigbee:

Another FYI; YouTuber "Andreas Spiess" has show of prototype of new/upcoming ESP32-C5 dev kit/board (ESP32-C5-DevKitC-1) which also have a Zigbee/Thread radio, though in that video he only tested the 5GHz Wi-Fi capability of the ESP32-C5:

https://www.youtube.com/watch?v=glEvHRHdboA

So what makes the ESP32-C5 SoC interesting related to this request is that it could allow you to both act as a Thread Border Router (or Zigbee Coordinator) and a Wi-Fi module at the same time as long as configure it to only use 5GHz for WiFi (if Thread/Zigbee is in use).

@Hedda
Copy link
Author

Hedda commented Jan 28, 2025

You can possibly in the future alternativly also use ESP32-C6 (or ESP32-H2) on a single of them as a remote Zigbee Coordinator (also known as a Serial-over-IP Zigbee controller adapter) for Home Assistant's built-in ZHA integration (native Zigbee Gateway), see/follow this work-in-progress but note that the ESP Zigbee radio for zigpy is is still very experimental and not yet fully working with ZHA:

FYI, regarding possible using such a radio module as a remote Zigbee Coordoinator, in addition to the above zigpy-espzb project there are now aboth ZHA/zigpy and Zigbee2MQTT/zigbee-herdsman developers are now working on totally independent separate projects that share the same goal of using a remote Zigbee Coordinator radio as a raw transceiver (transmitter and reciever) frontend via OpenThread RCP firmware and its Spinel protocol. Very early and only experimental but if interested then check out:

and

Those solutions would not only allow running the actual Zigbee stack remotley on a host computer but also enable you to work around the main downside of Zigbee, which is that the physical Zigbee Coordionator adapter is a single-point-of-failure, as with this solution you can have a failover setup that makes it switch to a different remote radio adapter if one goes down (i.e. any of the Home Assistant Voice Sattelite with this could act as a remote Zigbee Coodrinator adapter and if you have many then you have redundancy).

In theory all that is needed on the ESP32-C6 side is running OpenThread RCP (Radio Co-Processor) firmware and that is available:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants