Reef Pi Build

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,056
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Ok so I got some parts for the power center and started building. I'm still waiting on some things like a perma proto board, water level sensor and the fused power switch for the power center.
I was hoping to get the board so I can start on the circuits but it probably won't be here till Monday.


DISCLAIMER!!

This part of the build requires a basic understanding of high voltage wiring. It can be very dangerous. If you're not comfortable doing it the way I am, Ranjib's guide uses the DJ power strip with built in relays.
https://www.amazon.com/dp/B007EYHBVQ/

I got 4 electrical outlets, 4 face plates and a 25 foot roll of Romex 14/2 electrical wire.
The outlets, face plates and wire are just off the shelf stuff from the big bog box store of you're choice.
The cigar box I decided on for this part is made from all wood and I'm not sure if it's going to stay natural wood finish or not.

IMG_4122.JPG


This is just regular construction grade wiring
IMG_4174.JPG


I took the 14/2 wire and stripped off the outer insulation so I could use it for wiring the outlets. I ended up cutting around 4 feet of the wire and used most of it.
IMG_4124.JPG



Layout of the outlets and relay
IMG_4130.JPG


I used a face plate to help with the outlet placing I and cut the hole with a jig saw and cleaned it up with a chisel.
I wanted to make sure that there was enough room in between the sockets so I could plug in big power bricks.
IMG_4131.JPG


IMG_4135.JPG


IMG_4136.JPG



IMG_4137.JPG


The blue stuff around the sockets is a thin layer of rubber I had laying around. I put it between the box and the back of the face plates as a moisture barrier.
Once the box has been finalized I will seal all the seams with silicone.
IMG_4138.JPG


Placing and attatching the relay.
IMG_4139.JPG


IMG_4141.JPG


I used these little rubber vibration dampening feet for stand offs to keep the bottom of the relay off the wood.
When the relay is powered the bottom of it has exposed circuits that carry high voltage so it needs to be isolated.
I used these instead off traditional nylon standoff blocks so I wouldn't have holes in the front of the box.
IMG_4147.JPG


IMG_4149.JPG

IMG_4149.JPG
Very nicely done :)
 
OP
OP
Diamond1

Diamond1

Valuable Member
View Badges
Joined
Oct 17, 2013
Messages
1,368
Reaction score
1,911
Location
Cleveland Ohio
Rating - 0%
0   0   0
Before I start wiring I needed to prep the outlets so that each socket can be controlled individually. Looking at the outlet you will see different colored screws, 2 gold, 2 silver, and 1 green.

GOLD = POSITIVE
SILVER = NEUTRAL
GREEN = GROUND

Looking at the outlet on the side with the gold (positive) screws you can see that there is a small tab that connects the 2 sockets. I took a pair of needle nose pliers and bent the tab up and down to break it off. This will isolate the 2 sockets and now they can be controlled independently.
IMG_4126.JPG


After the tabs have been removed.
IMG_4129.JPG



After prepping the sockets I replaced all of them and numbered them in the order that I wanted the pi to control them. It makes a nice visual reference for wiring the sockets to the relay and keeping everything in order. Then I used the white wire from the 14/2 cable and cut the pieces needed for connecting the relays to the sockets.

IMG_4151.JPG


It's important that you don't strip off too much of the insulation going into the relay so as to not have any exposed wire. I cut each wire individually so they could be run to the sockets without to much of a mess. The solid core wire is very stiff and stays where you put it.
IMG_4155.JPG



Next up is the neutral wires. The neutral circuit is all common so I just cut wires to length and used the push connectors on the backs of the outlets to connect them all together. You can use either the screws or the push in connectors. I thought the push in connectors looked cleaner so I used them.
IMG_4156.JPG


IMG_4158.JPG

I used the un-insulated wire from the 14/2 cable to run the ground wire. It just goes from the first green screw to the next all the way over to where the power supply comes into the box.
IMG_4163.JPG


Now for the fun part. Hooking up all of the neutral wires to the relay. The neutral wire is connected to the central terminal of each relay and then connected to the power supply. This is basically supplying the power to the socket when the relay is set to the closed position.

At this point I realized that I had used white for positive and black for neutral in wiring up the relays and the power cord uses white for neutral and black for positive. Not a big deal but I was kinda miffed at my dyslexic wiring skills! Still the circuits works.

Here's the wires in the circuit coming from the relays to the power supply.
IMG_4166.JPG


IMG_4171.JPG


I didn't get pictures of the wiring process but basically I took the neutral wires from the first 2 relays and connected them with a wire nut and a small jumper wire that connected the next relay and a small jumper all the way across the relays. The last connection was to the neutral of the power supply.

For now the connection to the power supply is temporary, I simply wanted to make sure all the relays worked and my wiring was correct.

I have a fused power switch coming from amazon that all of this will be hooked up to.
https://www.amazon.com/gp/product/B06XNMT3WL/ref=oh_aui_detailpage_o00_s00?ie=UTF8&psc=1

fused power socket.jpg

I will also be putting a GFCI plug on the end of the power supply cord to protect the whole circuit.

