trigger on/off switch with external LED's in...???

I'm trying to get my arduino to take the LED pulses of a synthesizer and process them.. what would be the best way to interface between the arduino and the synth? Ive soldered wires to the anode and cathode of the LED and treated it like a simple pushbutton with a pullup resistor, but this doesn't seem to work for more than 1 LED...

The idea is that I will be sending 16 different LED lights into the Arduino and processing them being on an off as separate events and have them triggering different things.

because of the nature of this project, I can't use a photocell to sense the LED on/off state from the synth...

Thanks!!

Use an opto isolator and drive that through a resistor to the LED signal. That is not across the LED directly but across the LED and resistor in your synth.

zumdar: Ive soldered wires to the anode and cathode of the LED and treated it like a simple pushbutton with a pullup resistor, but this doesn't seem to work for more than 1 LED...

I don't see why this wouldn't work, except with pulldowns instead of pullups. Connect the Arduino input / pulldown to the anode only, not the cathode (to avoid the vF voltage drop). You'll need to use a separate input pin for each LED, of course.

The synth and the Arduino will need to have their grounds connected.

tylernt: I don't see why this wouldn't work, except with pulldowns instead of pullups. Connect the Arduino input / pulldown to the anode only, not the cathode (to avoid the vF voltage drop). You'll need to use a separate input pin for each LED, of course.

The synth and the Arduino will need to have their grounds connected.

so do I connect the cathode anywhere at all? also do i need to do anything with the 5V pin of the arduino? I'm a little confused now because if I'm only using the anode, I'm not sure how to wire it up like a switch. ive tried hooking it up like i think it would work, but im just getting a float from the ardunio input.

Thank you!!

You're not really wiring this up like a switch at all, think of it like a sensor. You don't care about the cathode because all you want to sense is the presence or absence of a voltage. The anode just the most convenient place to attach a wire leading to the Arduino.

The high value (=>10K?) pulldown resistor (LED anode to ground) is to keep the input pin from floating and returning random noise. Once the synth lights the LED, it will overpower the resistor, bringing the voltage at the LED up high enough to light the LED and also for the Arduino to sense it.

hmm ok so I hooked up the LED anode to the Arduino input pin and to a 10K resistor that goes to ground.

All I am getting is a 0 on the input pin, regardless of whether the LED is lit or not.

Am I missing something?

Thank youuu so much for helping mee I'm kinda in a bind and gotta get this figured out for an installation!

Please use a multimeter to measure the voltage on the Arduino input pin while the LED is lit by the synth and let us know what it says.

Also, just to double-check, you do have the synth ground (the synth PCB ground, not the wall-plug ground!) and Arduino grounds connected to each other, right?

The voltage between Arduino input pin in and the ground is .394 when the LED is lit. When it isnt lit, it is .412.

I actually didn't have the grounds connected previously. Now they are connected and I am getting a float on the input pin, regardless of whether the led is lit or not.

zumdar:
The voltage between Arduino input pin in and the ground is .394 when the LED is lit. When it isnt lit, it is .412.

Okay, I’m at the limit of my meager EE knowledge then. :frowning: I don’t understand what’s going on here and will have to hope someone else can chime in here and tell us what’s going on.

zumdar:
The voltage between Arduino input pin in and the ground is .394 when the LED is lit. When it isnt lit, it is .412.

I actually didn’t have the grounds connected previously. Now they are connected and I am getting a float on the input pin, regardless of whether the led is lit or not.

You are getting this because you have not wired it up correctly. The voltage across an LED is only in the order of 1.7V or so, this is not enough to trigger an arduino digital input.
There are a few ways the synth could be driving the LED you are assuming just one way, that is not very common either.

Like I said before an opto isolator is best if you do not understand the circuit driving the LED which it looks like you don’t.

aww mannnnnnn, unfortunately I dont have time to order a bunch of opto-isolators before this project needs to be functional (this coming friday!)

Is there any other possible solution for this that would involve common parts?

The synth I am trying to interface is a brand new 2014 Korg Volca, so I'm not surprised that the voltage over that LED is so low, its a very tiny SMT led.. i guess the trend in electronics is smaller packaging and smaller voltages right?

The package of the LED has nothing to do with the voltage across it when it is on.

You need to correctly identify the ground on your synth and connect it to the ground on the arduino. This might not be the ground that the audio has due to a technique called "ground lift resistors". Then you need to identify the voltage that drives the LED. There are many ways to drive an LED. 1) Sourcing current through resistor - common for the arduino but uncommon in industry. 2) Sinking current through resistor - common in industry 3) LED driving through some sort of constant current circuit like in an LED driver chip. 4) Driving through a matrix

Each one needs a different approach to drive an arduino digital input. Trace the circuit in your synth and try and find what sort you have.

Alternately take the voltage across the anode and cathode and identify what end of the LED is common buy using a multimeter when everything is off and common them and connect to the arduino ground. If there is no common connection then you have situation 4 above. The other end of the LED should be connected to one of the analogue inputs and you can measure if it is on or off. If you need more analogue inputs use an analogue multiplexer like the 4051.