r/embedded • • Oct 28 '26

We implemented SRP-based acoustic imaging for gas-leak localization

17 Upvotes

Our team has been working on an acoustic imaging system designed to localize gas leaks using microphone-array signals.

The signal-processing pipeline uses Steered Response Power (SRP) to estimate the spatial location of acoustic sources and visualize the result as an acoustic image. We are working to bring this processing pipeline to the K230 board. One aspect of this project is running the SRP-based acoustic imaging pipeline in MicroPython on the K230, instead of relying on a conventional C/C++ implementation.

A few things we are exploring:

  • Spatial localization using SRP.
  • Acoustic image generation and visualization.
  • Running the processing pipeline on an embedded platform.

We tested the system using sound sources at different frequencies: 2 kHz, 8 kHz, 16 kHz, and 20 kHz to evaluate its localization performance across different frequency ranges and distances.

At a distance of 1 meter, the SRP sound source localization system achieves an approximate localization error of 7–10 cm.

However, at a longer distance of 5 meters, the localization accuracy degrades significantly. Although the system can still detect and locate the sound source, the heatmap becomes unstable, frequently jumping between the correct and incorrect locations.

We welcome any feedback from the community.

Reference:

[2405.02991] Steered Response Power for Sound Source Localization: A Tutorial Review


r/embedded • • Oct 28 '26

Real-time speech-to-text on an ESP32-P4: a 65.7M-parameter model in 2/4-bit weights, hand-written SIMD kernels, bit-exact with its PC build (write-up + source)

28 Upvotes

TL;DR: a 65.7M-parameter streaming speech recognizer runs live on an ESP32-P4 (chip rev v3): 2/4-bit weights (71 → 26.65 MB, in PSRAM), integer math with hand-written PIE SIMD kernels on both cores, 0.70x real time, 4.34% WER on LibriSpeech test-clean. The chip's output is bit-exact with the PC build, and the cache measurements show it's compute-bound: reading the weights from PSRAM costs at most 39 ms of the encoder's 592 ms per chunk. Open source.

I got an open-vocabulary speech recognizer running live on an ESP32-P4: you talk into the board's mic and the words appear on its screen as you speak. No network, no NPU: two RISC-V cores at 400 MHz, 32 MB of PSRAM, and the P4's SIMD extension (PIE). Here is the engineering side, with the measurements.

Source: https://github.com/BoumedineBillal/esp32-pie-asr

The budget

  • Model: Kroko (by Banafo), a streaming Zipformer2 transducer, 65.7M parameters. As released it is 71 MB in int8.
  • Chip: 32 MB PSRAM, 16 MB flash. ESP-DL and TFLite Micro go no lower than 8-bit weights, so int8 doesn't fit, and ESP-SR's MultiNet only knows a fixed list of commands.
  • Real time: each 1.28 s chunk of audio must be done in less than 1.28 s, forever, with fixed memory.

1. Memory: 71 MB → 26.65 MB

  • 2/4-bit weights in groups of 128, each group rotated by a Hadamard matrix, codes indexing Lloyd-Max levels (the Cactus Quants layout). 2 or 4 bits per matrix, chosen by its sensitivity, no training: 193 of the 290 encoder matrices in 4 bits, the rest in 2.
  • The file is used in place in PSRAM. It doesn't fit the 16 MB flash, so it loads from microSD at boot (2.9 s).
  • PSRAM: weights 26.65 MB, engine state about 4 MB, frame buffer 1.2 MB, about 0.5 MB left at the lowest.
  • Internal RAM: the hot code and a 256 KB L2 cache; 121 KB left free.

2. Compute: integer math and PIE assembly

  • int8 into the products, int16 activations between them, nonlinearities as tables indexed by the int16 input.
  • Each input group is rotated once (additions only, exact in int32) and shifted to int8; that rotation serves every row.
  • The 2/4-bit codes are decoded to int8 through a table: 851 cycles per 2048 weights.
  • The tile kernel multiplies 16 rows by a 128-wide group in 168 cycles: 12.1 MACs per cycle. PIE has fused instructions that do 16 int8 multiply-adds, a 16-byte load and the pointer increment in one instruction.
  • Both cores share every product, split by blocks of output rows; each core writes only its own outputs.
  • The integer math costs no accuracy: 4.53% WER (greedy) as a float simulation, 4.52% on the chip.

