by keewee7 · 3y ago · 0 comments
Other companies like TI and STMicro had their own cheap WiFi/BLE MCUs but their devkits used to be too expensive for hobbyists and students. But the Chinese startup behind the ESPxx chips made sure that their devkits were cheap enough for hobbyists and students and through that influence they now also dominate the professional industry.
* integrated WiFi/BT with no/near zero extra engineering needed
* generous amount of RAM/Flash so you can afford to be sloppy
* SDK making it fast to get to the "the wifi is working and I can get on with my development"
* momentum from ESP8266 that already (due to same "super cheap with wifi") had a chunk of market.
Even now in middle of chipaggedon you can get WIFI/BT breakout board for like $3-5. That's not "just" "cheap enough for hobbyist breadboard", that's cheap enough to get the whole product built around.
I think partly due to how cheap WiFi/BT has become the likes of Zigbee didn't got as popular as they probably should, between licensing costs it was just cheaper for IoT companies to not touch it, even if it would make more sense in places.
1. Vendors want Cloud control over the product, they want it to phone home. Zigbee is built for Local Control
2. Consumers prefer "hub free" products that just "work", They are willing to give up privacy, security and possible performance issues for that convenience. They do not think or care about what will happen when their shitty comcast service breaks for the 100th time this year, or if the IoT vendor is hacked, they want to pull out of the box, and have an app connect it in 2 seconds via a QR Code so they can blink the light quickly and not have a fuss about with a hub.
WiFi is better than Zigbee at both of these things. Zigbee is beter for home automation where you want Local Control, and security. Local control and security has been losing that battle though the tide seems to be turning lately (I hope )
WiFi you have all kinds of underlying network issues to setup that do not happen or you do not have to account for like WiFi, things like IP Address, Routing, vLAN's, Firewalls, Ports, etc
None of that is a problem for Zigbee.
>>I'm designing a custom automation system for the ventilation in my house and I failed to discover any reason to use Zigbee
Then you are not looking very hard or do not value Dependability and security.
Matter will likely absorb both Zigbee and WiFi anyway as Google, Amazon, and Apple are all backing Matter
Zigbee which I'm a huge supporter of, offers this out the box and setting up is as easy as 10 seconds of pairing.
I don't want to spend more time than I need to automating my home or making it a full time job.
And customers want cloud control, it seems, and don't seem to care about the security and privacy issues around it. So why build two separate devices (the smart device + the hub) when you can just build a single device (the smart device) and put the WiFi directly in it? Sure, there might be a cost difference in the case where the customers might have many smart devices (many cheap Zigbee devices + one "expensive" hub vs. many "expensive" WiFi devices), but I'm not convinced the cost is all that different overall.
The main issue I do see is power consumption. It's much easier to make a battery-powered Zigbee (or Z-Wave) device where the customer won't have to change the batteries every few months. WiFi is a power hog compared to Zigbee/Z-Wave, even if you assume that the device (or at least its radio) will sleep a significant part of the time. But many of these smart devices end up being hard-wired, so often it isn't that big a deal. (To be fair, though, I have a WiFi battery-powered smart/keypad lock in a rental property, and its batteries last 9-12 months, so even the power consumption issue is often not much of an issue!)
Beyond that, if a company is going to put WiFi in their device, most of the more "mainstream" vendors are going to have it connect directly to their cloud service, and not bother with local control, except possibly as a fallback when internet access is down. That fallback is nice, when implemented, but for those of us who don't trust these vendors to secure their backends, the "cloud service by default" attitude is a liability. At least with Zigbee/Z-Wave, I know that it's local-only-by-default.
So to summarize: WiFi gives a better UX for customers, and is probably cheaper, too.
Personally I buy only Z-Wave kit for the smart devices in our primary home, connected to my custom-built hub, and don't allow a third-party to manage (and probably screw up) the cloud control bits. It's definitely more work to manage, and troubleshoot when there are issues. Certainly not suitable for your average homeowner.
The 10x difference in power can be papered away by running the radio 1/10th the frequency. Ex: instead of updating every minute (Zigbee), you can update every 10-minutes (WiFi).
--------
I think a lot of these WiFi internet-of-things are fine with the ~15 minute update routine to minimize the use of the (relatively power heavy) 100mA+ WiFi radio.
Zigbee is simpler, but not so simple that you can program it yourself. It is found in cheaper $5 microcontrollers with less oomph than the ESP32... and those microcontrollers also use less power since its just innately a slower protocol. Though... I guess ESP32 is also $5 so cost really isn't a factor anymore.
-------
The absolute limit of 10mA vs 100mA is also pretty interesting.
10mA is just barely what is reasonable to push out of a CR2032 coin cell battery. 40-ohms internal resistance at 3V, so 10mA is a .4V drop... which can be solved with enough capacitors to buffer up the current. A lot of these devices still work at 2.3V or so (-.3 volts from age, -.4 volts from internal resistance), so you have enough headroom for an IoT Zigbee radio with CR2032 coin cells.
You ain't getting 100mA out of a coin cell battery (lol 4V drop on a 3V cell), unless you're also adding a super-capacitor to the circuit or other rather significant forms of power-storage. Then again, 100mA is more than reasonable out of Li-ion / AA NiMH / etc. etc. So ESP32 is still a battery-operated device... just a larger one than any Zigbee solution.
Mind you, the CR2032 coin cell is designed to average ~0.4 mA or less. So you really need to keep the radio "sleeping" most of the time. 10mA is really close to the "temporary burst" limits of the cell, and you're already suffering from significant degradation of the cell's lifespan by running it at 10mA, even temporarily. But the fact that Zigbee "fits" inside of this means that you can design devices around CR2032 cells, rather than AA or Li-ion packs.
-------
EDIT: The setup/teardown speed of Zigbee is also much faster. IIRC, you can connect, send data, and disconnect in ~30 milliseconds on Zigbee. But it requires seconds on WiFi (find an Access Point. Call Access Point. Setup negotiations, etc. etc. 3-way TCP handshake: Syn, Syn-ack, Ack. And then HTTP finally begins...).
A 470uF capacitor can power 5mA across a .4V drop for 36 milliseconds. (I = C * dv/dt). Assuming half the power comes from CR2032 + the other half the power from the capacitor (that's not how electronics work but I'm doing quickie napkin math), that's 5mA from the CR2032 + 5mA from the capacitor. So the 470uF capacitor gives you the headroom to run other parts (sensors / uC, etc. etc.) within the 10mA limits of the CR2032 cell.
Good luck getting a capacitor to do that kind of work across the ~5 seconds needed to setup / teardown a WiFi connection.
Since "Energy" == "Power * Time", the 100x time to connect + 10x power leads to ~1000x energy usage in practice, for WiFi vs Zigbee.
You don't feel it because you've spent the time to make it work. But the average person from the street's wifi sucks hard.
This is tptally wrong - I need to control Ikea Lights, Xiaomi smart vacuum and use Aquara to control blinds and a third company for radiator valves - well guess what, you are going to need 4 separate hubs and the only way they can talk to each other is through the internet.
It doesn't matter how much money you spend, Iot shit is not inter-compatiable and no one company makes everything.
its not, Ikea Tradfri lights I believe are just Zigbee today which can connect to other hubs. Some Aquara products are also just zigbee, and will support matter so any Matter or Zigbee hub will work with them.
Not sure sure about the Xiaomi
Of course the vendors will try to sell you a hub, but you can connect just about any zigbee device to any zigbee hub
It went from hackaday being lol you can use this WiFi module like a MCU. To why would you ever do anything else?
Actually, the major benefit is the ability to use higher level languages or interpreted languages such as python and js. It also allows for more complex network stacks and protocols.
> Boufallo Lab BL616/BL618 is a 32-bit RISC-V wireless microcontroller with support for 2.4 GHz WiFi 6, Bluetooth 5.2 dual-mode, and an 802.15.4 radio for Zigbee, Thread, and Matter designed for IoT applications. [1]
Boufallo chips are becoming available on Pine64 products (Ox64, Star64, Pinecil) [2].
[1] https://www.cnx-software.com/2022/12/29/boufallo-lab-bl616-b... [2] https://www.pine64.org/2022/11/15/november-update-tuned-in/
Both cheap and profiting from the big community.
I'll buy an Ox64 (the ability to run Linux interested me), but Espressif isn't giving up easily. A few years ago, when Espressif was in more of a niche, it would've been an advantage to not have to use their weird Xtensa instruction set. But nowadays most toolchains have apparently added support and it's not a big problem anymore.
128Mb Ox64 SBC - $8 USD https://pine64.com/product/128mb-ox64-sbc-available-on-decem...
16Mb Ox64 SBC - $6 USD https://pine64.com/product/16mb-ox64-sbc-available-on-decemb...
Both currently out of stock, schedule restock in January 2023.
“640KB of RAM” is all you ever need in a great range of use cases that isn't currently well explored, and ESP8266/ESP32 serves that market very well with Arduino IDE integration and affordable devkits.
e: added absolutely necessary positivity to languages, sorry!
Even Apple AirTags (nRF52832 to be precise).
https://www.ifixit.com/News/50145/airtag-teardown-part-one-y...
Let's remember that when the ESP8266 came out, it was basically the only WiFi MCU you could just use. Maybe there were others, but they had no community, so Espressif won out for the makers. And the makers went on to ... make ... IoT devices.
As for power consumption, yeah, Nordic is pretty good. I feel like Silicon Labs is often the primary pick for low power.
When you’re trying to squeeze every dollar out of a BOM, the cheapest chip that gets the job done is going to win. The TI and STM parts were more expensive and less available, so they did not win.
The landscape is slowly evolving, though. Espressif is getting a reputation as the Raspberry Pi of IoT MCUs: Easy to get started and everyone knows about it, but too many people are trying to use it in places where it’s not really the right tool for the job.
A few years ago I’d hear “can’t you just use a Raspberry Pi…” from people who knew just enough to be dangerous. Now it’s “can’t you just use an ESP32…”
They're not great if you're coming from solely-software land, but their SDK and dev experience (you can just use the Arduino IDE for a gentler learning curve, step up to FreeRTOS, esp-idf, or go more bare-metal) is still leaps and bounds ahead of competitors, like the STM32CUBE cluster fuck...using their Hal was the only time in my life where deleting whitespace in C code could break a build. If the developer experience is awful, it doesn't matter that the STM32 chips perform better per second and per watt than an ESP32.
With STM32 they often have 3+ different kinds of timers (advanced, basic, sometimes also low-power). Instead of having one chapter about all of them and saying this and that feature is only available in TIM1, they will copy&paste the 100+ pages chapter for every kind of timer... They must be auto-generating this stuff somehow.
edit: The NRF52 docs and architecture are much nicer than both (the registers seem to be designed by a programmer not a hardware person).
The rest of the industry failing to learn from how Microsoft came to dominance by basically ignoring piracy among students and private individuals.
Who have long offered their software free or heavily discounted for students because then they would demand that software when they entered the workforce and businesses would pay out the nose for it.
Not at all, at least not professionally. Mostly mocked and avoided professionally. But prosumer and hobbyist, it’s probably the most popular. They are fun to prototype with and use around the house but I would never stake my business on them.
What exactly is your problem with them? The chips are fairly capable and the newest ones have transitioned to RiscV in case you're unaware. Sure I wouldn't use them for anything serious realtime but that rarely requires wifi/ble anyway so not sure why you'd pick an ESP to begin with for that :)
I've bought several things specifically because they use esp32 and I can flash Tasmota or EspHome on them. In fact it's a far bigger factor than price.
is that true? it wasn't a couple of years ago.
[0] https://www.espressif.com/sites/default/files/financial/Espr...
More established companies don't need to adopt it but I assume it will change as time goes on. Kind of like how Webview or React Native was scoffed at in the beginning but now it's pretty commonplace even at large companies. Or like when Twilio IPO'ed it started targeting larger firms by building out their sales department because at the time it was mainly a hobbyist platform.
Esp8266 doesn't have Flash Encryption, or Secure Boot, whereas Esp32 does and Espressifs SDK ESP-IDF is maturing. So it's definitely going that direction.
Nordic announced its Espressif Competitor but haven't released the cost yet. Espressif seems to be throwing things at the wall to see what sticks (S2, S3, C6, H2, etc). I think their IPO definitely helped them raise more cash to do more things.
They also had a virtual conference with a bunch of talks https://www.youtube.com/@EspressifSystems