Go Down

Topic: Relay with external power? (Read 1 time) previous topic - next topic

PaulS

A 15 pack of transistors at Radio Shack is $2.99. If you've got money to throw away, throw some my way, eh?

The next thing you'll want to do is PWM some of the lights, and the relays can't be PWMed. Transistors can.

silasmoeckel


Thanks for all your input guys.  I think I have settled on this item as it can also provide power to the Uno itself with a 5v rail:
http://www.sainsmart.com/16-channel-5v-relay-module-for-pic-arm-avr-dsp-arduino-msp430-ttl-logic.html

Seems simple enough.


That still requires 16 pins to run and it's fairly big and heavy.  There are plenty of methods to run a pile of LEDs that are a lot less complicated, cheaper etc.  I would go with a i2c LED controller it's easy to get 100's of LED's off of 2 Arduino pins and generally only needs a pair of resistors for the i2c buss.  The cheapest is a pack of transistors one per pin, connect between the LED's and the +5v rail.

Xpendable

#7
May 01, 2012, 10:14 pm Last Edit: May 01, 2012, 10:19 pm by Xpendable Reason: 1

Thanks for all your input guys.  I think I have settled on this item as it can also provide power to the Uno itself with a 5v rail:
http://www.sainsmart.com/16-channel-5v-relay-module-for-pic-arm-avr-dsp-arduino-msp430-ttl-logic.html

Seems simple enough.

Hey, just wanted to let you know I've already experimented with the 8-relay Sainsmart 5V relay board.  They work REALLY well.  I'm going to be using the 4 relay version for a commercial project.  Note that you need a pin for each relay.  So if you're using the 16 relay board, you're going to have to use a shift register or multiplexor or two in order to access all the relays from the Arduino Uno.  Also be aware that by for these relay boards HIGH = relay off, LOW = relay on.

Here's a video of mine running my test program on the Arduino:
http://www.youtube.com/watch?v=FqPvaRy6muI&list=UUhZhC5aF2FjxXKp8dGGZCGg&index=2&feature=plcp

Here's another tip... don't use pins 0 and 1 (the RX and TX) for one of the relays... When you upload a program to the Arduino you'll cause that relay to switch WAY fast.  Will probably shorten the life the relay.  I accidentally did this because I wasn't thinking.  I gotta stop prototyping in the middle of the night!
Creator of the MonsterShield
http://www.hauntsoft.com

SirNickity

Relays are really a waste for this.  Slow, mechanical, clicky, power-hungry...  Transistors do the same thing, cheaper, more reliable (no moving parts), and with less energy waste.

A simple N-channel FET would be ideal.  V+ to LED+, LED- to appropriate resistor, resistor to FET drain, FET source to Gnd.  Finally, FET gate to digital pin of your choice.  Provided the digital pin outputs enough voltage (threshold is usually 2-4v) over the FET source voltage (Gnd), the transistor turns on, current flows through the LED.  Easy as pie.

Only reason someone would choose to use relays in this case is that they're not comfortable with transistors.  Expand your horizons!! :-)

majhi

Sorry for the late response, had to get through finals before I could come back to thinking about this.  Okay, so I'm going to try to follow SirNickity's response and expand my horizons.  Google is not providing me with much luck, so if someone could point me in the right direction, that would be much appreciated.  I need to build something that will run off the Arduino's I/O ports with at least 10 separate channels.  To restate OP, I'm trying to make a portable, music-synced light show.

I must admit, this feels awfully over my head...

Go Up