Arduino Gurus:
I've got another question. Is the following diagram correct?
Thanks!
George
|
Replies sorted oldest to newest
George: The relay modules come in a variety of operating voltages which correspond to the Vcc and GND inputs shown at the bottom of your picture. There are 5 volt, 12 volt, and some 24 volt modules available. That's the amount of voltage that goes to the coils of the relays. You can tell which one you have by looking at the printing on the relay cubes. You should see something like: SRD-05VDC-SL-C indicating 5 vdc to the coil.
If you are using a 12 volt module, then you can not use 5 volts from the Arduino to power the relays.
The output side (shown at the top of your picture) does not care what voltage it is nor even if it is AC or DC. The outputs do not drive anything on the relay module. They are a switch.
@Consolidated Leo posted:George: The relay modules come in a variety of operating voltages which correspond to the Vcc and GND inputs shown at the bottom of your picture. There are 5 volt, 12 volt, and some 24 volt modules available. That's the amount of voltage that goes to the coils of the relays. You can tell which one you have by looking at the printing on the relay cubes. You should see something like: SRD-05VDC-SL-C indicating 5 vdc to the coil.
If you are using a 12 volt module, then you can not use 5 volts from the Arduino to power the relays.
The output side (shown at the top of your picture) does not care what voltage it is nor even if it is AC or DC. The outputs do not drive anything on the relay module. They are a switch.
"I see", said the blind man. I have been confusing the voltage necessary to drive the relay with the voltage it can handle. The 4-relay board in the photo has the (badly smeared) label "FL-3FF-S-Z" under which it reads "12VDC". I'm guessing that will require 12VDC to operate and thus is not the right choice for the Arduino. I also have an 8-relay module that reads "SRD-12VDC-SL-C". So I think that's incorrect as well.
Thanks Leo! Not good news, but hardly the end of the world.
George
Are there any other characteristics or features that I should specify when shopping for a relay?
I'm thinking I may look at 8-relay or 16-relay breakout boards for my project.
Thanks,
George
George: Yes, you could buy the 5 volt version of the relay module but since you already have a 12 volt supply, you could wire it up like this.
What he said.
@Consolidated Leo posted:...
If you are using a 12 volt module, then you can not use 5 volts from the Arduino to power the relays.
Perhaps semantics, but while you can't use 5V to power the 12V relay module, you can nevertheless control the 12V relay module's on/off triggering with "only" 5V. From a handful of 12V relay modules I've messed with, you can trigger a relay with, say, 3V (or up to 12V). This applies to so-called "HI" level trigger modules where a given relay is OFF if you apply 0V (or don't connect) to the input pin...and then turn the relay ON by applying a high or non-zero voltage. You are not directly driving the relay coil. There's a transistor buffer/amplifier. That's why you don't need a full 12V DC input to control the 12V relay.
@Consolidated Leo posted:George: Yes, you could buy the 5 volt version of the relay module but since you already have a 12 volt supply, you could wire it up like this.
Thanks Leo!
I will give that some thought, but there are some other considerations as well:
This is the board in question:
https://www.amazon.com/Channel...Inputs/dp/B07WYPLJBH
Any thoughts as to its suitability? (or not)?
Thanks,
George
George: Sixteen relays will work just fine with the Arduino. It actually helps to use an external power supply for the relay module(s) as that will not interfere with the power requirements of the microcontroller. There is some question about how much current you will need from the 12-volt supply but there are easy ways to solve that should it become an issue.
There is no downside to using the same 12-volt supply to power the relay module and the circuit that it controls as far as I can tell. They are independent circuits.
Stan is correct about using 12 volts to power the relay modules but then using the 5 volt outputs from the Arduino to control them.
Space saving being important in this application, I would prefer using a set of 4 channel relay modules that have the jumpers that allow you to choose between a high or low level trigger. With the low level trigger, you will be tasking the Arduino to use up some of its limited amperage to keep the relays inactive.
I don't know that I have run across any 16 channel relay modules that provide the hi/low trigger option. But there are some 4 channel ones that provide that capability. There are other reasons to use a set of relay modules rather than one big one but its your choice.
@stan2004 posted:What he said.
Perhaps semantics, but while you can't use 5V to power the 12V relay module, you can nevertheless control the 12V relay module's on/off triggering with "only" 5V. From a handful of 12V relay modules I've messed with, you can trigger a relay with, say, 3V (or up to 12V). This applies to so-called "HI" level trigger modules where a given relay is OFF if you apply 0V (or don't connect) to the input pin...and then turn the relay ON by applying a high or non-zero voltage. You are not directly driving the relay coil. There's a transistor buffer/amplifier. That's why you don't need a full 12V DC input to control the 12V relay.
OK, now I am a bit confused (that happens pretty easily in this arena).
Question 1: If I am going to use the Arduino MEGA 2560 to control my relays, is it best to HI level trigger modules or LO level trigger modules? And should they be 4-relay boards? Or will 8-relay boards be OK (assuming they have H/L capability)?
Question 2: I have at my disposal a standalone regulated 5VDC power supply that I could squeeze into the model to power the relays. Is that a better solution? And if so, what does changes are required to Leo's drawing (I think I know, but would like confirmation, please).
One strike against suing my 12VDC power supply for the relays is that it might be somewhat busy (not horribly, but...). Here's what it's powering:
Thanks,
George
George: The other reason to use multiple relay modules rather than one big one has to do with anticipating failures. When things break, you want to replace only what you have to. You've got more options when things are not so tied together. But again, it's your choice.
As to question 1, the Arduino MEGA has a limited amount of current that goes out on a given GPIO pin (I've seen 40ma max). But the total output for all the pins is something less (about 200ma total). So, driving the relay module inputs at a HIGH level just to keep them turned off may be tempting fate. I would recommend using the HIGH level trigger to activate the relays. Better to save power for the other things that you will be connecting to the processor.
For question 2, It really doesn't matter how you decide to power the relay modules except that you want to buy the ones that match the chosen voltage. If you were to use 5 volt module(s), then they could be wired as shown previously but you would cut out the 12 volt dc circuit to control the LED. That is, the 5 volt power supply would go to VCC and GND on the relay module. And the GND also connects to the Arduino ground.
Next, does your 12 VDC power supply have a known amperage rating? I would guess that with all of the things that you've listed in full operation, we're looking at something below 2-3 amps. Earlier I mentioned that this has a simple solution which is that you may need a heftier power supply. But I'd cross that bridge when we get there.
Man, George, are you sure you want to do all this right off the bat? How about a nice blinking LED project first?
Blinking LED? Been there, done that as well as most of the starter lessons in kits.
I have a piece of code running that reads 3 potentiometers. Time to up my game! 😉
George
George: Here's some encouragement for your project:
@Consolidated Leo posted:George: Here's some encouragement for your project:
Leo, many thanks for posting this. I had seen it many weeks ago, but didn't have enough perspective to fully appreciate it. It's significant in that it:
By the way, to answer your question about the 12VDC supply, my Mean Well LRS-150-12 is rated at 12.5 amps. The HarborModels 12V smoke unit consumes 2.5 amps at speed. All the LEDs together probably don't consume more that 500 mA. The two Seuthe No. 7 smoke units take 140 mA each. I'm not sure what each of the two MTH AA0000011 smoke units require (anyone know?), but I think I'm still under that limit.
Anyway, thanks again! That really was valuable.
George
Access to this requires an OGR Forum Supporting Membership