https://www.amazon.com/Replacement-...51928&s=Electronics&sr=1-2-catcorr&ref=sr_1_2
GFCI plug.jpg


I plugged the unit in and used a multi meter to check that the voltage coming from the power supply to the relays, it was correct and getting to all of the relays. The voltage read 110 volts across all relays.

IMG_4167.JPG
 
Last edited:

buddy.

Active Member
View Badges
Joined
May 16, 2018
Messages
291
Reaction score
617
Location
Australia
Rating - 0%
0   0   0
That looks really good, I was hoping you would do a detailed write up of this part :)
Could you loop each black wire to each relay terminal instead of going to the wire nuts? Unless two wires together won't fit in the terminal?
 
OP
OP
Diamond1

Diamond1

Valuable Member
View Badges
Joined
Oct 17, 2013
Messages
1,368
Reaction score
1,911
Location
Cleveland Ohio
Rating - 0%
0   0   0
The next part of the process was hooking the raspberry pi up and checking that reef pi worked.

I used a 10 wire female to female jumper to hook the pi up to the relays. I used a group of the GPIO pins that were close together just to keep the jumper wires together and avoid confusing myself when i set the GPIO pins in the reef pi app. The relay requires 5v power so I used the 5 volt power supply pin from the raspberry pi and connected it to the relay board. I did the same for the ground.

IMG_4173.JPG


I was able to confirm that everything worked.

WE HAVE LIGHT!
IMG_4172.JPG


I was then able to go into reef pi and set up all the GPIO pins on the equipment tab and turn them off and on remotely from my desktop computer via wifi.
 
OP
OP
Diamond1

Diamond1

Valuable Member
View Badges
Joined
Oct 17, 2013
Messages
1,368
Reaction score
1,911
Location
Cleveland Ohio
Rating - 0%
0   0   0
That looks really good, I was hoping you would do a detailed write up of this part :)
Could you loop each black wire to each relay terminal instead of going to the wire nuts? Unless two wires together won't fit in the terminal?

That is exactly the problem The 14 gauge wire is too big to fit 2 in the same terminal. I could get 2 18 gauge wires to fit but since this is a 110 volt circuit I didn't want to take any chances.
 

Erica-Renee

Valuable Member
View Badges
Joined
Oct 4, 2017
Messages
1,596
Reaction score
3,290
Location
lost
Rating - 0%
0   0   0
Curious with the Relay Wiring.

Mine are not wired that way Nor do i ever wire i switch like that.
From my POWER I Wired all the naturals together and to each of the outlets.
Cut the tab on the Hot side of each plug . Wired each plug to one side of the relay.
Wired the main power to the other side of each of the relay. I also have the Neutral connected to neutral on my pi .

My Question is where did you get the Wiring Guide ?
Mine is wired according to the Relay Manufacture which is different then yours but the relays look to the same or very similar. The reason i am asking is because maybe mine is incorrect but its been working fine for a VERY Long time..

Thanks in Advance Erica @Brew12 can you give your advice please ..
 

Erica-Renee

Valuable Member
View Badges
Joined
Oct 4, 2017
Messages
1,596
Reaction score
3,290
Location
lost
Rating - 0%
0   0   0
Looking at your wiring again you are switching the neutral side not the hot. I am still concerned about safety on this. Please do not take this Question as stating your wiring is wring. Its Just different then how i have been doing wiring for many years ..
 
OP
OP
Diamond1

Diamond1

Valuable Member
View Badges
Joined
Oct 17, 2013
Messages
1,368
Reaction score
1,911
Location
Cleveland Ohio
Rating - 0%
0   0   0
Your absolutely right. I have the relays connected to the neutral instead of the hot. The neutral is connected to the power supply and the relays via the last outlet on the left. I must have misunderstood what I saw in the wiring diagram I used.
The power and the ground are hooked up to the pi via the 10 pin jumper on the relay board. is this the ground you were talking about?

This is the diagram I used for wiring.
Pi-Power-Controller-Wiring-Diagram-SainSmart.jpg
 
OP
OP
Diamond1

Diamond1

Valuable Member
View Badges
Joined
Oct 17, 2013
Messages
1,368
Reaction score
1,911
Location
Cleveland Ohio
Rating - 0%
0   0   0
Curious with the Relay Wiring.

Mine are not wired that way Nor do i ever wire i switch like that.
From my POWER I Wired all the naturals together and to each of the outlets.
Cut the tab on the Hot side of each plug . Wired each plug to one side of the relay.
Wired the main power to the other side of each of the relay. I also have the Neutral connected to neutral on my pi .

My Question is where did you get the Wiring Guide ?
Mine is wired according to the Relay Manufacture which is different then yours but the relays look to the same or very similar. The reason i am asking is because maybe mine is incorrect but its been working fine for a VERY Long time..

Thanks in Advance Erica @Brew12 can you give your advice please ..

Looking at your wiring again you are switching the neutral side not the hot. I am still concerned about safety on this. Please do not take this Question as stating your wiring is wring. Its Just different then how i have been doing wiring for many years ..

No problem I'm totally new at this. The circuit seems to be working fine and I have been running it since early this morning with no issues.
 

Erica-Renee

Valuable Member
View Badges
Joined
Oct 4, 2017
Messages
1,596
Reaction score
3,290
Location
lost
Rating - 0%
0   0   0
No problem I'm totally new at this. The circuit seems to be working fine and I have been running it since early this morning with no issues.
Yes it will work.. But if you have a short by breaking the neutral thru the switch ( relay) Your short in one socket could short out everything else on that same Circuit . This is why its best to switch the Hot . I am not a Electrician and just know how things are done and have some understanding of the reasons behind them. Just want to be sure your Build and Mine are as safe as we can make them @Brew12 will be on eventually and set us BOTH Straight. he is a Master Electrician .
 

Erica-Renee

Valuable Member
View Badges
Joined
Oct 4, 2017
Messages
1,596
Reaction score
3,290
Location
lost
Rating - 0%
0   0   0
relay board setup.jpg


Here is how i have mine wired exactly. Other then i am not sharing the RELAY POWER WITH THE ULN. The ULN GND , PI GND, AND GND ARE ALL Shared with the Relay power supply.. the uln isolates the pi with diode to protect it ..
Controller box.jpg

I forgot i had this image . Hope it helps ..
 
Last edited:
OP
OP
Diamond1

Diamond1

Valuable Member
View Badges
Joined
Oct 17, 2013
Messages
1,368
Reaction score
1,911
Location
Cleveland Ohio
Rating - 0%
0   0   0
Yes it will work.. But if you have a short by breaking the neutral thru the switch ( relay) Your short in one socket could short out everything else on that same Circuit . This is why its best to switch the Hot . I am not a Electrician and just know how things are done and have some understanding of the reasons behind them. Just want to be sure your Build and Mine are as safe as we can make them @Brew12 will be on eventually and set us BOTH Straight. he is a Master Electrician .

I have leads going to each one of the relays from the Neutral so each relay is effectively isolated from the others. Switching one relay off or on doesn't effect the other ones.
 
OP
OP
Diamond1

Diamond1

Valuable Member
View Badges
Joined
Oct 17, 2013
Messages
1,368
Reaction score
1,911
Location
Cleveland Ohio
Rating - 0%
0   0   0
relay board setup.jpg


Here is how i have mine wired exactly. Other then i am not sharing the RELAY POWER WITH THE ULN. The ULN GND , PI GND, AND GND ARE ALL Shared with the Relay power supply.. the uln isolates the pi with diode to protect it ..

I forgot i had this image . Hope it helps ..

I'm planing on using a dedicated 5v power supply for the power module and using the octo couplers on the relay board to isolate it from the pi.
For now this was just testing to see if everything worked and if there is anything I need to change.
 

Erica-Renee

Valuable Member
View Badges
Joined
Oct 4, 2017
Messages
1,596
Reaction score
3,290
Location
lost
Rating - 0%
0   0   0
I have leads going to each one of the relays from the Neutral so each relay is effectively isolated from the others. Switching one relay off or on doesn't effect the other ones.
But if device on relay one shorts out the power will be back fed into the whole circuit. If the hot is switched thru the relay Each outlets hot is isolated from the other. Neutrals are connected together in other parts of the Circuit in the house . When switching the Neutral you always have power in each outlet if something shorts one OUTLET it can short all of them . If you switch the hot and a DEVICE on outlet one shorts out It will short the relay and likely trip the breaker NOT look for a path to ground thru the other outlets...
My explanation is probably not best way to put it..
 

Erica-Renee

Valuable Member
View Badges
Joined
Oct 4, 2017
Messages
1,596
Reaction score
3,290
Location
lost
Rating - 0%
0   0   0
@Erica-Renee So if I were to swap the black and white leads coming out of the relay that would create a circuit where the positive is switched and the neutral was not?

Yes This in my mind is Safer . Sorry for the Long Winded Confusion.. But hey you inspired me to get my Build Upgraded to 2.0 My reef-pi has been running on the desk for well over a two months not touched and all was still working perfectly when i checked it.. When i get the new Sump installed so will be REEF-PI put into service .
 
OP
OP
Diamond1

Diamond1

Valuable Member
View Badges
Joined
Oct 17, 2013
Messages
1,368
Reaction score
1,911
Location
Cleveland Ohio
Rating - 0%
0   0   0
Yes This in my mind is Safer . Sorry for the Long Winded Confusion.. But hey you inspired me to get my Build Upgraded to 2.0 My reef-pi has been running on the desk for well over a two months not touched and all was still working perfectly when i checked it.. When i get the new Sump installed so will be REEF-PI put into service .

No problem on the long winded answer. I'm a newb to electrical wiring and I definitely appreciate any input from guys in the know. I will get things swapped over and post new pics of the layout
 

Caring for your picky eaters: What do you feed your finicky fish?

  • Live foods

    Votes: 23 31.9%
  • Frozen meaty foods

    Votes: 57 79.2%
  • Soft pellets

    Votes: 12 16.7%
  • Masstick (or comparable)

    Votes: 7 9.7%
  • Other

    Votes: 4 5.6%
Back
Top