r/embedded • • Dec 30 '21

New to embedded? Career and education question? Please start from this FAQ.

Thumbnail old.reddit.com
317 Upvotes

r/embedded • • 14h ago

Why would new designs use 8-bit microcontrollers?

85 Upvotes

I see that Microchip keeps releasing new 8-bit PIC microcontrollers, but I can't think of why a device like this would be used in a new design when 32-bit ARM Cortex-M microcontrollers already exist at practically the same price. Is there any reason other than backward compatibility for companies to keep using these microcontrollers?


r/embedded • • 3h ago

Emulator/Simulator use case

10 Upvotes

Hi all,

During my embedded carrier, I have never used microcontroller simulators or emulators to check the program binary, and I always tested directly on a prototype PCB. I am looking for a workflow which stays reliable. I have seen Renode being suggested, but the validity comes down to how each device is modeled in Renode. Do you ever use simulation to speed up work and reduce costs? any reliable methods?


r/embedded • • 1d ago

It's a different feeling when your first prototype does exactly what you wanted...

Post image
230 Upvotes

Fairly simple design and even compared to some of my previous ones, but it does exactly as expected on the first try, holy! Lol.

L7805 for 12-32V down to 5V, then an AP2112K down to 3.3V for the STM32C0 MCU. Three thermistor inputs, a single PWM output on a Nch FET. Two 10-pos switches control the high and low temps as well as other ideas I'm still working out in firmware but shouldn't require any hardware changes.

Main purpose should be pretty obvious; it's made to control a cooling fan based on temperature at up to 3 sources with configurable min and max temps.

It's a simple design and I have no right to brag, but sorry, I'm excited that the only things I want to change are silkscreen!

(The main connector is just a placeholder because the 6pos screw terminal wasn't delivered yet, don't hate too hard)


r/embedded • • 2h ago

Drum-triggered LEDs on an STM32F429: a fixed-point no_std Rust signal graph, patched live from the browser

2 Upvotes

I've been building a lighting engine for an electronic drum kit, and it's at the point where I can show off some of the progress. I'm not publishing it as open source right now because it is still at a very early stage.

What it is:

The engine is an MCU-friendly signal graph written in Rust that runs on an STM32F429 Discovery board, which also drives LED strips using a pretty efficient approach (the driver supports up to 16 strips; I run 8). The looks are built from nodes like noise fields, palettes, trails, blends, etc. The graph is very generic, so extending it with any new kind of kernel is extremely easy. All the math is fixed point for efficiency.

The input is built on a custom-made analog front-end board that shapes the envelope; some further DSP is also performed later in the firmware (I think I will eventually build a kick drum trigger module based on that). The ADC samples 8 inputs at 20 kHz.

The first part of the video is Studio:

It is a browser editor where a graph can be built and wired. The preview runs the same engine that the board does, through WASM, so the looks in the browser match the ones on hardware frame for frame. It also allows turning the knobs of any node or sending a replacement patch to the board in real time. There is also cost estimation for CPU and memory; the board will refuse a patch that is beyond its computational capacity.

The second part of the video is OBS (yeah, I know):

Since I was building a drum trigger engine, I needed a way to fine-tune and observe the detector, so basically OBS allows you to see in real time how hits are detected and, more importantly, adjust the knobs of the detector and see what it would detect with them.

Where it is going:

I want to eventually drive an 8-drum kit and light each drum with a separate LED strip. I'm also currently working on improving the clock system, allowing multi-clock signals using some clock calculus approaches. I've also been experimenting with audio, so this also works for any audio nodes; I've built several guitar effects that run on the development board (no audio input/output yet, so they're not playable for now).

I'll probably open-source it at some point once I have enough time to tidy everything up and stop being ashamed of the code (so, possibly never :( ).


r/embedded • • 13h ago

What's a good unit test framwork to use?

13 Upvotes

I'm currently self learning embedded C with an STM32F103. And I wanna know your guys suggestion for a good unit test framework for embedded. I've tried Unity C before but any other that are more work oriented?


r/embedded • • 14h ago

Suggest a budget embedded system setup ?

5 Upvotes

Suggest a budget embedded system setup to learn about rtos and get real world experience. I prefer Arm architecture


