Another reef-pi build.

Diamond1

Valuable Member
View Badges
Joined
Oct 17, 2013
Messages
1,368
Reaction score
1,911
Location
Cleveland Ohio
Rating - 0%
0   0   0
What’s really strange. All the errors in the RKL cleared. I just hooked it back up to check some of my times and it’s working fine. I had a bad cable lol
Very cool! I'm glad to see it up and running. Can't really see your setup on my phone. I'll check it out on my pc tonight.
 

Diamond1

Valuable Member
View Badges
Joined
Oct 17, 2013
Messages
1,368
Reaction score
1,911
Location
Cleveland Ohio
Rating - 0%
0   0   0
One of these days I will build a nice wood cabinet to mount all this stuff in. But this will do for now. Reef-pi is officially running my reef. This weekend I will pull the lights apart to modify and plug them in as well.
1c2933d33910d626f39e4781ba4676af.jpg
9fb9798ff062bca344c0ee13dc90b8b1.jpg


Looks very good all wrapped up and ready to go!
Is everything working as it should?
 
OP
OP
b4tn

b4tn

Valuable Member
View Badges
Joined
Jun 17, 2015
Messages
1,673
Reaction score
2,241
Location
Columbia MD
Rating - 0%
0   0   0
Looks very good all wrapped up and ready to go!
Is everything working as it should?

@Diamond1 reefpi is working but my lights are giving me all sorts of issues. Didn’t you have a problem with the lights flashing with the relay off? I have one light hooked up and working but when I power both lights off with the relay the blues flash. They turn off fine with the white on but as soon as white goes off they flicker. They only do this if the pwm pin is connected. If I disconnect pwm they turn off fine
 
OP
OP
b4tn

b4tn

Valuable Member
View Badges
Joined
Jun 17, 2015
Messages
1,673
Reaction score
2,241
Location
Columbia MD
Rating - 0%
0   0   0
It’s been a day!!! I have been putting off light surgery for some time now because I just knew something was going to go wrong and I would be SOL. Well Murphy did not disappoint. But to start, I had said I was going to be installing moon lights to control via PWM into my OR lights. I know that I wanted to use 5 20mA LED’s so I used the below link to calculate the best way to wire them to 12 volts.

http://led.linear1.org/led.wiz

I came up with this.
5bb6b00e5c592716adc96fe13efb6cd1.jpg


So now it was time to take the lights apart and start drilling [emoji29]I got the lights apart with no issues. Drilled the holes and mounted and wired the lights.
96828f98dcf25e76947392ba41424edf.jpg
943e9dde0ea18469dbfe287773bfb5db.jpg
956e19a09135f0cb0670e3c8e4120786.jpg


I looked over and over this light enclosure and could not find a way that I could put in another plug without having an eye sore giant connector sticking out so I changed my plan a bit and decided to wire in a single wire instead of a plug. I drilled a second hole in the top to slide a wire through so it’s much cleaner looking and follows the power wire nicely. With the light mounted you can’t even see it.
342abf46d5f686aff74c9535f78b5476.jpg


Then the fun began lol. I hooked up the light and it would not power off with the relays and only one channel would dim. [emoji35]I messed around with it for a bit and found that for some reason the moon lights which get their 12 volts from the led drivers in the lights where the issue. I unplugged them and the lights powered on and off but still no dimming on one channel. So I pulled everything apart and found the PWM wire was broken in the connector so fixed that and moved the 12 volt wire for the moon lights to the 12 volt fan wire. After putting everything together the moon light still screws with the lights powering on and off. I’m not sure if there is a short somewhere or the drivers just don’t like having something else on them so unplugged it again and lights worked. I could dim them and all was well except one thing. When I turned off the relay the blue lights would flicker.

This is very strange because the relays are working. Even if I disconnected them completely the lights would flicker while powered off. They are being run off a pca9685 and if I dimmed them to 0 the flicker stopped. But this doesn’t work for me since I need them to be in fixed mode and on off with the relay till I get it all finished. I tried several restarts, changing channels, and nothing seemed to work. So figured just for the heck of it I will try running it off the rpi pwm. Switched the plugs around and everything works as it should. I still have to figure out the moon light issue but it appears the OR lights do not like the pca9685.

I think it’s time to walk away for now I have been at it all day.
 

Diamond1

Valuable Member
View Badges
Joined
Oct 17, 2013
Messages
1,368
Reaction score
1,911
Location
Cleveland Ohio
Rating - 0%
0   0   0
It’s been a day!!! I have been putting off light surgery for some time now because I just knew something was going to go wrong and I would be SOL. Well Murphy did not disappoint. But to start, I had said I was going to be installing moon lights to control via PWM into my OR lights. I know that I wanted to use 5 20mA LED’s so I used the below link to calculate the best way to wire them to 12 volts.

