Relay Wiring and LED

Started by Dylfish, November 19, 2013, 08:55:21 AM

Previous topic - Next topic

Dylfish

Hey Guys,

I've jumped head first into messing with my 2 favorite things (my arduino and my guitar) and i've decided to make a primitive programmable foot switch for my FX pedals.

I have never used relays before but I think i have the general idea. I was wondering if anyone could confirm if this would be correct for a simple bypass system (Obviously for one pedal and without the npn to drive the thing).



Also I'm tossing up on whether to use latching or non latching relays. Using a DPDT relay is is possible to use an LED indicator wired up this way? and if so would it have to be non latching?

Cheers!

Seljer

#1
Yep, thats fine.

With normal relays, you can just wire the LED in parallel with the coil. Or run it from the logic signal itself as LEDs usually consume less current than the relay coil.

Don't forget the reverse snubber diode to not kill the NPN transistor when switching it off. If you will have a lot of relays the cheapest and simple way is to use an IC with a bunch driver transistors inside (something like the ULN2803)

Latching relays use less current as you only need a short pulse to switch the state and in then stays that way, but this requires more circuitry to drive them. They might be a sensible option if you have something battery powered and need to save power.

Heres the nice article on relays from geofex to get you started http://www.geofex.com/article_folders/relays/relays_for_switching_audio_signa.htm
and the remote-effect-switcher project which also has some design guideline outlined http://www.geofex.com/article_folders/rmtswtch/rmtsw.htm

Dylfish

Cool, thanks!

so far I'm thinking something along these lines (but more)



Stupid question, but the transistor is just a common emitter as a switch, and soon as there is current on the base it allows current to flow and applies voltage to the relay? or am i wrong? :)

Thanks!

Seljer

#3
The way you wired the LEDs they'd always be shining and burn out without a resistor to limit the current. The LED+resistor should go between the 9V line and the transistor's collector.

And speaking of 9V, that means you're going to have to purchase 9v relays, which can be found but are not as common as 5V or 12V relays so pay attention to what you order.

And yes, thats precisely what the transitors are doing. Your Arduino's digital outputs are only 5v and have limited current capacity (I believe the Atmel datasheets say 40mA which is what your typical relay coil requires, so you'd be on the very limit if you were to drive the relays directly)

samhay

^The LED+resistor should go between the 9V line and the transistor's collector.
Or connect the LED to the uC's output pin via a limiting resistor.
I'm a refugee of the great dropbox purge of '17.
Project details (schematics, layouts, etc) are slowly being added here: http://samdump.wordpress.com