reef-pi :: An opensource reef tank controller based on Raspberry Pi.

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,811
Rating - 0%
0   0   0
Hey all I'm about to start my controller build(Ill star a thread as soon as the boards i had made get here)but i thought i would post this here so anyone could see it.
I purchased this light for my aquarium Phlizon-Dimmable-Decoration-Saltwater-Freshwater/dp/B074DRJK18/ref=sr_1_5?crid=1PWPDGSW7IQQ2 ( Freshwater at the moment) these are the long thin ones but they have the 16 inch ones as well and disassembled it to see what i would need to control it and low and behold after looking at the driver it uses 3.3 volt pwm to control dimming i also fed 3.3 volt dc into the control wire since they are just using a potentiometer and it works with straight dc as well i went up to 4.5 volts and no harm as far as i can tell.
I have hooked it up straight to the pca outputs and working great.
And it is immaculately constructed as far as wiring goes.
The 12 volt driver is being used for the fans.
The lights will also turn on and of with just the pwm signal they will turn on at 6% on my setup and they turn completely off below that.
u do seem to lose a tiny bit off brightness at the top end just going to 3.3 volt so i may look into trying it up to 5 volts after i find the data sheet on the drivers i have some level converters i may try to get it up a little
IMG_20200317_165900_0.png
IMG_20200317_165909_9.png
IMG_20200317_165918_1.png
IMG_20200317_165923_4.png
What frequeny is your pca9685 set at?
Have you tried a different frequency?
Lowering the frequency may allow you to dim below 6 percent.

For an example:
At 1000hz the on time of the pulse at 6 percent is (1÷1000)×.06=.00006 or 60 microseconds.
At 200hz the on time at 6 percent is (1÷200)×.06=.0003 or 300 microseconds.

The led driver may be filtered or not a be able to "see" a short pulse of 60 microseconds but may be quick enough to see a frequency of 300 microseconds and may allow you to dim the light to a lower level.

This may be worth checking out.
 

GaryE

Well-Known Member
View Badges
Joined
Mar 12, 2020
Messages
992
Reaction score
1,321
Location
Coatesville, Indiana
Rating - 0%
0   0   0
possibly stupid question, but hey, I don't know the answer so it can't be that stupid....

So... I do not have a chiller, don't believe I need on as we tend to keep our house at or below 78 all summer.

I do have a heater and want to set an upper limit say 78.2 and lower limit of 77.8 on my tank. How do I set that up? The temperature settings don't make it clear.

Thanks in advance.
 

ahnuts72

Community Member
View Badges
Joined
Sep 24, 2018
Messages
30
Reaction score
50
Rating - 0%
0   0   0
What frequeny is your pca9685 set at?
Have you tried a different frequency?
Lowering the frequency may allow you to dim below 6 percent.

For an example:
At 1000hz the on time of the pulse at 6 percent is (1÷1000)×.06=.00006 or 60 microseconds.
At 200hz the on time at 6 percent is (1÷200)×.06=.0003 or 300 microseconds.

The led driver may be filtered or not a be able to "see" a short pulse of 60 microseconds but may be quick enough to see a frequency of 300 microseconds and may allow you to dim the light to a lower level.

This may be worth checking out.
Im running at 800hz i wasnt thinking about it being filtered inside the driver guess that makes sense since it will accept both pwm and dc im just now starting to get back into my electronics hobby and this gave me a good excuse to dust off the 2467 and the tm506.
I will try to lower it when i get everything put together i broke it all down as the boards i had made from Michael's schematics will be here friday and then i will have everything to assemble it this weekend Im
using www.amazon.com/Pyle-Pro-PDBC10-Outlet-Supply-Center/dp/B0037GPLOE as my power center the wiring is a tad small 20 gauge but it is easily changed and probably enough room in this thing to put the pi and everything inside so for 28 dollars not to bad.





IMG_20200317_202833_8.png
.
Screenshot (39).png
 