http://led.linear1.org/led.wiz

I came up with this.
5bb6b00e5c592716adc96fe13efb6cd1.jpg


So now it was time to take the lights apart and start drilling [emoji29]I got the lights apart with no issues. Drilled the holes and mounted and wired the lights.
96828f98dcf25e76947392ba41424edf.jpg
943e9dde0ea18469dbfe287773bfb5db.jpg
956e19a09135f0cb0670e3c8e4120786.jpg


I looked over and over this light enclosure and could not find a way that I could put in another plug without having an eye sore giant connector sticking out so I changed my plan a bit and decided to wire in a single wire instead of a plug. I drilled a second hole in the top to slide a wire through so it’s much cleaner looking and follows the power wire nicely. With the light mounted you can’t even see it.
342abf46d5f686aff74c9535f78b5476.jpg


Then the fun began lol. I hooked up the light and it would not power off with the relays and only one channel would dim. [emoji35]I messed around with it for a bit and found that for some reason the moon lights which get their 12 volts from the led drivers in the lights where the issue. I unplugged them and the lights powered on and off but still no dimming on one channel. So I pulled everything apart and found the PWM wire was broken in the connector so fixed that and moved the 12 volt wire for the moon lights to the 12 volt fan wire. After putting everything together the moon light still screws with the lights powering on and off. I’m not sure if there is a short somewhere or the drivers just don’t like having something else on them so unplugged it again and lights worked. I could dim them and all was well except one thing. When I turned off the relay the blue lights would flicker.

This is very strange because the relays are working. Even if I disconnected them completely the lights would flicker while powered off. They are being run off a pca9685 and if I dimmed them to 0 the flicker stopped. But this doesn’t work for me since I need them to be in fixed mode and on off with the relay till I get it all finished. I tried several restarts, changing channels, and nothing seemed to work. So figured just for the heck of it I will try running it off the rpi pwm. Switched the plugs around and everything works as it should. I still have to figure out the moon light issue but it appears the OR lights do not like the pca9685.

I think it’s time to walk away for now I have been at it all day.

Sorry I didn't get back to you sooner. Rough nite at work.
I was going to ask if you tried running it straight from the pi pwm signals but while I was making nachos you posted you had.
Is there any way you can run the power for the moon lights from the power supply that runs your relays or from a 12 volt rail on the pi hat? Might take some of the strain off the drivers if that's what's causing the erratic behavior with the channel flashing.
 
OP
OP
b4tn

b4tn

Valuable Member
View Badges
Joined
Jun 17, 2015
Messages
1,673
Reaction score
2,241
Location
Columbia MD
Rating - 0%
0   0   0
Sorry I didn't get back to you sooner. Rough nite at work.
I was going to ask if you tried running it straight from the pi pwm signals but while I was making nachos you posted you had.
Is there any way you can run the power for the moon lights from the power supply that runs your relays or from a 12 volt rail on the pi hat? Might take some of the strain off the drivers if that's what's causing the erratic behavior with the channel flashing.

Nachos definitely take precedence! I was trying to avoid running another cable but that’s probably what I will end up doing. I will test it more tomorrow and try running the dosers of the pca9685.
 

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 NACHOS GOOD!! :D

Could you just run a cat 5 cable that carries the power and the pwm without adding another cable? Cat 5 should be able to handle your power needs to the moonlights with no problem.

BTW the moon lights look great.
 

crusso1993

7500 Club Member
View Badges
Joined
Oct 21, 2018
Messages
8,671
Reaction score
44,647
Location
SW, FL, USA
Rating - 0%
0   0   0
Hey guys... yes, NACHOS GOOD!

This is a touch off of the current build but do you know if there is anyone controlling Viparspectras with reef pi?
 

Diamond1

Valuable Member
View Badges
Joined
Oct 17, 2013
Messages
1,368
Reaction score
1,911
Location
Cleveland Ohio
Rating - 0%
0   0   0
So I was thinking about the issue you were having with your lights flickering with the moonlights hooked up to the 12v from the driver.

With the moon lights hooked up to the driver or the fan I think the driver sees it as being turned on like placing a jumper between the 12v line and the on/off switch resulting in the driver turning everything on (fans and whatever channel you have the moonlights running from) since the channel that turns on doesn't have a proper pwm signal at the correct frequency it is causing your lights to stay on and strobe. If you can isolate the 12v power supply to the moonlights I'm thinking you should be good to go and that was causing the problem. I would be interested to see if that takes care of the problem with the pc9685 running your pwm signal for both channels.
I'm thinking the channel that works properly through the pc 9685 isn't the channel you have the moonlights tied into?
 
OP
OP
b4tn

b4tn

