I’m an EE by trade focusing on embedded devices, but most of my work is in relatively low-power STM32 applications. When I stopped following developments in hobby kits, it was mostly Arduino Unos slowly driving I2C OLED displays.

Now suddenly, there are embedded Raspberry Pis and ESP32s doing realtime facial recognition and video feeds.

Is there a good place to look to catch up on what’s now possible with these embedded devices?

Also, while I enjoy the ease of the hobby kits, I’m also interested in more mass-production-focused solutions.

  • Kit Sorens@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    15
    ·
    1 year ago

    It’s not that you can’t make a more efficient device without it. Hell, if you wanted to impress people, you can absolutely populate a board with IC’s and traces and build your own logic.

    Orrrrr you could spend $45 to get a full GPIO header backed behind a vast online electronics community. Tbh pi’s, arduinos, and other ARM core hobby kits give you a root skillset to base any project on. Once you can get logic through your code, there’e no need to figure out wire logic if you can program based on I/O and software variables. But it -is- a different skillset that you’ll need to learn to use it efficiently.

  • TCB13@lemmy.world
    link
    fedilink
    English
    arrow-up
    9
    ·
    edit-2
    1 year ago

    Now suddenly, there are embedded Raspberry Pis and ESP32s doing realtime facial recognition and video feeds.

    Oh yes, you can buy an ESP32-S2 for 2$ and run with Python or something higher level than C and get something that would’ve done with an AVR in days quickly up and running in hours. It is the brand new world of hardware is cheaper than developer time and nobody knows how to code anything and read datasheets anymore. Also there’s the trend of cloud-backed platforms like PlatformIO that essentially make it so you can’t ever develop anything completely offline and become hostage of some provider, ecosystem etc.

    Something that might interest you is ESPHome and HomeAssistant. Heads you, you can now flash a microcontroller (be ir an Arduino/AVR or ESP) from a Chromium browser :).

    • ch00f@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      9
      ·
      1 year ago

      and nobody knows how to code anything and read datasheets anymore.

      You seem a bit bitter which I can relate to. As someone who cut his teeth writing assembly for an 8051, I remember feeling a bit cheesed by people using arduinos to do what could be done with a 555.

      My career has gotten comfy, but I can feel my skills stagnating with all this new stuff coming out. I of course would never ship a product with a Raspberry Pi embedded in it, but I’d like to have a feel for how to solve problems using newer more advanced hardware. With that in mind, do you have any recommendations?

      • TCB13@lemmy.world
        link
        fedilink
        English
        arrow-up
        6
        ·
        edit-2
        1 year ago

        You seem a bit bitter which I can relate to. As someone who cut his teeth writing assembly for an 8051

        Oh yeah, bit my “bitterness” doesn’t come from that, technology evolves and overhead and CPU power takes over all previous attempts at optimization. It comes from the fact that without Internet and the ecosystems people can’t do shit anymore. All those things that make development very easy and lowered the bar for newcomers have the dark side of being designed to reconfigure and envelope the way development gets done so someone can profit from it. That is sad and above all set dangerous precedents and creates generations of engineers and developers that don’t have truly open tools like we did.

        As for suggestions, get into the PlatformIO ecosystem and the cheap ESP32 bandwagon, it is really amazing what an ESP32-S2 mini is and can do. Micropython is also another interesting thing to get running. For IoT as I suggested ESPHome+HA are delightful a simple YAML file and you’ll be up and and running sensors and relays.

        • bitfucker
          link
          fedilink
          English
          arrow-up
          0
          ·
          9 months ago

          Truly open tools? As far as I remember, arm is supported in gcc. Even RISC-V is being supported now. You can make a lot of the tooling yourself for uploading or use the already existing one. But guess which is less time consuming? If someone has already did the job for you, why reinvent the wheel? You also have openocd and even black magic probe for debugging. Tons of open source framework and stack available (zephyr rtos, free rtos, arduino, mbed, opencm, cmsis). You want to design a board? KiCAD. Making an enclosure? FreeCAD and 3D printing does the job. What more openness could you possibly want? As for the point of easier access, why would you be bitter when datasheet, sdk, and other tooling are available online? Are you mad that you didn’t have access to those when you were younger? And about an ecosystem designed to make a profit, of course ic/chip/mcu manufacturers will make a profit. Do you expect to get them for free? And if you don’t like a certain manufacturer, then don’t use their product when designing. You can totally pair an STMicroelectronics MEMS microphone with ADC from Texas Instrument, and MCU from Espressif. Unless of course that very specific hardware is not provided by any other manufacturer, in which case that makes the point even moot because that is not the fault of the engineer.

          • TCB13@lemmy.world
            link
            fedilink
            English
            arrow-up
            1
            ·
            9 months ago

            and other tooling are available online?

            No no, it’s perfectly okay to have things online. What isn’t okay is over-reliance on being online and cloud services made by some for profit company. Open tools yes, but something that forces you into having permanent internet connection and requires pinging someone’s server isn’t open at all.

            • bitfucker
              link
              fedilink
              English
              arrow-up
              0
              ·
              9 months ago

              What kind of tools did you use? I only ever play around with STM32 stuff (specifically their cubemx program) while the rest is just SDK and open source tools.

              • TCB13@lemmy.world
                link
                fedilink
                English
                arrow-up
                1
                ·
                9 months ago

                The tooling around STM32 is decent, same goes for PIC and AVR microcontrollers. But even with those you see people going with PlatformIO and the dozens of layers of abstractions that have a less open nature and push people into cloud services. Even the Arduino guys are trying to go on that direction now.

                • bitfucker
                  link
                  fedilink
                  English
                  arrow-up
                  0
                  ·
                  9 months ago

                  Look my man, I am genuinely confused here. What online service are you talking about? PIO only provides their registry and that is it. They didn’t even take a mandatory payment, only donations. If you are talking about the IoT ecosystem, then that is an entirely different beast.

    • bitfucker
      link
      fedilink
      English
      arrow-up
      0
      ·
      9 months ago

      What do you mean PlatformIO is cloud backed? As far as I know, PIO is just a vscode extension to manage embedded projects and it does just that very well IMHO. Heck, you can even use it not as an extension but as a python library/script. Sure, you can maybe connect it to some cloud service but it is not a requirement (but I don’t even know if they provide any service whatsoever beside their repository). Your code is still stored locally, the compiler, tooling, and framework used is downloaded too. You can, of course opt to store your code to the remote git repository but that is a whole other matter. Also, you can always configure where to pull everything from. Also, the thing that you mention about flashing MCU from chromium based browser cannot be generalized. It’s highly dependent on the system in question. I doubt you can flash STM32F103 (a.k.a. blue pill) using the usual stm bootloader.

      • TCB13@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        9 months ago

        You can’t setup your environment offline, there’s discussion about that on their GitHub and forum here. They’ve added some support so sometimes you can run offline but not the full setup, new projects etc.

        • bitfucker
          link
          fedilink
          English
          arrow-up
          0
          ·
          9 months ago

          Well, of course you can’t. Any kind of setup requires you to have the data. Unless you want to get that data from another medium (USB Flashdrive, CD/DVD, SD Card, anything else), then online is the easiest way. After the setup phase, it depends on how the software will behave. In PIO case, it will not download anything else unless needed since if they do otherwise, you will be downloading a lot of junk that you may not need (if you only want to develop stm32, why download avr tooling).

          I’ve read the discussion linked and it seems that it was a bug which has been fixed. If you mean the reliance on github, as I said before, it is not platformio fault. The person just happens to distribute their library on github rather than advertising their library on some other media and saying “Hey, I provide this library for this specific thing. If you want it, buy this CD/contact me and we can arrange on how you would get it”. Being online has nothing to do with it. You can just as easily have your friend/coworker write the library and transfer it using usb stick then compiling it on PIO. The person can also simply download the .zip and configure PIO to use the downloaded file. In fact, that is exactly how PIO does things too. Download the code once and then use it afterward repeatedly. Now, if we are talking on over reliance on library, that is another can of worm that I will not touch here unless you want to discuss it too.

          Also, down below another person is having trouble when updating. And as mentioned, it is not that PIO Core is auto-updating (it shouldn’t as the reply mentioned, it should only show a prompt to update), but the extension is auto updating (VSCode default behaviour).

          • TCB13@lemmy.world
            link
            fedilink
            English
            arrow-up
            1
            ·
            9 months ago

            Any kind of setup requires you to have the data. Unless you want to get that data from another medium (USB Flashdrive, CD/DVD, SD Card, anything else), then online is the easiest way

            The thing is that they make it hard to archive that data or get it in any other format besides constant internet access. PIO provides zero instructions on offline usage and is plagued by “convenient” small bugs and dependencies that force you to be online all the time. Not even their repository URLs are stable, there’s discussion about this on Github and the alleged links that would allow someone to actually download what is required is no longer there. I’m not talking about the library xyz one uses on their program but the tons and tons of crap that are required to make it work in the first place.

            • bitfucker
              link
              fedilink
              English
              arrow-up
              0
              ·
              edit-2
              9 months ago

              Fair enough about the providing instruction part. And yes, it can be hard to install manually since PIO IDE extensions have installation check after the plugin is installed, but the PIO core itself is just a python script. You can pip install it or download the .tar.gz from pypi.

              Edit: Sorry, somehow my long ass comment got trimmed to the single paragraph above. Anyway, the thing about dependency required comes from the fact that PIO will download the required tooling when it needs them. Say, you want to develop for STM32 ARM MCU, then PIO need to download the compiler, uploader, and debugger. After that, if you define that you want to use a framework, PIO will need to download that too. Can you install it manually? Absolutely. But as you said, there is no instruction on how to do it since there are literally hundreds of possible configurations. Doing it manually defeats the purpose of PIO in the first place. And what kind of always online feature are you talking about? I never encountered such a thing in my 3 years experience on PIO.

              • TCB13@lemmy.world
                link
                fedilink
                English
                arrow-up
                1
                ·
                edit-2
                9 months ago

                And yes, it can be hard to install manually since PIO IDE extensions have installation check after the plugin is installed, but the PIO core itself is just a python script. You can pip install it or download the .tar.gz from pypi.

                Yes but why? From what I see they could’ve just a few simple tweaks to the extensions to make things suitable for offline / airgrapped scenarios, but instead they decided to design it all around internet access.

                Absolutely. But as you said, there is no instruction on how to do it since there are literally hundreds of possible configurations. Doing it manually defeats the purpose of PIO in the first place

                I get your view, but PIO isn’t the first piece of software that has to deal with this issue. Look at Linux apt repositories, whenever we want to install some program it also pulls hundreds of dependencies, however, apt is designed to be mirrored and even packaged as physical media for offline usage. Debian’s amd64 repository is around 800GB and the source one is 150GB and people who need it offline are more than welcome to mirror the thing, why can’t we have the same for PIO?

                • bitfucker
                  link
                  fedilink
                  English
                  arrow-up
                  1
                  ·
                  9 months ago

                  Fair enough. I guess it can be implemented someday if enough people ask for it since the back end is there (PIO core). The only thing left I guess is making the repo have offline capabilities so people can mirror it too. But I think it should be left as a separate project.

  • agent_flounder@lemmy.world
    link
    fedilink
    English
    arrow-up
    3
    ·
    1 year ago

    You might want to check out OpenMV Cam which does some cool machine vision stuff and runs MicroPython.

    I would probably start looking at OpenCV software for RasPi if you need more processing power.

    I’ve been playing with ESP32 lately. I’m frankly kind of shocked at how well documented the API is and how well it all works. And it’s mostly open. I haven’t done anything with ESP32 Cams I bought, yet. No idea what is possible there or where to start.

    Hopefully that helps.

    Meanwhile I’m over here trying to wrap up a simple Bluetooth-enabled amp project for the last couple months lol. I should do more with machine vision.

    • agent_flounder@lemmy.world
      link
      fedilink
      English
      arrow-up
      2
      ·
      1 year ago

      PS: to me RPi is overkill for all but the most intense compute requirements. So is the esp32 to a lesser degree. Don’t always need 240MHz dual core RISC with FreeRTOS and 2.4G radio…

      I default to Arduino, usually attiny devices for simple, low power stuff. I am really liking the new TinyAVR line. Quicker programming, way more functionality, etc.

    • DontNoodles@discuss.tchncs.de
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      I’ve noticed that outside of the fixed use cases and their combination, it is surprisingly difficult to make ESP32 do something. For example, i wanted to crop and apply simple filters on videos being streamed from an ESP32 Cam. Should be doable for a setup that can do facial recognition and AI stuff, right? Clearly not without writing your own libraries.