by jacknews · 4y ago · 0 comments
I'm not sure why more-modular electronics are not more of a thing.
For example, blue-pill STM boards are very cheap, because they are produced in millions. Similarly for many other modules.
How is it cheaper to design and produce a relatively limited run of integrated, custom washing machine control electronics, instead of a simple 'baseboard' and a bunch of really-really-mass-produced modules?
The later modular design would be a boon for legibility, repairability, re-usability, supply-chain resilience, etc, etc.
Connectors also cost money; often more than you'd think. And they add additional points of failure.
Modularity also creates a compatibility matrix you have to track if you're a responsible OEM. I.e. can I use [X,Y,Z] sensor with [Q,R,S] base board and [A,B,C] MCU module and firmware [1,2,3]? In a model that may have shipped with motors [T,U,V]? That's 3^5 combinations right there. Compare that to, say, a single-digit or small two-digit number of actual combinations a manufacturer might ship as revisions over the life cycle of a design. You never have to worry about whether the Q base board will work with the C module in an integrated design.
That $2 blue-pill STM board starts looking expensive really quick compared to the cost of the microcontroller (and maybe the crystals if you really need them) at even modest volumes. It just doesn't cost that much to add a chip or other subcircuit to a PCB design for a real product.
But the true cost, to the environment, savings due to repairing more modular machines, vs scrapping and manufacturing, shipping, installing, etc whole new machines every few years, could be way less.
It's essentially never the microcontroller that fails in something like this, anyway, so you would never repair something by swapping out something like a blue pill dev board. Maybe you would swap in a microcontroller with a different pinout in production that way, to solve a shortage issue, but the development time and costs would be almost identical to just spinning the board. I really don't understand what problem you're trying to solve.
Modularity costs, in a number of ways, and one of them is the material involved. That material will ship in every unit whether it is ever needed or not. When your more modular devices are beyond repair or obsolete or just unwanted all of that material will wind up in the landfill.
A simple example is my washing machine that recently died. A mosfet blew on the motor inverter/controller, and obviously took out some other components too. It's silicone-encased, making it infeasible to diagnose and fix compoonent by component. The entire electronics, including psu, mcu, display, buttons, and motor controller are a single unit, and has to be replaced. Since it's specific to the model, it is rare and expensive, and not economical to replace, so the entire machine is now junk, or at best spare parts.
In my fantasy ideal, the motor controller would be a separate board, and fairly standardized to the motor size/design, just like stepper driver boards. The display/ui would be a separate board, since that is a common point of failure. The psu should certainly be a standard board. And the the main control board running the valves etc would again be it's own board. Interfaces and protocols between boards should be standard or at least documented.
Yes, multiple, simpler mcu's. And slightly more material, etc, as you say, though for a washing machine, the added weight of a few electronics hardly matters. But much less custom design, inventory, much more repairable, reusable, upgradeable, hackable, etc.
The washing-machine of Theseus, as it were.
Another example is a toaster oven that recently broke. One of the elements shorted or burned out, it is one of a handful of standard sizes/resistances etc, rather than some custom proprietary design. Nice and modular, just as I want. BUT, the elements are riveted to the rest of the oven, rather than screwed, making a replacement significantly harder, to the point I haven't yet bothered (eg I don't have a metal drill-bit), and I bought a replacement oven (with screwed elements - the search was not trivial). A saving of a couple of cents (riveting vs screwing) for the manufacturer has actually cost me, and the world, much much more. IMHO the repairability of this stuff should be mandated, or at least documented right on the front alongside the energy-efficiency ratings and purchase price, etc.
Those "maker" boards are dirt cheap because (a) the builders can use gray-market parts, including "pulls" (b) there is nothing on the board that isn't absolutely necessary: even the PCB itself tends to be 0.031" FR4 instead of the more robust 0.062" to save money. I've seen some boards in the Arduino ecosystem that clearly used punched holes to save money over drilling.
When you're building tens or hundreds of thousands of something, using a baseboard and daughterboard architecture is going to be far more expensive than putting everything on one board. Hell, I'd go so far to say that if you're building more than 500/year it's not worth it.
Of course, a repair involves replacing the entire proprietary electronics assembly (multiple PCBs, and plastic frame), and is just not economical, so the entire machine, valves, motor, steel drum and cabinet, are written-off because a mosfet failed, or whatever.
If the electronics were standardized and modular, even if encased in silicone, there would be an economic case to replace just failed modules.
Those are useless for practical application.
64 KB of flash and 20 KB of RAM on a stereotypical STM32F103 (edited to add weasel words: that's what a blue pill is, correct? I don't actually use them.)
Remember these are not PCs where you slap in a bigger SSD or another stick of DRAM.
I have a F767 dev board on my desk. Kind of the same family, 'F' series anyway, and it has 2M flash and I believe 768K of SRAM.
My latest simple application build (built while posting this) ended up 228744 bytes of flash and 142119 of sram.
What kills modern microcontroller storage is every thread has its own fixed size stack so 1K there, 16K there, pretty soon you've got a lot of RAM in use if you go thread-happy, and on the flash side like every civilized embedded device it has MCUboot so 2M sounds like a lot until you partition it into two bootable partitions for OTA upgrades and MCUboot itself takes 64K or 128K or whatever, and there's a big fat (not FAT32 lol) partition for non-volatile config storage. It doesn't matter what RTOS you're using they all seem to be about the same size in the end, FreeRTOS, Mbed, or Zephyr.
Another point worth making is peripherals, I'm pretty sure the F103 doesn't even HAVE the capability to connect ethernet whereas I'm doing OTA upgrades using wired ethernet using the F767.
Note that for decades now, I guess, its been possible to build a washing machine or a lithography machine as an arduino shield or raspi shield, but nobody does that. The part that would not be a boon would be FCC certification, UL certification, and whatever other safety certifications a product requires.
With respect to washing machines as a homeowner I have had to do some repair work on multiple dishwashers and value engineering is the rule, if it corrodes out in five years needing replacement from the point of view of the mfgr that's a "feature" not a bug. So I've never seen a conformally coated washing machine PCB although I'm sure they exist if you don't buy big-box store garbage. Let me remember... Some piece of trash from Sears from 15 years ago used to ship with mosfets having too small of a heatsink and a voltage rating about 5 volts higher than line voltage and an underpowered pump so the user was encouraged to use the water heating mode in operation to keep the water as hot as possible for the anemic pump resulting in the mosfet blowing out every year or so, replaced the PCB under guarantee about three times and tossed that POS. Got a Bosch from horrible depot and that one has a pump that somehow is anemic AND sounds like a screaming jet engine bearing after a year of use, on the third pump now and just ignore the incredible noise. I'm told for eco reasons the new greenwashing dishwashers use 10% less water but don't work at all so you have to run them three times to clean the dishes resulting in 3x the wear and tear (good for mfgrs) and roughly 170% increase in environmental damage over a non-greenwashing dishwasher.