I am actually developing a DC air compressor testing unit. The idea is to have the ability to test 4 compressor motors one by one. The compressor has only 2 wires, one for power and one for ground. I am trying to have it automatically know when each compressor is plugged into the testing unit. After one or all compressors are connected to female plugs attached to each relay, I would like the UNO to then call the testing functions for the compressors connected. This way if one of our technicians are using it, they can test one or all of them without any setup other than plugging the test amount and starting the testing unit.
The compressors pull 32amps when running. I am having issue with figuring out how to have the UNO "sense" the connection using the analog inputs. If the relay has 12v running through it when switched on. I would be afraid that the 12v power would travel through the "sensing" lines back to the UNO and releasing the smoke.
Also, doesn't the relay module have opto's on it already? Can I join two lines each to the power and ground to the compressor plug, one set of lines to the relay that switches the 12v to the plug and the other two lines to another relay powered by 5v and then back to A0? Before the switched 12v relay is activated, the other relay is switched causing 5v to the compressor and seen by the analog pin to confirm that a compressor is connected. Then the code will know there is continuity at the plug?
I really appreciate your thoughts!