ESP32 alternatives for industry project - Page 1
Forum section: electronics / projects

author: Gi_T
author_rank: Newbie
timestamp: May 19, 2022, 06:59:33 pm
content: Hey. I'm currently working on a mobile battery-driven system used to increase safety in tunnels. At the moment, the system uses an ESP32 to control a fan and brake (digital output) and read some sensors (digital input, I2C, and SPI). The ESP32 is connected to a PC over USB. The system works well most of the time, but there are problems:The ESP stops working sometimes and isn't resetting even though a watchdog timer is implemented.The USB connection is unreliable at times (no connection to the device, cannot read data, etc.)Such problems are not allowed to happen. That is why we are searching for a way to either improve the current system or replace it with something different (switching to another microcontroller or using a PLC). Here are some requirements for the system:Can read and write digital and analog input/outputI2C and SPI support would be greatWorks in a production environment under harsh conditions (temperature, device shaking while moving, etc.)The system needs to either communicate to an industrial PC over USB or Ethernet or to be able to send and receive data directly over Websockets or some other protocol (it has an internet connection and is programmable)Remote maintenance is also a big plus.Any advice and help is greatly appreciated.

author: globoy
author_rank: Frequent Contributor
timestamp: May 20, 2022, 03:28:14 pm
content: From the FWIW dept: I've shipped products based on the ESP32 and they remain operational for weeks or months between power cycles so my experience shows that micro-controller is capable of reliable operation.Regarding what you see: Your description lacks the detail necessary for any real analysis but the watchdog not resetting the device is probably a firmware bug. Since the ESP32 usually depends on an external USB UART for USB connectivity then you need to look at that area of your design, not necessarily the ESP32. Certainly many of the off-the-shelf USB UART chips and drivers are very reliable and used by huge numbers of devices every day without problems. So it's likely you have a bug or hardware problem there too.Regarding alternatives: There are a large number of alternatives that do everything in your "want" list. You're in the west so you could look at Renesas, ST Micro, Infineon, Microchip/Atmel, TI, Maxim, etc. Many of the manufacturers have devices marketed for critical or safety applications. As you dig in you'll find that most devices have bugs, errata and the like you have to be aware of but won't prevent you from delivering a reliable system.Regarding advice:1. Spend the time to understand why something doesn't work. In your case you should understand why the reset isn't occurring and what is going on with USB communication. It may lead your ESP32 based design to success and, in general, it's important to fully understand how a system works. I've seen disasters where the designer didn't fully understand an issue and perhaps included some kludge that appears to fix it, only to be bit hard when there were a large number of devices out in the field. The cost to deal with the issue then swamps the cost it would have taken to really understand and correctly fix the issue in the first place.2. Avail yourself of information online about how to write good embedded software. Learning to write firmware is a discipline and there are ideas and techniques you should know that will result in performant and reliable code.3. Engineer the hardware. Don't just put together parts you see on dev boards. You need to know your design will work in all environmental conditions you specify, has no signal quality issues, isn't violating the important specifications of parts on the board, can handle ESD events, meets regulatory requirements, etc. And is manufacturable for the price your market needs.4. Test, test, test...

author: Bud
author_rank: Super Contributor
timestamp: May 20, 2022, 06:03:20 pm
content: @OP for a battery driven system I would use something less power hungry than ESP32.And ( my opinion) it is unwise to use a random module ,which runs an operating system, for a safety application to start with. I would build something i know how it works inside out.

author: bruchmueller
author_rank: Newbie
timestamp: May 25, 2022, 01:48:13 pm
content: We are using the ESP32 as a replacement for Raspberry Pi quite a lot, in 24/7 applications. For your application, I don't think the ESP32 is wrong, it just needed to be used in an environment made for that application. That means, no "maker boards", but application specific developed boards, with industrial IOs.When I understand you right, your boards are connected by Ethernet? If so, I would replace the batteries with PoE(power over Ethernet), when there is already a CAT5/6/7 cable installed anyway.The on-chip watchdog (not only in the ESP32, but any MCU) can be disabled by a software error, a not so uncommon problem. Adding an external watchdog and reset supervisor is the common practice, to avoid these problems. Cost a few cent, but is bullet prove.We have designed the EsPiFF, and ESP32 in Raspberry Pi 4 form factor. The upcoming version 3 will have an external RTC/Watchdog, plus 2kB FRAM, include Ethernet wired and Wifi.https://github.com/MDCservice/EsPiFFI am currently designing the V3, for our Crowd Supply campaign. The EsPiFF does not have PoE, not enough space on the base board. But I could add the same headers for PoE as the Pi3/4, so that a PSU on a PoE-HAT could generate any voltage. If you are interested, let me know.