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

marekd1

Active Member
View Badges
Joined
Dec 24, 2019
Messages
133
Reaction score
200
Rating - 0%
0   0   0
In 3.0 we introduced HAL (hardware abstraction layer), using that it should be relatively easy to have a arduino driver that can do pwm, digital i/o, analog input etc.. if you are mimicing the existing protocols, then you should be able to just add it as an existing driver :)

Would you have an example on how to use it? say how would I create digital I/o from Arduino to reef-pi.
 

Urtoo

Well-Known Member
View Badges
Joined
Jul 1, 2019
Messages
688
Reaction score
925
Rating - 0%
0   0   0
A buddy of mine is an electrician and he estimated that I'll need at least 4 separate circuits for what I plan to do. He said he'll run 6 just to be on the safe side. It's great having friends :D

Hope you live near me in Chicago! I need an elechicken to check my work, but they charge wayyyyyy too much by the hour around here. Seriously called a guy, and for a run of 12' linear, I was quoted 650
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,848
Reaction score
17,081
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Would you have an example on how to use it? say how would I create digital I/o from Arduino to reef-pi.
checkout reef-pi/drivers repository it has all the drivers implementations. The file driver will give some idea on what a minimal implementation looks like. The actual interfaces that needs to be implemented are defined under reef-pi/hal
 

dmolavi

Well-Known Member
View Badges
Joined
Jan 3, 2015
Messages
509
Reaction score
646
Location
United States
Rating - 0%
0   0   0
@Ranjib , @crusso1993 .... if one of you could take a peek at my DLI driver and point me to what needs fixing, i'd like to get that into at least my branch and then put in a pull request. The reason I like the DLI switch so much is that it isn't reliant on the cloud for connectivity and functionality.

Separately, I've been pondering how to do an auto shut-off on my skimmer, so that when the cup is nearly full, it turns off. I know that I could use this: https://www.bulkreefsupply.com/smart-level-security-autoaqua.html , but I would have no reef-pi feedback that the skimmer was turned off. I suppose the first discussion would be a reliable way to detect it - optical sensors could easily give false positives if they get "crudded up" by the skimmate. Float switches could get locked up by the stuff too...this particular aspect of the discussion I'll post elsewhere, as it's not directly related to reef-pi, but I'd like to be able to incorporate that functionality into reef-pi eventually. (Same for detecting when my ATO is low, and shut it off).
 

Schreiber

Leviathan
View Badges
Joined
Jun 28, 2016
Messages
468
Reaction score
593
Location
Knoxville
Rating - 0%
0   0   0
Just a comment, nice power distribution but little scary if you need to load all on a single feed of power. Typical house wiring 14/2 with maximum 15A panel breaker. Since it is very likely that this is not going to be plugged into a dedicated circuit and will be shared with some of the existing receptacles in the house very easy for cabling to overheat and spark a house fire. Just an FYI

Could you expand on that? 14 gauge house wiring is rated to safely carry a 15A load. When you're pulling power through that 15A panel breaker, there shouldn't be a way for it to draw more current than the wire can handle. Once it hits the threshold of that 15A breaker, it will trip, preventing you from overloading what the wire is rated for.

Theoretically, a power strip with 100 outlets would be perfectly safe, as long as you're pulling less than 15A through it. Of course, at those extremes, you'd probably have to start seriously considering the resistance introduced by the outlets themselves.

I'm not sure why you'd consider it scary, unless you've done something to your panel to bypass the circuit breaker. Drawing 10 A through a single power enclosure like this is the same as drawing 1A through 10 different outlets on the same circuit as far as power draw & heat concerns go.
 

Schreiber

Leviathan
View Badges
Joined
Jun 28, 2016
Messages
468
Reaction score
593
Location
Knoxville
Rating - 0%
0   0   0
A buddy of mine is an electrician and he estimated that I'll need at least 4 separate circuits for what I plan to do. He said he'll run 6 just to be on the safe side. It's great having friends :D

