Powering Arduino + ESP8266 NodeMCU + sensors—Need advice!

Powering Arduino + ESP8266 NodeMCU + sensors—Need advice!

Hello!
Currently, I'm making two air quality monitors for a project using an Arduino, a NodeMCU and some sensors. In both monitors, the readings are taken by the Arduino and then sent to the NodeMCU via serial to be transmitted to my server over MQTT.

Regarding the circuit’s power, I'm using a breadboard power supply of 5V (this one for monitor 1 and this one for monitor 2) to feed the Arduino, the NodeMCU, and the sensors, as shown in the circuit diagrams. I'm powering both the Arduino and the NodeMCU through their Vin pins.

The problem is that yesterday I read that the Arduino should be powered through the Vin pin with 7-12V, so wanted to check if my circuit is OK before powering everything together again.

Regarding the circuit's current, I'm using two power supply cables, each with an output of 12V / 1.5A. Also, i added all of the sensor´s current draws (without including the arduino and nodeMCU of each monitor) and for monitor 1 is about 500mA and for monitor 2 is 50 mA.

I would appreciate any guidance regarding this. Thanks!

I think you made a bad decision already. Using 2 or more microcontrollers in the same project makes the whole thing more than twice as complex and error-prone. Find a way to connect the sensors directly to the ESP and things will become much simpler.

Hello! Thank you for your reply.
I used two microcontrollers because the monitors require more than one analog pin, and the NodeMCU has only one, which doesn't work very well. Thats why i had to add the arduino. I tested both monitors, and the code works. My concern is about how to power the whole system and whether I’m doing it correctly.

Not a good enough reason to use 2 or more microcontrollers. Remember, you make everything much more complex and less likely to work correctly, as you are finding out.

Give the ESP more and better analog inputs. For example by using ADS1115 or similar module.

Again, thank you for your reply. The thing is, there were several factors that led me to use two microcontrollers, but the biggest one is that where I’m from, I don’t have easy access to many electronic components, so I had to work with what I had on hand. And you are right—working with two microcontrollers was challenging, but as I said, the system works. I’m just asking for guidance on whether the way I’m powering it is okay.

Arduino can be powered at 5V on 5V pin and esp on VIN(5V) pin.
But I agree with post above, find a way to use just one board. Esp32 could be valid option to substitute both.

Thanks! After seeing your post, I looked it up, and yes, I can just connect my power supply to 5V, and everything should be fine. I'll also check to see if I can get an ESP32. Have a nice day!

You too,
if you go with two boards route, be aware that they have different operating voltages and thereon different logic level voltages.