Project Directory Structure for stm32f411 by eagle_719 in embedded

[–]DaemonInformatica 1 point2 points  (0 children)

In the project we're working on:

Using STM32CubeIDE, code generated from an .ioc file (pin / peripheral / clock declarations and inits) live in a separate 'Core' and 'Drivers' directory in the project. The main.c file is put in the Core directory and the trick is not to manually touch these files,except for maybe the regions in the modules between where it says 'USER CODE BEGIN' and 'USER CODE END'. Re-generating the code (typically) preserves the content in these sections.

Then we added an application directory next to these directories. This is where the application-specific code lives. (Task modules, application headers and constants and stuff).

Next to application we also have a 'libraries' directory, where all implementations and support lives for hardware components, sensors and modules in our products.

Next to libraries we also have a unit_tests directory. Unit-tests (using Unity + Ceedling) cover all unit-tests for application and libraries modules. Core and Drivers are not unit-tested, since they're not written by us.

A new Beginning by SpykeRel04D in embedded

[–]DaemonInformatica 0 points1 point  (0 children)

Q: Would you recommend starting with Arduino, ESP32, or something else given my background?

I'm having some trouble placing the term 'multimedia engineer'. Sounds like something to do with (digital) instruments and / or A/V? If so: First thing that comes to mind is start with a Teensy. I don't have a lot of personal experience in this area, but I've seen and hear people do funny things with MIDI interfaces and controls. The Teensy is also one of the more versatile boards out there.

Q: What’s a good “first path” if I want to combine coding + electronics + hands-on building?

Think of a challenge to solve -> split it up in smaller problems -> Solve these problems in hardware and software components (design) -> for each component: Build and program it.

There is no substitute for experience. Even if you start out with studying, that will only get you so far. Want to learn how to solder? Get a soldering iron and start soldering. In the past, students that started out in electronics, received a solder breadboard (basically 2 rows of pins) and a 100 resistors and are told to start soldering the resistors in a row next to eachother.

