Alternate microcontroller with cap sense feature

I have been using a ESP32-S2 CPU chip cap sense feature to sense moisture content in materials like lumber which works well but need a alternative ARM or RISC based CPU that includes the feature and is much cheaper in the 500 unit quantities. My total BOM at QTY 10 is $3.39 with the S2 chip costing $2.56 so it represents a large portion of the cost. I don’t need the WiFi and Bluetooth features but low power is important.

I would greatly appreciate suggestions for alternative chips. Some MSP430 have the feature but those models seem more expensive than the ESP32-s2. Specific suggestions for different ARM or RISC chips would be greatly appreciated.

Also I found a chip https://www.digikey.com/en/products/detail/azoteq-pty-ltd/IQS211B00000000TSR/18627377 that looks like I could add it to a MSPM0 chip but don’t know how well it would perform compared the the S2 chip which as been working fine. Does anybody else have experience using a chip like this for environmental sensing rather than proximity sensing?

Hi joexdobs,

Looking at the IQS211B, it does not seem to be suited for this purpose. It’s designed specifically for proximity sensing and is not likely to function well in a capacitive moisture sensing application.

To your point about pricing for the ESP32-S2, you’re not going to do much better than that family for performance vs. pricing, even at the pricing you state above, but a number of ESP32’s in that family are significantly less than what you state. All of the parts in this link are $2 or less in any quantity.

There are parts from TI and Microchip with capacitive sensing features integrated within, but if you have a working prototype with the ESP32-S2, I don’t think you’d save much, if anything, going to another architecture, particularly if one includes the learning curve to get going with a new architecture and getting the capacitive moisture sensing to a functional state.

You may be right, perhaps I need to stop being lazy and design the circuit around the bare chip https://www.digikey.com/en/products/detail/espressif-systems/ESP32-S2/11613132 you had for $1.25. On the Bare S2 chip do you have any examples of bare bones circuits including programming using the USB connectors. I read the schematic for the module but it didn’t show the exact specs or parts #s people are using for the crystal setup. Everything else seemed pretty straightforward other than the layout and parts for the antenna path to the UFL was a little confusing.

The part I used was https://www.digikey.com/en/products/detail/espressif-systems/ESP32-S2-MINI-2U-N4R2/16591889 that you show at $2.50 which is $0.06 than the deal from the PCBA company who sold me the last batch of 10 boards. I used the module because it was actually cheaper than the CPU chip from the same PCBA company and I didn’t have to figure out the crystal. The thing that really bothered me was that I ended up paying a penalty which increased the cost of the board by $1.50 each because the PCBA company claims they have been having a high failure rate with those modules. Anything where I start with a supplier talking about poor reliability makes me nervous because these boards will be very difficult to access for service.

Looks like the LPC802, LPC804 and MSP430FR2522 may provide what I am seeking. I do understand and partly agree with your point about learning multiple tool sets. On the other hand I regularly program in 5 different languages and the 1K prices on the TI FR series with cap sense and LPC802 are under $0.80 not a huge savings but the TI chip seems a lot easier to power optimize the software. Do you have any sense for the LPC versus TI parts in general environmental and moisture capacitive sensing? I know the TI parts have a great reputation for touch sensing but have not been able to find anything on moisture sensing with their chip and library. I probably only have time to test one or the other. I am already somewhat familiar with coding the MSPM0 chips but really hate the T.I approaches static IO pin configuration. Never tried the MSP430 chips other than when using Energia.

The critical factor for my cap sensing is that I need access to the underlying count values, not just the configured transition point interrupts. On the ESP32 I can just read that with a function call and get back a number. Don’t reall need or want the other stuff the vendors aer laying on top of the core capability.

Hi joexdobs,

An additional reason I was steering you back to the ESP32 was that I have seen very little regarding direct moisture sensing examples from any of your typical MCU companies. I could have easily missed something out there, but I was looking several years ago with little to show for it. Just about everything I’ve seen involved an external sensing circuit with an analog output being sent back to the MCU.

I’m sure it can be done with many of them, but that would take time and experimentation to develop. An example of a working unit using the ATSAMD10 is the Adafruit Stemma Soil Sensor.

Regarding the ESP32-S2, yeah, most just use the modules, as they are still very inexpensive (some I linked to above were $2) and all of the important layout is taken care of. Granted that if you don’t need the RF capability, it removes much of that complexity, and the performance becomes massive overkill for your application (with the requisite higher current consumption to boot). And as you hint at, certain overseas companies tend to be thin on specifics in their documentation, making proper bare metal designs more difficult. That being said, I did find some pretty good documentation which may be of help here, here, here, and here.

Thank you so much for the info!

You can think about the STM32 series. Some STM32 microcontrollers have the option of cap sensing.
https://wiki.st.com/stm32mcu/wiki/Introduction_to_touch_sensing_with_STM32
You can read this article about the capacitive touch sense option of PCBs.