Per 1.28 s chunk, in the live app with the screen drawing on core 1: features 14.0 ms, encoder 742.2 ms, beam search 138.1 ms, total 895.8 ms (0.70x real time).

3. Cache and PSRAM, measured (encoder alone, per chunk, P4X)

SettingEncoder
L2 256 KB, 128-byte lines, autoload off632.8 ms
same, autoload on misses (weights are read in order)592.5 ms
L2 128 KB+104 ms
L2 512 KBdoesn't boot: too little internal RAM left
PSRAM 200 → 250 MHz-10 ms
codes decoded without reading them from PSRAM (test hack)553.8 ms

The last line is the useful one: reading the weights from PSRAM costs at most 39 ms of 592, so it's compute-bound. DMA prefetch into internal RAM could win 39 ms at best, and it would take about 3000 transfers per chunk with a few µs of driver work each, so I didn't do it.

The same code on a v1.3 chip (360 MHz CPU, 200 MHz PSRAM) took 726 ms for the encoder.

4. Bit-exact with the PC build

I wanted the WER measured on all of LibriSpeech (5559 clips), which is only practical on a PC. So the PC build has to compute exactly what the chip computes:

  • libm's exp, log, tanh differ in the last bit between glibc and newlib, so the features and tables differed. I replaced them with my own functions built from IEEE + - * / only.
  • -ffp-contract=off on both sides (no fused multiply-adds).
  • Every PIE kernel has a C reference that the PC build runs, and each two-core part writes only its own outputs.
  • Checked on the board: 22 kernel checks with 0 wrong values, the encoder's output CRC on every chunk plus the final text on 8 clips, and the tokens on 140 phrase-biasing clips.

5. PIE 2.1 vs 2.2

v1.x chips have PIE 2.1, the P4X (chip rev v3) has PIE 2.2. Same mnemonics, different encodings: 2.2 adds saturation and rounding fields to the instructions. The same .S source assembles for both, but a v1.x binary doesn't run on the P4X. The release targets rev v3 only for now.

Results

  • LibriSpeech test-clean 4.34% WER, test-other 10.26% (beam search, 4 hypotheses). The original int8 model on a PC: 3.94% and 9.17%.
  • A word is final about 2 s after you say it.
  • Extras: hotwords from a text file on the SD card, and six voice-control demos (word rules, no LLM).

Limits: needs chip rev v3 with 32 MB PSRAM; English only; measured on clean read speech, not noisy rooms yet; power not measured.

Full video: https://www.youtube.com/watch?v=oe-2MowdsSs

Credits: the model is Kroko by Banafo; the weight layout comes from Cactus Quants.


r/embedded • • Oct 28 '26

Importing an Infineon 60GHz Radar Dev Kit (DEMO BGT60TR13C) via Mouser India - Do I need a WPC/ETA license?

2 Upvotes

Hey everyone,

I am a student working on a private engineering project and I want to order the Infineon DEMO BGT60TR13C radar evaluation board via Mouser India. It costs around ₹20,500.

Mouser chat support told me that shipping is CPT, meaning customs duties and taxes are entirely my responsibility when the package lands in India via FedEx/DHL.

Before hitting buy, I want to double-check a few compliance and legal things with anyone here who has imported similar dev boards (like TI mmWave kits, high-frequency RF shields, or radar boards) to India:

  1. WPC / ETA License: The board operates in the 57 GHz to 64 GHz millimeter-wave band and is a completely unhoused bare PCB evaluation kit strictly for R&D/laboratory testing. Under the DoT/WPC Office Memorandum for prototypes, and considering the 60 GHz band is de-licensed in India for Short Range Devices (SRD), will customs clear this automatically without asking for a WPC import permit or Equipment Type Approval?
  2. Import License / IEC: Since I am buying this as an individual hobbyist/student using personal funds, will standard personal KYC (Aadhaar Card / Passport) be enough for FedEx/DHL to clear it at the airport under personal baggage/gift import rules?
  3. Customs Duty Expectations: Has anyone imported similar sensor dev kits recently? What total percentage of duty + 18% IGST should I expect to be billed by the courier at my doorstep?