Valuable Member
View Badges
Joined
Jun 17, 2015
Messages
1,673
Reaction score
2,241
Location
Columbia MD
Rating - 0%
0   0   0
The moon light as soon as it gave me issues I removed it from the picture completely so I could rule it out. Coincidently the power source it was connected to was not the channel that was flashing.

The drivers in the OR lights have 2,12 volt power sources. The fan and the wire that powers the controller. I tried both as all the time 12 volts for the led and ran the ground wire back to the pi transistor pwm circuit that would switch them to ground and dim them. It worked for the moon lights just fine. But tapping into the 12 volts on the light itself caused it to not dim or not turn off. I removed that right away to gonna k to later.

The light issues was something separate all together. They would dim just fine and worked as expected. Using the relay switching the on off wire I could turn off the whites with no issue, turn off blues no issue, turn them both off and the blues would flash in random flickering. It did this on every jack I configured on the pca9685. If I disconnected “one” of the pwm wires didn’t matter which, from the pca9685 that one light would go to 10% and not dim but the other would just fine and both would power on and off just fine. Very strange issue. Connecting them direct to the rpi pwm pins 18 and 19 solved the issue. They all work fine now.

Going back to the moon lights. I went ahead and bought a separate 2 conductor security wire at Home Depot and wired the moon lights back to the moon light pwm circuit. The 12 volts is coming from the rpi power supply now and ground goes to the transistor circuit that gets pwm from the pca9685 and it works as expected with no interference in the OR lights. It turns off and dims as expected.

@Diamond1 each light requires 7 wires to go back to the pi and relays

Ground
Pwm white
Pwm blue
12 volt on white
12 volt white
12 volt on blue
12 volt blue

The cat 5 cable only has 8 wires. That’s why I was tying to source the 12 volts from inside the light and use the last available wire as the ground/pwm wire. But for some reason the drivers did not like it.

@Ranjib I used to have an O-scope years ago. It was actually a giant box with a CRT display lol. I think the flicker issues you had where different. I was getting flicker not from the dimming but from the powered off state. I would be curious to see what the pca9685 is outputting that caused a completely powered off light driver to flicker the lights. Near as I can tell the pca9685 works just fine. My moon lights are dimming up and down with no issues on it. Once I finish the lights I will be curious to see how it runs the dosers since moving them over from the rpi to the pca9685

Now that one light is working time to get busy on light number 2. Hopefully it goes smoother today :)
 

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 moon light as soon as it gave me issues I removed it from the picture completely so I could rule it out. Coincidently the power source it was connected to was not the channel that was flashing.

The drivers in the OR lights have 2,12 volt power sources. The fan and the wire that powers the controller. I tried both as all the time 12 volts for the led and ran the ground wire back to the pi transistor pwm circuit that would switch them to ground and dim them. It worked for the moon lights just fine. But tapping into the 12 volts on the light itself caused it to not dim or not turn off. I removed that right away to gonna k to later.

The light issues was something separate all together. They would dim just fine and worked as expected. Using the relay switching the on off wire I could turn off the whites with no issue, turn off blues no issue, turn them both off and the blues would flash in random flickering. It did this on every jack I configured on the pca9685. If I disconnected “one” of the pwm wires didn’t matter which, from the pca9685 that one light would go to 10% and not dim but the other would just fine and both would power on and off just fine. Very strange issue. Connecting them direct to the rpi pwm pins 18 and 19 solved the issue. They all work fine now.

Going back to the moon lights. I went ahead and bought a separate 2 conductor security wire at Home Depot and wired the moon lights back to the moon light pwm circuit. The 12 volts is coming from the rpi power supply now and ground goes to the transistor circuit that gets pwm from the pca9685 and it works as expected with no interference in the OR lights. It turns off and dims as expected.

@Diamond1 each light requires 7 wires to go back to the pi and relays

Ground
Pwm white
Pwm blue
12 volt on white
12 volt white
12 volt on blue
12 volt blue

The cat 5 cable only has 8 wires. That’s why I was tying to source the 12 volts from inside the light and use the last available wire as the ground/pwm wire. But for some reason the drivers did not like it.

@Ranjib I used to have an O-scope years ago. It was actually a giant box with a CRT display lol. I think the flicker issues you had where different. I was getting flicker not from the dimming but from the powered off state. I would be curious to see what the pca9685 is outputting that caused a completely powered off light driver to flicker the lights. Near as I can tell the pca9685 works just fine. My moon lights are dimming up and down with no issues on it. Once I finish the lights I will be curious to see how it runs the dosers since moving them over from the rpi to the pca9685

Now that one light is working time to get busy on light number 2. Hopefully it goes smoother today :)

Ok I was just trying to think of what might be causing the issue and that's what I came up with not knowing exactly how you had things wired. Good luck with light #2.
On a side note I ran both of my grounds individually from both channels using all 8 lines in the cat 5 cable.
 
OP
OP
b4tn

b4tn

Valuable Member
View Badges
Joined
Jun 17, 2015
Messages
1,673
Reaction score
2,241
Location
Columbia MD
Rating - 0%
0   0   0
Gents, I am up and running :). I need to go get some zip ties and do some wire management but both lights and moon lights now work with reefpi and all is connected to my tank. To bad I don’t get paid for this stuff. It took me 8 hours to do the last light and re wire the inside of my once organized reefpi box. So.... officially

- Lights where swapped over to the built in rpi PWM

-moved the dosers over to the pca9685

-ran separate power and ground from the moon lights to inside the reefpi box. It’s an extra wire but it’s not to bad. It will look better once I get everything zip tied together.

4f8b15299714f28155966be3c5c2a760.jpg
953617f48c17f7dee96558a29198136b.jpg


On a separate note. I’m running 12 volt fans off the doser outputs right now. I’m getting no pwm interference with the lights so far. I still need to crack open the jaebo doser and run actual motors with it but I think that’s for another day.

Now I have to get this all cleaned up before my wife gets back from California tomorrow lol
bdf90a83da00adffc397314721e6647a.jpg
 
OP
OP
b4tn

b4tn

Valuable Member
View Badges
Joined
Jun 17, 2015
Messages
1,673
Reaction score
2,241
Location
Columbia MD
Rating - 0%
0   0   0
The lights look good. It's cool that you were able to get things working.
Now you need to spend 8 hours cleaning up the mess before the wife finds it.

Thanks, I’m thinking about cracking open the jaebo doser tonight since everything is already spread out anyway. All I have to do is put a dB9 connector on the box and solder two motor wires to it. The jaebo doser has 4 pumps and I’m currently only using 2. The plan is to leave two of the motors in tact that currently work and wire the other two to reefpi. This way I have a backup just in case things don’t go as planned.
 
OP
OP
b4tn

b4tn

Valuable Member
View Badges
Joined
Jun 17, 2015
Messages
1,673
Reaction score
2,241
Location
Columbia MD
Rating - 0%
0   0   0
I think I am done! The doser was an easy add on. I just cracked open my jaebo and there was lots of room to add a dB9 connector. Since the doser circuit is housed inside the pi box only 4 wires needed to be run, power and ground for the 2 motors.

08fefb264ae317afe8c5dd741c124bae.jpg


The other 2 motors are still connected to the jaebo controller and work as a backup. It took me all of 5 minutes to calibrate them. 76% speed and I get 1 ml per second. :). My biggest concern though was interference from the motors causing issues with the lights but not even a faint flicker while the motors run. I am happy!

So the final state of the pi.. due to the last minute troubleshooting with the lights and having to make some changes, it’s not as organized inside anymore. But all connectors inside the box have been either soldered or pressed on tightly to prevent issues down the road.

a57e4ecb1d08b174742d79c3755e3ba4.jpg


Now that I’m done with this part of the build I closed up the box and did my best to get the cables all cleaned up.

e2d58ab5f5bcb0010472dc8507caa4e8.jpg
5567585028ee4ed5bec285d4785588f5.jpg
c4c1cfc40dcf665bf527254543ad55cd.jpg


So to sum things up for my reefpi I wanted the build to be in one box with remote boxes for the doser and the power. I built the following into my box

- 8 configurable outlets, 4 normally open, 4 normally closed, With reef pi turned off my return, skimmer, algae scrubber, and right Powerhead stays on.

- 2 temp probes

- 2 float switches for ATO that detect high and low level.

- 2 dosers controlled with a tb6612 driver on a pca9685 PWM module

- PWM controlled moon lights on the pca9685

-RPI PWM controlled Ocean Revive lights with on/off relays for power.

Mission complete :).

I’m not done though. I’m patiently waiting and researching for the next module I want to build. I have 2 maxspect gyres on each end of my tank. Right now they are on pulse mode via their built in controller and I flip flop them every hour via a reefpi outlet. Hopefully someday reefpi will have the ability to run 24volt brushless motors so I can ramp them up and down.
 

High pressure shells: Do you look for signs of stress in the invertebrates in your reef tank?

  • I regularly look for signs of invertebrate stress in my reef tank.

    Votes: 31 30.4%
  • I occasionally look for signs of invertebrate stress in my reef tank.

    Votes: 25 24.5%
  • I rarely look for signs of invertebrate stress in my reef tank.

    Votes: 19 18.6%
  • I never look for signs of invertebrate stress in my reef tank.

    Votes: 27 26.5%
  • Other.

    Votes: 0 0.0%
Back
Top