Hey all- I'm having some ground issues involving a large 12v power supply and the Sainsmart 12v 16-relay board... In addition to 16 relay control pins, it has 2 5v pins and 2 gnd pins (they are enough to power my ESP board)
Problem 1: If I connect everything as in the bottom drawing and plug in the power supply, all of the relays on my relay board (that are connected to my arduino) turn on for some reason... and they stay on. Nothing in my arduino code can turn them off. It feels really dead shorty.
If I disconnect the power supply from the VIN/GND of my arduino and instead power the arduino with a USB wall wart, aka use TWO power supplies... things work ALMOST okay. The relays on the board all turn on and off fine with the code I'm using, HOWEVER, my CO2 sensor is not giving me any readings (also doesn't seem to be getting enough voltage)!
If I remove the wallwart, unplug the power supply, and plug the arduino directly into my computer, and run a simple is-the-co2-sensor-working sketch, the co2 sensor is working fine.
I'm a little afraid to plug the power supply/relay board in AND connect the arduino to my computer at this point to see if the co2-sensor-working code still works.
I have a feeling there is a ground issue, but I'm not sure where to begin...and I should also add that my sensors are about 10 feet away from the arduino.
Any thoughts/glaring issues in this beautifully sketched diagram?