• For a Limited Time the R2R Partner Membership is NOW OPEN! Get some cool swag and chances to win part of over $20,000 in prizes! Click here for more details

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

OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
8,273
Reaction score
14,724
Location
Palo Alto, Bay Area
Take a look at my build thread somewhere I have instructions for adding a Real Time Clock board. This helps with corruption issues from power outages/internet outages. Sometimes raspian gets wonky when file timestamps dont match. Without a RTC if raspian comes up without internet, it wont be able to get the correct time.

Since adding the RTC i have not had an issue, going on 1.5 years now and we get power outages and internet outages regularly in the woods of NW Pennsylvania.
Might be useful: https://learn.adafruit.com/adding-a-real-time-clock-to-raspberry-pi
 
Aquarium Specialty - dry goods & marine livestock
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
8,273
Reaction score
14,724
Location
Palo Alto, Bay Area
Not yet. But this was something I wanted to get done for 4.0 :-/, along side stepper driver
Something I forgot to mention, it’s relatively easy to control servo with pi, https://learn.adafruit.com/adafruits-raspberry-pi-lesson-8-using-a-servo-motor?view=all , and though we don’t have any direct integration with servo in reef-pi yet, it should be possible to do an indirect integration using the file driver. Reef-pi can output (jack or outlet ) state to a file and and external python script can read that file and do the required servo work , as described in the adafruit guide.
 

Yov

Community Member
View Badges
Joined
May 24, 2020
Messages
43
Reaction score
39
I would like to use it in a macro to open or close my top lid of the terrarium. This contains al the electronics and i use the heat to warm the terrarium, but in case things get to hot it would be nice to just open the lid to vent! (Like in green houses)

A6815508-E021-42F7-8A82-B09EED4E3749.jpeg
 
Corals.com

BenB

Community Member
View Badges
Joined
Jun 11, 2019
Messages
76
Reaction score
121
@Ranjib is there a way to control servo motors from the reef-pi?
F180217E-BB00-4491-8A83-C30348305F68.jpeg
In the past i played with this:

I tried the Servo again and I found that the servo PWM needs to be in between 1 and 2 ms. 1 ms is 0dgr and 2 ms is 180dgr. Using the PCA9685 you can set the Frequency. When a frequency is used of 350Hz that means 1/350= 2.86 ms. I used the Lights tab in Reefpi and set it to manual. When the percentage is set to 17% it moves to 0dgr and 55% it moves to 90dgr and 93% to 180dgr.

1592689238567.png


After some fine-tuning when the frequency is set to 320Hz (1/320=3.125ms) i get with 17% it moves to 0dgr and 50% it moves to 90dgr and 83% to 180dgr.
I am thinking of building an auto-feeder with Servos!!!
 

Matevz Savarin

Active Member
View Badges
Joined
Dec 5, 2018
Messages
200
Reaction score
158
Hi I just reseted my pi after 7 months and now all data is gone... not good at all. I tried ro update my saved db file but its same.. any idea? Tnx! I have all on pi including heaters, lights, pumps.. all.. not good at all
 

theatrus

Valuable Member
View Badges
Joined
Mar 26, 2016
Messages
1,316
Reaction score
2,542
Location
Sacramento, CA area
My little sensor assemblies are gaining some ground from R&D. I had to toss a few ideas out, and rejected a number of epoxies, but settled on these little things in the latest batch.

IMG_7434.jpg


Real cable is by far the most expensive thing here. This is a PUR jacket, PVC inner, 3 conductor job. At a little over $1.50/ft, 8 feet of cable adds up fast. There are even fancier jacket materials, but they run $3+ a ft. Over a generic PVC cable, this is quite the expense but should make up for its self in long term reliability. I'm also trying to source as much as possible domestically, and import cables are right out for that (not going to touch them, lest I end up with some copper clad aluminum).

