• Aceticon@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    16
    ·
    edit-2
    6 hours 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 (meaning there’s battery control involved) 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.

    • KairuByte@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      9
      ·
      5 hours ago

      Temperature control, likely something to keep track of how much is left in the device, and I’m betting I’m forgetting something.

      I doubt discreet electronics can cut it at that point.

      • Aceticon@lemmy.dbzer0.com
        link
        fedilink
        English
        arrow-up
        3
        ·
        4 hours ago

        Yeah, as per the analysis I did in another post, even a 555 and a couple of transistors to just blink an LED is more expensive than putting a microcontroller like this one there.