Must-haves for EASY DIY controller?

I hope you know that, technically, you're more qualified to solve this problem than any of us are. :D

We need some specs or documentation before we can really help. Do you have a link to a product page or datasheet?

The MCP23008 relay breakout board will probably work but it's hard to say for sure without some more information. Or if you really did want to use GPIO pins from the Arduino itself (might seem like the simplest option but IMHO isn't always the best) then you probably need a way to get the Arduino to switch a 12v signal, so you'd likely need a 12v source and a transistor driven by the Arduino's output pin.


LOL, Technically perhaps, the course I am taking is just a 2 year program and only really covers the basics. This semester was my class was split up into mechanical and electrical emphasis. I am in the mechanical group so I don't get to learn all the fun technical stuff, I just know enough to be a little dangerous I guess.


Here is a link to the SR-8 relay pack:
http://www.chauvetlighting.com/relay-pack.html

The pinout to control the relays is here in this thread somewhere.

I may just go with the transistors for now as I really just need it to function so I can begin to write my code.

Thanks for the help and suggestions.
 
I guess the part I am still struggling with is the (registers, value) part. Though I understand the hardware aspect of externally biasing the relay pins, I dont understand the software aspect. ex: if I were to put all 3 address pins to ground, what would I put in that part of the code?

Thanks again for your awesome help!

The last three bits of the device address reflect the state of the address pin. If you tie an address pin low, use a zero in that pin's bit. If you tie a pin high, use a one. For instance, if you tie all three to ground, the address would be 0100000.
 
That part I understand, for example I have one wired to be 0100111 and the other wired to be 0100000. I just dont understand how to enter that in my code properly.
 
That part I understand, for example I have one wired to be 0100111 and the other wired to be 0100000. I just dont understand how to enter that in my code properly.
Add a 'B' in front of it or convert it to Hex:
Binary........Hex
0100111 = 0x27
0100000 = 0x20

For 0100111:
MCP23XX relayset_1 = MCP23XX(B0100111);
or
MCP23XX relayset_1 = MCP23XX(0x27);

For 0100000:
MCP23XX relayset_2 = MCP23XX(B0100000);
or
MCP23XX relayset_2 = MCP23XX(0x20);
 
Is there a reason why people are not just using a 5v relay board to run their outlets?

Usually beefy relays need 12V. Most 5V relays don't work with higher currents or are very expensive. At least that was the case when I was looking into it.
 
Every single one of the "integrated" solutions I know of, where there are relays already wired to 120v AC outlets, are 12v. So unless you're rolling your own there isn't much choice.

At any rate I don't like the idea of running something as noisy/beefy as a relay directly off an AVR's pins anyways - and if you're going to be putting an interface in between, you don't really care if the voltage is different.
 
If:

1) it can switch your intended load (I would derate by 50%)
2) it won't hurt the Arduino (current draw to switch an individual relay is appropriately low, has diode across coil)
3) it's total current draw is low enough to not overload the 5v reg on your Arduino
4) it's easy to wire to whatever you're switching

then go for it.

Keep in mind that 120v AC is nothing to be fiddled with. The "integrated" solutions are nice because they provide a certain level of safety by having everything all pre-built in a safe box on the AC side.
 
Thanks again for all of the help! Let me know what I am missing here, I am just trying to make a relay blink on and off at the moment.

Thanks!

Code:
#include <I2CRelay.h>
#include <Wire.h>
#include <mcp23xx.h>

MCP23XX relayset_1 = MCP23XX(B0100000);


void setup ()
{

}

void loop ()
{
  relayset_1.enable(1);
  delay(1000);
  relayset_1.disable(1);
  delay(1000);
}
 
Does that even compile? The MCP23XX class doesn't have enable/disable methods... You need to call .set(registers,state) as I said few posts back. These two should turn on/off all your relays:

relayset_1.set(MCP_REG_GPIO, B11111111);
delay(1000);
relayset_1.set(MCP_REG_GPIO, B00000000);
delay(1000);
 
No, it didnt compile before, I was just referencing to the code you posted before. If I wanted to tell one particular relay to turn on or off, how would I modify this? In my current code I have some if statements that use "digitalWrite(relay, value)"
 
I understand the level of the binary in the last statement, where my confusion was with that method, was whether it would interfere with standing commands

so lets say that one if statement is met to turn on relay 0
"relayset_1.set(MCP_REG_GPIO, B10000000);"

but then another if statement is met to turn on relay 7
relayset_1.set(MCP_REG_GPIO, B00000001);

will both relays stay active in that instance? or will the second cancel out the first?
 
are there any ready built "integrated" solutions you could list as a reference or example

The Chauvet product linked higher up this page is a typical example. They're made as expansions for DJ lighting systems, and are basically a bunch of relays in a box with 120v AC outlets all wired up and ready to go, with a DIN or other standard plug to provide a control signal. Pinouts vary from device to device but typically you provide 12v, gnd, and an on/off signal for each relay.
 
Back
Top