This question already has an answer here:
- Control 220V AC line using MCU 3 answers
I need to build a switching box, which switch between 4 pairs of the contacts, and give one of the pairs to the output (to read one of the 4 signals). I am going to do that as follows: For each pair of contacts I would have a DPST relay. Each of the relay I would connect to the output pins of the microcontroller (if the relay needs 5V, and microcontroller has 5V operating voltage, it should be possible directly. Otherwise, if operating voltage is lower, I would use operational amplifier or transistor-based one). A 4-buttons keyboard array would be connected to the input of the microcontroller, so that only signal between respective contacts go to the output of my circuit, since only circuit with this contacts would be closed by relay. However, I don't have so much experience so far, and need advice/comments if this plan should work or something looks wrong, bad (if I miss or overcomplicate something).
I also consider possibility of using circuit without any microcontroller, but just mechanic switch, operating DPST relays. My understanding of the 2 options illustrated at the images below. Only 1 pair of contacts shown, because the others would look the same.
I also would appreciate comments if choice of such relay would be ok. It has DPST modification which I need, and also provided already with protecting diode.
Voltage and currents through the contacts will be low (less than 10V voltage, less than 1mA current), and the main requirement is that my switching box shouldn't affect those currents, which I am going to measure at the "out" contacts.