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

robsworld78

Well-Known Member
View Badges
Joined
Feb 14, 2020
Messages
985
Reaction score
1,325
Location
Edmonton, Canada
Rating - 0%
0   0   0
It is :) Probably the best recommendation for reliability would be enabling multiple pins?

I've setup 3 buses on Pi 3 and 4 with no issues, was too easy.

 

DeeEmm

New Member
View Badges
Joined
Sep 20, 2020
Messages
24
Reaction score
27
Location
RADelaide
Rating - 0%
0   0   0
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.
 

stefanm

Active Member
View Badges
Joined
Oct 11, 2017
Messages
360
Reaction score
397
Location
Sweden
Rating - 0%
0   0   0
I thought this might be helpful if you're facing any issues with reef pi.

I had a few things that wouldn't work as they should, no issues with the hardware. I was in the verge of wiping the sdcard and reinstalling, the pi has been running for for around 20 months, I felt the software had been corrupted.

So instead of removing the card and doing it all again, I decided to try updating the raspberry pi os, it worked a treat and no need to reconfigure anything.

I guess that the power cuts we have had which the battery backup has run out (around 10 times) had corrupted the os.
 

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
I thought this might be helpful if you're facing any issues with reef pi.

I had a few things that wouldn't work as they should, no issues with the hardware. I was in the verge of wiping the sdcard and reinstalling, the pi has been running for for around 20 months, I felt the software had been corrupted.

So instead of removing the card and doing it all again, I decided to try updating the raspberry pi os, it worked a treat and no need to reconfigure anything.

I guess that the power cuts we have had which the battery backup has run out (around 10 times) had corrupted the os.
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.
 
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
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
 

Yov

Community Member
View Badges
Joined
May 24, 2020
Messages
51
Reaction score
44
Rating - 0%
0   0   0
@Ranjib is there a way to control servo motors from the reef-pi?

F180217E-BB00-4491-8A83-C30348305F68.jpeg
 
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
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
51
Reaction score
44
Rating - 0%
0   0   0
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
 

BenB

Active Member
View Badges
Joined
Jun 11, 2019
Messages
112
Reaction score
155
Rating - 0%
0   0   0
@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
209
Reaction score
163
Rating - 0%
0   0   0
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
2,223
Reaction score
3,632
Location
Sacramento, CA area
Rating - 0%
0   0   0
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
646
Reaction score
1,035
Location
Durban - South Africa
Rating - 0%
0   0   0
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
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
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
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
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

Valuable Member
View Badges
Joined
Jan 15, 2020
Messages
1,591
Reaction score
1,590
Rating - 0%
0   0   0
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

Well-Known Member
View Badges
Joined
Sep 16, 2018
Messages
516
Reaction score
922
Rating - 0%
0   0   0
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.
 
Back
Top