Multiple analog signals ESP32

I have designed a temperature controller on a ESP32 doit board and I would like to add some industrial pressure sensors. These are the 4-20mA current loop sensors, which I have tested on both an arduino nano and a pro mini without difficulties.

I want to read 8 of these sensors and monitor them with the same controller (i.e to display them and have safety systems in place). Using 8 analog pins on the ESP32 would be kind of difficult, since I am already using multiple SPI devices and inputs/outputs. Additionally, I've read that the ESP32 analog pins are not as user friendly as Arduinos' analog pins.

I thought about measuring them with the pro mini (which is 3.3V) and send them to the ESP32 through serial communication. However, I haven't been able to establish a serial communication even though both devices are 3.3V. I am also worried that serial reading will block important code on the esp32, since at it's core I use it as a PID controller.

The best option I believe, would be to use a SPI digital to analog converter, such as the MCP3008. It even has a library on github for arduino.

Would this be faster and thus block less code than using serial communication? Could there be any negative effects of having to many SPI devices? Or what would you do instead?

Since the SPI buss works with chip selects and is not addressed the only limit to the number is the number of chip selects you can generate. There is also a practical limit and that is dependent on the wiring, capacitance etc. The faster the bus the more critical these parameters become. Since it is not a bidirectional bus it is relatively easy to add drivers if needed. This is what the SPI was developed for.

SPI is not bidirectional?

Another limit is the SPI electronics. An ESP32's SPI buss can only drive 3 devices per SPI buss, the ESP32 has 2 SPI busses. Making a ESP32 SPI device limit of 6 devices.

I am sure this was a mistype on your part.

Only 3 devices per SPI bus? I haven't experienced issues driving a TFT display, a SD card module, a MAX31855 thermocouple module and a 74HC595 shift register that uses SPI communication.

I am using the VSPI bus with 4 chip select, but even if that was an issue, I could still use the HSPI bus.

I am still unsure if this is the way to go (MCP3008) or should I use serial communication between the esp32 and another microcontroller?

I got 13 ESP32's that communicate with each other, I use MQTT running on a Raspberry Pi. Wireless.

Sounds very interesting, though I don't have any knowledge of MQTT or Raspberry Pi's. Do you have sources where I can read more about this?

Learning how to do your own research is very important with programing and electronics. enter the words "Raspberry Pi" into your favorite internet search engine for more information on the RPi,

Enter the words "Eclipse MQTT Broker", into your favorite internet search engine for more information.

Remember learn how to do your own research.

Thanks, I didn't mean it like I was lazy to not do enough research. It was more about specific sources related to your project.

As for my project, I will try using the SPI ADC and see how it works (i.e measuring how much time it takes to compute the values) and compare it to the serial option. Using a RPi would be great, but I would add more layers of complexity and I am looking for the most cost effective way to finish this controller.

It has separate wires for data in and data out hence it is full duplex. Data is clocked in and out concurrently. A simple unidirectional driver can be placed in the line and expande it to whatever is wanted.

The common way to read 4-20mA sensors is an ADS1115, with 100ohm sense resistor (PGA2).
Four sensors can be read with one breakout board.
Several boards can be used on the same I2C pins.
Leo..