r/embedded • • 12h ago

Need ideas for a simple Bluetooth item tracker (keys, remote, wallet)

1 Upvotes

Hi everyone, The problem is that we waste a lot of time every day searching for keys, remote, wallet, charger etc. inside the house. I want to make a simple low-power Bluetooth tracker that can be attached to these items and ring when we search from the phone. I’m looking for practical ideas and suggestions from people who have worked on similar projects. Here are some specific questions I have:

Hardware: Which microcontroller is better for a battery-powered BLE tracker – nRF52840, ESP32, or something else? Any recommended modules? Power: How can I make the tracker last at least 6–12 months on a CR2032 coin cell? Any tips for deep sleep and advertising interval? Firmware: Any good open-source examples or libraries (Zephyr, Arduino, nRF Connect SDK) for making a simple beacon that can also ring a buzzer?

Mobile App: What is the easiest way for a beginner to make an Android/iOS app that can find the tracker and make it beep?

Challenges: What common problems should I expect (range inside house, battery drain, antenna design, etc.)? Any advice, circuit suggestions, or links to similar projects will be really helpful. Thanks in advance!

BLE #embedded #nRF52 #ESP32 #IoT #BluetoothTracker


r/embedded • • 13h ago

Anyone familiar with Altierre/Agile Displays shelf labels? Can their displayed data be read wirelessly?

Post image
1 Upvotes

I bought a batch of electronic shelf labels, including Agile Displays ETAG 250W and eTAG 210E models. Photos of the fronts and model markings are attached.

I’d like to read the price, product name and EAN/barcode currently displayed, ideally by walking past them with a portable reader. I want to keep the original firmware and display content intact—no reflashing or changing prices.

I have a Raspberry Pi 5 and an nRF52840-MDK USB dongle, but no original base station. The 250W’s FCC filing (W22-ETAG) describes proprietary 2.4 GHz GFSK frequency-hopping radio.

Has anyone worked with this hardware or seen a teardown, firmware analysis or protocol documentation? I’ve found projects that repurpose other ESL brands, but nothing clearly applicable to these models.

Before opening one, I’d love to know whether reading the displayed content is plausible, or whether these tags only send back an ID/status acknowledgement. Any pointers or suggestions for a sensible first step would help.


r/embedded • • 17h ago

Turn your Cytron MOTION 2350 Pro into a standalone air quality monitor with CircuitPython!

Thumbnail bleuio.com
2 Upvotes

r/embedded • • 15h ago

Multiple STM32 Cube MX exports in one project

0 Upvotes

Hi all,

I'm working on a project where I've created two platforms with CubeMX; Nucleo and Production. The project uses one or the other based on the build preset. CubeMX only takes care of some things for me using LL. I create the rest manually.

Pros:

- Covers both debug board and production in one project.

- I can re-generate MX files with no issues.

Cons:

- It adds doubled CMSIS files.

- Seems weird.

Is this a typical setup or is there a better way to do it? I'm not sure how to handle Git repository. Should I use "Copy only the necessary library files" and manually copy / paste the rest?

I will be grateful for any clues.


r/embedded • • 1d ago

Running homebrew on a Sony NW-A918: old ARM Linux, syscall ABI quirks, and firmware repacking

83 Upvotes

r/embedded • • 14h ago

Building an offline MCU datasheet knowledge base for firmware reverse engineering — looking for architectural feedback

0 Upvotes