Last edited:

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,811
Rating - 0%
0   0   0
possibly stupid question, but hey, I don't know the answer so it can't be that stupid....

So... I do not have a chiller, don't believe I need on as we tend to keep our house at or below 78 all summer.

I do have a heater and want to set an upper limit say 78.2 and lower limit of 77.8 on my tank. How do I set that up? The temperature settings don't make it clear.

Thanks in advance.
Welcome to Reef2reef.

First off start a build thread as answers in this thread can get lost sometimes.

To keep my tank at 79 with a max temp of 79.2 degrees I set the heater threshold to 79 and hysteresis to .2

On these settings my 75 gallon stays between 78.9 and 79.2 degrees at a room temp of 70 degrees. This is with a 300 watt heater.

You may have to play around with this because of tank size...heater size and room temperature
 

GaryE

Well-Known Member
View Badges
Joined
Mar 12, 2020
Messages
992
Reaction score
1,321
Location
Coatesville, Indiana
Rating - 0%
0   0   0
Welcome to Reef2reef.

First off start a build thread as answers in this thread can get lost sometimes.

To keep my tank at 79 with a max temp of 79.2 degrees I set the heater threshold to 79 and hysteresis to .2

On these settings my 75 gallon stays between 78.9 and 79.2 degrees at a room temp of 70 degrees. This is with a 300 watt heater.

You may have to play around with this because of tank size...heater size and room temperature
I also have a 75. I'll try those settings and see how it works.. Thanks for the quick reply.
 

Matt Carden

Valuable Member
View Badges
Joined
Apr 13, 2018
Messages
1,657
Reaction score
4,036
Location
Detroit Metro
Rating - 0%
0   0   0
Something to remember when wiring Alternating Current (AC) - 120V in the USA, 220V where I live. The positive and negative (Hot and Negative) switch polarity according to the Frequency (Hertz value). 60Hz here and (I think??) 50Hz in the USA. So actually, the positive and negative connections don't really matter as these are switching polarity between themselves 50 / 60 times a second.

HOWEVER, it is good practice to adhere to a convention so that anyone else that comes and works on your stuff can easily figure out how the circuits are made up.

The one NON-NEGOTIABLE is the Earth / Ground wire. The must only be joined to other Earths and to Earth points / connections
Big Trout is right that there is only one hot wire (black) and the other 2 are connected to ground.
 

ahnuts72

Community Member
View Badges
Joined
Sep 24, 2018
Messages
30
Reaction score
50
Rating - 0%
0   0   0
I just hooked them up again @Bigtrout and i am getting 3.3 volts almost exactly till i turn on the pot it has a switch as well built in but after the voltage goes up to around 4.5/4.7 volts at full brightness but i was trying to get the reading trying to hold the probes and the switch at the same time and they have a conformal coating so might not be perfectly accurate because u cant open the housing up all the way unless you unplug the pots..

Anything below 400mv they turn off.

When hooked up to the pot when u click it on they come on at around 6 to 10% and don't go any lower that is the bottom of the pot before it switches off.

I cant find a datasheet anywhere on the drivers i will try to remember to pull one of the drivers apart this weekend so we can get a look at the inside.
 
Last edited:
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,876
Reaction score
16,680
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
New to reef-pi. Can I get some help in connecting the Kasa HS300 to the reef pi. I downloaded the driver but I am not sure how to identify each of the power plugs and provide them names.

Thanks in advances
welcome to reef2reef and thank you for trying out reef-pi.
Now, onto hs300 setup
- Go to Configuration -> Drivers section and add a new driver with type "hs300" and provide ip:port as addresss. Port should be 9999. IP you can get from your wifi router.
- Go to connector section and create 6 new outlet and analog inputs. You can name them whatever you want. I prefer to use Plug1 -> Plug6 to reflect Kasa's original naming. Associate them with pin 0 to 5 for plug1 to plug 6.
- After that you can create equipment and associate them with relevant outlets. You can also create fake ph probes and associate them with the corresponding analog input to chart current usage (in Amps)