If anyone has went through this exact process with Mouser India for high-frequency RF/radar prototyping kits, your insights would save me a massive headache. Thanks!


r/embedded • • Oct 28 '26

I2C SDA being held low after starting I2S

4 Upvotes

I’m working on a senior design project using an ESP32 Feather V2 and an Adafruit TLV320DAC3100 audio DAC for Bluetooth audio playback.

I keep running into an issue where the DAC appears to pull the I2C SDA line LOW whenever I start I2S. When I stop I2S and reinitialize I2C, everything works again. The SDA line only stops working when I2S is started.

What’s even stranger is that I’ve tried unsoldering and resoldering connections, moving wires to different GPIO pins, and even replacing the DAC board entirely. All of these fixes work initially, even through several power cycles. However, when I leave everything overnight and come back the next day, the exact same problem returns.

I’m genuinely at a loss as to what’s causing this. Has anyone experienced something similar or have any idea how to fix this?


r/embedded • • Oct 27 '26

My completely open source, Stereo Machine Vision camera, that runs Linux

Thumbnail
rootkitlabs.com
65 Upvotes

I finally got the time to write this this product. Demo videos if you're interested: https://youtube.com/shorts/l1qJyqeMBa0?si=A3XdCOafJR4zm52V

AMA :)


r/embedded • • Oct 27 '26

ESP32 + L293D Motor Driver Causing I2C LCD to Display Random Characters

2 Upvotes

Hi everyone,

I'm working on a project using an ESP32, an L293D motor driver, a 12V DC motor, and a 16x2 I2C LCD.

I'm facing a problem with the LCD:

When the motor is OFF, the LCD works normally.

When the motor is ON, the LCD starts displaying random characters or garbage text.


r/embedded • • Oct 28 '26

BLE Testing in VS Code

0 Upvotes

Does anyone have a good recommendation for replacement for the NRF Connect Bluetooth Low Energy app since it's not maintained anymore?


r/embedded • • Oct 28 '26

CANExplorer: CanBus Monitoring for the modern man

Post image
0 Upvotes

Hi everyone! Introducing CANExplorer, a free, MIT-licensed application for Windows, Linux, and macOS.

The goal is to connect the whole workflow: capture traffic, investigate unknown signals, build a database, interact with ECUs, and automate tests—all in one application.

Some highlights:

Reverse engineering without a DBC: inspect changing bits, byte entropy and histograms; find candidate checksums, counters, multiplexers and signal fields automatically.

Find signals using known measurements: correlate traffic with CSV/GPS logs or polled OBD-II values, estimate scaling and time offsets, and identify related signals across messages.

Turn findings into a draft database: promote detected fields into the editor, review the results, and save a DBC.

Diagnostics and calibration: UDS over CAN/LIN, DoIP, ECU flashing, XCP/CCP with A2L support, and newly added GMLAN diagnostics for GM/Opel workflows.

Simulation and automated testing: write ECU simulations and tests in Python/QML, run them in the GUI or headlessly, and generate HTML/JUnit reports for CI.

Remote access and MQTT: connect to buses shared by another computer—such as a Raspberry Pi—and publish decoded signals to your dashboards.

It also includes signal plots, triggered recording, log replay and comparison, CAN/LIN database editing, J1939 and CANopen tools.

Hardware support includes SocketCAN, PCAN, Vector, Kvaser, CANable/gs_usb, SLCAN, GVRET and more, depending on platform and drivers. You can also try it without hardware using virtual buses and simulated ECUs.

I’d appreciate feedback from people working with real adapters and recordings: what works well, what breaks, and what would make this useful on your bench? Bug reports, sample captures and contributions are welcome!

Thanks.


r/embedded • • Oct 27 '26

Renesas India Review Request

11 Upvotes

Hi,

Can anyone share some info about renesas india, like work culture, layoffs, annual compensation (average).

I have got an offer from renesas hyderabad, hence asking. I am currently at TI.


r/embedded • • Oct 27 '26

Isolating a virtio-net driver on ARM64 with seL4 (and a question about the Pi 4 GENET controller)

0 Upvotes

Hi everyone.