I’m exploring an idea for improving AI-assisted firmware reverse engineering, and I’d like to get feedback from people with experience in embedded systems, reverse engineering, and local AI tooling.
The problem
When reverse-engineering firmware for a proprietary 8-bit MCU, the datasheet may be available as a PDF, but general-purpose LLMs often don’t know anything about that specific chip.
This makes it difficult for an AI agent to reliably interpret memory-mapped registers, bit fields, peripheral initialization sequences, interrupt behavior, and hardware-specific code patterns.
Simply putting the PDF into a conventional RAG pipeline might help with document lookup, but I’m not sure it’s sufficient for accurate register-level analysis.
The idea
Build a completely offline, chip-specific knowledge base that an AI reverse-engineering agent can query through MCP.
The proposed architecture would include:
Structured register database: register addresses, bit fields, access permissions, reset values, and peripheral descriptions.
Document evidence: links back to the original datasheet, including page numbers and table references.
Knowledge graph: relationships between registers, peripherals, clocks, interrupts, pins, and hardware functions.
Semantic search: retrieval of relevant descriptions and hardware behavior from the documentation.
Reverse-engineering integration: MCP tools that let an agent query register definitions and relate them to instructions and memory accesses found in a firmware binary.
The initial implementation would target a single proprietary MCU, using Python and SQLite, with a lightweight graph representation. Everything, including document processing, indexing, and inference, should work offline.
I’m considering integrating it with tools such as REA, Claude Code, and IDA.
Questions I’d appreciate feedback on
Architecture: Would you use a structured database plus semantic search and a graph, or is this unnecessarily complicated for a single MCU?
Datasheet extraction: What tools or techniques work best for reliably extracting register tables and bit-field definitions from complex PDF manuals?
Register-level reasoning: How would you help an AI agent distinguish documented hardware facts from hypotheses inferred from disassembly?
MCP integration: Would exposing precise register lookups and relationship queries through MCP be a useful approach for firmware reverse engineering?
Prior art: Are there existing tools or projects that already solve most of this problem?
I’m particularly interested in practical experience and architectural pitfalls, rather than building a generic PDF chatbot.
I haven’t committed to the implementation yet, so I’m open to simpler or fundamentally different approaches.
Thanks for any suggestions!


r/embedded • • 1d ago

I Built a Stereo Vision Board for Hardware Hackers

Thumbnail
rootkitlabs.com
3 Upvotes

r/embedded • • 2d ago

I built a cat wheel odometer with touch screen display, so now I know my cat's top speed and habits

144 Upvotes

It's an STM32 discovery dev board (32F469IDISCOVERY) I had laying around for a decade...I figured I would put it to good use 😂

The sensor is a simple hall effect sensor + 12 small magnets strategically glued to the wheel. 

It stores a few weeks worth of sessions (evicts oldest).

LVGL library, 10 different colour themes.

Auto threshold calibration.

It tracks history, time, distance, speed, etc. real time charts.

Compact/expanded views, etc etc

Definitely over-engineered. A bike odometer could have been much simpler but where is the fun in that?

Refresh rate is a bit low, maybe 5 to 10FPS but it's good enough.

Developed a browser based simulator as well as hardware in the loop to tune the noise filter. Memory map visualization. Etc etc...

