# Do I need different isolations among long-wire switches?

I'm playing with an MCU board (like Arudino) to read the state of several switches in my home (i.e. magnetic switches). The wires between the sensor and the board are quite long: 15+ meters in a star topology.

I would isolate the inputs from the MCU, using opto-couplers. To provide the voltage needed to turn on the diode I'm going to use an isolated DCDC converter.

Question: do I need to use a different DCDC for each input? Or may I live with only one? In this case I will end up with all sensors that share the same power supply rail.

I.e.: one side of the switch goes to +12V (shared across ALL switches) while the other sides go to the anodes of the opto-couplers.

It's not an industrial design: I'm fine if it works without false detections due to the environmental noises.

## EDIT

To be more clear. Two ways:

A

simulate this circuit – Schematic created using CircuitLab

or B

simulate this circuit

• Your setup is unclear, or maybe I'm just sleep deprived. Still, add some clarification details and review grammar. – A.S. Mar 29 '18 at 18:38
• I'm sorry for my awful English. What details should I add? – Mark Mar 29 '18 at 18:40

## 1 Answer

You should be fine having the shared power rail(case B), although I'm not sure how many switches you could be dealing with, so you might want to calculate the max current draw with all of the switches closed, which would be:

Current through one switch: (12-Diode_voltage)/680

Current through them all: Number_of_Switches * Current_Through_One_Switch

So long as the DC-DC converter can put out enough current (which is likely, unless you're going to have 100s of switches) it'll be fine.

• Got it, thank you. Current is not a deal here - I'm going to have 4-5 sensors. – Mark Mar 29 '18 at 18:58
• If you're happy with the answer, could you mark it as accepted? Thanks :) – Flyingfirepig Mar 30 '18 at 20:28
• I was waiting for any other answer. Don't worry. I give you some points. – Mark Apr 2 '18 at 11:19