This is probably the third time im writing these steps down :-( , i really need some help to update the adafruit guides
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,876
Reaction score
16,680
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0

robsworld78

Valuable Member
View Badges
Joined
Feb 14, 2020
Messages
1,029
Reaction score
1,293
Location
Edmonton, Canada
Rating - 0%
0   0   0
This is probably the third time im writing these steps down :-( , i really need some help to update the adafruit guides

Working on a manual right now, it will be a PDF file that you can post on the GitHub, I'm doing what I understand and will be asking questions soon, going to start a new thread for that.

I think I have the hs300 covered. ;)

EDIT: will be a word document to so it can be edited
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,876
Reaction score
16,680
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Hey all I'm about to start my controller build(Ill star a thread as soon as the boards i had made get here)but i thought i would post this here so anyone could see it.
I purchased this light for my aquarium Phlizon-Dimmable-Decoration-Saltwater-Freshwater/dp/B074DRJK18/ref=sr_1_5?crid=1PWPDGSW7IQQ2 ( Freshwater at the moment) these are the long thin ones but they have the 16 inch ones as well and disassembled it to see what i would need to control it and low and behold after looking at the driver it uses 3.3 volt pwm to control dimming i also fed 3.3 volt dc into the control wire since they are just using a potentiometer and it works with straight dc as well i went up to 4.5 volts and no harm as far as i can tell.
I have hooked it up straight to the pca outputs and working great.
And it is immaculately constructed as far as wiring goes.
The 12 volt driver is being used for the fans.
The lights will also turn on and of with just the pwm signal they will turn on at 6% on my setup and they turn completely off below that.
u do seem to lose a tiny bit off brightness at the top end just going to 3.3 volt so i may look into trying it up to 5 volts after i find the data sheet on the drivers i have some level converters i may try to get it up a little
IMG_20200317_165900_0.png
IMG_20200317_165909_9.png
IMG_20200317_165918_1.png
IMG_20200317_165923_4.png
This is awesome :-) . Thank you so much for sharing. Welcome to reef2reef. We truly appreciate you taking the time to share your build, it will help fellow saltwater/freshwater hobbyists.
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,876
Reaction score
16,680
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Working on a manual right now, it will be a PDF file that you can post on the GitHub, I'm doing what I understand and will be asking questions soon, going to start a new thread for that.

I think I have the hs300 covered. ;)
Hugs :-)
 

That Crusso Kid

10K Club member
View Badges
Joined
Oct 21, 2018
Messages
14,893
Reaction score
76,038
Location
SW, FL, USA
Rating - 0%
0   0   0
welcome to reef2reef and thank you for trying out reef-pi.
Now, onto hs300 setup
- Go to Configuration -> Drivers section and add a new driver with type "hs300" and provide ip:port as addresss. Port should be 9999. IP you can get from your wifi router.
- Go to connector section and create 6 new outlet and analog inputs. You can name them whatever you want. I prefer to use Plug1 -> Plug6 to reflect Kasa's original naming. Associate them with pin 0 to 5 for plug1 to plug 6.
- After that you can create equipment and associate them with relevant outlets. You can also create fake ph probes and associate them with the corresponding analog input to chart current usage (in Amps)

