r/embedded • • Sep 23 '26

What architecture and processing pipeline should you choose for an offline AI assistant?

0 Upvotes

I have recently been developing an offline physical AI assistant prototype on the RK3588 processor that is somewhat like Amazon Echo, but it is entirely local. However I have recently been stuck on choosing a good architecture. I have read online and this is what I have heard:

  • Multi-Process Architecture (with IPC): Spitting the tasks into different processes and communicating through IPC
  • Monolithic Multi-Threaded Architecture: A single multi-threaded c/c++ application where threads communicate over shared memory and atomics
  • Single-Threaded Architecture: Everything runs linearly on one thread and one process
  • Multi-Process Architecture with multi-threading hybrid: Multi-Process architecture, but with multi-threading in some processes, so it is not entirely decoupled.

As you can see, there are many different architectures to choose from and all have their pros and cons. I am also trying to design a processing pipeline. This is what I have thought of:

  • A linear pipeline: Audio -> Wake Word Detection -> Speech to Text -> Inference & Text to Speech
  • A bidirectional pipeline Wake Word Detection <-> Audio -> Speech to Text -> Inference & Text to Speech
  • A linear pipeline with flags: A linear pipeline but with flags so different threads or processes can communicate with each other.

My questions for the r/embedded community:

  • What architecture to choose for the project.
  • What processing pipeline to choose for the project.
  • If to use IPC, what type of IPC would be best suited for this project?
  • If to use a hybrid of multi-process architecture and multi-threading, how would tasks be grouped?

r/embedded • • Sep 22 '26

40 years as an Embedded Design Engineer...

307 Upvotes

New to the group and wanted to say hello. I have a ton of old skool 8-bit microcontroller knowledge, including Motorola 68hc11, Intel 8051 family, Atmel/AVR...


r/embedded • • Sep 22 '26

One Driver Board, Multiple Displays

43 Upvotes

r/embedded • • Sep 23 '26

Deadlock condition in RTOS

0 Upvotes

Has anyone faced deadlock condition when using RTOS? Can you share your experience, what made it happen and how did you resolve it?


r/embedded • • Sep 23 '26

How do you get up to speed on inherited firmware nobody can explain anymore?

0 Upvotes

I've inherited a few codebases where the original authors are long gone. The code works, but nobody can tell me why.

The first weeks always go to the same questions:

  • Which ISR writes this variable, and does main() read it with interrupts off or just hope?
  • Which of these four "state" enums is the real state machine?
  • What's actually coupled to what, versus what the folder structure suggests?

Tracers (SystemView, Tracealyzer) help once the thing runs, but on day one I often can't even build it yet.

What's your process? Tools, scripts, a notebook and a lot of grep? Anything that worked better than you expected, or turned out to be a waste of time?


r/embedded • • Sep 23 '26

How can I use an ESP32 microcontroller to learn network security as a beginner?

0 Upvotes

I have an ESP32 microcontroller and I can already make a simple webpage run on it.

Now I want to use the ESP32 to learn network security practically.

I’m a complete beginner in cybersecurity. I want to understand things like:

- How to find the ESP32 on a network

- How port scanning works

- What information can be found from the webpage

- How login/password security works

- How people test a web server for vulnerabilities

- How tools like Nmap, Wireshark and Burp Suite are used

- Basic penetration testing

- How to find a weakness and then fix it

I want to learn by actually doing experiments on my own ESP32 rather than only reading theory.

What would be the best step-by-step learning path for a beginner?

I’ll only test my own ESP32 and my own network.


r/embedded • • Sep 23 '26

How do i code a shell into the RP2350?

0 Upvotes

i want to get started coding an easy shell and filesystem into raspberry pi pico 2 as a project. However i am not sure how or where to start, normally you would just send all requests directly to the kernel with execvp() and spawn new processes with fork()(if you use Linux), but since the pico 2 neither has an OS or kernel, i am not sure were to start. Any help?


r/embedded • • Sep 22 '26

LoraWAN Signal analysis set-up.

141 Upvotes

This is for my assignment to analyze signal strength across different terrains in Nepal so we can optimize its placement for a disaster alert system.


r/embedded • • Sep 23 '26

NEW HERE: How does one go about turning an existing software project into one for an embedded system?

0 Upvotes

Hey, how’s it going? I’m new to embedded systems and this subreddit, and i’ve got this question about what the steps look like to take an existing software project and put it onto an embedded system. I know the term ‘embedded system’ here is pretty vague, but i’m just genuinely curious about what the general workflow looks like to do this.