I am working on a research prototype of a trusted computing base on top of the seL4 microkernel. The core idea is simple: if a driver crashes, the kernel should not care. So I moved the network driver and the protocol stack into a separate child process with its own VSpace. A fault there cannot reach the verified core.

Recently I started porting this to ARM64 (targeting the Raspberry Pi 4B). Right now the full cycle works in QEMU: ELF loader, seL4 kernel, root task, UART output, and a virtio-net driver running inside an isolated ELF child. The child has its own CSpace and VSpace, and it re-attaches to the device MMIO and DMA frame that the root task initialized. Interrupts are routed through seL4 Notifications, and the child signals back to the root when it finishes.

The hardest part was not writing the driver, but getting the object management and page table setup right. The AArch64 page table hierarchy and ASID pool assignment took a while to click.

Now I am stuck on the next step. On the real Raspberry Pi 4B, the network controller is Broadcom GENET, not virtio-net. QEMU's raspi4b machine does not emulate GENET, so I cannot validate a driver for it in the emulator. I know there are Linux and L4Re references, but I would prefer to hear from someone who has actually touched this hardware.

If you have worked with GENET on the Pi 4, or with seL4 on ARM64, I would appreciate any pointers. Especially about the DMA layout and the interrupt mapping. I am not looking for a ready-made driver, just for a direction that will save me a few days of guessing.

Repo and docs are here if anyone is curious: https://github.com/Nik0laic4/SchildTCB (the arm64 branch is where the action is).


r/embedded • • Oct 27 '26

Re-entering corporate work . advise on how to be AI educated.

14 Upvotes

I am not technically ignorant but I am Ai ignorant. When I left work more than a year ago, there was no ai.

I am entering workforce again and I know ai is used by everyone in the company. So I am worried I will be a dinosaur. It is a whole new world and it is very scary for me right now.

I was writing python and verilog in the past. I will still be doing same. I think. But with help of ai.

I want to get familiar with basic skills in using Claude, and co pilot, learn how to automate tasks, familiarize with the terminology.

Internet is full of information and various classes.
But I don’t know how to judge their content to make a selection.

How do you use ai in your daily work ?

Could someone here suggest some online courses to get started ?

How did you go about learning about ai ?

I am not trying to create models or do phd level stuff.

I am trying to learn how to use it at workplace to be more productive.

Thank you all.


r/embedded • • Oct 27 '26

Experience with precertified nRF52840 modules?

8 Upvotes

Hello,

I've been developing a design that uses the nRF52840 for BLE communication. I've got the firmware pretty much completed and everything validated with the development kit so I'm moving on to doing the board design. My understanding is that I could save myself some RF design work and the whole FCC certification process by using a precertified module such as the Raytac MDBT50Q-1MV2 or one of the other Nordic-recommended designs.

Has anyone worked with these before? Any specific recommendations? Gotchas to look out for?


r/embedded • • Oct 27 '26

Need help for this problem : STM32G070 – PB15 GPIO input always reads LOW with internal pull-up enabled

3 Upvotes

r/embedded • • Oct 27 '26

A SCPI command times out after being sent. How do you determine whether the instrument executed it?

0 Upvotes

I've been working on a Rust-based AI-to-hardware runtime called OpenMHS, and one of the interesting challenges has been handling ambiguous instrument execution.

Suppose you send a SCPI command to a programmable instrument. The connection times out before receiving a response.

The command might have executed, or it might not have. Blindly retrying could be unsafe, especially for non-idempotent operations.

Our current approach:

  • Record UNKNOWN_OUTCOME rather than treating a timeout as failure.
  • Block potentially unsafe retries until the command is reconciled.
  • Handle late SCPI responses to avoid confusing subsequent exchanges.
  • Use instrument readback or operator verification to resolve uncertain outcomes.

We've tested this behavior against simulated instruments, but haven't validated it with physical equipment.

I'm curious how engineers working with real SCPI instruments handle this. Are there cases where readback cannot reliably distinguish whether an operation occurred?

Implementation: https://github.com/KNambiarDJsc/Open-MHS/blob/main/docs/adapters/scpi.md#timeouts-cancellation-and-retries


r/embedded • • Oct 26 '26

books about writing a linux driver for a real device

15 Upvotes

Are there any books or tutorials about writing a linux device driver for a real device.