She reached 20km/h (on a other day when I wasn't looking)!!

I probably had more fun with the wheel than the cat herself!!

What I found pretty cool was to let Claude do a lot of automated development and testing in closed loop (USB + serial connected to the computer, end to end tests).


r/embedded • • 1d ago

Can a Microcontroller Tell You Exactly Where exactly a Cable Is Shorted without costly electronics and resistance per meter avilable in datasheet ?

22 Upvotes

Imagine a 2 km cable buried underground. A short circuit happens somewhere along the way. Instead of digging up the cable or checking it meter by meter, can a simple Arduino or ATtiny tell you exactly where the fault is?

I want to build a low-cost embedded system using basic electronic components that detects the short circuit and displays the fault distance in meters with it's details datasheet such as resistance or capacitance per meters

How would you design it? Can this be done without expensive test equipments to easy trouble shooting with drawings marked distance and cable routing


r/embedded • • 1d ago

Measuring barbell displacement

7 Upvotes

Problem:

I'm part of a team of amateur athletes who compete in Olympic weightlifting. I would like to measure the displacement of the barbell path to assess the technical quality of our training.

To simplify, the goal is for the barbell to only have vertical displacement along the z axis, with no horizontal displacement or rotation around other axes.

Similar products:

  • There is gpath which visualize the kind of device I had in mind, even though it doesn't measure displacement
  • There is FLEXX which seems to have everything I need and uses some kind of laser meter, but is bulky, hard to source and does not contain all the metrics I want

Question:

  • Is it feasible to use a high precision gyroscope to measure the displacement of the barbell?
  • Which kind of gyroscope or sensor would you suggest?
  • Maybe I could use two sensors, one on each side of the barbell, to increase precision?

r/embedded • • 1d ago

ESP32 Captive Portal for Meshtastic Hardware

1 Upvotes

Built an offline Wi-Fi captive portal for the Heltec WiFi LoRa 32 V3, using ESP-IDF and React.

Open-source firmware + a customizable React template.

GitHub: https://github.com/DarkLordGeo/esp32-captive-portal


r/embedded • • 1d ago

Question about lost time

1 Upvotes

I am working on an atmega1280 and im using an int6 interrupt, on the osciloscope i measure ~32 clocks between the interrup happen, but in the dissasembly i only see 28 clocks, where do the other 4 “dissapear?”


r/embedded • • 1d ago

Why does RD-60 radar UART1 output zero bytes while UART0 returns point-cloud coordinates?

0 Upvotes

I’m connecting an Ai-Thinker RD-60 radar module to an ESP32-S3 and need help troubleshooting its binary point-cloud output. RD-60 is installed on its development kit. My wiring is:

\- RD-60 module PA8 directly → ESP32 GPIO21 — radar data RX.

\- Kit PB1 → ESP32 GPIO17 — ESP32 command TX.

\- Kit PB0 → ESP32 GPIO16 — ESP32 command RX.

\- Common ground; both boards powered through their own USB connections.

\- All eight kit UART DIP switches OFF to isolate the onboard USB serial interfaces.

Also, while connecting only the mmWave RD-60 kit to a monitor, its UART1 doesn’t give any values; it receives 0 bytes. The DIP-switch setup for that separate kit-only test is not specified here.

Firmware: MMW version:V4.130.4.2 (build 1bf05415)

Commands:

mmwc stop

mmwc baudrate 1000000

mmwc mode 1 2

mmwc chirp_num 1

mmwc freq 58000 0

mmwc range 10000 40

mmwc veloc 3000 375

mmwc frame 200 100

mmwc coord cart

mmwc data 3dpoints

mmwc uart on

mmwc report points 100

mmwc start

During the finite scan, the command UART returned actual point-cloud previews:

MMW data=0x48

Point Cloud=2:

P0: x=-14cm y=9cm z=162cm 75cm/s 2100

P1: x=-14cm y=49cm z=159cm 75cm/s 2300

The problem is that despite those previews, the ESP32 received zero bytes on GPIO21, connected directly to module PA8. The diagnostic reported:

data_bytes=0

fifo_overflow=0

buffer_full=0

frame_error=0

parity_error=0

breaks=0

read_error=0

I haven’t checked PA8 with an oscilloscope or logic analyzer yet, so I can’t confirm whether the pin is electrically transmitting.

Has anyone successfully captured the RD-60’s binary point-cloud stream on PA8 with this firmware?

Specifically:

  1. Does UART1 output require RTS/CTS or another enable command?

  2. Is mmwc uart on sufficient to enable binary point-cloud output on this firmware?

  3. Are all UART DIP switches OFF appropriate when using the kit’s PB0/PB1 breakout and tapping module PA8 directly?

  4. Is there an official UART1 packet-format document or a known working ESP32 example?

I’m trying to distinguish a wiring/routing issue from a firmware configuration or handshake requirement. Any working configurations or troubleshooting suggestions would help.


r/embedded • • 1d ago

Upload PCAn firmware to CANable device ?

1 Upvotes

Hello everyone, firs ttime I post here so I hope it's the right place and right way to do so, sorry if not. I am trying to build something at work to connect to a CAN network and need some help as I'm not fully an expert...To make it short, I work in the automotive industry and to connect to some controm modules we need a CAN interface produced by a giant firm that they sell for over 1000€/$...while it's only a CAN to USB that actually doesn't even work anymore on some computers that run with Windows 11. That company has been quite smart to make it possible to connect to their software with a PCAN device, which works very well. We have some at work and it was easy to build an adapter loom. However, I was wondering if maybe it would be possible to use any sort of CAN adapter for this purpose as it's way cheaper and that could be a cost-friendly alternative...

I have available an old CANable device that I used a bit in the past but don't need anymore...My question might then be wrong but is quite simple : is there any way/any chance to upload the firmware from a PCAN device to this cheap CANable so that it can be detected by the software ? I can give you more details about the hardware if you think that it's possible, hopefully someone can help me with this. Thanks in advance !


r/embedded • • 1d ago

Sourcing FPGAs in small quantities for edge AI prototypes: what has worked for you?

3 Upvotes

I’m looking into edge AI prototypes that need an FPGA for deterministic latency on a camera pipeline. The quantities are small, think 5 to 50 units per build, and lead times through the usual franchised channels have been all over the place this year.

A few questions for people who have been through this:

  1. Where do you source FPGAs or adaptive SoCs when you only need a handful and franchised stock is on allocation?
  2. Do you design in a second FPGA family as a fallback from day one, or is that more trouble than it’s worth?
  3. If you have used independent distributors, what do you ask for before ordering? Test reports, traceability docs, anything else?
  4. For edge AI specifically, has anyone moved from FPGA to an SoC with an NPU just because the SoC was easier to buy?

Not looking for a single “best” vendor, more interested in the process people use to avoid stalled builds or counterfeit parts. Thanks in advance.


r/embedded • • 2d ago

What is hardware security on a high level and what are the career options for it?

25 Upvotes

I am exploring my options after getting my bachelors, one of the things that sound interesting is hardware security and I want to know what does it entail exactly? What is a career path for it? How important is a masters degree for it and what type of work would someone be doing?


r/embedded • • 2d ago

STM32F446RE: Why am I not getting a HardFault when accessing NVIC registers from unprivileged Thread mode?

Post image
23 Upvotes

I'm learning about privileged and unprivileged modes on ARM Cortex-M4 using an STM32 Nucleo-F446RE, and I'm trying to understand a behavior that differs from my instructor's demonstration.

I'm setting the nPRIV bit in the CONTROL register to switch Thread mode to unprivileged mode. After that, I attempt to enable and trigger IRQ3 through the NVIC registers.

My instructor's system enters HardFault_Handler(), but mine doesn't seem to do so.

Complete code (main.c):

/**
 ******************************************************************************
 *     main.c
 *   Auto-generated by STM32CubeIDE
 *  V1.0
 * u/brief   Default main function.
 ******************************************************************************
 */

#include <stdio.h>
#include <stdint.h>

/* This function executes in THREAD MODE of the processor */
void generate_interrupt(void)
{
    uint32_t *pSTIR  = (uint32_t *)0xE000EF00;
    uint32_t *pISER0 = (uint32_t *)0xE000E100;

    // Enable IRQ3 interrupt
    *pISER0 |= (1 << 3);

    // Generate a software interrupt for IRQ3
    *pSTIR = (3 & 0x1FF);
}

void change_access_level_unpriv(void)
{
    // Read CONTROL register
    __asm volatile("MRS R0, CONTROL");

    // Modify CONTROL register
    __asm volatile("ORR R0, R0, #0x01");

    // Write CONTROL register
    __asm volatile("MSR CONTROL, R0");
}

/* This function executes in THREAD MODE of the processor */
int main(void)
{
    printf("In thread mode : before interrupt\n");

    change_access_level_unpriv();

    generate_interrupt();

    printf("In thread mode : after interrupt\n");

    for (;;);
}

/* This function (ISR) executes in HANDLER MODE of the processor */
void RTC_WKUP_IRQHandler(void)
{
    printf("In handler mode : ISR\n");
}

void HardFault_Handler(void)
{
    printf("Hard fault detected\n");
    while (1);
}

What I observe:

  • The debugger shows CONTROL = 0x1 after calling change_access_level_unpriv().
  • STM32CubeIDE's Fault Analyzer displays "No Fault Detected", although it also shows fault-detail entries that I'm unsure how to interpret.
  • My program doesn't appear to enter HardFault_Handler().

I'm using STM32CubeIDE with an STM32 Nucleo-F446RE (ARM Cortex-M4).


r/embedded • • 2d ago

Just shared a personal project

Thumbnail
github.com
2 Upvotes

I don't usually post much, but I'd like to share a bit about what I'm learning, and exploring along the way.

To start, here's a small STM32 project I've been working on and recently open-sourced.

It is based on another open-source project.

Any feedback is welcome