You must have TWO wires from the Arduino, one from Arduino GND to the other board's GND or circuit common, AND one wire to A0, BUT you must get polarity (+ -) right AND there cannot be a voltage difference greater than Arduino's Vcc voltage between boards. If you are not sure about the other board's voltage, connect a 10k resistor between A0 and the point you are measuring on the other board.
And for the wiring each wires from the led on the pictures goes to A0 / A1 and A2
Thanks Perry/JCA34F, I read it multiple times before. I am pretty sure this is related to that but I might miss something.
In fact I did try at first to link the middle pin of the LEDs to the Arduino ground additionally to what I described above.
So each middle pin of the LEDs were linked to the ground of the Arduino but then when I do that the LED that was lit stops and my serial output on arduino IDE stops I have to restart it.
traktopel007:
In fact I did try at first to link the middle pin of the LEDs to the Arduino ground additionally to what I described above.
So each middle pin of the LEDs were linked to the ground of the Arduino but then when I do that the LED that was lit stops and my serial output on arduino IDE stops I have to restart it.
You don't seem to understand the idea of a common ground: one wire from the ground on your device to the ground on the Arduino. This is zero 0.0 volts on both sides and is the basis for measuring the voltages you are interested in.
It may be that middle pin on the LEDs is, in fact, ground. If so, any one of them would do. Ground be ground. But your description of the results when you tried this suggeststhis isn't so.
Frankly to tinker around like this without a good idea of what you are poking at is insane and asking for trouble as in damages to one or both the device and the Arduino.
There is another way of achieving that without having to understand the circuit you are connecting to. It involves turning the 3 leds into opto couplers, but using maybe a light dependent resistor (LDR) instead of photo diode.
3 x LDRs, 3 x 10k resistors and some black insulating tape should get you started.
If you do , however, want to make physical connections to the led circuit, you have to get to the stage of drawing a circuit diagram which includes the leds, the power rails, the current limiting resistors and the IC pin or transistor that is driving them.
In fact I did try at first to link the middle pin of the LEDs to the Arduino ground
The middle pin might or might not be ground. Ground is likely to be the circuit's -ve supply. Likely to be. NOT is.
You really need to know where ground is on the circuit and connect that to the Arduino 0v. This is the kind of thing where if I were with you I could point it out in a second, but trying to describe what to look for is difficult.
on your "led" pcb :
One pin of each led goes to a Ax input of arduino. Where does the other ledpin go? Most probably to a resistor.
Check : Are all three resistors end to a common track (measure with DMM)? If yes, let a led ON and measure voltage (+ to cable) from its cable (Ax) to common resistor point. If the voltage is positive (>0) and < arduino Vcc (i.e. voltage should be between 2,5V and arduino Vcc volts) then use the common resistor point as "ground" and connect it to arduino GND.
ONLY Ax cables and THIS common point should connect to arduino.
use the common resistor point as "ground" and connect it to arduino GND.
It's a bad idea to connect "ground" on one circuit to ground on another.
If you don't know why, then it's a really bad idea.
Find real grounds and check the voltages as has been recommended.
@6v6gt's idea for a non-electrical connection is the most safe way. No direct electrical path between the two units.
You could even go so far as to replace the LEDs with opto-isolators. Again, you would need to know more about the circuit you are hacking, and electronics in general.
So far it seems there is an implicit assumption that the LEDs are simply driven. Likely so, but not necessarily. It would be, er, nice to know for sure.
And also sorry for not posting in the correct section of the forum, sorry I was tired.
I know now what I do not understand :-).
Indeed I made the confusion between the ('-') and the ground. I thought what I was doing would act like a voltmeter.
I think the correct way to do what I want to do is indeed to use or make an opto couplers, because I do not know anything about the other circuit and I am not close to find the ground myself.
One question though Instead of making one my self using LRDs, can I safely do what I put in attachment with opto couplers ? (yes my drawing skills are as good as my electronic skills)
You can't put LEDs in parallel, they should be in series. Depending on the voltage used on the board to drive the LEDs you might be able to break the connection to the anode of the LED and insert your opto-coupler LED in series. It won't do any harm if you try, as long as you don't damage the board and can put it back if you need to, it just might not work. You can put your opto-coupler LED in place of the existing LED, but then of course that LED won't light.
Not wishing to discourage you from experimenting but I am concerned as to whether your knowledge and skill level are up to doing what you are trying to do. If you damage the board does it matter?
there is a side effect : It is likely that the leds on the PCB will not light any more. The forward voltage of the isolator-led is (in most devices) <1.5 V , so the original leds wont have enough voltage to turn on...
If the led resistor is selected for a led current of 50mA, it is possible you destroy the isolators (they cannot handle that much current).
Both above can be corrected by connecting a resistor in series with the isolator led, 100-270 Ohm should be ok.