Resistor for each LED or one for many (for MIDI controller/looper)?

What is a good general purpose diode to use in these projects? Gonna order some..

Or should I just get one of those diode assortments off of eBay or Amazon?

I have several projects I want to use the Arduino for besides this one (but this one is by far the most complex, I think), so buying all this stuff is not overkill for me..

What is a good general purpose diode to use in these projects?

A good general purpose diode is the 1N4001, it is rated at 1A.

Grumpy_Mike:
A good general purpose diode is the 1N4001, it is rated at 1A.

Thanks!
Mark

MountainCraft:
Can the full 3A of the power adapter be fed into the system via this port? Or is it fused at 500ma too?

That would very much depend on the adapter. Three Amps on a breadboard is - as Mike will tell you - not a good idea anyway.


OK, I just dug out this adapter that I purchased recently (and why did I do that since I don't really use them? Because someone was discussing them on the forum!).

As you see, it has a polyfuse - apparently rated at 500 mA - in series with the USB input. Another one I grabbed has a gold "506Y" polyfuse which I believe is the same as on a genuine UNO.

MountainCraft:
If not, is there a female USB receptacle available anywhere that is prewired (has a pigtail coming out)? Having trouble finding that..

Pigtail - no, but adapters, no problem. :grinning:

Paul__B:
Pigtail - no, but adapters, no problem. :grinning:

Ooooo! Perfect! Thanks!

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.

connection to the relay via an internal voltage divider that draws 0.4mA @ 5v

You sure of that? Never come across an internal voltage divider in a relay control, current looks way too low.

Do I need to put some sort of load to limit current between the ground and the digital input pin on the Arduino?

No.

Do I solder a 220 ohm resistor to each of the three color leads,

Yes. Soldering just one resistor to the common will result in lights not working when more than one is turned on. The red LED being on will prevent the other two colours being on at the same time because not enough voltage will be left when the red LED is on.

Grumpy_Mike:
You sure of that? Never come across an internal voltage divider in a relay control, current looks way too low.

Pretty sure that's what I'm seeing, but hell no, I ain't sure of anything, except maybe that I woke up this morning (maybe)! :slight_smile:

Here's the

SPEC SHEET/SCHEMATIC..

You tell me, because I could easily be wrong..

Thanks
Mark

I see a 10k series resistor, with a 100k resistor to ground.
Not really a divider, because the 100k resistor is connected across BE junction of a darlington.
It is acting as 'bleed resistor', to keep the high gain darlington off when nothing is connected to the input.
The bleed resistor only uses 1.3volt(BE junction)/100k = 13uA.
Pin current (5volt Arduino) is (5-1.3)/10k= 370uA.
Leo..

Wawa:
I see a 10k series resistor, with a 100k resistor to ground.
Not really a divider, because the 100k resistor is connected across BE junction of a darlington.
It is acting as 'bleed resistor', to keep the high gain darlington off when nothing is connected to the input.
The bleed resistor only uses 1.3volt(BE junction)/100k = 13uA.
Pin current (5volt Arduino) is (5-1.3)/10k= 370uA.
Leo..

So does that mean I can tie a digital output of the Arduino Mega to both the relay input, and my LED (which has a 220 ohm resistor in series with it)? I'd really rather not waste a second Digital Output to operate them separately, when both will always be on at the same time, and off at the same time...

Not a problem to connect multiple things to a Mega output pin, as long as max current is less than ~20mA.
A LED/220ohm could draw 15mA.
LED and one relay input is 15.4mA total, so safe.

If you use the LED/resistor between pin and ground, then the LED is on when the relay is on.
If you want the opposite, then connect your LED between VCC and pin.
Leo..

Wawa:
Not a problem to connect multiple things to a Mega output pin, as long as max current is less than ~20mA.
A LED/220ohm could draw 15mA.
LED and one relay input is 15.4mA total, so safe.

If you use the LED/resistor between pin and ground, then the LED is on when the relay is on.
If you want the opposite, then connect your LED between VCC and pin.
Leo..

Cool.. This is what I'm trying to do (just to be clear)

Thanks,
Mark

Fine.
The led symbol should also have something like a zig zag line with an arrow at the end to distinguish it from a diode.

Grumpy_Mike:
Fine.
The led symbol should also have something like a zig zag line with an arrow at the end to distinguish it from a diode.

yeah, I know.. But the old version of IE I'm using on the even older computer I'm using was making it a PITA..

So I just wrote "LED" to try and make it understandable.. I was trying to put two arrows next to it at a 45 degree angle, but things were not cooperating.. so "LED" it is..

Should probably go ahead and work through it.. At leas then I'll have it for copy and paste purposes in the future...

OK that is the main reason we discourage the use of schematic packages and encourage the use of pencil and paper for schematics.

Hey Mike..

Ordered your book yesterday from Amazon.. Read some of the excerpts and table of contents, and I'm really looking forward to it.. Knowledge is power... :wink:

Ordered parts are trickling in, and making slow progress on the hardware side of things as I get time and parts..

Soon as I have the very basics operating, I'll start a new thread in the proper (audio/midi) forum and stay with that one till completion...

In the mean time, if I have anymore hardware oriented questions, this is where I'll do it.. 8)