The capsules are are a thin wall acetal/delrin construction (0.5" diam), with bottom caps also of delrin. Inside is a _real_ DS18B20 TSOP-8 mounted on a carrier board, and a power decoupling capacitor.

IMG_7435.jpg


Finding the right potting compound took awhile. I'm currently using Loctite 870FT - not cheap, but it has the right viscosity and the cartridge dispensing is perfect for this, even if it means I lose some to the mixing nozzle - just incentive to make bigger batches. I had a number of failed potting attempts previously, and pot mix was just simply too much work.

The commercial guys are using this 5k thermistor pill, potted (with probably a non-thermal modified resin) in an acrylic tube and then heatshrunk over. I may borrow the idea of heatshrinking the cable exit of my version to just clean up the looks.

IMG_7436.jpg


More tests soon!
 

Des Westcott

Well-Known Member
View Badges
Joined
May 29, 2018
Messages
564
Reaction score
933
Location
Durban - South Africa
I'm trying to run the pH calibration, but it seems to have changed since I last used it. So just want to check I clean the probe in RODI. Disable the pH in reef-pi and save. Drop the probe into the 7 Buffer solution. Then hit the calibrate function. Then I'm not sure what is the best course of action. I see the "Midpoint", "Value" which can be set if different from what I want to use and "Run" Boxes. Do I just wait for the "Current Reading" value to stabilise and then hit "Run"? "Run" then turns to a tick/check mark

Then rinse and repeat with the 10 Buffer.

Is that right?
 
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
8,273
Reaction score
14,724
Location
Palo Alto, Bay Area
Hi I just reseted my pi after 7 months and now all data is gone... not good at all. I tried ro update my saved db file but its same.. any idea? Tnx! I have all on pi including heaters, lights, pumps.. all.. not good at all
Can you share the error or the log ? Also expand what you mean by resetting pi? Reboot or reimage?
 
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
8,273
Reaction score
14,724
Location
Palo Alto, Bay Area
My little sensor assemblies are gaining some ground from R&D. I had to toss a few ideas out, and rejected a number of epoxies, but settled on these little things in the latest batch.

IMG_7434.jpg


Real cable is by far the most expensive thing here. This is a PUR jacket, PVC inner, 3 conductor job. At a little over $1.50/ft, 8 feet of cable adds up fast. There are even fancier jacket materials, but they run $3+ a ft. Over a generic PVC cable, this is quite the expense but should make up for its self in long term reliability. I'm also trying to source as much as possible domestically, and import cables are right out for that (not going to touch them, lest I end up with some copper clad aluminum).

The capsules are are a thin wall acetal/delrin construction (0.5" diam), with bottom caps also of delrin. Inside is a _real_ DS18B20 TSOP-8 mounted on a carrier board, and a power decoupling capacitor.

IMG_7435.jpg


Finding the right potting compound took awhile. I'm currently using Loctite 870FT - not cheap, but it has the right viscosity and the cartridge dispensing is perfect for this, even if it means I lose some to the mixing nozzle - just incentive to make bigger batches. I had a number of failed potting attempts previously, and pot mix was just simply too much work.

The commercial guys are using this 5k thermistor pill, potted (with probably a non-thermal modified resin) in an acrylic tube and then heatshrunk over. I may borrow the idea of heatshrinking the cable exit of my version to just clean up the looks.

IMG_7436.jpg


More tests soon!
Looking awesome :) . Keep it up
 

elysics

Active Member
View Badges
Joined
Jan 15, 2020
Messages
134
Reaction score
129
I like the idea of multiple busses along with additional ATO logic, Whilst this does mean that the users has to create the additional redundant network, it opens up the possibilities of more complex control schemas.

At the moment we only have

IF THIS THEN THAT

What we really need is

IF THIS AND / OR THIS THEN THAT

Then just set up two temp probes, each on a different bus. Problem solved.

It also means that the system degrades nicely. i.e. there is no loss of control of the system (i.e. the heater) in the event of a single temp probe failure or single bus issue. This is basically how a safety PLC works.

You can use the same control logic to implement redundant control for any connected device, not just heaters and temp probes. E.g. redundant float control for ATO, redundant Ph control, in fact redundant control for any device or control schema.

Plus there's the added bonus of more complex control schemas that would be available with the additional ' AND / OR THIS ' logic.
I think i asked about something similar a really long while ago with the overall stance being that reef-pi wouldn't get a programming language type feature, which i undestand. But with the HAL driver system standardizing everything, and the macro system being expanded, is that maybe something that could be looked into again? I agree that AND/OR statements, and also IF...THEN...ELSE rather than just IF...THEN would vastly increase possibilties here in regards to tinkering with stuff and layers of safety features.
 

Mikeneedsahobby

Active Member
View Badges
Joined
Sep 16, 2018
Messages
413
Reaction score
759
I'm trying to run the pH calibration, but it seems to have changed since I last used it. So just want to check I clean the probe in RODI. Disable the pH in reef-pi and save. Drop the probe into the 7 Buffer solution. Then hit the calibrate function. Then I'm not sure what is the best course of action. I see the "Midpoint", "Value" which can be set if different from what I want to use and "Run" Boxes. Do I just wait for the "Current Reading" value to stabilise and then hit "Run"? "Run" then turns to a tick/check mark

Then rinse and repeat with the 10 Buffer.

Is that right?
Edit ph.
disable probe.
save
Calibrate
Rinse probe in rodi
Place in 7 calibration fluid
Wait for readings to stabilize
Set cal value to 7
Push run
Rinse probe
Put in 10 calibration fluid
Set cal value to 10
Run
Enable probe
Rinse probe and check both 7 and 10 and make sure it’s close.
 

Des Westcott

Well-Known Member
View Badges
Joined
May 29, 2018
Messages
564
Reaction score
933
Location
Durban - South Africa
Edit ph.
disable probe.
save
Calibrate
Rinse probe in rodi
Place in 7 calibration fluid
Wait for readings to stabilize
Set cal value to 7
Push run
Rinse probe
Put in 10 calibration fluid
Set cal value to 10
Run
Enable probe
Rinse probe and check both 7 and 10 and make sure it’s close.
Thanks. That's basically what I was doing.
 
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
8,273
Reaction score
14,724
Location
Palo Alto, Bay Area
I think i asked about something similar a really long while ago with the overall stance being that reef-pi wouldn't get a programming language type feature, which i undestand. But with the HAL driver system standardizing everything, and the macro system being expanded, is that maybe something that could be looked into again? I agree that AND/OR statements, and also IF...THEN...ELSE rather than just IF...THEN would vastly increase possibilties here in regards to tinkering with stuff and layers of safety features.
Support for else (as in if - else ) and combining multiple sensor values are two things I’m thinking as something we need as part of next evolution of macro.
 
Top Shelf Aquatics

Matevz Savarin

Active Member
View Badges
Joined
Dec 5, 2018
Messages
200
Reaction score
158
Ranjib I managed to upload db file from 6 months ago, now it works. Well all I did when all data was gone is that I added 6 led drivers and lights. After reboot nothing left in pi. Now all works again exept adafruit gets only 7 data feeeds in minute, I will play with that later.
 

sellereef

New Member
View Badges
Joined
Sep 28, 2020
Messages
4
Reaction score
2
Location
Grand Rapids
Has anyone setup reef-pi light controller for Mars Aqua? I am reading some things now that looks like I may need an additional converter to be able to use PWM?

Thank you!
Anyone have any thoughts with this one? I may end up with other "Standard black boxes" but I just want to be prepared
 

waynel

Active Member
View Badges
Joined
May 22, 2020
Messages
139
Reaction score
183
Location
Kentucky

Have you ever used a spoon, hose and rubber band together to remove algae?

  • YES

    Votes: 14 5.4%
  • NO

    Votes: 129 50.2%
  • What the heck? (see the thread)

    Votes: 114 44.4%

Online statistics

Members online
2,215
Guests online
4,694
Total visitors
6,909
Top