Okay, so I got a chance to work on this a little while I'm waiting for stuff I ordered...
I soldered a 220 ohm resister to each positive lead of 4 Red LEDs (actually five, but I'm not working with the other yet)...
I tied all the negative leads together as a common to the ground on the Arduino Mega...
I also wired an individual wire to each of the 4 momentary switches, and tied all the other sides of each switch together as a common..
I tested all four LED's by connecting them one at a time to pin 13 on the Arduino without any program running (the base state with pin 13 blinking), and connected the common to ground.. All looks good and working..
The first part of this project that I plan to get working is these 4 switches and 4 LED's then to add in the relays afterwards and finally to wire up all the audio jacks to the relays add in a delay during state switching using a couple IC relays (they will be the mute switch for the entire pedal board)...
The idea is to have all 4 switches pull an input low that results in pulling a corresponding output high.. This will control the LED/Relay.. pushing the switch again, will pull the output low.. Back and forth with each push of the button.. push=relay on, push=relay off, push=relay on, push=relay off, etc.
According to the SPEC SHEET, the relay input draws 0.4mA @ 5v... )notice that it already has decoupling diodes across the relay coil)
1st QUESTION: Can I control both the relay and the LED from the same output? (connection to each output would be one LED via 220 ohm relay and connection to the relay via an internal voltage divider that draws 0.4mA @ 5v)?
2nd QUESTION: Each momentary switch is to be connected to a digital input on the Arduino Mega... the other side of each switch is tied to a common that is connected to the ground on the Arduino Mega... Do I need to put some sort of load to limit current between the ground and the digital input pin on the Arduino? If so, what size resister? Can I put it on the common, or should I add one to each switch leg (only one switch is to be pushed at a time)? What is common/best practice for using momentary switches on Arduino inputs?
BONUS QUESTION: I also need to use a RGB LED.. Do I solder a 220 ohm resistor to each of the three color leads, or is just connecting a single 220 ohm resistor to the RGB LED 'common' okay?
Below is a picture of the relay board that will be controlled by the Arduino outputs, as well as a link to it on Amazon (for more info)
The next phase after this is to get basic MIDI functionality and the ability to use up, down, and select switches to scroll through hard programmed MIDI patches and select them..
After that the fun begins (a user programmable UI :o)
Thanks!
Mark
ELECTRONICS-SALON Four DPDT Signal Relay Module Board, 5V version.