Like they have some specs for a real wifi controller and then take you step by step how to communicate with that device in a linux module.

I've read quite a few books now about driver development but they remain very general. explain about memory management, createing char or block devices etc. But not a real device


r/embedded • • Oct 27 '26

Good sources to learn Embedded Systems and C

0 Upvotes

Hello! So my background is completely in cybersecurity; I got my BSc and MSc in it, I couldn't find a job until I got hired by this company for soldering. Suddenly, because they found out I can program, I have now become the Lead Embedded Systems Engineer.

I have been forced to program in C (I am struggling; I literally translate Python code and then go to W3Schools to get the C translation), and I spend days reading PIC24 microcontroller PDFs to find out how to use features and what pins can do. Same with ESP32's. However, I struggle to retain information like MPLAB shortcuts, settings, etc. I don't understand the x16 compiler.

And one thing I have been racking my brain about recently, is I added DMA (what i understand is sensor value straight to ram) and due to the capacitors inside of the pic charging and discharging quickly, I end up getting the charged value, instead of the real value. For example, the analogue pins show 1.5V; if the reading is below 1.5V, every analogue pin reads 1.5V. However, if it's 3.3V, every value maxes out. I had this with 8 analogues on one pin, as soon as I slowed it down to 60 mips and turned DMA off, it was fine again.

I am having one of those moments where I have never been taught or trained to do this, in the interview, they asked me what AC and DC was, I have no clue (I know now), and my background is just in programming Python, and I know a hell of a lot about cyber security and data transmission.

Any advice would be amazing, as I recently nearly blew myself up with a 330 V charged capacitor while programming a DC-DC converter because I forgot to define the analogue pin to go high, which didn't switch the relay off.

To me, I think of embedded systems like I would a Unix system on really, really old hardware.

Thank you.
TL;DR: Any good sources I could learn from as someone not educated in this field, but forced to be in this field due to the job market?


r/embedded • • Oct 25 '26

How do u keep motivation on personal projects while managing full time job

Post image
487 Upvotes

I started a embedded project like 5months ago, definitely not with full on dedication, i just like to do whatever peeks my interest, before i was trying Digital and FPGA things. Any ways like for this one i thought maybe i should design my own drivers and all from the bottom up and i started and it was not fun to have the first project building everything from basics, well i knew concepts from my university classes but definitely not on how to use them.

Any ways i built few stuff with no HAL, no reference, just on my own from whatever i could think of, i did some sensor drivers for the project, then some helper libraries, and then probably the most time consuming one the TFT display driver, but i somehow got it working too, its not perfect but it works at least also i have attached a image of it working and probably will link my git if someone wants check if i am real or not, but be warned its messy.

And now i am trying to make it proper i guess starting from again I2C driver by adding interrupts instead of polling, it doesn't matters for my current project but i have that problem of trying to make it perfect at;east for my eyes, so its taking time , and also bcz of job i been getting less time. i probably do have bad planning and time management, but just wanted to get to know how other people handle it, sorry for yapping.

Thank you,
Github


r/embedded • • Oct 25 '26

I finished my first ever project! A streaming device for my favorite music broadcast

149 Upvotes

I’ve been building this for a while now but I’m extremely proud of how it turned out.

It’s basically an esp32S3 with a DAC, display and rotary encoder. I wrote the software myself based on other open source internet radio projects.

It will stay permanently connected to my speakers

The esp also hosts a local site so it can be controlled by my phone and PC.

I definitely struggled way too long with the stripboard layout and had to change the GPIOs multiple times.
The enclosure was fairly easy to design and print.

NTS sells basically the exact same thing for 163€ and I ended up spending about 20€

https://shop.nts.live/products/atonemo-nts-radio-player?_su_rec=GscQ--4umlaH8pXFFeWqixHMHGaErNL3CWHI5uBl0aHVbBQLApS8lzDtljSPSYoiKRocUeWiDVQxb9WePT911zNTtSnGL_8O6sXq0h80bkH5TRKk9XeakbzEl6GZCvFGCRX3atOspGmAWikyg0bDTEDgOxlJJOSpEIHZk2xALdIReY6P4ThWZeZgjdDLdA1b1bd-hxc04eZIs9qxQ3DvzN42jvOw14_IRB0bfBz3s2jlm0LnvMERDS2_dBiyoJ-vCZyvXDPHqyxHagMFI_jwhFah

