The signal detection part shouldn't send any significant current through the Arduino - the digital pins in INPUT state have a very high input impedance. The current in the resistor network with the values I suggested will be about 1 mA, and that's not even going through the Arduino itself.
12 signal LEDs draw about 120 mA from the Arduino (assuming you run them at 10 mA each). That's fine for a USB powered Arduino.
I do apologize for my lack of knowledge but I tried decoding what you meant in your previous post. Are you talking about bypassing the 1k resistors. and then have a voltage divider (ex 12k R1 and 4.2K R2 but connected to the 17V) and see if it is grounded? And how do I connect the ground of the Arduino? Do I connect arduino ground to the ground of the transformator?
I do apologize for my lack of knowledge but I tried decoding what you meant in your previous post. Are you talking about bypassing the 1k resistors. and then have a voltage divider (ex 12k R1 and 4.2K R2 but connected to the 17V) and see if it is grounded?
Whatever is practical, whatever point you can easily solder an additional wire to.
If you tap it from right at the leads of the LED, you have the 1k resistor as part of your voltage divider network, adjust R1 accordingly.
And how do I connect the ground of the Arduino? Do I connect arduino ground to the ground of the transformator?
Yes.
Alternative way of detecting the switch would be to hook up to the switch itself like this:
Use the built-in resistor to pull the pin HIGH when the switch is open. The switch shorts it to GND pulling it low. The diode D3 prevents the high voltage (in my schematic 15V as I don't have a 17V symbol ready made) to flow into the pin of the Arduino. Connect Arduino GND to voltage supply GND (or the other end of the switch, which should be the same.
I should add: I just came up with this circuit, haven't actually tested it, but I'm quite sure it will work (the idea is in part based on ideas I've seen come by in this forum). At least the diode should make it safe to try.
The beauty of @wvmarie's circuit is that there is no need to worry about the high voltage as long as is does not exceed the range of the protection diode.
Thanks everyone! I was able to get a signal into the system now! I think the common ground was the main problem.
wvmarle, thanks very much for the ideas, unfortunately I do not have LED's laying around. As I live far away from civilisation I only 270, 330, 4k2 and 12k ohm resistors. Now I just use stepdown from 17 V and ground the step down via the switch. That way I get 3.3 volt ungrounded and 0V grounded.
That will do. 3.3V is a bit low but should be high enough to reliably detect a high.
Over the past half year I've been stocking up on parts with lots of different values - you can get really cheap kits of 30 resistor values, or 20 ceramic capacitor values, a dozen electrolytic or tantalum values, etc. Highly recommended. Many values you may never use but it's so convenient to at least have the ones you need around
A handful of LEDs, diodes, small transistors (PNP & NPN), and maybe some MOSFETs for higher currents are also always useful to have around.