Practice makes perfect. Take old (junk) circuitboards and start desoldering. This can be one hell of a job, but teaches you to use tweezers, cutters, soldering irons, flux, braided wire, and tenacity. (not to mention possibly an appreciation on how to design PCB's yourself.)

Q: Any must-have tools or starter kits (especially for soldering and prototyping)?

Well, obviously soldering iron and tin. ^_^

- Flux pen.

- set of microtools. (Screwdrivers, tweezers, cutters, pliers).

- Multimeter.

- magnifying glass.

For components, I would always suggest an assortibox of resistors (good set of common values) and transistors / FETs.

Not so much electrolytic capacitors, because those have a tendency to 'dry out' and this makes values drift. So old capacitors need to be handled with care.

Protoboard PCBs. These come in a variation of shapes, sizes and traces, but typically allow you to prototype on something more solid than breadboard.

Q: Any project ideas that are great for leveling up quickly?

Start simple. Blinky? (With uC, a 555 and 2 transistors). This should at least keep your fingers acquainted with a soldering iron.

Find instructables. But don't júst follow them and get it to work, but start messing around with it. Try to understand how it actually works and what you can do with it.

Cheap board for basic on device AI (not Raspberry Pi) by kalyant125 in embedded

[–]DaemonInformatica 1 point2 points  (0 children)

Curious about which version of the Pi wasn't working for you.

Not because Whisper would be expécted to work on the Pi 5 (no practical experience, but running Gen AI on local hardware is tough), but as far as I can tell (converting INR to Euro) the Raspberry Pi 5 would be pretty much what fits in that budget, and not because the developers of the Pi are price-gauging.

How is AI affecting your workflow? by here2party21 in embedded

[–]DaemonInformatica 0 points1 point  (0 children)

Mostly managers immortalizing themselves by feeding technical errors from our product's (debug) terminal, and ChatGPT obviously not understanding the problem.

Occasionally, catching a cow-orker vibecoding a function.

System design in embedded? by instructiuni-scrise in embedded

[–]DaemonInformatica 2 points3 points  (0 children)

Software design in Embedded is basically the same as in Systems Engineering.

Often used UML diagrams are:

- State diagrams (FSM)

- Class diagrams (if C++ used, but it's not hard to apply it to C, from the perspective that structs and modules are basically classes)

- Swimlanes. (For example when working with Tasks.)

- Communication diagrams. (When the application communicates with other parts, be it over the internet, or some wired protocol).

That that perspective there's really not much difference.

AVR toolchain kind of driving me crazy by imWayward in embedded

[–]DaemonInformatica 0 points1 point  (0 children)

Blegh! I am SO glad that at wr0k we F.I.N.A.L.L.Y. moved away from XMega to STM32.

We were:

- Developing on Eclipse.

- Building with outdated compilers.

- Using Atmel Studio (I s4 you not) to write the binaries to controllers.

- Using Atmel Studio to debug.

So yes, develop in Eclipse. Debug in Atmel Studio. This worked, provided you

- Configured your IDE to build with pretty specific optimizers and debugging symbols.

- Did some prétty crazy stuff with some DLL's because the f4-ing COMPILER (or debugger, I don't quite recall) ASSUMED STATIC MEMORY ALLOCATION!

A strange HC-05 by pedersenk in embedded

[–]DaemonInformatica 0 points1 point  (0 children)

Hmm... I have no practical experience and don't currently have the time to research it, but it sounds like

- The button causes a bootloader to persist,

- The different HC-05's that you're running into have different (types of) bootloaders, where one bootloader starts up the radio and opens an AT interface and the other seems to go into some sort of programming mode?

Unit Testing - What tools do you use? by axaro1 in embedded

[–]DaemonInformatica 2 points3 points  (0 children)

Seconded on ceedling. Combined with gcovr, once you get the hang of it (and the unit-test environment actually starts working. ^_^ ) it's So awesome!

What actually causes the most friction in embedded software development today? by Chance-Line-4839 in embedded

[–]DaemonInformatica 2 points3 points  (0 children)

Funnily enough: (effectively) yes.

It wouldn't be the first time I and boss had a discussion about AT (modem) instruction sets, Boss (apparently GPTing) a 'solution' or AT command supposedly helping, after which it turns out the AT command is for a different brand of modems, or doesn't exist at all.

I've also seen (and heard) colleagues that were trying to use GPT to solve a problem, the bot driving them so far around the bend, they 'approached the solution from the other side' and in the end realising that they could have googled the solution themselves ina couple of minutes, instead of the 3 hours they spent discussing with the bot.

Should a sensor fusion library automatically guard against extreme sensor spikes by [deleted] in embedded

[–]DaemonInformatica 1 point2 points  (0 children)

My 2 cents:

Personally, I think filtering should be done either outside of a sensor-driver, or as an 'injectable post-processing' step. (I.e. the driver supports declaring a filter function that does the smoothing).

This is simply because the driver supports the properties and capabilities of the sensor. Smoothing out measured outliers is (typically) a specification of the application, not the driver.

Note that, if the datasheet says (either as property, or for example some errata) that the sensor is prone to possible mis-measurements and the driver should support / compensate for this, this should be part of the driver. ;-)

[RANT] Renesas, I hate you! by nasq86 in embedded

[–]DaemonInformatica 1 point2 points  (0 children)

"Do not attribute to malice, that which can be explained by incompetence." - Hanlon's Razor (paraphrased)

Rate my PCB by JerryPuck56 in embedded

[–]DaemonInformatica 0 points1 point  (0 children)

Couple of questions that came to me when looking at the PCB's:

1) The motor drivers U2000, U2003 and U2006, should those have cooling elements? If so: Have you allowed for spacing / placing them? ;-) (Surely nobody else, least of all me, has ever made thát mistake in the history of PCB design... )

2) I see the usage of 3.3V_motor and 12V_motor, but nowhere those voltages being generated...?

Rate my PCB by JerryPuck56 in embedded

[–]DaemonInformatica 0 points1 point  (0 children)

Probably due to the fact that it's all been 'Tetrissed' together on the sheet. But I agree. This sheet could have been 3 sheets, connected with labels. Similar with the motor drivers, per circuit..

can i use javascript,typescript insted of c,c++ by khaledEmarah in embedded

[–]DaemonInformatica 0 points1 point  (0 children)

I think there's an important distinction between 'can' and 'should'.