That's wild! What all are you running?? I'm going to guess there are either multiple metal halides or seriously heavy duty pumps/heaters involved. My setup at peak (all pumps, powerheads, lights, heaters, etc. at their absolute highest power draw they're rated for) is less than 7 amps. Not sure what the actual current draw is though. Sounds like you're about to have 90 amps of circuitry installed!!

When I was designing my enclosure, I did some research to find what people with smart plugs typically see as their actual current draw for their tanks. The typical current draw for an average reef tank seems to sit in the 2.5-3A range. I saw only 2 responses using above 5A, both were using multiple metal halide lights.

Absolute highest response I found was a guy running about 25 amps, with 3 250W metal halides, 4 60" T5s, huge 3.5A return pump, 800W 9A heater, & more. This was for a 375 gallon SPS tank.

I guess what I'm getting at, is unless you're running a fish store, or the equivalent, in your house.... 90A is *major* overkill. The 4 circuits at 60A miiiight be necessary if you've got a crazy setup & a lot of other power-hungry electronics on the same circuit as well. I'd be curious to hear what all you've got on that one circuit & why he thinks 60A would be the minimum. I'm not a professional electrician, so I'm not saying he's wrong... but for a figure like that, there'd better be a good reason :oops:
 
Last edited:

lmm1967

Well-Known Member
View Badges
Joined
Sep 12, 2017
Messages
563
Reaction score
848
Location
North Georgia
Rating - 0%
0   0   0
Hive mind
its been more than a month since 3.0 release. Thankfully we have not heard of any serious bugs except few edge cases (bugs induced by very specific type of inputs or usecases). I have taken time to go through those and fix them along with addressing several minor bugs (does not impact controller behavior/function critically but undesirable or confusing things). There are few minor but very useful feature that also i felt were missing after using 3.0 for a month. I have made all those changes and we are shipping reef-pi 3.1 today.

Update went perfectly smooth - have seen no issues as of yet on my small (currently desktop monitoring - LOL) instance.

I'll play around and report if I do manage to find anything but so far looks good!
 

crusso1993

7500 Club Member
View Badges
Joined
Oct 21, 2018
Messages
8,671
Reaction score
44,651
Location
SW, FL, USA
Rating - 0%
0   0   0
@Ranjib , @crusso1993 .... if one of you could take a peek at my DLI driver and point me to what needs fixing, i'd like to get that into at least my branch and then put in a pull request. The reason I like the DLI switch so much is that it isn't reliant on the cloud for connectivity and functionality.

Separately, I've been pondering how to do an auto shut-off on my skimmer, so that when the cup is nearly full, it turns off. I know that I could use this: https://www.bulkreefsupply.com/smart-level-security-autoaqua.html , but I would have no reef-pi feedback that the skimmer was turned off. I suppose the first discussion would be a reliable way to detect it - optical sensors could easily give false positives if they get "crudded up" by the skimmate. Float switches could get locked up by the stuff too...this particular aspect of the discussion I'll post elsewhere, as it's not directly related to reef-pi, but I'd like to be able to incorporate that functionality into reef-pi eventually. (Same for detecting when my ATO is low, and shut it off).

Are you looking for something like the below link?

 

dmolavi

Well-Known Member
View Badges
Joined
Jan 3, 2015
Messages
509
Reaction score
646
Location
United States
Rating - 0%
0   0   0
Are you looking for something like the below link?


almost yeah. I guess that isn't reliant on Arduino (just give it +5V VCC from a pin)...not a fan that it needs to be power cycled to re-zero it, though (in looking at the docs on the DFRobot pages). I suppose I could have a quick connect that i unplug each time...hmm...
 

marekd1

Active Member
View Badges
Joined
Dec 24, 2019
Messages
133
Reaction score
200
Rating - 0%
0   0   0
Could you expand on that? 14 gauge house wiring is rated to safely carry a 15A load. When you're pulling power through that 15A panel breaker, there shouldn't be a way for it to draw more current than the wire can handle. Once it hits the threshold of that 15A breaker, it will trip, preventing you from overloading what the wire is rated for.

Theoretically, a power strip with 100 outlets would be perfectly safe, as long as you're pulling less than 15A through it. Of course, at those extremes, you'd probably have to start seriously considering the resistance introduced by the outlets themselves.

I'm not sure why you'd consider it scary, unless you've done something to your panel to bypass the circuit breaker. Drawing 10 A through a single power enclosure like this is the same as drawing 1A through 10 different outlets on the same circuit as far as power draw & heat concerns go.


The concern is not that you will draw maximum allowed current. Having that large number of outlets running on a single feed and creating opportunity to plug things that in total would exceed 15A is an issue. Your assumption is that the breaker will always trip if you exceed 15A (perfect world). If that was the case there would be no instances of electrical fires. You can have one device that runs say at 20A on a 15A circuit. If the breaker fails to trip due to its failure you will keep on drawing 20A until insulation melts. There is a reason why for example you do not have 8 outlets on extension cords but people would plug in extension to extension to extension.

Better yet show this box to your house insurance inspection agent and see what he tells you.

Just trying to point out some dangerous approaches and be helpful.
 

marekd1

Active Member
View Badges
Joined
Dec 24, 2019
Messages
133
Reaction score
200
Rating - 0%
0   0   0
Could you mount the optical sensor on the outside of the cup? Maybe mount a "shield" around it to protect it from salt buildup?

Unfortunately no, they need to touch water, this is when the light direction changes and water level is being sensed.
 

marekd1

Active Member
View Badges
Joined
Dec 24, 2019
Messages
133
Reaction score
200
Rating - 0%
0   0   0
almost yeah. I guess that isn't reliant on Arduino (just give it +5V VCC from a pin)...not a fan that it needs to be power cycled to re-zero it, though (in looking at the docs on the DFRobot pages). I suppose I could have a quick connect that i unplug each time...hmm...

here is something similar.... still 5V but you will have to shift the voltage to the PI's levels.


1578416790006.png
 

Schreiber

Leviathan
View Badges
Joined
Jun 28, 2016
Messages
468
Reaction score
593
Location
Knoxville
Rating - 0%
0   0   0
The concern is not that you will draw maximum allowed current. Having that large number of outlets running on a single feed and creating opportunity to plug things that in total would exceed 15A is an issue. Your assumption is that the breaker will always trip if you exceed 15A (perfect world). If that was the case there would be no instances of electrical fires. You can have one device that runs say at 20A on a 15A circuit. If the breaker fails to trip due to its failure you will keep on drawing 20A until insulation melts. There is a reason why for example you do not have 8 outlets on extension cords but people would plug in extension to extension to extension.

Better yet show this box to your house insurance inspection agent and see what he tells you.

Just trying to point out some dangerous approaches and be helpful.

Again, not an electrician, so I may be wrong on this.... But what is the difference between having these 16 outlets in one enclosure vs having 16 outlets in different enclosures? They'd still be pulling from the same circuit on the same power wire.

If I overloaded my wiring's current rating & caused a fire due to a failed circuit breaker, it isn't because all the outlets were close together. I would have overloaded it if I'd plugged 16 things into 16 separate wall outlets as well. As long as the enclosure has wiring rated to handle the same amps that the house wiring is, there shouldn't be a problem.

Circuit breakers are a nice fail-safe, but it's always up to you to ensure you're pulling a safe amount of current. Sure, a 16 outlet enclosure makes it easier to add on too much current draw, by the virtue of having more outlets to draw from. But the outlet number isn't the problem, it's the amps. This 16 outlet enclosure running 16 1/2 amp power heads would be perfectly safe. But a 2 outlet enclosure running 2 12 amp heaters has the potential to catch fire if the circuit breaker fails.
 

crusso1993

7500 Club Member
View Badges
Joined
Oct 21, 2018
Messages
8,671
Reaction score
44,651
Location
SW, FL, USA
Rating - 0%
0   0   0
almost yeah. I guess that isn't reliant on Arduino (just give it +5V VCC from a pin)...not a fan that it needs to be power cycled to re-zero it, though (in looking at the docs on the DFRobot pages). I suppose I could have a quick connect that i unplug each time...hmm...

How did I know what you were going to say before you said it? Lol

It's all I could come up with based on your not wanting to use an optical or float sensor. Plus, I was in a hurry when I replied. Plus, there was an earthquake... a flood... and locusts! ;)
 

dmolavi

Well-Known Member
View Badges
Joined
Jan 3, 2015
Messages
509
Reaction score
646
Location
United States
Rating - 0%
0   0   0
How did I know what you were going to say before you said it? Lol

It's all I could come up with based on your not wanting to use an optical or float sensor. Plus, I was in a hurry when I replied. Plus, there was an earthquake... a flood... and locusts! ;)

Haha actually there is a simliar (Amazon product) one that isn't Arduino specific that I found online, and since (I think) these need to be permanently affixed to the surface, quick disconnects would be the way to go to enable emptying and cleaning.
 
Last edited:
Back
Top