From the datasheet, it looks like the C3 doesn't have the Ultra Low Power (ULP) co-processor. This co-processor was there on previous ESP32s and allowed you to run code for sensor monitoring or other basic tasks while the main CPU was stopped, consuming ~150µA. It can then wake the main CPU if certain conditions were met. Wonder why it was removed, and if this would prevent the C3 from being used in these kinds of low-power applications.
Actually it only consumes 150uA when it's active so if it's just doing one reading a minute then it'll be closer to the deep sleep current which is 5uA or so.
There is an awesome library (https://github.com/boarchuz/HULP) which makes using the ULP much easier so that things like software i2c and ADC multisampling are trivial.
I’ve been using a preproduction version of this (they were distributed widely on social media) with good results. It’s another iteration of the ESP32 products, but it’s not necessarily better than the previous boards for every application. All of the ESP parts have significant differences that can make them more or less appropriate for certain application needs, so read the specs carefully rather than skipping straight to picking the latest part.
My biggest wishlist item for Espressif would be to make a solid WiFi/BT part with SDIO interface that can be used as a radio for a Linux host SoC. Espressif provides a hosted version of the firmware for previous ESP boards ( https://github.com/espressif/esp-hosted#12-supported-esp-boa... ) but it doesn’t integrate as cleanly as standard SDIO WiFi parts and their latest boards don’t support SDIO.
There are many cheap WiFi/BT SDIO modules on the market, but I’d like to have one go-to solution that is known to work well, readily available, and cheap like the ESP parts are as wireless micros.
I wonder if they are capable of having the convenience features of CircuitPython boards of being able to appear as a USB storage device that you just drop firmware or code into. That would be killer. Even more killer would be if you could just drop an "a.out" and have it work. I hate installing microcontroller toolchains, especially STM32 and all that DFU crap.
It has an USB controller, so the chip should be capable of exposing an USB drive. Unfortunately, for whatever reason they are running it through an USB-to-serial chip instead of using native USB. The same is the case for many ESP32-S2 boards...
>Unfortunately, for whatever reason they are running it through an USB-to-serial chip instead of using native USB.
The reason is cost : you need to pay a fee[0] if you want to officially implement USB in your product.
Well, to hell with that. Make this stuff outside the US then and let's be a technologically advanced civilization.
The US is quickly becoming a wasteland of angry IP lawyers who love to stifle innovation. Pay a fee to use a goddamn plug? It's as ridiculous as if you had to pay a fee to implement 120VAC or 12VDC power.
IP fees give investors a return on investment that, in turn, encourages more investment in IP and thereby advances the state of the art. If you have a problem with that, take it up with the US Patent Office and nobody else.
You can’t update the ROM boot loader and it already has usb vendor and product ID assigned. For your own application you can just use random numbers as long as you are not selling this…
Hm, I suppose USB serial is fine too, but we should make it support something simple like "gcc --arch=esp32 somefoo.c; cat a.out > /dev/ttyUSB0". Would be awesome if gcc can auto-fetch the cross-compiler like Docker does if you tell it to docker run <something you don't already have>.
$ sudo apt install pio
[sudo] password for dheera:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package pio
Nope, pio isn't convenient. If I have to google for how to install it, it's not convenient. Googling for "pio" also gives a lot of seemingly irrelevant things, adding to the inconvenience. By the time I find it on Google, my FeatherS2, that presents itself as a USB drive, is flashed and ready to go.
Software installation, of all things, should be L5 autonomous in 2021.
Mind you, I built my own PIC programmer back in the day. It's just that we're in 2021 now, and I expected progress.
You still need a toolchain, compiler, drivers, operating system. Arduinos won't read your mind and neither will Debian.
Having said that, since you are knowledgable in these things you can absolutely package PlatformIO as a Debian package and maintain it. I would certainly use that. As is, just head over to https://docs.platformio.org/en/latest/core/installation.html... and you'll see the one line you need to install it. It's literally easier than installing the Arduino IDE.
I assumed with the shortages that these went up in price. Or more specifically the link I previously used to buy node d1 mini has gone from $3 to $8. Guess I should have looked harder.
I might pull the trigger and buy 10 of these for all sorts of purposes.
On a side note, these made a bad taste in my mouth for Arduino. It's making me think all Brand names should be a red flag.
These cheap board have turned me sour on some of the brand name stuff.
First of all the cheap Chinese boards are far more innovative than what I see coming out of the US. If there is something you can imagine doing with an ESP32, there is a good chance somebody in China is making a pre fabbed dev board for you that has exactly the peripherals you already need on it
And they’re selling it for $8.
The US equivalents which seem to do way less, last cost $50-100.
I get it, and I do try to support those US companies as much as I can, but when I’m putting together a workshop and need 10 boards, it goes from impossible to “I can give every student their own board and they can keep it at the end”.
These things are educational tools for me. The cost matters a lot.
Cypress sells PSoC dev/proto boards for as little as 4.99 IIRC, for Cortex M0+ chips. Lots of periphs on-chip and I/Os but not a lot of hw adapters. I've used one of their $10 PSoC 5 boards before for test automation.
They do sell more expensive boards but those generally have detachable programmers, capacitive touch and lots of extra hardware.
When you buy a branded Arduino, you're supporting the people who develop the hardware, software, libraries, documentation and learning resources, community platforms, and educational outreach.
It is important and people should be willing to pay for that if they desire it. It is also important to offer products that don't offer the same degree of support if they do not want it.
Ten years ago, I happily paid for an Arduino. I was interested in microcontrollers for about a decade at that point. Even though microcontrollers were inexpensive, I didn't get into them previously since I needed that extra support. Yet the Arduino development board and IDE provided that support in a form I found palatable at a price I could bear. (There were certainly alternatives that provided something similar, but they were expensive. There were certainly alternatives that were inexpensive, but they lacked support.)
Ten years later, the situation is different. More experience means that I don't need as much support. For the most part, I just want a development board that I can solder a header onto. It's something that I may be willing to pay $10 for, but it is much harder to justify at twice the price. It looks like this is something that the Raspberry Pi Foundation realized with the Pico. The development tools are better compared to those provided by a microcontroller vendor than with those provided by Arduino. The board's price is better compared to those of eastern companies than western ones.
The reality is that we need both. The reality is that western boards will probably be more expensive than eastern ones, but the price differential need not be so large when similar products are offered.
If everyone goes with the cheap Chinese clone, you can't have either. Because those cheap clones are so cheap because there is little to no R&D required. No software stack to create, etc. Because all of that work is being done by the more expensive, original brands. Support is likely only a small part of the cost.
I completely disagree. The main issue is: can you produce a good product and sell it for a good price? Because there are many excellent products that are simply to expensive and the market simply ignores them or they're being used in niches.
But if you succeed in offering an inexpensive good product, people will do things for you. Espressif did that and what people are doing with these modules and boards is amazing.
In some cases what you say is true, the cheap clone is piggybacking on the R&D of someone else. Yet the situation is definitely not so clearcut in the case of many development boards.
The heart of a development board is the MCU. Assuming a genuine component is being used, the software stack is typically provided by the vendor of the MCU. The supporting circuitry is either well known or provided in the vendor's datasheets. In the case of basic boards, there is not much R&D happening.
It is also worth noting that the software stack for many boards is open source. Let's ignore the compilers. They're typically based upon GCC, thus open source, but they are typically supported by the MCU vendor which is supported by MCU sales. Consider something like Arduino and MicroPython. Some board vendors undoubtedly invest in them, but it is open source. Others can use the products of their labours. Equally important, others can contribute to them. The board vendors who invest in the software also benefit from contributions.
On top of all of that, Chinese firms aren't the only ones making clones and Chinese firms do more than create clones. For example: I haven't heard anything about Espressif parts being clones of original brands.
I know, and yet the fact that I can buy a Chinese clone literally 10x cheaper makes it seem a bit off. I mean, I happily spend $35 on a Raspbery Pi and don't feel it's overpriced.
The educational materials, documentation, and software support are the main reason for the markup. I really enjoy the Espressif boards, but I have faced many undocumented bugs or incomplete features on them and have had to frequently manually modify the IDE for them to work. No such problems with Arduino/Adafruit/Sparkfun, which also create high quality educational materials (and yes, cost 4x (not 10x) more).
That's a good part thanks to the fact that nobody other than RPi Foundation can get those Broadcom microprocessors for cheap. This fact really sets apart the money making ability of those two companies.
RISC-V for $4.30 USD? Sounds like they'd sell like hotcakes...
NodeMCU ESP32-C3S_KIt
Specifications:
Wireless module – AI Thinker ESP32-C3S (footprint compatible with ESP32-S / ESP32-WROOM-32D) with ESP32-C3 RISC-V processor @ 160 MHz, 2.4 GHz WiFi, Bluetooth 5.0 LE, 4MB flash, on-board PCB antenna, and IPEX connector (which may be soldered or not).
USB – Micro USB port for power and programming via CH340C USB to TTL chip
Expansion – 2x 15-pin headers with GPIO, SPI, UART, ADC, I2S, 3.3V, GND
Misc – RGB LED, Reset key, user-programmable key
Dimensions – 49 x 26 mm
There’s no “switch” (yet), the C3 is their new MCU with a RISC-V core, but they will be continuing to manufacture their Xtensa-based designs for some time.
16MB of flash lets you use sooo many "creature comforts", and as an added bonus, a lot of them tend to be a more breadboard friendly width since the module itself is thinner and longer than the WROOM.
Like with 4MB of flash, even something as simple a <sstream> is off limits, because that pulls in locale data, and that in turn blows up your binary size budget unless you turn off OTA
(If you're making an actual product, then yeah obviously trading some creature comforts for a simpler codebase and a cheaper product is on the table)
Huh, I wonder why these have the same old CHG USB-Serial chip on them. The C3 has a built-in serial (and JTAG) USB interface. Maybe the software support isn't there yet?
Espressif guy here: Actually, unless the crash is so bad that it triggers a RTC watchdog or manages to mess up with clocks somehow, the C3 USB thing will also stay active if your program crashes. Unlike the USB in e.g. the ESP32S2, this is a hardware implementation that is more like we took an external usb-to-serial implementation and integrated it into the ESP32C3 silicon.
Sure, but (not actually knowing how the integrated controller works) I don't see why the hardware one couldn't do that too, especially since it seems to only be build to support CDC (serial) and JTAG.
Are you sure that the integrated one doesn't? It just seems like an odd thing to leave out.
I'm not following, there is only one CPU: It has to run your application and 'operating system' (usb stack, Wifi if used).
Usually those MCUs don't have much memory protection, so when your app crashes down goes the whole thing. Writing UART is usually just writing data to a single register, fire and forget. This will still work if everything else is burning. (unless you screwed with the clocks)
Now USB on the other hand is a complex best, you have to keep state and do two way communication.
If you corrupted your memory, you won't be able to get a debug message out over USB.
The datasheet suggests these chips support 802.11n, HT40, MCS7, which maps to 150 Mbits of data throughput.
But with these little embedded systems, I know the software stack typically heavily limits throughput. Can anyone comment on real world data rates this can achieve?
My dad buys loads of this stuff from eBay and Aliexpress, we got a lot of plastic boxes just filled with modules like this. It's a shame I don't have any ideas on what to do with them though, they just sit there doing nothing.
* Connected an accelerometer and hall effect sensor, used to know when the washing machine is in use and the state of the lid. I taped a magnet to the lid so that it can be sensed with the hall sensor, so no wires are moving / need to be managed. Sends a message if we've left clothes in the wash.
* Fish tank lights with WS2812B strips
* Water softener brine level sensor using an IR transmitter / receiver in the lid of the brine tank, lets me know when to add salt.
* Plant moisture sensor, lets me know when to water.
* 1x4 WS2812B lights that we can all use to mark ourselves as on a call, either through a web page or Telegram, so that we know to be quiet because someone is on some sort of video call.
If you're using esp32 or esp8266 take a look at esphome.io for ideas -- you can do a ton of stuff without writing much code at all. Most of my projects are done with the Nodemcu framework because I have a soft spot for Lua, but I do use esphome.io to interact with some Mijia BLE temperature and humidity sensors.
Forgive me if it's an ignorant question, but what's the benefit of an ESP32/ESP8266 over a Pi Zero (W), apart from saving ~$5, assuming all your applications are indoors and don't need to run on battery?
I've only recently gotten into the whole topic, and have yet to see the benefit of dealing with micro-controller toolchains, MicroPython etc. if power consumption is not a big factor. Seems like a full Raspbian offers a lot more flexibility.
I've used a Pi Zero W that runs regular Python and sends messages to a REST API on my home server (little go thing) + MariaDB + Grafana, for similar use case (although I will now need to build the washer/dryer idea :)).
esp8266 and esp32 boot almost instantly and don't really have a file system. My issue with Pi setups is that they eventually fail due to SD card corruption.
If you're happy with a Pi Zero for your use-case, then there probably isn't anything you'd appreciate about moving to a microcontroller.
One big driver for microcontroller use is power, as you've suggested. A quick look on Google shows that the Pi Zero uses about 100mA at idle, and even its "sleep" mode uses 30 mA. In contrast, the esp32-c3 datasheet lists power consumption at 130 micro-Amps for light sleep and 5 micro-amps for deep sleep. If you want to run something on battery or small solar, you can go a lot farther with a microcontroller using power-efficient sleep.
One other thing that might be relevant to some use-cases is deterministic realtime control. When your program is the only thing running on the processor, with no OS involved, you can have much more reliably control over your timing and latency. This isn't an area I know much about.
Care to elaborate more on the IR sensor for a water softener? I had thought of doing something similar but with ultrasonic for level. I'm curious what you are doing with IR. I suppose resistance could be used based on dissolved salt but I like the non-contact options, when possible.
Sure, it's purely optical. I don't know if this was the exact sensor since I salvaged it off of something else, but it was something like this one: https://www.amazon.com/dp/B075FPR2VX/
It's hooked up to the ADC of the ESP8266, and thankfully the output was between 0 and 3.3V since that's the range that the Wemos D1 boards can accept, as they have a built in voltage divider. It's measuring the distance between the lid and whatever reflects the IR back.
I love these ideas! I've always wanted to do home automation stuff but I worry about sending data to outside parties. Do you happen to know if Home Assistant monitors the things you have installed and/or keep track of the data your devices pass to each other?
The whole philosophy behind HA is "local only as much as possible".
There are a few analytics modules that report back which integrations are in use so that they can help focus dev efforts but those are optional. They also have a cloud service that can be used to help expose your instance externally if you don't want to run a local nginx and expose your home network to the outside world, but even that is not a way for them to monitor the devices you're running.
Plenty of people run HA with absolutely no access to the outside internet (like, the host is firewalled from communicating outside the local network). Plus it's all open source so you don't need to trust anyone, you can look at the code if you want.
All of my stuff is completely decoupled from the internet. I publish mqtt messages to a broker running on PC in my basement. Any interaction with the internet, such as sending messages to my phone, happens from there and I am 100% in control of where traffic goes.
Good luck! I used a SS441R hall sensor. You don't need to use an ADC or anything like that since the output is the same level as what would be needed for GPIO and you can use an edge trigger interrupt to know when the state has changed.
The accelerometer is a GY-521 breakout board. It was a little tricker to work with because orientation is important and they are sensitive. Different cycles on my washer result in different vibration patterns, and the "bulky" setting rests for several minutes with no motion.
Overall, it's the one project which gets used the most and has saved us from having to re-wash stuff because it was forgotten and got kinda funky.
> ... It's a shame I don't have any ideas on what to do with them though, they just sit there doing nothing.
You've got the supply, that's good!
Now, if you have the interest, then asking your dad to show how these components could be practically used for something interesting could as well be a beginning of a wonderful journey.
Perhaps, your dad just needs such a signal from you. In my own experience, Snap Circuits set is currently providing this journey.
Oh I have interest in this stuff, it's just that it's pretty much useless for an engineering career. Plus, you can't really make any profit because a Chinese inventor will just copy your idea and scale it up and drive you out of whatever market you make.
To be honest I understand more on how these components work than my dad does, he usually just clicks on the first results on Google and glues together Arduino/Hackaday projects. Whenever I talk to him about doing real low level stuff and writing actual drivers, it always goes over his head.
I've got 5 esp8266 based temperature/humidity probes hanging out around the house and collecting data once a minute. At some point, I'm going to use that to better control my central HVAC systems (mostly I want to run the fan more strategically), and alert on bad conditions.
Also, another two to use as an alternative controller (with opensource firmware) on a video conversion board; but I only installed one, because it didn't satisfy my hopes.
Awesome. I wonder if, in future, ESP8266 chips will be replaced with this one since former is WiFi only.
There really needs to exist an alternative WiFi chip from another manufacturer. It would significantly drive the price down due to competition. Currently there's no competition to Espressif in this segment. Maybe Raspberry Pi should come up with RP2040 WiFi chip. That would be amazing.
While we are on this topic I did a lockdown project based on ESP8266 thought I had share :p
The S2 is more of a direct upgrade as it has ULP and only wifi. Surprising the c3 is that much cheaper, the release is also much more recent. Wonder why that's the case?
I wonder if these would be a good fit for the DIY mechanical keyboard scene. With a board like this it looks like all you'd need electronics-wise is a battery and a charge controller.
I wouldn't think it would be too difficult to get QMK running on these.
It doesn't look like these are close to the Pro Micro pinout though, so perhaps a shim PCB to wire things up correctly?
There are a few bluetooth keyboard controllers that already fit the bluetooth controller niche and are pin compatible (nice!nano). This having a microusb port would make it less appealing as well.
Personally I'm more interested in the RP2040 Pro Micro variant. It uses KMK, works with circuit python and can have its keymap changed by editing a file on it rather than reflashing or being limited by Via/Vial.
Only one of the newer ESP32 variants has USB HID support, so none of them are compatible (except for Bluetooth, but battery life there won't be good). There was someone who was porting QMK (or maybe ZMK) to ESP32, so hopefully that'll happen.
From a hardware perspective, likely. The regular esp8266/esp32 chips are arduino-compatible. If I remember correctly a common chip for DIY keyboards are the Arduino Micros.
I have been playing with a couple of NodeMCUs for a hobby project and I have to say the documentation and tooling are extremely poor (at least with a Mac).
If you're used to the plug-and-play Arduino, be ready to spend quite a bit of time on setup before even connecting to a WIFI.
Do these things have PWM suitable for power electronics applications? Meaning driving complementary pairs with dead time, center aligned, synced ADC reading, period start ISR...
There is an internal scheduler using the same core to run the wifi stack, so if you need hard realtime for power electronics control, I'd personally still run that off a dedicated chip.
You'd probably offload PWM onto the in-chip PWM peripheral, rather than doing it in software. There isn't a lot of info about it in the datasheet[1], and based on my quick skim, the ESP-IDF docs[2] don't say anything about complementary pairs.
>> You'd probably offload PWM onto the in-chip PWM peripheral, rather than doing it in software.
Of course. In power we need specific features in the PWM peripheral. In particular complementary pairs with programmable dead tine. It is also customary to have an interrupt every cycle to do measurement and control. Control output is the new duty cycle for the next period - we typically compute a new duty cycle every period. Weather this chip can handle that type of thing is what I was after in my original question. It seems like the answer is no.
Second this. Heard of a lot of blown H-Bridge Mosfets that used MCUs to gate them. With (deterministic) hardware, there is a data sheet and test circuits so you can be sure.
ESP32(having more ram, more cores, more pins, more frequency, better than this in all the respect?) is available for $2-3 if you look for it. Why is $4 the news?
Nicely twisted, but the implication was not about the US prison system.
This does not look at all like the work of pick-and-place machines. No solder paste was used, much less flow soldering. This is all done by hand, by incompetent workers.
Again, nicely twisted, but nothing here checks out. It is extremely likely these boards have been soldered by Uighurs in Xinjiang camps.
Would you rather sit in a factory soldering RISC-V boards without pay or wait for your turn in a concentration camp where you can get indiscriminately beaten, raped, tortured and killed?
So these are for sale on AliExpress which I've found to be higher friction than other open marketplaces (ebay/amazon/etc). The last time I tried to buy something there, my checkout was interrupted by a notification asking that I submit ID and other info for screening to proceed, which I found surprising since I was buyer not a seller and was purchasing some rather mundane item, cables or jumpers, I can't remember. In the end, the result was I didn't complete the order because it didn't seem worth the trouble. Additionally, I'm a little hesitant to buy some items on AliExpress because I worry they suffer from the same counterfeit issues as other open marketplaces due to poor oversight over sellers. Except for on AliExpress I have even less of a sense of how to distinguish between sellers with established reputations or otherwise. Does anyone have any tips for how to best use AliExpress?
Your mileage may vary. My experience so far has been mostly low quality stuff from aliexpress with very long shipping periods.
I found the ratings on aliexpress to be completely useless. as compared to aliexpress, even amazon ratings feel legit (which has probably the lowest reputation from my experience).
I had way better experience with local vendors here in Switzerland or even shipped from Germany for all kinds of qualities.
The local vendors here also have way better support and very quick shipping times.
It's on par with local options when it comes to ease of use.
As for the sellers, I either know them due to their other online presence, or I select them based on how good the descriptions are on the items they sell from a technical perspective. Reviews are also useful, especially those with more text, photos, and some technical comments.
I don't really have any tips, it is more painful/friction-full than Amazon (which is in other ways deteriorating into it!) I agree. I've only used for things where I've suspected they're commodity dozen-'brand' 'drop shipped' items, and the AliExpress price has been enough cheaper for me to bother with it, and risk worse/non-existent return/refund experience (worst case could always charge back I suppose if bothered enough).
A lot of the time though, Amazon is O(tens of pence) more expensive, and I just view it as a cheap insurance. (Amazon's returns/replacements is great IME; AliExpress's is unknown to me and frankly I assume it's bad, and for the sake of tens of pence don't want to find out.)
I've bought a couple items on AliExpress. For me, I had to call my card issuer and have them pause the anti-fraud systems for my card, so they would allow the charges; and then when I bought some more stuff a couple weeks later, I had to do it again. Some people on reddit report success or failure with different card issuers.
I would only use AliExpress to buy things you can't find anywhere else, which should help with counterfeit issues, AliExpress has seller ratings and what not, too. I've had some luck with BangGood.com for randomly produced NodeMCU style boards, and they have a US warehouse which helps with shipping speed (at additional cost).
Are you sure this information isn't required because of your government? That's the case at least in the EU, and the EU gets angry if they miss people. Aliexpress tries to do what the regulators want, sadly they don't have user experience in mind.
That's a long time ago. Aliexpress started asking me for this stuff only few months ago, which I believe is when EU made getting the info mandatory - that was definitely post-brexit.
Well.. I suppose that's a matter of perspective, but if that's such a recent change then fair enough!
What's the purpose of it? Does it have to be recorded & kept (in case police want to ask 'who bought x' or 'what did y buy' or something?) or is it just to check that the purchaser matches the billing details (fraud prevention?)?
It's because of collecting VAT and import taxes and then redistributing the money to the relevant countries, I believe. Companies used to pay customs and import taxes in the port where a shipment arrived, often under favored terms, which the other countries didn't like.
Datasheet: https://www.espressif.com/sites/default/files/documentation/...