Next Article in Journal
Study on Coordinated Servo Control Between Observatory Dome and Telescope
Previous Article in Journal
A Deep Learning Approach for Direction-of-Arrival Estimation in Low-SNR Environments
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
This is an early access version, the complete PDF, HTML, and XML versions will be available soon.
Article

EdgeTalk-MCU: State-Aware Prompt-Constrained Local LLM Control with Runtime Shielding for Low-Latency Microcontroller Interaction

1
Glasgow College Hainan, University of Electronic Science and Technology of China, Lingshui 611731, China
2
School of Integrated Circuit Science and Engineering, University of Electronic Science and Technology of China, Chengdu 611731, China
*
Author to whom correspondence should be addressed.
Appl. Sci. 2026, 16(12), 5748; https://doi.org/10.3390/app16125748
Submission received: 28 April 2026 / Revised: 1 June 2026 / Accepted: 3 June 2026 / Published: 7 June 2026

Featured Application

This framework is applicable to resource-constrained cyber-physical and IoT platforms where cloud dependency is undesirable and safety-critical embedded control must coexist with flexible natural-language interfaces. The runtime shielding approach provides a lightweight, training-free safety layer that can be deployed on a host–microcontroller pair without task-specific fine-tuning.

Abstract

Large language models (LLMs) offer a flexible interface for human–machine interaction, but their direct use in embedded control remains difficult because low-cost microcontrollers cannot host such models locally and unconstrained language generation is not physically grounded. This paper presents EdgeTalk-MCU, a local host–microcontroller framework for low-latency natural-language control of resource-constrained devices. The system couples a locally deployed LLM on the host side with an ESP32-S3 microcontroller through a lightweight serial protocol and closes the loop with real-time state feedback. The reported end-to-end decision latency of ∼0.15 s refers to the host-side inference pipeline; physical platform latency additionally includes UART round-trip and servo actuation overhead. The design combines two complementary mechanisms: a state-aware prompt constraint that injects task progress and physical state into the host-side policy, and a runtime shield that enforces hard execution consistency before actuation. This decomposition separates raw policy quality from executed safety. Across representative obstacle scenarios in simulation, unshielded controllers remain unreliable—LLM-only and Prompt-only exhibit collision rates of 30.6% and 26.5%, respectively, in the Sudden Obstacle setting—whereas both shielded methods reduce collision to 0%. An ablation study confirms that the runtime shield is the decisive safety mechanism; the state-aware prompt constraint contributes primarily at the raw-proposal level by reducing the fraction of unsafe proposals submitted to the shield, rather than by independently guaranteeing safe execution. Hardware-in-the-loop (HIL) validation on a physical ESP32-S3 platform confirms that the same qualitative pattern holds under real sensing and communication conditions.
Keywords: large language models; microcontroller control; runtime shielding; prompt constraints; cyber-physical systems; edge intelligence; hardware-in-the-loop; embedded control large language models; microcontroller control; runtime shielding; prompt constraints; cyber-physical systems; edge intelligence; hardware-in-the-loop; embedded control

Share and Cite

MDPI and ACS Style

Xiong, J.; Bao, J. EdgeTalk-MCU: State-Aware Prompt-Constrained Local LLM Control with Runtime Shielding for Low-Latency Microcontroller Interaction. Appl. Sci. 2026, 16, 5748. https://doi.org/10.3390/app16125748

AMA Style

Xiong J, Bao J. EdgeTalk-MCU: State-Aware Prompt-Constrained Local LLM Control with Runtime Shielding for Low-Latency Microcontroller Interaction. Applied Sciences. 2026; 16(12):5748. https://doi.org/10.3390/app16125748

Chicago/Turabian Style

Xiong, Jinyu, and Jingfu Bao. 2026. "EdgeTalk-MCU: State-Aware Prompt-Constrained Local LLM Control with Runtime Shielding for Low-Latency Microcontroller Interaction" Applied Sciences 16, no. 12: 5748. https://doi.org/10.3390/app16125748

APA Style

Xiong, J., & Bao, J. (2026). EdgeTalk-MCU: State-Aware Prompt-Constrained Local LLM Control with Runtime Shielding for Low-Latency Microcontroller Interaction. Applied Sciences, 16(12), 5748. https://doi.org/10.3390/app16125748

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop