Shamelessly stolen from you know where

  • Aceticon@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    5
    ·
    2 days ago

    You can force it to happen (because the Linux kernel is quite modular and you can make it way smaller by switching off a lot of things) but as I said, what’s the point when all you need is to literally run a single application that only toggles I/O ports or does a bit of comms with an external integrated circuit via I2C, Serial or SPI?

    In a production design for something as simple as a dildo - so basically a motor controller - there really is no point in paying for a more powerful and more expensive microcontroller, adding cost to the final product, just to stuff a Linux kernel there to run a single application that doesn’t need things like filesystem or networking support.

    (For example, here is an example of about the most low end microcontroller you can use. Notice the 128 bytes of RAM and 2KB Flash storage. You can stuff enough code in there to activate a motor in one of several specific simple cycles depending on the position of a switch but not much more. Of course that kind of stuff is programmed in C either directly on top of the hardware - by literally changing microcontroller registers - or most likely on top of a manufacturer specific low level library)

    Further if you do need functionalities of an OS such as multiple task/application support, there are alternatives that tend to be better for those kinds of use, such as various RTOSes.

    Now, as many pointed out, there’s plenty of reason to do it for the challenge or the fun of it - the ethos of any good hacker in the traditional sense of the word - just not for a production design of a device for which tens/hundreds of thousands of units will be made where adding Linux raises the needed capabilities of the microcontroller and hence the hardware cost while not actually helping to deliver the needed functionality.

    • zod000@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      3
      ·
      2 days ago

      While you were probably fully correct in the past, with how they are forcing everything to be “smart” now, it is entirely possible that everything from vibrators, to toasters, to refrigerators could be running Linux on a cheap chipset.

      • Aceticon@lemmy.dbzer0.com
        link
        fedilink
        English
        arrow-up
        2
        ·
        edit-2
        2 days ago

        In my experience, pretty much everything does indeed have a microcontroller nowadays (because software is so much easier to make, test and change than electronics, plus a lot of what took several digital components in the old days are just a few lines of code in a microcontroller, so putting a microcontroller there is cheaper also in hardware terms), but most things use tiny ones like the one whose info I linked in my previous post (if you get your hands on a broken mouse, open it up and google the part codes of the integrated circuits you find inside), with maybe a bit more memory since that specific ATTiny is very much on the lower end.

        The reason why it’s something like that rather than something bigger, is that something like that costs $0.38 each, in bulk, whilst something that’s big enough to run Linux costs around $10+, plus something like that has a smaller physical footprint, needs all of 1 capacitor and 1 resistor externally for it to work and can work directly from some pretty shit power sources, further reducing overall costs, whilst microprocessors demand a lot more supporting electronics and proper power regulation to work.

        When the cost of putting a big one there are nothing next to the overall device costs, manufacturers can easilly just upgrade it to “smart” enough to justify Linux (which goes beyond merelly digital controllers and displays or even WiFi connectivity and into Android TV levels of complexity) with little risk, but when we are talking about much cheaper stuff, they’ll only make a “smart” version if there’s explicity demand for such “smarts” that’s willing to play a lot more. Notice how, when comes to dildos if you look at the Lovense which probably the most complex around, as somebody else pointed out it still uses a microcontroller that’s not running Linux and is way too small for having Linux to be worth it even if possible - in fact per its datasheet doesn’t even support WiFi but only Bluetooth LE, which means it doesn’t even have an IP stack, as Bluetooth is basically Serial-over-radio, which means it’s actually the software on the other side of that Bluetooth link that does the heavy lifting.

        I think your idea of “everything” in Electronics is pretty much just big ticket Consumer Electronics, yet most Electronics out there by number of units is actually the small stuff that costs a few dollars in parts to make, and almost all dildos fall into the second category, not the first.

        • zod000@lemmy.dbzer0.com
          link
          fedilink
          English
          arrow-up
          3
          ·
          2 days ago

          You are correct on most things here, but your example pricing is WAY off. You can get Linux capable microcontrollers for less than two dollars retail, and most certainly much cheaper in bulk. I want to be clear that I in no way support putting this sort of tech into these devices. I do think that with the current trend of wanting to add “AI” to consumer devices and/or siphon up as much user information as possible, inexpensive embedded Linux being very common wouldn’t shock me at all.

          • Aceticon@lemmy.dbzer0.com
            link
            fedilink
            English
            arrow-up
            2
            ·
            2 days ago

            Can you give me an example of a microcontroller that can run Linux in production (so, not just be made to run Linux experimentally, but which actually is used in applications were it’s worth it to run Linux on it) AND which costs less than $2 in bulk?

            Because the only ones I can think of, the lower end of the Esp32 range, can run Linux but it’s just not worth it for the kind of applications they end up in.

            • zod000@lemmy.dbzer0.com
              link
              fedilink
              English
              arrow-up
              1
              ·
              2 days ago

              The esp32-s3 is specifically one I was thinking of, its less then $2 for purchasing a single chip. You keep moving goal posts here, so I’ll just leave it. Have a good one.

              • Aceticon@lemmy.dbzer0.com
                link
                fedilink
                English
                arrow-up
                1
                ·
                edit-2
                1 day ago

                “Moving goalposts” is asking you to back your claims versus the point I was making in the posts you replied to (which include the whole “in production” part)?!

                Sure, mate, salve your ego after having blindly dived into deeper waters than you expected.

    • oatscoop@midwest.social
      link
      fedilink
      English
      arrow-up
      3
      ·
      2 days ago

      what’s the point when all you need is to literally run a single application that only toggles I/O ports or does a bit of comms with an external integrated circuit via I2C, Serial or SPI?

      None, but sometimes you need far more functionality. A micro-controller is cheaper and less power hungry than a full fledged SOC, which is why you find them in things like e-ink tablets.

      I’m not saying it’s common, but given the swath of “high end” internet connected adult toys I wouldn’t be shocked if there’s a handful running linux.