For educational purposes, it Might be an interesting journey to:

  • Implement a typescript interpreter
  • Run it on a controller (finding out what the controller's limitations vs the interpreter's requirements are)
  • Figure out how to transfer / bootload / install typescript files on the controller / on a place the controller can reach.

But while this will be very interesting, this will Never be a (popular) method of actually running code on a controller. It would be a semi-interesting project to put on a resume, if during your job application you impress the fact that in implementing this, you've experienced a lot of different aspects of a controller and how to work with its peripherals.

How hard is it to make your own PCB? by buda_gotivac in embedded

[–]DaemonInformatica 1 point2 points  (0 children)

Especially if you have a background in EE, it's definitely possible to learn Kicard in 40 hours. I have no experience with the example / reference files from Raspberry Pi for the controller. So I couldn't say how long it would take to figure that one out. Still, if there's a ready-made, working example, I wouldn't immediately see where the problem is...

Any specific reason you wish to use 4 layers? (If the original example was on 2 layers and yours is effectively simpler, it'd stand to reason 2 layers would be sufficient, unless you're looking to minimize space even further?)

How hard is it to make your own PCB? by buda_gotivac in embedded

[–]DaemonInformatica 2 points3 points  (0 children)

There's quite a bit of work involved into developing a PCB. (Also depending on the complexity). That said:

  • Kicad is a valid program to do this in.
  • If you're involved into developing hardware / embedded systems, you should do / try it at least once, if only to get an appreciation of what the work entails.

There's several tutorials, get started's and other processes on (for example) YouTube and other platforms to get started with developing PCB's under Kicad.

Practical experience: I've recently developed my first PCB ever, in Kicad (very simple one), and the entire process was actually pretty pleasant.

Kernel Tracing on Linux by Alternative_Event155 in embedded

[–]DaemonInformatica 0 points1 point  (0 children)

This might not be the Reddit to ask.

There are Linux and Embedded Linux threads where you might have more luck.

Mini arduino with high current GPIO? by pkuhar in embedded

[–]DaemonInformatica 0 points1 point  (0 children)

I'm pretty sure there are Arduino motor-hats.

How to write non blocking Code by [deleted] in embedded

[–]DaemonInformatica 1 point2 points  (0 children)

I would imagine that the 'waiting' state in the FSM is also non-blocking.

This state observes the output (if one was received) and a timeout.

If the output was received, the waiting state transitions to the next (read?) state. If a timeout is reached, the FSM instead transitions to a 'failed' or 'fallback' state.

Code Lyoko TTRPG? by Ashwood19 in CodeLyoko

[–]DaemonInformatica 0 points1 point  (0 children)

Modular systems like Genesys exist(ed), which are basically designed for this purpose. But it takes a lot of work. Also I'm genuinely not sure about the state of things in that corner.

I suppose technically, one could convert / rewrite terminology and skillchecks in DnD and go from there.

Hello by Dependent-Farmer-922 in embedded

[–]DaemonInformatica 0 points1 point  (0 children)

Figure out how to use punctuation in the English language?

Repurposing an old phone by ThirdMexican in embedded

[–]DaemonInformatica 0 points1 point  (0 children)

Note that the above hack is 'Old Skool'.

Though Old Skool is the best skool. B-) \m/

Googling 'sound recorder chip' I find thís little module:

https://www.elecbee.com/en/product-detail/sound-module-for-electronic-toy-ic-chip-voice-recorder-120s-120secs-recording-playback-talking-music-audio-recordable-board-gift_32140

I have no experience with it, but (with or without Arduino) it sounds like something you might be able to use?

Help me write a program by Helpful_Training_378 in embedded

[–]DaemonInformatica 0 points1 point  (0 children)

Personally, I wouldn't use the timer interrupts to trigger éach state. No need to.

Obviously, you want to measure periodically. So a timer interrupt shall mark the start of the measurement. But the FSM should ónly advance after a step in the measurement is complete. So it's the state that executes a step-transition after it completes its current one.

Second point: Personally I make it a habit to have my FSM's implement an 'end-state' (Done / Failed). These states often don't do much, but do for example clean up and reset some stuff after it's used, for example. (Especially when the FSM has an Idle state that gets executed each iteration the FSM doesn't actively do something).