r/embedded • • 2h ago

Is it safe not to isolate the MCU ground?

Post image
6 Upvotes

This from TI's BQ76942 AFE datasheet. I'm connecting it to an MCU powered from an external regular but they will have a common ground and I2C line. The ground will also be connected to charger's ground at Pack+ and pack- and I2C line. Is it safe for the MCU not to have an isolated ground? I never designed something with TI products so idk how good they do it and whether it's safe to just use their schematics in datasheet as they are or not.


r/embedded • • 22h ago

I made RAID storage using STM32 and 4 NOR flashes

Post image
71 Upvotes

For those who don't know what RAID is , its basically a redundancy system in which a parity is created so the data can be rebuilt if a storage device suffers a failure , In my project 1 out of 4 flashes can fail and still have the full data available .

The way it works is that three blocks in each stripe store actual data, while the fourth stores XOR parity.

the parity is calculated using a simple formula P = A ^ B ^ C ( all 3 data blocks will be XOR'ed together)

so in case the A block fails , the data on A block can be rebuilt using the other data blocks and the parity block

A = P ^ B ^ C.

The parity location rotates between all 4 flashes, so data can be recovered regardless of which flash becomes unavailable.

But if more than one flash fails then the data cannot be rebuilt due to insufficient parity.

if a failure is detected write command is disabled and it goes into degraded mode with only read command available

The current version does not rebuild the data on the flash instead its rebuilt only in the stm32 RAM when requested and it can only accept data entered through the UART interface .

The MCU used is STM32F401RE

The flash used is W25Q64FV by winbond

It was a fun challenge making this project , learnt a lot and coded most of the stuff like read, write clear block drivers for the flashes by using SPI commands myself , I struggled a bit when it came to linking all 4 flashes using logical memory address and implementing the parity rebuild . So i did end up utilizing AI for that part as I wanted to complete this project to put it on my resume.

Here is my github repository if u want to have a better look at it will all the explanation : GITHUB Repo

If any memory or storage firmware engineers are reading this, I'd really appreciate any feedback or advice on the project. I'm trying to get into companies like Micron, Western Digital and SanDisk, so any suggestions on what I should improve or learn next would be helpful.

Thank You.


r/embedded • • 3h ago

Arduino MEGA as a JTAG probe??

0 Upvotes

I'm not sure how many details to include, tried all possible googling for how to debug a MEGA and all I found was I had to buy an AVR ICE ?

took me a few weeks to figure this out, all vibe coded so YMMV, you can turn your spare MEGA in a JTAG probe to help debugging another MEGA .

pretty much all that you need is in the repo README

stars, sponsors, forks, comments, issues, feedbacks appreciated

https://github.com/lsdlsd88/mega-jtag-killer


r/embedded • • 6h ago

a way to automate port/i/o testing off a board?

0 Upvotes

I can't find much about how to automate/testing stuff like pcie, m2, sata, and random i/o pins.

there are some passmark tools but they're too much expensive. random AliExpress stuff seems to use some led checkers, which is just bad. I honestly, don't know how any of those protocols do work, one time I tried some pcie stuff, but I dropped it off, due to their complexity.


r/embedded • • 1d ago

I made an IP streaming camera. Is this worth pursuing?

Post image
360 Upvotes

I threw together a design for an IP streaming camera over the weekend and was wondering if it'd be worth modularizing and open sourcing it. Is there interest in this? I didn’t see too many projects like it out there, but I’ve built too many things in a vacuum, so I wanted to see what people think first.

Right now it’s a small 4K30 camera: a Rockchip RV1126B with a Sony IMX415 sensor, streaming over Ethernet, powered off USB-C, with a microSD slot. I designed the carrier board around a small compute module I made for another project, and slapped together the full assembly in Fusion. The RV1126B module matches the CM4 pinout, so I’m planning on testing with a CM4 as well.

That’s where it is today, and I’ve been thinking about how it could turn into a modular design if that’s something people want. The camera core would stay the same and the back would swap out: a plain heatsink, a heatsink with a tripod mount, a battery pack, a touchscreen. Later maybe other mounts, 5G, a rugged version, a thermal/IR camera, or swappable lenses. And if the back is open, anyone could print their own.

Some things I could see it being used for: a DIY doorbell, a DIY webcam, a home security setup that doesn’t depend on someone’s cloud, a camera for a drone or rover, a 3D printer cam, a wildlife or trail cam with the battery back, or just streaming something live.

I’ve already ordered the first test units, so I’ll post how they go once they’re running. The pictures are my CAD, an exploded view of the assembly, and the SoM I’ve been testing and plan to use (see my previous post on that).

Looking for honest feedback. Would you use something like this? What for? Does open source and modular matter to you, or would you just want a solid camera? I know Seeed’s reCamera exists (the Pro came out in July on the same chip), so also want to know if this is a waste of time.


r/embedded • • 1d ago

Anyone know where to get small capacity Micro-SD cards.

29 Upvotes

I am working on a device/PCB right now and intend to use micro SD cards as a medium of storing the collected sensor data.

The long intervals between data collection (for analysis) and the remoteness of deployment mean that radio data link are impractical. I have left the capability for a radio link open/available if the use case changes but my employer does not want to use that option at this point.

The problem is that I cannot find SD cards of capacity smaller than 32GB to be readily available at scale. I am after about 200 or so 2GB cards; for the first batch. Anyone know any electronic component distributor or retailer that still sells them? Thanks.


r/embedded • • 13h ago

Generating 10mv 100khz signal using ESP32

0 Upvotes

Hi friends, I built an analog filter and I wanted to generate a 10mv 100khz signal to test my amplification and attenuation, is this possible with an ESP32, I dont have a testbench. Thanks!


r/embedded • • 11h ago

Riemann Hypothesis solved — what happens to embedded engineers?

0 Upvotes

If even the Riemann Hypothesis can be solved, what's to become of embedded software engineers?


r/embedded • • 1d ago

Unable to get a clear waveform from an INA219 shunt resistor using an oscilloscope

0 Upvotes

I'm trying to observe the current waveform across an INA219 current sensor's shunt resistor using a Siglent SDS1102CML+ oscilloscope.

My test setup is around 10 Ω with approximately 20 mA of current. I tried both 1X and 10X probe settings and adjusted the oscilloscope settings, including increasing the sensitivity, but I still cannot get a clear waveform.

The interesting thing is that I can display the test waveform properly on the same oscilloscope, so I don't think the oscilloscope itself has a problem.

What would be the correct way to measure and display this small shunt voltage waveform?

Should I use a different probing technique or an amplifier?

Any suggestions would be appreciated. Thanks!


r/embedded • • 2d ago

Testing 4-axis EtherCAT on an RK3588 at 250 µs cycle time

80 Upvotes

We recently tested a 4-axis EtherCAT setup on the RK3588-based MYD-YR3588 board. Here are some results worth sharing.

Test setup:

  • RK3588 + Linux 6.1 RT + IgH EtherCAT Master
  • 4 × Inovance SV630N servo drives, daisy-chained
  • CSV velocity mode, 600 RPM
  • Dedicated Ethernet MAC for EtherCAT

Results at a 250 µs cycle time:

  • 12 hours without additional system load: zero cycle overruns or skipped cycles.
  • 2 hours under CPU, memory and I/O stress: also zero overruns or skipped cycles.
  • Maximum thread jitter: 1.993 µs (normal) / 5.493 µs (under load).
  • Maximum EtherCAT DC synchronization difference: 127 ns.

A few caveats: the motors were running without mechanical loads, and the stress test did not include full GPU/NPU workloads. These results are specific to this test configuration, not a guarantee of worst-case performance. The strict 1,000 ns frame-transmission qualification was also not met.

Interesting to see how far an ARM-based Linux platform can go with real-time industrial control.

How are you guys handling EtherCAT on ARM platforms?


r/embedded • • 1d ago

Fixing an impact-damaged Samsung QD-OLED from inside its panel controller: per-lane skip flags and scan-time sensing gains over the TCON's internal USB service link

Post image
0 Upvotes

TL;DR: Impact damage on my Samsung S95F 77" QD-OLED caused (1) a blackout / controller-reset loop, every 46–51 s at worst, and (2) a dark 6-column line. Both are fixed from the TV's own Linux side by talking to the panel controller (TCON) over its internal USB service link. RAM writes only, nothing flashed by me. Blackouts: set the controller's own per-lane skip bit for lanes 540–661, re-applied on every controller boot (24/24 boots clean). Line: lower the damaged columns' sensing gain at the moment the controller wakes for the standby compensation scan, so the TV's own scan computes and saves a proper boost. Code (Python on a server + C# helpers run on the TV's .NET) and docs on GitHub. Before/after: images 1–2.

Prerequisite: root access. Both TV-side fixes require a working root shell on your own TV. Use the S95F rooting toolkit and its root setup guide, then verify your TV root session. Firmware decryption is not required for either fix.

Hobby project on my own TV, nothing for sale. Writing to the panel controller can brick a TV and voids the warranty.


The access path (image 3)

  • The TCON hangs off the main SoC on an internal USB link: 04e8:2001, interface 2, bulk OUT 0x02 / IN 0x82. As root on the TV it opens through usbfs. No extra hardware, no firmware mods.
  • Each request is a 12-byte little-endian header (op, address, length), plus data for a write:
OpDoes
0x101read RAM / registers
0x1read the ID block
0x103read storage (flash); read-only for us
0x102write one 32-bit word to RAM
  • The link isn't clean: under long bulk write runs it lost ~1 write in 3,600. So every write is one word, in five steps: status block 0x47012400 must be Clean (stop 0, fault 0, gate 1, limit 40) → read and compare the old value → bounds compiled into the helper → write → read back (mismatch = restore). The first write on any setup is an identity write.
  • Tooling: Python on a home server reaches a root shell on the TV and stages a small C# helper that runs on the TV's own .NET runtime. The helper does the USB transactions and returns a receipt.

Bug 1: the blackout loop (image 4)

  • While the picture is on, the controller runs a per-lane sensing consistency check (RT Protect). 24 lanes failed, all within ~554–649, which is the damaged area.
  • Failing lanes push a fault score: 0 → 38 → 44 against a limit of 40. Over the limit the controller stops the picture and raises its error line; the main board's monitor resets the controller, it re-enumerates on USB, and fails again.
  • The primary lane table has a per-lane skip flag (bit 0). Lanes 540–661 = 122 halfwords at 0x47010438–0x4701052A, RAM only.
  • RAM clears on every controller power-up, so a watcher service tracks boot id and USB devnum, reads and classifies the controller (Clean, Quiescent, Faulted, first scan after power-on), writes the 122 bits and requires an exact read-back. A separate first-scan writer ignores six free-running scan-counter bytes when it compares two reads. 24/24 boots clean.
  • Optional recovery for an already-faulted controller: switch the TV to its own Apps home (stock input_keyevent, focus checked after every key), then one stock controller power cycle through the TV driver (/dev/tztv_tcon, ioctl 0xc010749f, payload 41, 2, 0, 0). Budget: 3 per hour, 6 per day.
  • Trade-off: that one check is off for those lanes. Current monitoring and panel power control are untouched.

Bug 2: the dark line (image 5)

  • In standby the TV runs a sensing scan and builds per-column compensation from it. The firmware only ever adds drive, and only to columns that read weak. The damaged columns' stored sensing result read far too high, so they got nothing.
  • Fix: lower the per-column sensing gain (a per-lane 32-bit word holding two 16-bit column halves) just for the scan. A scan-arm helper waits for the controller's USB device to appear when it powers up for the scan, waits until the gain table is loaded and the controller is Clean, writes, reads back, then logs the scan stage every 50 ms. Hard bounds: lanes 600–660 only, halves 8000–26000, at most 8000 change per write, ×0.65-of-stock floor.
  • The scan then stores a result that reads those columns as weak, the TV's own save writes it to storage, and the live compensation is built from it at every power-on. The next stock scan would overwrite it, which is the rollback path.
  • 11 calibration runs to converge. Two runtime trims on top (a second gain stage on lanes 627–630, and the blue compensation weight 205 → 820), re-applied after each controller boot.
  • Dead ends: the blue curve tables (panel-wide only; one write faulted the controller) and editing raw blue samples mid-scan (worked, but with 1 write in 3,600 lost it isn't reliable).

Results

Links

Ask away about the protocol or the controller internals.


r/embedded • • 2d ago

FOC control via Serial

11 Upvotes

I want to get into making a robot arm, and decided to start from scratch, that means start from the fundamental of control a motor.

At first I stated everything from Matlab with Simulink coder to generate the control code, everything works well, and I can control everything from Matlab. Then I moved forward and port the control algorithm to handcoded code.

The desktop application is vibecoded since it doesn't intereste me.


r/embedded • • 2d ago

Emulating keyboard press in a PIC32CM

3 Upvotes

I have heard of the USB HID. I read the datasheet of the microcontroller I am using, and admittedly, I still do not know how to approach it.

Where can I start so I can figure out what to do?


r/embedded • • 2d ago

Emulation and Simulation

16 Upvotes

In the last year AI has completely taken over how much my team used AI and We were able to basically just Gen code left right and center. Using connected hardware CI/CD works to a certain extent but it felt like we really need better ways to handle the type of load that AI was putting for the pace we "needed" to be going with agents.

So when generation is easy and validation is still hard, how useful are people finding emulation/simulation? And since its important this is for usually post silicon micro-controller level work IOT, automotive etc.


r/embedded • • 2d ago

Do you think this runs Linux or Bare Metal software?

15 Upvotes

I used to have this Sampling / Beatmaking device. It booted very quickly. From my experience with SoCs like Raspberry Pi and others make me believe that there is no operating system involved because you could boot into this device within about 5-10 seconds after pushing the power button. By contrast, RPI take good 2-4 minutes to boot.

https://www.youtube.com/shorts/PPnyn8HVME8

How do they achieve that? Does it run the software on bare metal instead of Linux as intermediate layer?


r/embedded • • 2d ago

Making a smart greenhouse with a PIC microcontroller

1 Upvotes

Hey everyone! I’m currently working on a Smart Greenhouse project for my Microcomputer Systems class, and I could use some help with the hardware setup.
For this project, I’m using a **PIC16F1829 microcontroller**, which has already been soldered and assembled. The hardware components I’m working with include:
Breadboard
Jumper wire kit
Small water reservoir with a mini water pump
Soil moisture sensor
LM35 temperature sensor
HC-SR04 ultrasonic sensor
16x2 LCD display
MOSFET driver
5V power supply
For the software side, I’m using **MPLAB X IDE** with the **MPLAB XC8 Compiler**.
I’m looking for some guidance on how to properly connect and integrate all these components with the PIC16F1829, especially when it comes to wiring, power requirements, and controlling the water pump.
Any advice, suggestions, tutorials, or resources would be greatly appreciated. Thanks in advance!


r/embedded • • 2d ago

Is anything running on Linux or an RTOS really bare metal?

0 Upvotes

Omer Kilic is a hardware and manufacturing consultant. His view is that bare metal means a microcontroller or an FPGA. Once you're running on Linux or even an RTOS, you're working with a scheduler. Real time means a guaranteed upper bound on how long something takes. With speculative execution and multi-core contention on modern CPUs, that is very hard to guarantee.
The episode is about the BEAM on embedded hardware, with Nerves creator Frank Hunleth. Topics include the medical device he built in C++ with hand-rolled actors, offloading timing to companion MCUs, and the microcontroller that ends up handling power sequencing for the whole board.

https://youtu.be/Wfl9Vp-jdN8


r/embedded • • 2d ago

Looking for a LoRaWAN module for a smart water meter project

Post image
0 Upvotes

Hey guys,

I'm currently looking for a LoRaWAN end-device module for a personal smart water meter project I'm working on.

I've done some searching, but most of the results I can find seem to be LoRaWAN gateways rather than end-device modules.

I asked AI for some recommendations, and it suggested Quectel modules. However, I'm not sure if a company of that size would be interested in dealing with individual developers or hobbyists like me.

Does anyone have any recommendations for LoRaWAN node modules? I'd really appreciate it if you could share some product links or resources.

Thanks a lot!


r/embedded • • 3d ago

Not another square LED matrix! 👀

107 Upvotes

I've added a new horizontal LED bar to my setup alongside the usual square LED panel.

square matrices are everywhere, but I rarely see this kind of horizontal LED display. I think it opens up some interesting possibilities for animations and visual effects.

what do you think? Any cool ideas for what I should make it do?

will add some more shorts this weekend~~


r/embedded • • 3d ago

What is the voltage or procedure needed to power the SIM900?

Post image
10 Upvotes

Heyyyy people, I am working on a capstone project about sending a message from my GSM module, I would love your help regarding it if that is possible. Normally, I am powering it with 5V DC 2A but unfortunately it doesn’t work for me. It gets powered but when I click pwerkey, only the status LED lights up but the netlight LED doesn’t. What can I do? And what is this problem related to? I would really appreciate any kind of help.


r/embedded • • 3d ago

Wirelessly controlled, STM32-driven DRSSTC, the Emma Mk1

4 Upvotes

Hello,

Just wanted to share my DRSSTC, the Emma Mk1. The project launchpad contains links to the live documentation and all the repos.

The main project goal was to verify the STM32G474RE firmware, which proved satisfactory.

The main project constraint was the secondary coil and the spun-aluminum topload, which I had purchased a while ago from eBay, the remainder of the DRSSTC was designed around them.

Some further tuning remains, and the inverter bus capacitance needs to be increased to improve performance, but overall I consider this done until I can get back to it and add features to the firmware.

Thanks for looking.


r/embedded • • 2d ago

What MQTT broker are you using for your embedded projects?

0 Upvotes

A quick disclosure: I work on LavinMQ and would love to learn from others' experiences.

I've been playing around with MQTT and ESP32 devices using LavinMQ for a while now, and I'm curious what others are using on the broker side.

Are you using Mosquitto, EMQX, or something else? What made you choose it? Have you run into any issues as the number of connected devices grew?


r/embedded • • 2d ago

A idea build in Edge AI

Thumbnail
github.com
0 Upvotes

I have build something like a library in ANSI C to make the Edge AI workflow simpler and easy.

In traditional way ,when the deep learning model outputs a value we would use a multiple of conditions to evaluate the condition on the output value and trigger the function to do a action.

So I build TINYCHAIN ,a output to function handler mapping with validation of the conditions specified just through flags and also performs denouncing checks and also has a feature of streak count .

As every node has assigned a struct with the condition flag (greater value ,less value than threshold or max value) , required streak to trigger function,and other features.

The conditions are checked for all the nodes everytime and consecutively and triggers the function.

Does this idea is good ?

Eager to know some professional feedbacks on the architecture !

GitHub repo


r/embedded • • 3d ago

Did somebody read Latency, by Pekka Enberg

2 Upvotes

I want honest reviews about this book. I saw some guys saying that the book is incorrect/inaccurate on some technical concepts, so some feedback could be really nice.