My reef-pi build freshwater style!

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
In other news, I mounted my enclosure under my stand, reef pi is now officially controlling everything, lights, filters, heaters and soon will have a ph monitor.
I set timers to shut down each of my canisters once a day for 1 minute to clear and bubbles, and it also seems to stir the tank a bit and move some detritus that may be stuck in the bottom.

I also did my weekly plant trimming...in one week it gets to be a jungle...here are before and after pics:

Before trimming
20190210_113001.jpg


After trimming
20190210_133117.jpg

Nice!
 
OP
OP
Bigtrout

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
@theatrus and @Ranjib

Ranjib tested his pca9865 and got im assuming correct frequency numbers.

Any reason mine is 'stuck', or could it be a weird installation or stuck driver issue?
Hardware issue? Although everything else on the pca9865 seems to be correctly working? Im using a mike lane board, but it appears as though everything looks good on the soldering, the pins all put out correct duty cycle, its fed with 3.3v, and pins all work when called and it shows up correctly on an i2c bus scan as address 40.

Is a re-install in order? Did I miss a setting in a config txt or something? Should I delete my database and rebuild perhaps
 
Last edited:
OP
OP
Bigtrout

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
Just a build update...
My feeding macro that turns off my canisters is working great, just have to tune in the time a little bit.
I built some timers to start and stop my canisters twice a day. They stop and start in different orders to help make flow a little different to stir the detritus differently than it usually gets stirred. The timers have been flawless and it is helping to keep the black diamond blasting sand cleaner looking, plus it "burps" the canisters if evaporation(fast sometimes in winter) lets a spray bar get uncovered enough to make microbubbles.

Seeing all the weird issues with sd cards getting whacky and time stamp issues on files hosing installations. I decided to look into adding a RealTimeClock to my installation. Its not necessary if you have a good internet connection all the time. The raspberry pi gets its time via NTP, but I live in rural NW PA and lose internet quite frequently, so it cant hurt to add a RTC.

The DS3231 is the most accurate out there and can be added to the i2c bus. Found one on ebay for 4 bux, and just happen to have a 5 dollar coupon on any purchase ready to expire today, so an RTC is on its way!
 
OP
OP
Bigtrout

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
At this stage of my build, I am just about finished until I put in my 40 breeder sump this spring. Theres still the driver kinks to work out with the pwm, and im awaiting the driver for the ph board. But reef pi is functional, works good and has been trouble free.

My next moves are going to be researching for my sump, now with reef pi in mind. Think ATO sensors, and a variable speed dc return pump that could be controlled with reef pi pwm.
 

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,058
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
I wanted to give some updates on the pwm frequency thing. As it stands now, we have made some fixes, in the code but have not been able to see the effect in hardware. I am in process of ordering couple of more pca9685 to double check that its not a faulty IC thats causing the fixed code to not have any effect. Me, theatrus and another lady developer from UK (Melanie) have worked on it.
Just wanted to let you know that we are not dropping the ball :) . Its in our list, and since we are in the middle of wrapping up the ph board/pico board driver major focus has been there.
 
OP
OP
Bigtrout

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
I wanted to give some updates on the pwm frequency thing. As it stands now, we have made some fixes, in the code but have not been able to see the effect in hardware. I am in process of ordering couple of more pca9685 to double check that its not a faulty IC thats causing the fixed code to not have any effect. Me, theatrus and another lady developer from UK (Melanie) have worked on it.
Just wanted to let you know that we are not dropping the ball :) . Its in our list, and since we are in the middle of wrapping up the ph board/pico board driver major focus has been there.
No problem...while im not a code guru, I looked over some of the cose and cant see where the problem may be...just to make it work for me, I was going to change the driver default in the code to 200hz and recompile and see if it defaults at 200 which would work for now.
 
OP
OP
Bigtrout

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
Woohoo, recieved my DS3231 real time clock module. I will incorporate this into my build. I am gathering info on how to make raspberry pi use NTP normally but fall back to the RTC if the internet is down...and periodically update the RTC to keep it accurate.

When sucessful I will make a writeup so anyone wanting to add one can do the same.
 
OP
OP
Bigtrout

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
Adding A DS3231 Real Time Clock

Living in a rural area, I get frequent internet outages. With the raspberry pi having no clock other than getting internet time, I decided adding a RTC module is my best action to keep reef pi operational.

Here is how I did it. I decided on a ds3231 based clock because they are accurate and cheap. Look on ebay and they are less than $2, I bought one. These modules are marked ZS-042.
20190223_170926.jpg
20190223_170913.jpg

These have a few quirks. They are meant for a lir2032 rechargeable battery but seldom ship with one because of the air mail restrictions on lithium ion batteries. Mine shipped with a cheap chinese CR2032. They work with a cr2032 coin cell but you must disable the "charger circuit" to use a standard coin cell. If you use this module with a cr2032 without disabling the charging circuit, IT CAN EXPLODE and possibly start a FIRE!!!

So all we have to do to make this useable is to remove the resistor marked 201 circled in the pic below. I used a soldering iron, you can cut a trace between it and the diode as well. This disables the charging circuit only. The clock chip is still backed up by the battery.
20190223_173152.jpg

So I am going to remove the resistor, put in a decent battery and wire this.
This runs on the i2c bus and simply uses 5v to VCC, GND, SCL and SDA.
Here is the resistor removed
20190223_171723.jpg

Here is a good battery installed.
20190223_171758.jpg

Here is the module wired ready to be installed into my reef pi setup
20190222_193931.jpg


Once wired into my pi, I followed this adafruit guide to get it working:
https://learn.adafruit.com/adding-a-real-time-clock-to-raspberry-pi/overview