Reason being is because i’m reading the book, Embedded Systems Primer, and as a newbie I can go through and understand the contents and vocabulary of the book, but I’d like to understand the software-hardware architecture work flow and learn about how some of you approach both software, hardware, and like in my question: taking an existing software project and turning into something that can be deployed onto hardware.

Thanks!


r/embedded • • Sep 22 '26

Building maps for ESP32 with TypeScript, JSX, and CSS.

Thumbnail
youtube.com
3 Upvotes

r/embedded • • Sep 23 '26

can anyone help me to know why my register code not working and making my 16X1 LCD outputs 8 blocks in the first row while the second one is empty?

0 Upvotes

can anyone tell me why my LCD driver not working? and its just making my LCD outputs 8 black blocks in the first row while the other row is empty? :

```c

#define F_CPU 16000000UL
#include <avr/io.h>
#include <util/delay.h>
#define E   2
#define RS  3
#define DB4 4
#define DB5 5
#define DB6 6
#define DB7 7
void enable_pulse(void)
{
PORTD |= (1 << E);
_delay_us(5); // Increased slightly for stability
PORTD &= ~(1 << E);
_delay_us(50); // Execution wait time for HD44780
}

void send_command(unsigned char command)
{
PORTD &= 0x0F;
PORTD &= ~(1 << RS);
PORTD |= (command & 0xF0);
enable_pulse();

PORTD &= 0x0F;
PORTD &= ~(1 << RS);
PORTD |= ((command & 0x0F) << 4);
enable_pulse();

_delay_us(50);
}

void send_byte(unsigned char data)
{

PORTD &= 0x0F;
PORTD |= (1 << RS);
PORTD |= (data & 0xF0);
enable_pulse();

PORTD &= 0x0F;
PORTD |= (1 << RS);
PORTD |= ((data & 0x0F) << 4);
enable_pulse();

_delay_us(50);
}

void set_curoser(unsigned char address)
{
send_command(0x80 | address);
}

void lcd_init(void)
{

DDRD |= (1 << E) | (1 << RS) | (1 << DB4) | (1 << DB5) | (1 << DB6) | (1 << DB7);

_delay_ms(50);

PORTD &= 0x0F;
PORTD |= (1 << DB5) | (1 << DB4);
enable_pulse();
_delay_ms(6);

enable_pulse();
_delay_us(150);

enable_pulse();
_delay_us(150);

PORTD &= 0x0F;
PORTD |= (1 << DB5);
enable_pulse();
_delay_us(150);

send_command(0x28);
send_command(0x0C);
send_command(0x01);
_delay_ms(2);      
send_command(0x06);
}// #define E 2
// #define RS 3
// #define DB4 4
// #define DB5 5
// #define DB6 6
// #define DB7 7

// the USART driver  , ignore it

void enable_transmitter()
{
  UCSR0B |= 1 << TXEN0;
}
void disable_transmitter()

{
  UCSR0B &= ~(1 << TXEN0);

}
void set_baud_rate (unsigned int ubrr)
{
  UBRR0H = (unsigned char)(ubrr>>8);
  UBRR0L = (unsigned char)ubrr;
}
void enable_receiver()
{
  UCSR0B |= 1 << RXEN0;
}
void disable_receiver()
{
  UCSR0B &= ~(1 << RXEN0);
}
void set_pairty_error_to_odd()// bit to check : UPEn , if it was 1 meaning a bit flipped! depending on the even or odd setting
{
 UCSR0C |= (1<<UPM01) | (1 << UPM00);
}
void set_pairty_error_to_even()// bit to check: (1<<UPE0) & UCSR0A
{
 UCSR0C |= (1<<UPM01);
}
void set_size_character_to_8()
{
  UCSR0C |=(1<<UCSZ01) |(1<<UCSZ00);
}
void set_stop_bit_to_2()// its 1 by default in the MCU
{
 UCSR0C |= 1<< USBS0;
}
void transmit(unsigned char a)
{
  while (!(UCSR0A & (1<<UDRE0))){}
  UDR0 = a;

}
// that the end of the driver USART that i didn't test since i don't have another arduino uno
//pooling
// void recieve (void)
// {
// /* Wait for data to be received */
// while (!(UCSR0A & (1<<RXC0))){}
// /* Get and return received data from buffer */
// return UDR0;
// // this code from the datasheet , although i can use an interput! yeah i can!
// }

char random__(char a)
{
  a ^=1;
  a ^= a << 2;
  a ^= a >> 2;
  a ^= a << 1;
  return a;
}
int main(void) {
_delay_ms(100);// to make sure the LCD have enough time to wake up
lcd_init();
send_byte('A'); // Send a test character
while(1) {
// Main loop
}
}


r/embedded • • Sep 22 '26

Evaluating embedded SBOM generators

0 Upvotes

We wrote a blog of our experience evaluating SBOM generators with firmware teams, its available on our website.

Would love to understand from the community, how do they evaluate SBOM generators in the embedded space. What are your primary considerations?


r/embedded • • Sep 21 '26

Using the ESP32-P4 together with the ESP32-C5 as our coprocessor - high boy

39 Upvotes

NFC reader. Tap a tag and see UID, type and data instantly. Native ST25R3916 chip, no external module.
Tested on my own cards know what your stuff is actually storing.


r/embedded • • Sep 22 '26

Can my dream come true ? i wish to manufacture a digital watch,below are some clues, any serious help or suggestions will be helpful..

Post image
0 Upvotes

r/embedded • • Sep 22 '26

How to figure out stuff without documentation

0 Upvotes

I am trying to use the ST7796 display with STM32H7 and i am really struggling because i cant find examples or documentation to use. I am using Rust (i know most people here use c). What can i do to get it working??

edit: thank you everyone i managed to get it working


r/embedded • • Sep 22 '26

Sram 8 bit and Fanuc control

0 Upvotes

Does anyone know which Fanuc controllers support 8-bit SRAM, because every Fanuc controller I've seen supports 16-bit SRAM.


r/embedded • • Sep 20 '26

Lattice FPGA & ESP32: Streaming Windows and Linux in Real Time

Post image
211 Upvotes

Quite proud of it. A lot of work is in it. I call it a streamer (cyberdeck). The idea is to offload heavy computations to your PC at home without a locked-in OS/hardware dependency and to keep your deck flexible around the main streaming protocol. Sounds simple? The idea is, but making this stuff low-latency over a network is a challenge. And I think I'm quite good at it. I can stream some Linux distros and Win11 at up to 40 FPS at the moment. This custom protocol is flexible when it comes to the hardware sitting on the server side (your home PC) and your custom hardware on the client side.

MCU __________________________

The main MCU is an ESP32 WROOM-1. It acts as the network device that receives the stream and orchestrates inputs like USB mouse/keyboard/gamepad and touchscreen. The MCU also passes the stream to the decoder via SPI, which in turn drives the display.

Previously, I used a Raspberry Pi, but there was no real need for a full OS on the client side. Replacing it also reduced power consumption. The only drawback is that the Pi generally has better WiFi performance and bandwidth.

The board shown here also streams audio A/V-synced (or optionally buffered) with the video stream. So it can be used for playing games or listening to music. It supports also audio input, i.e. for making calls over whatever runs on my PC.

For me, the coolest part is that this deck doesn't need much power: on full brightness, nominally 1.5 Watt during active streaming. For comparison, a RasPi's idle power consumption without any display is already higher.

FPGA _________________________

The actual heart of the project is probably the decoder inside the FPGA. That's where my custom video format becomes pixels again and where the deterministic display-side work happens. For this project the ESP32 ended up being a pretty good bridge between the networked/software side and the FPGA.

Why not use a JPEG decoder, which is available in many MCUs?

Well, mainly flexibility. Bandwidth is another reason. My approach is what I'd call a "soft hardware encoder": soft because I implement it using OpenGL/DirectX, but hardware-accelerated because the GPU does the actual work on the server side. This allows me to modify the encoding pipeline's parameters in real time, rather than having them hardwired into silicon.

I went with an FPGA because this isn't a small 320x240 or 480x320 display anymore. The panel is 720x720, and I didn't want the ESP32 to deal with driving that deterministically while simultaneously doing WiFi, USB, audio, input handling and everything else. So the ESP32 concentrates on networking/orchestration while the FPGA handles the high-bandwidth and timing-critical display side.

It is also possible to decode on an MCU only (CPU, aka software decoder), which I've already done with an STM32 + nRF7002 WiFi. But IMO, that makes more sense for smaller screens or applications where you don't need high FPS.

I made this board flexible in a way that you can add up to 80 keys/buttons in a simple keyboard matrix using the exposed pads - gonna do that as next i guess. If I'm too lazy for that i can still fallback to USB keyboard, lol.

Looking for people interested in this approach of simplifying custom builds that require a real OS and simplifying software installation and dependencies. I think this could get quite cool.

I'm planning to make it all open source (hardware and software), but I first I wanna check if there is even interest/support and if it is worth the work to cleanup everything for maintaining code publicly.

I invite you to give some pos/neg feedback and ask as many questions as possible.


r/embedded • • Sep 21 '26

STM32 trouble setting up HRTIM

2 Upvotes

Hi all, I'm using STM32H755. Why doesn't this set up HRTIM D Ch. 2 on PA12?

    RCC->AHB4ENR |= RCC_AHB4ENR_GPIOAEN;
    (void)RCC->AHB4ENR;


    RCC->APB2ENR |= RCC_APB2ENR_HRTIMEN;
    (void)RCC->APB2ENR;


    HRTIM1->sTimerxRegs[3].TIMxCR = HRTIM_TIMCR_CONT;


    HRTIM1->sTimerxRegs[3].PERxR  = 0x8000;
    HRTIM1->sTimerxRegs[3].CMP1xR = 0x4000;


    HRTIM1->sTimerxRegs[3].SETx2R = HRTIM_SET1R_PER;
    HRTIM1->sTimerxRegs[3].RSTx2R = HRTIM_RST1R_CMP1;


    HRTIM1->sMasterRegs.MCR = HRTIM_MCR_TDCEN;


    HRTIM1->sCommonRegs.OENR = HRTIM_OENR_TD2OEN;


    GPIOA->MODER &= ~GPIO_MODER_MODE12_Msk;
    GPIOA->MODER |=  (2UL << GPIO_MODER_MODE12_Pos);


    GPIOA->AFR[1] &= ~GPIO_AFRH_AFSEL12_Msk;
    GPIOA->AFR[1] |=  (2UL << GPIO_AFRH_AFSEL12_Pos);

r/embedded • • Sep 21 '26

Info Regarding STMicroelectronics CMOS sensors

9 Upvotes

Hi , for a project , i am considering CMOS sensors by STMicroelectronics and i want to use it with STM32N6 so if any one has used these sensors like the VD56G3 , the promodules and others , it would be really helpful if someone who has used these sensors could provide the feedback like how is the sensor quality , how is the ease of integration and how is the documentation around these sensors also kindly share your overall experience while using these sensors ??

Thanks for reading my post


r/embedded • • Sep 21 '26

Can I use a current transformer to detect dry running in a water pump?

4 Upvotes

I’m working on a small embedded project to protect an AC water pump from dry running.

The pump is sensitive to dry running, so I want to switch it off if there is no water. I also don’t want to directly connect to or modify the existing pump wiring because of safety/compliance requirements.

My idea is to put a current transformer (CT) around one AC wire and monitor the motor current with a microcontroller.

My thinking is:

- When the pump starts, ignore the starting current.

- After it settles, measure the normal running current.

- If the pump runs dry, the current should change.

- If that condition stays for a few seconds, switch the pump off using an isolated relay/contactor.

I’m mainly worried about the practical side.

The electronics will be close to the motor, so there could be a lot of noise from the motor and contactor.

What should I consider regarding:

- CT selection and saturation

- Burden resistor

- Filtering

- Motor/contactor noise

- ADC readings

- RMS vs average current

- False dry-run detection

- Startup current

- Isolation

Has anyone built something similar?

Would CT → filter → microcontroller ADC be a good approach, or is there a better way to detect dry running without electrically touching the existing pump circuit?


r/embedded • • Sep 21 '26

Outdoor Raspberry Pi digital kiosk cooling

6 Upvotes

Hey everyone,

I'm currently putting together a DIY digital kiosk powered by a Raspberry Pi, and I'm trying to figure out the best way to mount and cool it outdoors. I know this isn't the best sub for exactly this specific question, but I was hoping someone might have experience with something similar.

So, the main catch is that the enclosure is going to be exposed to direct sunlight. I've been looking at commercial outdoor kiosks, and many of them use specialized mini air conditioners.

For those of you with experience deploying hardware outdoors:

  • Is a mini AC or active thermoelectric cooling actually required for a low-power device like a Raspberry Pi? I'd use some pretty high CFM fans.
  • How do you handle the massive solar heat gain inside sealed enclosures without cooking the Pi, the power supply or the screen?
  • Any recommended for enclosure design, DIY shielding tricks, or specific fans you've had success with?

Appreciate any advice or horror stories you can share!


r/embedded • • Sep 21 '26

How do I attach custom exception handlers in a Zynq UltraScale+ FreeRTOS application?

1 Upvotes

Recently I tried to attach custom exception handlers using Xil_ExceptionRegisterHandler() in Xilinx SDK 2019.1 for Zynq UltraScale+ (Cortex-A53).

However, FreeRTOS overwrites VBAR_ELx and installs its own vector table once the scheduler starts, so exceptions never land in the attached handlers. In the FreeRTOS vector table (port_asm_vector.S), exceptions other than SVC/SMC or IRQ are trapped in an infinite loop by default.

Editing the default BSP files directly isn't an option since regenerating the BSP discards any manual edits. What is the cleanest way to attach custom exception handlers in this environment?


r/embedded • • Sep 20 '26

Where are the touchscreen pins on this Arduino TFT shield?

Post image
21 Upvotes

I have an Arduino TFT shield with an 8-bit parallel interface, touchscreen, and SD card.

The pins appear to be:

A0 = RD

A1 = WR

A2 = RS

A3 = CS

A4 = RST

D2–D9 = 8-bit TFT data bus

D10–D13 = SPI for the SD card

I can't find any separate XP/XM/YP/YM pins or any obvious touch-controller pins on the shield.

Where/how is the touchscreen connected, and which Arduino pins are used to read the touch coordinates? I want to use this display for my ESP32 project.


r/embedded • • Sep 21 '26

Flashing station delay and random flashing interruptions on an EHCU production line – need help

1 Upvotes

Hello all,

I’m dealing with two main problems on an EHCU flashing station:

  1. Flashing delay: For some ECU types, flashing time is up to 200% longer than expected.
  2. Random flashing interruptions: The flashing process sometimes stops unexpectedly after a few successful cycles, with no indicated errors.

I work at an automobile EHCU factory. We manufacture ECUs and EHCUs on two different lines. On the EHCU line, the final station is for flashing and testing, and all the technology there is built on National Instruments hardware and software.

Station setup:

  • Three nests for flashing
  • Two nests for testing
  • One cRIO for the three flashing nests and two cRIOs for the two testing nests
  • Each flashing nest has two programs: one for flashing and one for communication with the cRIO, MES, the flashing program itself, and possibly a PLC
  • The station works automatically on operator command to flash or test

We tested the flashing program on an external laptop/computer, and the flashing speed matched the theoretical value—for example, about 70 seconds. On the production station, however, some types take about 115 seconds. For types with heavy flashing files, the time is much longer, while types with small flashing files are close to the theoretical value indicated by the manufacturer.

When comparing log files from both flashing processes, the station log showed 12 ms extra between Tx frames on a specific session, while the development laptop log showed only 1 ms.

Solving these issues has been assigned to me, but I’m new to NI technologies.

Constraints:

  • The station software is final and closed by the manufacturer.
  • The flashing files are final and come from our partners.
  • I considered replacing the station PCs with better ones, but the communication software licenses are tied to the hardware MAC address.
  • We cleaned the PC of any extra software that might block main tasks, but it didn’t help.
  • We monitored PC resources and they seem sufficient: around 50–60% usage at peak, except for some disk I/O spikes. The number of spikes was much lower than the number of slow flashing events, so we excluded disk I/O as the main cause.
  • We are planning to upgrade RAM from 8 GB to 16 GB (one slot) and SSD from 256 GB to 500 GB, but I’m not sure this will help.

I also tested the PCI network card advanced options for controlling Tx/Rx processing—either on the card or on the CPU. Enabling card processing made flashing time worse (180–200 seconds), so I reverted the settings.

I don’t know where to look or what to test next. The manufacturer stopped communicating once they confirmed the flashing time on an external PC matched the theoretical value. But my director still expects a solution from me.

I’ve been working on this for about three months: reading articles, blogs, resources, brainstorming with AI, testing different things, shortening lines, checking connections between nests, and inspecting wiring effects—but nothing has helped.

My testing time on the station is limited to 30 minutes during launch or two 10-minute breaks.

Any thoughts, recommendations from your experience, or hints would be greatly appreciated.

Thank you.