Newbie question on Relays

Be gentile and specific with replys as I am clearly a novice.

Question is what Relay to select for a Photon (wifi) triggered application?

Relay and Photon device will go in a Pool control box in back yard (50 ft from house). My plan is to use the Relay/Photon to turn on/off one device for sure (yard lights) and possibly two other devices if it doesn't complicate matters (pool lights would be disired second device if possible) and the third device again if possible is a pool pump for a waterfall feature.

I want to use the Photon because of the voice control via Amazon echo device

Thanks in advance for suggestions

Jon

T

Hi Jon,

The first thing I would do in your shoes is take your smartphone to the location where you plan to install the board and check to make sure you have a good connection to your WiFi network.  This is absolutely vital before proceeding.  If your smartphone has a good connection to the WiFI network then the Photon module should not have any problem.

Controlling relays on our relay controller through a Photon is really simple.  The first thing I recommend if you are just starting off is to put our firmware into the controller.  Setting up the Photon module and flashing our firmware into the controller is covered completely in this video(it looks really long but it is an interactive video so you will click buttons in the video to skip around for your particular setup):

https://www.youtube.com/watch?v=keYHz__MTME

It sounds like you need 4 relays.  I would recommend a controller with 10 amp relays like this one:

https://www.controleverything.com/content/Relay-Controller?sku=MCP23008_SCIO4R4G5LE_10A

Don't worry.  You can always add more relays using the I2C port as your application and knowledge grows.  You can build a huge system just starting with this 4 channel relay controller.  When you purchase that controller you will have the option to purchase a 12VDC power supply that plugs into a standard outlet as well as a Photon module, I highly recommend both of those.

Once you have the controller, get it configured for your WiFi network and flashed with our firmware(all covered in that video above) you are ready to start turning stuff on and off with your echo.  I did a small instructables post about this already which I used to open a garage door.  What you are doing is extremely similar so you should be able to adapt it for your application:

http://www.instructables.com/id/Amazon-Echo-Activated-Garage-Door/

If you have any questions at all let us know.  We are all always happy to help.

J

Thx Travis, just a couple of follow-up questions:

1) totally agree I need to check the wifi network reception capability for my planned relay location and using my phone / tablet is an easy method. If I find that I have a weak signal is it possible to add an antenna for the Photon module? Thought I saw that somewhere

2) the youtube video for setting up the Photon module is excellent and I think I can handle that part thanks to the video. Also the video on the garage door project was excellent as well.

3) Regarding the Relay I was thinking this one would work, https://www.controleverything.com/content/Relay-Controller?sku=MCP23008_SCIO6R2G5LE_10A since the two primary connections I want to control our light switches. The third device is actually a pool pump which I think might require a more "heavy duty" relay and maybe is better for a "phase 2" effort on my part. Thoughts?

Thanks for the advise and I look forward to completing this little project and posting here about my experience

 

T

Hi Jonny,

1.  Yes, you can add an external antenna to the Photon module.  We carry them but not sure if they are optional when ordering or not.  If not I can get one thrown into your order when you place one.  We also have some long cables that allow you to mount the antenna on a pole or on the roof of a building.  If you are interested in that longer cable please let me know, I may be able to get them added to ControlEverything for purchase.  They are quite cheap.

2.  I am glad the videos were helpful.  The intention of those videos is to make you feel confident in taking this on.  The controller's may seem a bit scary at first if you have never done this before but I assure you they are very simple devices and very easy to use.

3.  Honestly the 4 relay controller is not that much more expensive and would give you two additional relays which I assure you, you will find uses for :)  What I generally recommend when controlling a large external load like a large pump or motor is to drive a larger external relay with a small relay on our board.  This is generally cheaper, also if the pump causes damage to the relay you are not replacing our relay controller which as expensive components on it but rather an external relay which you can probably run out and get on short notice if needed.  This is a very common practice in this type of application.  This is all however completely up to you.  You could start with the 2 relay board as you suggested and then add a large relay expansion board like this one in the future when you are ready to take on the pump:

https://www.controleverything.com/content/Relay-Controller?sku=MCP23008_I2CIO7R130

This board would simply connect to the I2C port on the MCP23008_SCIO6R2G5LE_10A controller you are looking at.

If you have any other questions please let us know.

Thank you Jonny,