This is probably the third time im writing these steps down :-( , i really need some help to update the adafruit guides

What are you looking to update on Adafruit?
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,876
Reaction score
16,680
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Made a wooden stand for my one of my pico tank. Dedicated space for ato container, controller and power strip/wall warts
7C40A8B1-9BC5-4E02-B84B-92EC96F9A55B.jpeg

it’s made of normal Dimensional pine boards from Home Depot with back, bottom and top panels made of ply woods. All miter joints with screws .
418EDBB7-7EF3-45F6-B97F-0C05558EFE97.jpeg

and danish oil as finish.
91C4493F-9BD4-4494-8075-BC0311689C78.jpeg

I’m taking this woodworking for mere mortals course by Steve Ramsey and getting used to miter saw , table saw , glue , finish etc etc . Lot of learning , lot of fun.
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,876
Reaction score
16,680
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
What are you looking to update on Adafruit?
All the guides basically. They all have 2.0 specific details which are limited if not inaccurate now. I can share the summary points, backing images/details if you are intereseted. For example for power controller i was thinking of making a really good guide with following details
- Scratch builds (NO/NC configuration, amp ratings, solidstate vs mechanical relays etc), link to build threads etc
- ADJ powerstrip (we already have it)
- Kasa300 powerstrip and 110/103 series smart plugs (probably the very first section, since this is the easiest).
Other than these three types of builds also cover various important ancillary factors such as total current draw (since most powerstrip has 15A max, but some 10 or 12A), form factors (the ones with plugs that fit flush on wall outlet), wall warts that can block other outlets thus limiting thei applicability, DC power adapters with ferrite cores (for getting rid of DC power aberrations) etc.
I think we have learned a lot and added a lot more features since 2.0. If we can take the time to update the adafruit guide that will be some work but it will help tremendously rest of the community (far beyond reef keepers).

I also think if it makes sense, it just fine to develop and maintain the guides here. Since I am blessed with all of your presence here. I (or someone else) can always copy over the content to relevant places. But have them in a place where we can have easy and sustained contribution is key,.
 

Des Westcott

Well-Known Member
View Badges
Joined
May 29, 2018
Messages
646
Reaction score
1,025
Location
Durban - South Africa
Rating - 0%
0   0   0
Big Trout is right that there is only one hot wire (black) and the other 2 are connected to ground.

Maybe I'm misunderstanding some terminology there, but that post makes no sense to me at all.

AC wiring has 3 x conductors :-
Positive (+) usually Red
Negative (-) usually Black
Earth / Ground usually green and yellow

As I understand it, this convention can change depending on region, but the concept is the same.

The Positive is usually the switched leg, the Negative is usually the "return" leg (completing the circuit) and the Ground / Earth is completly separate and connected to any chassis / conductive material that creates a path back to your Earth Leakage unit. This way if either you Positive or Negative comes in contact with any part of the chassis or any conductive part, the Earth Leakage unit senses that something dangerous has occured and trips your power so that nobody gets electrocuted by touching equipment inadvertently. Connecting "the other 2" to ground will not achieve this. Well at least the way things are done here in SA. I stand to be corrected if it's different in other countries.
 

GaryE

Well-Known Member
View Badges
Joined
Mar 12, 2020
Messages
992
Reaction score
1,321
Location
Coatesville, Indiana
Rating - 0%
0   0   0
Welcome to Reef2reef.

First off start a build thread as answers in this thread can get lost sometimes.

To keep my tank at 79 with a max temp of 79.2 degrees I set the heater threshold to 79 and hysteresis to .2

On these settings my 75 gallon stays between 78.9 and 79.2 degrees at a room temp of 70 degrees. This is with a 300 watt heater.

You may have to play around with this because of tank size...heater size and room temperature


That did the trick. My tank is holding at about 78.1 right now. Very nice to have this kind of control.


What sort of lighting schedule do you run?
 

ahnuts72

Community Member
View Badges
Joined
Sep 24, 2018
Messages
30
Reaction score
50
Rating - 0%
0   0   0
Maybe I'm misunderstanding some terminology there, but that post makes no sense to me at all.

AC wiring has 3 x conductors :-
Positive (+) usually Red
Negative (-) usually Black
Earth / Ground usually green and yellow

As I understand it, this convention can change depending on region, but the concept is the same.

The Positive is usually the switched leg, the Negative is usually the "return" leg (completing the circuit) and the Ground / Earth is completly separate and connected to any chassis / conductive material that creates a path back to your Earth Leakage unit. This way if either you Positive or Negative comes in contact with any part of the chassis or any conductive part, the Earth Leakage unit senses that something dangerous has occured and trips your power so that nobody gets electrocuted by touching equipment inadvertently. Connecting "the other 2" to ground will not achieve this. Well at least the way things are done here in SA. I stand to be corrected if it's different in other countries.
Here in the US it is different.
AC wiring doesn't have positive and negative
We run a 60Hz cycle
Black=line or hot if u prefer
white=neutral
green=earth(but not always it could be just a bare wire)
The black is the line coming in to the service panel the neutral is the return path the earth wire is technically not needed for things to operate that is also why alot of our 120 plugs have a larger blade on one side(polarized) especially when no earth terminal is used.

The neutral and earth are usually tied together at the service panel but should never be tied together before.

Just like a gfci outlet will function without a earth connection contrary to how some people believe,they measure the difference between whats coming in vs whats going out of the outlet.
 
Last edited:

Des Westcott

Well-Known Member
View Badges
Joined
May 29, 2018
Messages
646
Reaction score
1,025
Location
Durban - South Africa
Rating - 0%
0   0   0
Here in the US it is different.
AC wiring doesn't have positive and negative
We run a 60Hz cycle
Black=line or hot if u prefer
white=neutral
green=earth(but not always it could be just a bare wire)
The black is the line coming in to the service panel the neutral is the return path the earth wire is technically not needed for things to operate that is also why alot of our 120 plugs have a larger blade on one side(polarized) especially when no earth terminal is used.

The neutral and earth are usually tied together at the service panel but should never be tied together before.

Just like a gfci outlet will function without a earth connection contrary to how some people believe,they measure the difference between whats coming in vs whats going out of the outlet.

Different, but basically the same. As per my previous post, yes, AC Positive and Negative are switching at the Hz cycle - 60 times a second, so both wires are essentially the same. Hot / Neutral / Positive / Negative = same-same :) Like I said - different terminology.

