Arduino Mega 2560 and 8 Channel relay module

Hello,

I know this has been asked before but I am struggling with the hardware setup for my project. I have an Arduino Mega 2650 and an 8 Channel relay Board. Specifically this one

https://www.aliexpress.com/item/1PCS-LOT-5V-8-Channel-Relay-Module-Board-for-Arduino-PIC-AVR-MCU-DSP-ARM-Electronic/32655768069.html

I want to use the Arduino to control 3 12VDC peristaltic pumps and 2 120VAC 300 watt heaters for an aquarium. If I recall correctly the max current draw on the Arduino pins is 40. According to the datasheet for the relay JQS-3FF-S-Z; to pull the coil in using 5V with a resistance of 70x(1+-10%) leads to to a current draw of 64ma per relay. Obviously, this is above the 20-40 the Arduino can supply.

I have been reading about using a transistor and a diode to trigger the relay. However, I have no idea as to what one I need.

Would it be any easier or reliable to purchase a relay module specifically designed for use on the Arduino,; ones with less then 40ma coil current?

Thank you.

These boards have transistors to pick the relays.

|500x500

.

|500x275

|500x157

.

larryd: |500x275

|500x157

.

Wow, thanks for the quick reply. Ha! So my relay board can be driven directly from the Arduino pins. Where did you get that picture from? I couldn't find anything with that level of detail. I guess that's a problems when you order stuff from China, no documentation.

Thank you.

Hi, As Larry showed, that relay board has both optical isolators and built-in transistors to drive the relays. More information ON This Page

DISCLAIMER: Mentioned stuff from my own shop...

BUT you will need a separate 5V power supply to run the relay board. 5V 1Amp should be enough. Larry's diagram should help. Many people have used these successfully.

You will also obviously have a separate 12V power supply for your pumps.

Maybe read up on Arduino controlling Power HERE

And here's a page about thinking through your overall design...

joebob296: Hello,

I know this has been asked before but

You really should have stopped right there. How do you know it has been asked before? Have you seen all of those threads that would give you your answer? Or is that a lazy excuse on an assumption?

It says right there in your link 'for Arduino'. You will not find a relay module with <40mA coils. If they existed, they would probably be a whole lot more common. Just think about it.

Electromechanical relays need power. You need to give it to them. There's no way around it.

Thank you for all the information, I have alot a reading to do. I read the first link you posted and I cannot guarantee that multiple pumps will not turn on at once. The pumps will trigger based on time, but the heaters will be dependent on temperature. So as you stated, I will need another power supply for the board, pumps, and heaters.

However, I am confused on one part of Larrys pictures. The top one shows there is a 12V power supply, while the bottom picture shows a 5V power supply.

If I understand it correctly the board will work with either 12V or 5V. To make things simpler I could use a 12V power supply large enough to power both the board and the pumps at the same time.

Terry’s summary page is great.

This is drawn with one of the many schematic drawing programs available.

‘Eagle’ is very popular.

8 Relay PCB.jpg

Edit:

Some 8 channel relay PCBs are 5 volts some are 12V

Look at the voltage found on the top of the relay.

INTP: You really should have stopped right there. How do you know it has been asked before? Have you seen all of those threads that would give you your answer? Or is that a lazy excuse on an assumption?

I did search quite a bit actually. Have I read all of them? No. Have I read a lot of them? Yes.

INTP: It says right there in your link 'for Arduino'. You will not find a relay module with <40mA coils. If they existed, they would probably be a whole lot more common. Just think about it.

And I did find relays modules that specify that they only need 15-20ma to drive the relay. Which the Arduino can do. For example this one.

https://www.sainsmart.com/8-channel-dc-5v-relay-module-for-arduino-pic-arm-dsp-avr-msp430-ttl-logic.html

Electromechanical relays need power. You need to give it to them. There's no way around it.

[/quote]

My problem is that I did not have any documentation stating coil current draw of my particular relay module, so I referred to the datasheet and found that the relay takes to much current to drive from the arduino pins directly. Next, I tried to figure out if my relay module had a transistor built in, which from the above responses, it does. Once again, my problem was lack of documentation, not lack of trying.

joebob296: I want to use the Arduino to power 3 12VDC peristaltic pumps and 2 120VAC 300 watt heaters for an aquarium.

Could have been easier with three mosfets and a 2-channel SSR relay board. No relay supply needed for that. Leo..

OptoRelay4X_Wiring.png

.

joebob296:
And I did find relays modules that specify that they only need 15-20ma to drive the relay. Which the Arduino can do. For example this one.

https://www.sainsmart.com/8-channel-dc-5v-relay-module-for-arduino-pic-arm-dsp-avr-msp430-ttl-logic.html

That’s signal current. That’s completely separate from coil current.

An Arduino can basically turn on any device imaginable with a 15-20mA signal. It’s like how you only need to press a little bit on a gas pedal to move a whole car. Your foot is just a signal. Power to actually do the work come from elsewhere.

INTP: That's signal current. That's completely separate from coil current.

An Arduino can basically turn on any device imaginable with a 15-20mA signal. It's like how you only need to press a little bit on a gas pedal to move a whole car. Your foot is just a signal. Power to actually do the work come from elsewhere.

That much I understand. I said "If I recall correctly the max current draw on the Arduino pins is 40. According to the datasheet for the relay JQS-3FF-S-Z; to pull the coil in using 5V with a resistance of 70x(1+-10%) leads to to a current draw of 64ma per relay. Obviously, this is above the 20-40 the Arduino can supply.

I have been reading about using a transistor and a diode to trigger the relay."

However, after rereading my initial post I can see where my wording was incorrect. Here "I want to use the Arduino to power 3 12VDC peristaltic pumps and 2 120VAC 300 watt heaters for an aquarium." I should have used the word control instead of power.

Sorry for the confusion in my post, I will edit it and try to be more clear next time.

The relay module you linked to in post#0 draws 2mA signal current per pin/relay. About 75mA coil current per relay has to come from the separate 5volt/1Amp power supply connected to that relay board.

Switch the peristaltic pumps with transistor (not relays). Use the relays for mains power (heaters). Leo..

Wawa: Switch the peristaltic pumps with transistor (not relays). Use the relays for mains power (heaters). Leo..

So I could use a TIP120 and a 1N4001 Diode?

joebob296: So I could use a TIP120 and a 1N4001 Diode?

Up to you to use a relay or a transistor to switch the 12volt pumps. A relay module needs a second 5volt supply that has to run 24/7. And the coils use ~75mA each when active. A TIP120 with 1k base resistor just uses ~3mA signal current from the Arduino. A logic level mosfet uses 0mA signal current.

Always make a test setup before you build. Leo..

Wawa: Up to you to use a relay or a transistor to switch the 12volt pumps. A relay module needs a second 5volt supply that has to run 24/7. And the coils use ~75mA each when active. A TIP120 with 1k base resistor just uses ~3mA signal current from the Arduino. A logic level mosfet uses 0mA signal current.

Always make a test setup before you build. Leo..

Of course, I got the necessary parts on order to build this setup on a breadboard. I have never used a transistor before so I would like to try them. At the cost of the parts, I don't mind spending money to change my setup.

How did your project go? I'm curious because I'm starting a project and I know far less than you apparently do.