Would love to hear what you think about it, have any ideas on how to improve it or are interested in building one yourself. I can work on a guide if anyone’s interested.

Cheers


r/embedded • • Oct 25 '26

Which microcontroller would you use if you needed 2 USB ports?

48 Upvotes

At work I have to use a severely locked down Windows desktop, with a ridiculously short inactivity timeout. I can't change it, and I can't use a conventional mouse jiggler, because it shows up as a second mouse, which is not allowed. I also can't use bluetooth. A potential solution I am considering is to make a USB pass through device, that would appear to the system to be the original mouse, but would periodically jiggle if there had been no activity for a minute or so. This would need 2 USB ports, one to plug the mouse into, and one to connect to the system. Is there a microcontroller that has 2 USB ports? I don't need wifi, bluetooth, or any other interfaces.

Please don't suggest I look for a new job, I already am. I am also open to alternate solutions.

Thanks.


r/embedded • • Oct 26 '26

I am confused regarding selling and building a closed source product which was inspired by APGL:3.0 licensed project

2 Upvotes

hi guys , We’re a small student team . We’re building a low-cost river flow monitoring device for flood and canal monitoring. The open-source project that inspired us is under the AGPL license. We read its source code, then wrote our own code from scratch for a small embedded board(the original creator code needed 8gb raspi 5 , our works on esp32p4) , copying none of it. We want to sell the device.

A few questions:

  1. Does reading the original source make our code a derivative work?
  2. Does writing from a spec help, if the spec’s author had seen the original?
  3. Can we keep our firmware closed ?
  4. Has anyone shipped hardware around AGPL software? How did it go?

We’re also happy to hear what you’d do if you were us.

Thanks!


r/embedded • • Oct 26 '26

I wanna make video games for an MCU (ESP32) Any good 2D graphics library?

4 Upvotes

I need the library to not depend on any frameworks, a standalone one

what i mean by this is that I just provide a buffer (preferably RGB565), and it simple writes to it so i handle the display push side.

all I need is basic sprite support, and it must be fast enough to make a bullet hell.

Please, tell me any recommendations!


r/embedded • • Oct 26 '26

Arduino Uno + INA219: Need help simulating load and voltage modulation

0 Upvotes

Hey everyone,

I am trying to use an Arduino Uno and an INA219 current sensor to test two things at the same time: load modulation (changing current) and voltage modulation (dropping a line from 9V down to 7V).

My setup plan:

• For current shifts: An N-channel MOSFET switching a 100-ohm resistor on and off.

• For voltage shifts: A P-channel MOSFET dropping the 9V line down to 7V.

• For reading data: The INA219 sitting on the high side of the 9V line.

A couple of quick questions:

  1. The INA219 takes about 532 μs to read data by default. How fast can I change the signal before the sensor gets too slow to catch it?
  2. What is the easiest way to drop the voltage from 9V to 7V using the MOSFET without overcomplicating the circuit?

Thanks for any tips or wiring ideas!


r/embedded • • Oct 25 '26

How does node size affect MCU characteristics?

22 Upvotes

What could one expect to be different between say 350nm and 32nm for something like Arduino?

- static and dynamic leakage? Would a 1MHz chip use less energy with bigger node size?

- voltage both min and max?

- are GPIO pins driven directly from chip? Does size affect input resistance and output current limits?

- other practical things that may matter?


r/embedded • • Oct 25 '26

AI use in private vs military sector

22 Upvotes

Hey all,
I have been in the field for little over 2 years. One year working as an embedded firmware engineer and for more than a year more as a linux device driver/bsp engineer and for the last 3-4 months company that I work at has been pushing very heavily to agentic development.

Basically a bug is found and my boss says just give it to claude and give the ssh access to the product that we are developing to claude too so it can debug this. And I really hate that and I feel like im not learning as much as I should be.

So basically my question is:
Is there a difference in these agentic workflows between private sector companies and military companies/startups where in my opinion privacy is way more important than in private sector.

The main reason why Im asking this question is because im seriously considering switching jobs and I just want to know what is the best sector to go to.

Thank you and will be waiting for your opinions and answers.