Your gfci is used as what we call "Earth Leakage Unit" over here. While I'm not 100% sure exactly how our units work, I was under the impression that they monitored the earth connection and tripped if a value larger than a certain milliamp reading was sensed. Hence the importance of connecting those wires to equipment chassis etc.

Thank you for the clarification.
 

Matt Carden

Valuable Member
View Badges
Joined
Apr 13, 2018
Messages
1,657
Reaction score
4,036
Location
Detroit Metro
Rating - 0%
0   0   0
Here in the US it is different.
AC wiring doesn't have positive and negative
We run a 60Hz cycle
Black=line or hot if u prefer
white=neutral
green=earth(but not always it could be just a bare wire)
The black is the line coming in to the service panel the neutral is the return path the earth wire is technically not needed for things to operate that is also why alot of our 120 plugs have a larger blade on one side(polarized) especially when no earth terminal is used.

The neutral and earth are usually tied together at the service panel but should never be tied together before.

Just like a gfci outlet will function without a earth connection contrary to how some people believe,they measure the difference between whats coming in vs whats going out of the outlet.
This is exactly what I was trying to say but I don't have the gift of knowing how to explain things like this. Thank you for explaining it for us.
 

TOP 10 Trending Threads

WHAT AMOUNT OF LIVE ROCK AND SAND SHOULD BE PRIORITIZED FOR OPTIMAL BIODIVERSITY/FILTRATION?

  • 100% live rock + bagged sand

    Votes: 37 27.0%
  • 100% dry rock + 100% live sand

    Votes: 46 33.6%
  • 50/50 live/dry rock, 50/50 live/bagged sand

    Votes: 30 21.9%
  • 75% live rock, 25% live sand

    Votes: 14 10.2%
  • 25% live rock, 75% live sand

    Votes: 10 7.3%
Back
Top