Once its working, to check the status of clocks on your setup run the command:
timedatectl status
This screen shows up
Screenshot_20190223-180228_ConnectBot.jpg

Tells me everything I need to know about the clocks on the pi.

Using the adafruit guide your pi will use the RTC when an internet clock is not available and will periodically update the RTC(Im not a linux guru yet so im not sure how often).

Here is a schematic of the module for anyone interested
DS3231.jpg
 
Last edited:
OP
OP
Bigtrout

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
I spied a new addition to my tank.
When I moved 2 years ago,I lost the female of a pair of golden bristlenose plecos. The male survived, and I bought 2 juvenile females, but standard brown color. Around Xmas, I spied a new small pleco in the tank. Messing around the tank today, there is another. These plecos are slowly breeding, I am up to 5 now. All the plant and driftwood must be enough cover that a couple are surviving.
Heres the new one its about 1 inch long.
20190223_183330.jpg


In other tank news, my fish are tuned in to the feeding macro. My macro turns off the canisters for a few minutes so they don't suck up food before its eaten. Now as soon as the pumps shut off, the fish go nuts waiting for the food, and my biggest angel is now taking food from my hand!
 
Last edited:

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
I spied a new addition to my tank.
When I moved 2 years ago,I lost the female of a pair of golden bristlenose plecos. The male survived, and I bought 2 juvenile females, but standard brown color. Around Xmas, I spied a new small pleco in the tank. Messing around the tank today, there is another. These plecos are slowly breeding, I am up to 5 now. All the plant and driftwood must be enough cover that a couple are surviving.
Heres the new one its about 1 inch long.
20190223_183330.jpg


In other tank news, my fish are tuned in to the feeding macro. My macro turns off the canisters for a few minutes so they don't suck up food before its eaten. Now as soon as the pumps shut off, the fish go nuts waiting for the food, and my biggest angel is now taking food from my hand!

Very cool!
 

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,058
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
I spied a new addition to my tank.
When I moved 2 years ago,I lost the female of a pair of golden bristlenose plecos. The male survived, and I bought 2 juvenile females, but standard brown color. Around Xmas, I spied a new small pleco in the tank. Messing around the tank today, there is another. These plecos are slowly breeding, I am up to 5 now. All the plant and driftwood must be enough cover that a couple are surviving.
Heres the new one its about 1 inch long.
20190223_183330.jpg


In other tank news, my fish are tuned in to the feeding macro. My macro turns off the canisters for a few minutes so they don't suck up food before its eaten. Now as soon as the pumps shut off, the fish go nuts waiting for the food, and my biggest angel is now taking food from my hand!
Congrats :)
 

Michael Lane

Well-Known Member
View Badges
Joined
Aug 11, 2018
Messages
677
Reaction score
1,123
Rating - 0%
0   0   0
That's great! I love it when I find a pleasant surprise in my tank. It makes me want to try setting up a planted fresh water tank (if only I could make the time for it).

The RTC addition is nice too. I'll have to remember it next time I upgrade my reef-pi.
 
OP
OP
Bigtrout

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
We had a powet blink...great test to see if everything with the RTC is working:

sudo hwclock -D -r

Reads the clock and tells how much drift the RTC is from internet time
Screenshot_20190224-032116_ConnectBot.jpg

RTC drift is 0.0000 secs, its working as planned...woohoo!!!
 
OP
OP
Bigtrout

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
Just an update, with the rtc in place, numerous power and internet blinks...and its steady as she goes!!

If the PWM bug on the PCA9685 gets fixed, this makes one heck of a controller!
Screenshot_20190228-171235_Chrome.jpg
Screenshot_20190228-171246_Chrome.jpg


Once we get hysteresis on the temp controller, im giving serious thought to making a reef pi with small screen and making my own home thermostat with one...lol
 
OP
OP
Bigtrout

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
With the pwm fix in place, I can now work on tuning my lighting, it is nice to let the lights slowly turn on instead of an abrupt full on. Watching now as lights gently ramp up, the fish seem alot calmer, and watching the school of cory cats scouring the bottom in the dim light!
 
OP
OP
Bigtrout

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
The lighting pretty much finishes this build until we can monitor ph. I will work on a write up to describe how I did the PWM to the beamswork lights. It wont be informative to reef keepers, but both beamswork and finnex lights both use the odd common cathode layouts for the LEDs and both are very popular freshwater lights.
 
OP
OP
Bigtrout

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
Build summary:
75 gallon freshwater planted tank

8 controlled outlets
(3 canister filters and 2 250w heaters)

3 DS18b20 temp sensors

4 channels of PWM control to 2 beamswork DA FSpec 48" lights

DS3231 Real Time Clock

Roberto's pH board to monitor pH

One heck of a controller for good price and some fun time building it myself!
 

Mikeneedsahobby

Well-Known Member
View Badges
Joined
Sep 16, 2018
Messages
516
Reaction score
922
Rating - 0%
0   0   0
Trout,

What are the major components to turning a standard freshwater tank into a planted tank? Is it just lights or are you adding c02, dosing something, special dirt?

I have a 20g fresh with some tetras and one small plant that lives but grows slow. It would be fun to fill it with plants.
 

Algae invading algae: Have you had unwanted algae in your good macroalgae?

  • I regularly have unwanted algae in my macroalgae.

    Votes: 44 35.2%
  • I occasionally have unwanted algae in my macroalgae.

    Votes: 27 21.6%
  • I rarely have unwanted algae in my macroalgae.

    Votes: 9 7.2%
  • I never have unwanted algae in my macroalgae.

    Votes: 10 8.0%
  • I don’t have macroalgae.

    Votes: 31 24.8%
  • Other.

    Votes: 4 3.2%
Back
Top