[Solved] Arduino + 8 channel relay.

Hi friends, i have 5V 8 Channel Relay with the Mega 2560.

I plan to use 4 or 5 channel first.

I can control the one channel with a resistor, diode, transistor etc.

Do i have to use multiple resistor, diode, transistor etc. to be able to work with multiple channels or is there any shorter way to do this?

Thank you

We need to know what relay(s) you are using. For example if you are using mechanical relays with 12V coils, yes, you will need the 3 components for each relay coil (or an equivalent driver circuit).

A solid state relay won't require any additional components. (But, you'll need the right SSR for your application).

Some low-current 5V relays can be driven directly from the Arduino and you'd only need the protection diode.

This one http://www.aliexpress.com/item/New-5V-8-Channel-Relay-Module-Board-for-Arduino-PIC-AVR-MCU-DSP-ARM-Electronic-11121/663483123.html

That relay module, has all the electronics built onto the board.
All you need to do is to hook the each input pin that you want to use, to a data pin.

The specs mention

Each one needs 15-20mA Driver Current

, but that is not the input pins.
They are referring as to how much current the board power supply will require, for each relay activated. So if you had just one relay activated (20ma) . If you had all 8 relays activated (20X8= 160ma) power supply load.

So, you say i don't need any resistor, transistor or diode?

I can connect digital output to relay directly?

There is a big difference in driving a relay (coil) needing pretty much current, and sending a signal to the control circuit that controls the relay.

You can just hook one of the digital outputs from the arduino, to one of the input pins on that board. In1 in2 ... in8.

You will of course need to provide a power supply to that board (gnd and vcc).
Also connect the ground from your arduino to the ground on that board (common grounds).

Great. Thank you jackwp.

I know about the power supply needs. Thank you again.