Go Down

Topic: Digital Input from an LED (Read 740 times) previous topic - next topic

tocpcs

Interfacing to another PCB, I'm looking to pick up that a pump is being driven on.
The back of the PCB has 4 LEDs commoned up on one side (I assume the ground side - anode of the 4 LEDs)
On the other side of the LEDs, after a resistor is where I've picked up what should be a digital signal - high when the LED is being driven on, and low when LED is off.

Metering this, I was expecting (perhaps incorrectly) that the voltage would be 5v (the LED would be driven from the onboard PIC).
What I got was 0.5v when the LED was off, and 1v when the LED was on.
No problem, still a usable method of determining it.

My question based on the above is- I want to wire that into a digital input. So for it to read 'high', I think I need a transistor. If I use an NPN transistor from 5V to the digital Input, and feed it's base direct from the wire described above, will I get the desired behaviour?

fungus

What about on the other side of the resistor?
No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

tocpcs

Same signal - it was 0.5V off, and 1V on.

cjdelphi

0.5 might be enough to trigger the transistor (off would be on)

fungus


Same signal - it was 0.5V off, and 1V on.


Why not use an analog input? The Arduino has 6 of them.
No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

cjdelphi

#5
Apr 24, 2013, 05:36 pm Last Edit: Apr 24, 2013, 05:38 pm by cjdelphi Reason: 1
actually no....

how much of a voltage drop is the LED causing? cut them off completely....

tocpcs

I would use an analog input, but as the arduino only has 6 of them, I wish to use them for other purposes.
The intent is to pick it up as a digital signal, so I'm after a method of doing that.

What I don't yet know is whether direct to a transistor base pin is good enough or so

Cutting off the LED isn't ideal.
I've found a better output from the PIC pin which looks like it drives when needed.

MisterResistor


(I assume the ground side - anode of the 4 LEDs)


I think you meant cathode not anode. Rather than cutting out the LED, how about replacing it with an optoisolater?

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy