• HugeNerd@lemmy.ca
    link
    fedilink
    English
    arrow-up
    62
    ·
    4 hours ago

    “it was actually a PY32F002B, powered by a 24 MHz Arm Cortex M0+ processor. The chip also carried 24KB of flash storage and 3KB of static RAM”

    To process a single button.

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

      Well the PY32F002B (costing a few cents) even though it has a 32-bit (entry level) ARM core @ 24MHz is literally cheaper than older and less powerful microcontrollers.

      Granted, if you don’t do anything else than react to a push button it’s still cheaper to use discrete electronic components than a microcontroller, but given that this device has a LiPo battery and judging by the picture a USB-C connector, there’s probably a bit more digital logic in it, by which point a 3 cent microcontroller plus a cheap SMD crystal and some caps is cheaper than using discrete components.

      The domain of embedded systems has evolved to the point that it’s the best option for almost everything in consumer electronics, mainly because at the lower end there are so many stupidly cheap and easy to use choices were you don’t run an OS in it but instead just a single block of single-threaded code directly on the bare metal accessing registers directly.

    • StarDreamer@lemmy.blahaj.zone
      link
      fedilink
      English
      arrow-up
      31
      ·
      4 hours ago

      Because an existing SoC at scale is cheaper than a custom ASIC.

      You see this all the time, custom keyboard running ARM+Linux, SmartNICs using RISC-V cores/FPGAs instead of ASIC accelerators. Even Microsoft refuses to commit to ASICs for network processing in their DCs and use FPGAs instead.

      • wewbull@feddit.uk
        link
        fedilink
        English
        arrow-up
        17
        arrow-down
        2
        ·
        4 hours ago

        A vape is a battery connected to a button connected to a heating coil. You might want a single transistor. You don’t need a software platform.

        • I_Has_A_Hat@lemmy.world
          link
          fedilink
          English
          arrow-up
          9
          ·
          1 hour ago

          Sure, if you weren’t competing with every other vape out there that has things like variable voltage settings (at least 3), a pre-heat feature, the ability to turn on/off with 5 presses, or to turn off automatically after 5-10 minutes without use, a low battery indicator, a charging indicator, a broken coil indicator…

          Hmm, seems like you need a lot more than a battery, heating coil, button, and single transistor.

        • Croquette@sh.itjust.works
          link
          fedilink
          English
          arrow-up
          12
          ·
          3 hours ago

          There is also a battery management system as well.

          M0 processors are dirt cheap, especially in bulk.

          They probably have a BMS library that takes a few Kb of flash.

          The time it would take to make the design cost effective wouldn’t be worth it.

          Slap a less than a dollar mcu and be done with it.

        • StarDreamer@lemmy.blahaj.zone
          link
          fedilink
          English
          arrow-up
          7
          ·
          3 hours ago

          Disclaimer: I don’t smoke anything, so I don’t know any details.

          Wouldn’t a button connected to a heating coil be a fire hazard? Is there no automatic shut-off based on temperature? If you add enough safety features, it might end up costing about the same as an embedded SoC.

          • lyralycan@sh.itjust.works
            link
            fedilink
            English
            arrow-up
            5
            ·
            3 hours ago

            All it would need is a thermal fuse/cutoff, like those in portable heating appliances (air fryers, grills etc.). I wonder what’s needed to include a 10 second on & 30 seconds disabled timer, maybe it’s cheaper

            • Ithral@lemmy.blahaj.zone
              link
              fedilink
              English
              arrow-up
              3
              arrow-down
              1
              ·
              3 hours ago

              They also do some BMS stuff, and some support limited graphics and UI. Depedns on the moddle

  • Turbodad@feddit.org
    link
    fedilink
    English
    arrow-up
    13
    arrow-down
    1
    ·
    4 hours ago

    I don’t get those pieces of crap. There were these fancy electric cigarettes years ago, using those 3.7V rechargeable batteries. Custom designs (saw lightsaber designs), custom liquids, repairable, no e-waste. What is wrong with people to use those crapsticks? And why do those dumbnuts don’t get that these things are e-waste not residual waste?

    • cookiecoookie@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 minute ago

      Instead of asking why people are buying disposables, ask why nobody is buying those reusable vapes. These disposable companies must be doing quite a few things better if people are willing to throw away money and tech.

  • amelia@feddit.org
    link
    fedilink
    English
    arrow-up
    130
    arrow-down
    1
    ·
    8 hours ago

    This further illustrates how absolutely crazy it is to produce these devices for a single use and then just throw them away, not even making sure they can be recycled properly. It’s complete madness. I hope they’ll be banned soon, I think the EU is working on it.

      • stoy@lemmy.zip
        link
        fedilink
        English
        arrow-up
        58
        ·
        8 hours ago

        It is interesting to see old tech having clever solutions for stuff like this, these days the answer is 98% of the time is to slap a CPU on it.

        It’s boring!

      • Korhaka@sopuli.xyz
        link
        fedilink
        English
        arrow-up
        5
        ·
        8 hours ago

        Doesn’t that just need a voltage regulator? It’s disposable so you don’t never need to concern yourself with charging.

        • empireOfLove2@lemmy.dbzer0.com
          link
          fedilink
          English
          arrow-up
          9
          ·
          edit-2
          8 hours ago

          A lot of them have selectable voltage/power levels as a “feature”, which is easier to do via a mcu PWM controll than discrete electronics.

          • rain_enjoyer@sopuli.xyz
            link
            fedilink
            English
            arrow-up
            8
            ·
            8 hours ago

            yeah it’s more efficient this way but all you need is ne555 + mosfet tho? still no need for it to be turing complete

            • raldone01@lemmy.world
              link
              fedilink
              English
              arrow-up
              9
              ·
              7 hours ago

              There are really cheap mcus that need maybe one capacitor if even that. It is cheaper, easier and more flexible than the multiple components required to configure an NE555.

            • empireOfLove2@lemmy.dbzer0.com
              link
              fedilink
              English
              arrow-up
              10
              ·
              8 hours ago

              Yes, but think about it like you’re a Chinese manufacturing engineer with only basic electronics education. You COULD do that design, build out the pcb, custom tool it to fit your plastic housing, etc etc… Or you could go to the manufacturer down the street who already makes pre designed voltage reg MCU’s on a board and spend like, 20 minutes in an IDE to code the specific voltage levels and button presses.

              When production volume and turnaround time is the only things that matter in this shovel waste crap, “wasting” silicon is MORE expensive financially than building out the optimal solution.

              • rain_enjoyer@sopuli.xyz
                link
                fedilink
                English
                arrow-up
                6
                ·
                7 hours ago

                my guess would be it’s a parts commonality thing, it’s not hard to make it the old way, there are datasheets for it too. sure you could probably make tiny and cheaper (30x10mm? maybe smaller) analog board with two chips and mosfet working as pwm controller and current limiter, but it’ll have different passives for different battery sizes and heater powers. or you could make one design with optional usb port that you might just not solder on, and depending on model you just put different firmware inside

                • Hitchie_Rawtin@lemmy.world
                  link
                  fedilink
                  English
                  arrow-up
                  4
                  ·
                  5 hours ago

                  The old way is actually the analog style you’ve mentioned, but that was the very early days of ecigs well before they became mass market, the cottage industry modding scene had no hope of creating sophisticated microcontrollers and the charger wasn’t even USB, it was a DC jack & plug. Lavatube was the first time we had that kind of microcontroller regulation & then the DNA15 and DNA20 came out, got cloned by China and that changed the game forever.

                  The problem with the older way is consumers understand watts alone as a relatively consistent measurement of power much better than they would the relation between voltage, resistance & current draw. They didn’t want to learn Ohm 's Law back then and wouldn’t want to know about it now. Microcontrollers simplified that massively.

            • tetris11@feddit.uk
              link
              fedilink
              English
              arrow-up
              1
              ·
              5 hours ago

              ne555

              Thanks for the interesting read. Real nifty little timing/switching circuit!

              • rain_enjoyer@sopuli.xyz
                link
                fedilink
                English
                arrow-up
                2
                ·
                5 hours ago

                it’s kinda dogshit but for this application it (cmos version) would be good enough. or better than that, there are dedicated pwm signal generators. i meant this thing in terms of complexity needed

                • tetris11@feddit.uk
                  link
                  fedilink
                  English
                  arrow-up
                  2
                  ·
                  4 hours ago

                  It was a good insight into how the lightbulb dimming tech of the 80s/90s worked. Also why the dimmer switches back then were so dangerous with the capacitor likely just a few mm’s away from the light switch which might not have been properly wired because UK homes back then didn’t run a neutral back from the switch, but daisy-chained the switch and the bulb together and then ran the neutral back from the bulb

            • Korhaka@sopuli.xyz
              link
              fedilink
              English
              arrow-up
              4
              ·
              8 hours ago

              I was just thinking that yeah again all it needs is some basic components. Like how a light bulb or fan might have multiple power settings but I don’t expect them to be able to run doom.

        • khannie@lemmy.world
          link
          fedilink
          English
          arrow-up
          2
          ·
          8 hours ago

          Some of the larger disposables do have a charging port. I guess it allows them ship a smaller battery which is good

          • rain_enjoyer@sopuli.xyz
            link
            fedilink
            English
            arrow-up
            5
            ·
            8 hours ago

            then you have to interface with charger anyway so ig this makes some more sophisticated chip make sense

      • rain_enjoyer@sopuli.xyz
        link
        fedilink
        English
        arrow-up
        1
        ·
        edit-2
        8 hours ago

        ok fine i’d put there a current limiter which you can make with 2 transistors and a diode. no need for an entire microcontroller. it’s often included with batteries these days anyway

    • Valmond@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      12
      ·
      8 hours ago

      It’s probably cheaper and simpler to modify (say you suddenly want it to turn on when you click 3 times) to use a 0.1€ chip than to figure out how to do it and build it with discrete components.

      20 years ago I was all “computer (chips) can do everything! We can use them everywhere! Replaceable, reprogrammable, fantastic!”

      And no one cared.

      Now they are everywhere and it’s just a fucking mess 😔

      Maybe 20 years from now the EU will have forced standards onto everything and you can (again) fix your dishwasher (and start it from work!!1!).

  • Armand1@lemmy.world
    link
    fedilink
    English
    arrow-up
    15
    ·
    7 hours ago

    24 MHz Arm Cortex M0+ processor. The chip also carried 24KB of flash storage and 3KB of static RAM.

    … a 10y old phone can barely load Google, and this is about 100x slower.

    Wild that you can serve anything with that hardware. Granted, static websites are basically just sending files over the wire.

    • BCsven@lemmy.ca
      link
      fedilink
      English
      arrow-up
      14
      ·
      6 hours ago

      The 10 year old phone OS probably is slowing all of that. If they flashed phone as a dedicated webserver it would probably be fine

    • disorderly@lemmy.world
      link
      fedilink
      English
      arrow-up
      9
      ·
      6 hours ago

      The webpage he hosted was a copy of his own blog post explaining the hack. It just about fit into the 20KB of available flash storage.

      We can infer that on every request, the whole static page needs to be spooled out of flash onto RAM (in chunks no larger than 3k), then sent out over Ethernet.

      That’s an awful lot of work for the chip. I’m not surprised at all that it errors out under heavy load. The request queue probably grows until it collides with the buffer that bucket brigades the web page to the network.

      I’m afraid to look up what optimizations were necessary to get that level of performance. It’s damned impressive work.

      • Lumisal@lemmy.world
        link
        fedilink
        English
        arrow-up
        3
        ·
        5 hours ago

        Ah, but what if you string together 100 of these as a cluster? Now u get a whole 2Mb of flash storage!

    • Maroon@lemmy.world
      link
      fedilink
      English
      arrow-up
      4
      ·
      3 hours ago

      What is this Brodie guy’s problem? Keeps calling it “dumb” and throwing shade for like 5 min before he actually gets on with what basically summarising the guys work.

      Like no one is expecting a high functioning website to run off of a vape, chill dude.