Travis Elliott

J

Travis you're awesome! Ok time to fine tune my order / project plan.

1) I tested the wifi signal strength with my phone and a Wifi Analyzer app. Looks to be about -65 dBm where I will locate my relay (which seems good enough?). However the relay will end up in a mettle control box that has some space and the existing wires. Once the Photon is in the mettle control box I am guessing I will lose the wifi strength. Bottom line I think I'll need to utilize an external antenna that I can mount to the outside of the control box wired to the Photon in the box

2) I am still a bit confused on the Relay(s) to get. I understand your point about the larger external relay for the pump motor on/off, that make sense to me to get the https://www.controleverything.com/content/Relay-Controller?sku=MCP23008_I2CIO7R130

The Relay part that has me confused is the difference between "6 Programmable Digital I/O" and "the two controlled relays" on this is one which I'll call my Primary relay that will have the Photon module the  https://www.controleverything.com/content/Relay-Controller?sku=MCP23008_SCIO6R2G5LE_10A

I am probably mixing apples and oranges but if I have the larger external relay does that have to connect to a relay on my Primary or can that connect to one of the 6 programmable Digitial I/O's ? I am guessing the 4 relay controller you recommended is probably the "cleaner" way to go and maybe my question about the Digital I/O's was actually dumb and not an option

3) Lastly, I'll have to splice the existing wires and connect up to the Relays. Do you guys sell the wire with connectors for the relays? 

Since I am so new at this I am leaning towards just doing the 2 Relays for the lights and waiting on the pump Relay to see how it goes. Regardless I'll make a video to post. How can I get in touch with you directly to make sure I place the order correctly?

Thx

T

Hi Jonny,

1.  Yes, you will want the external antenna to mount on the outside of the box.  It will include a short pigtail wire that snaps onto the photon, the antenna screws onto the other end of the pigtail wire which is about 4" long or so.  If you drill a 1/4" hole in the metal box you can stick the pigtail antenna connector bulk head through that wire and use the included nut to secure it in place.  It is really pretty self explanitory when you have the stuff in front of you.  When you place the order shoot me a message with the order number and I will make sure the external antenna is included in the shipment.

2.  The digital IOs on the board are really not suitable for driving an external relay directly.  You would have to run the digital output from the board to a 5VDC driven transistor and then drive the relay off of that transistor.  This is exactly how those digital lines are used to operate the relays on our controller.  It is way simpler and cleaner if you just use the relays on our board to drive larger external relays.

3.  The 10 amp relays on the board you have picked out have screw terminals for connecting to the relays.  You can use up to a 12 ga wire in those terminals so you do not need connectors/adapters or anything like that.  Now the 30 amp relay expansion board I sent the link to has 1/4" spade terminals in the top of it.  We do not carry the 1/4" female connectors to connect to those spades but you can pick them up at any home store or automotive store.

You can send me an email to travis@controlanything.com  If you place everything in your cart and then shoot me an email I can take a look at your cart to make sure you have everything you need.

Thank you Jonny,

Travis Elliott

J

i have 4 relay board with electron how are the pins assigned from the electron to the relays?

B

it usages I2C communications. Relay board has a MCP23008 IO chip on it.

 

J

so you cant control the relays that are on the board the photon is plugged into ?

B

YES, you can. all you ned to do is use ncd realy control lib. 

You will send I2C commnands to control relays.

https://github.com/ControlEverythingCom/NCD4Relay

 

 

J

i am trying it with blynk is there a way to do that ?

B

at this point we dont have any blynk app, but we are working on it and soon will have a solution.

 

J

ok so what would be the fastest way to toggle relays i see ncd4ch sets it all up how can i send a test command to fire relays ?

B

 

#include "NCD4Relay/NCD4Relay.h"
NCD4Relay relayController;

void setup() {
relayController.setAddress(0, 0, 0);
}

void loop() {
relayController.turnOnAllRelays();
delay(500);
relayController.turnOffAllRelays();
delay(500);
relayController.turnOnAllRelays(1);
delay(500);
relayController.turnOnAllRelay(1);
delay(500);
relayController.turnOffAllRelay(1);
delay(500);
}

https://github.com/ControlEverythingCom/NCD4Relay

it has a readme file which explains how you can use this lib.

let me know if you have any other questions.