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

OP
OP
Ranjib

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
Ok, so I deleted my calibration to confirm a suspicion I had. The readings are pretty unstable from the probe. This is the output from my probe sitting undisturbed in 9.18 solution for roughly an hour.

Have other people seen this as well?

594040311.jpg
I would recommend to plug it in your tank and let it run for a day or two, and then let’s look at the data. How much fluctuations you see, if there’s diurnal cycle visible or not etc.
 

Schreiber

Leviathan
View Badges
Joined
Jun 28, 2016
Messages
468
Reaction score
593
Location
Knoxville
Rating - 0%
0   0   0
I would recommend to plug it in your tank and let it run for a day or two, and then let’s look at the data. How much fluctuations you see, if there’s diurnal cycle visible or not etc.

I'm just worried about calibration at this point. Theoretically, the calibration solution should be totally stable. I shouldn't be seeing fluctuations like this. In my tank, pH definitely will be changing, so I'm not sure I'd get anything useful out of putting it in the tank pre-calibration.
 

rushbattle

Valuable Member
View Badges
Joined
Oct 19, 2016
Messages
1,347
Reaction score
1,644
Location
Equality
Rating - 0%
0   0   0
I'm just worried about calibration at this point. Theoretically, the calibration solution should be totally stable. I shouldn't be seeing fluctuations like this. In my tank, pH definitely will be changing, so I'm not sure I'd get anything useful out of putting it in the tank pre-calibration.
Do you know the scale though? That could equal 0.0001 pH points noise or something like that.
 

Schreiber

Leviathan
View Badges
Joined
Jun 28, 2016
Messages
468
Reaction score
593
Location
Knoxville
Rating - 0%
0   0   0
Do you know the scale though? That could equal 0.0001 pH points noise or something like that.

I have my notes at home. But If I recall correctly, I'd see (roughly) a .1 pH change for every 500 units. But as you see there, I have a range of ~2700 units for solution that is theoretically a constant pH. It's hard to nail down a scale when the actual reading is unpredictably changing.
 

BenB

Active Member
View Badges
Joined
Jun 11, 2019
Messages
100
Reaction score
152
Rating - 0%
0   0   0
Analog systems are realy sensitive, it can be that something from outside is infuensing the signal before the conversion to digital. A near power source an AC cable, maybe Wi-Fi. Using a different power adapter for the ph board can help. Or a higher quality powersupply. You can create a faraday cage to keep out noise, with an antystatic bag. On the ezo website they have a lot of dont's you can learn from .
 
OP
OP
Ranjib

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'm just worried about calibration at this point. Theoretically, the calibration solution should be totally stable. I shouldn't be seeing fluctuations like this. In my tank, pH definitely will be changing, so I'm not sure I'd get anything useful out of putting it in the tank pre-calibration.
I can understand the rationale behind but I would still recommend running the probe in the tank. There are many things that can cause aberrations, quality of probe, calibration solution etc. What we do know is the relative range and periodic nature of the ph cycle in reef tanks. This will help us orient and triage the problem. We need that data. Do you have details about your probe etc in your build thread?
 

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
Ok, so I deleted my calibration to confirm a suspicion I had. The readings are pretty unstable from the probe. This is the output from my probe sitting undisturbed in 9.18 solution for roughly an hour.

Have other people seen this as well?

594040311.jpg
I watched some wacky readings on my ph probe. Similar to yours. Sitting in a 6.86 ph constant solution it varied alot. I tried moving cables, putting the ph board in a shielded grounded box, and still got a " daily cycle"
What it turned out to be was a noisy power supply for my led lights. It was putting out major emf interference. I have 2 identical lights and when one was unplugged my ph reading in 6.86 solution leveled right off. If I plugged my light in again, back to the wacky readings.
I bought new better power supplies for my led lights and bingo, problem solved. Not only did this solve the ph reading problem, it solved a few others as well. Now my temp sensors which threw in a very occasional 185F reading, quit doing that and my cable modem which was plugged into the same circuit as the bad power supply, quit giving loads of uncorrectable errors on its status page and my internet download speeds went up.
All this from a cheap chincy power supply thay came with my led lights.


As an aside, when routing cables if you need to have a cable near another, for instance the ph probe cable has to go by a power cable with ac mains running thru it. Cross the ac cable at a right angle(perpendicular) to the ph probe cable. The worst thing you can do is bundle them together where they are parallel to each other if one cable is putting out interference.

Common sources of interference are:

Ac Main cables because these tend no either have no shielding. Ungrounded cables can be worse here for causing an inductive signal.

Dc switch mode power supplies and cables. This includes many dc pumps as well if the cables are not shielded.

Lighting ballasts both magnetic and the newer electronic type, and the secondary wires feeding the bulbs themselves.
 
Last edited:

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
Analog systems are realy sensitive, it can be that something from outside is infuensing the signal before the conversion to digital. A near power source an AC cable, maybe Wi-Fi. Using a different power adapter for the ph board can help. Or a higher quality powersupply. You can create a faraday cage to keep out noise, with an antystatic bag. On the ezo website they have a lot of dont's you can learn from .
Very sound advice here!
The ph probe is reading in millivolts so it does not take much interference to cause erroneous readings.
 
OP
OP
Ranjib

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
Hive minds,
It's less than one month for thanksgiving, and we are heads down busy wrapping up reef-pi 3.0. Its mostly feature frozen (no new things) from now on. I just wrapped up the last bit of new things and that demands a new beta release. So,
reef-pi 3.0.0-beta is out now: https://github.com/reef-pi/reef-pi/releases/tag/3.0.0-beta
This is by far the biggest changeset (highest amount of code) we have done for reef-pi., Here is the summary of key things, copying as it is from the release notes, with some explanations:

  • Timer module improvements:
    • Ability to rigger macro: Yes, users can now trigger macros periodically.
    • Support weekly & monthly schedules: We;ll be able to say things like every Monday, in timer module.
  • Control system:
    • Temperature module supports calibration
    • ph module can control equipment: Calcium reactor, CO2 injectors etc.
    • Hysteresis support in temperature and ph based controls: reef-pi can now act exactly same as heater's inetrnal thermostat. Makes it suitable for chiller and other equipment
    • Temperature and ph module can use macro instead of equipment as control target: Useful if you want to control multiple equipment. Just model them as a single macro.
  • Drivers
    • Jacks can be reversed: We are moving the active high/low option from light channel to jacks. Similar to outlet and inlets, jacks can also be reveresed. This has exactly same effect as light channel high/low. So we are not really adding/deleting any feature, just moving it to a more semantically correct place.
    • kasa smartplug & powerstrip support: Control hs300 powerstrip, hs100/hs110 smart plugs,. This driver also exposes the current monitoring as analog inputs that you can use as fake ph probes.
    • File driver: This is a nifty feature where an arbitrary file can be used to provide a value. Think of an external script writing a single value in a text file and reef-pi can now seamlessly integrate with it, by reading that file periodically and treating as analog input (ph)
  • New PWM profiles:
    • Sine: Typical sine curve for a given start-> end period
    • Arbitrary interval profile: Specify pwm values at fixed interval for a given start->end period. This is a generic version of the current 2 hour interval profile,. User can now use 1 hour or 15 min or any other fixed interval.
    • Random profile: generate incremental random values for a given time period and intensity range. I expect this to be useful for wavemakers
    • Composite profile: Allows combining above three profile (and fixed value profile). Think of pulse mode wavemaker profile can be implemented with an alternate diurnal and fixed interval profile.
  • Internationalization:
    • Chinese language support
    • Portugese language support
    • Dutch language support
  • Other:
    • reef-pi db subcommand: A new reef-pi db list/show/update/create/delete command that can work directly with the database., The controller has to be turned off for this. This can be used to investigate and fix reef-pi during troubleshooting.


We still have a few things to sort out, the pwm profiles UI is still not done yet. Michale is been working on it. Internationalization in not uniform yet (since we added quiet a bit of new things recently). We could really use your help in getting all the language support and above everything testing the beta release if possible. I have tried my best to test each of these bits, but I can certainly use more. I definitely wont be able to test all the possible software combination, let alone the hardware variations. So, if you have some free time or a test build , please give it a shot and let us know what you think. If everything goes well, we'll wrap up the UI bits, fix any critical bugs we found and ship 3.0 right before thanksgiving.
 

brandon clow

Active Member
View Badges
Joined
Oct 22, 2017
Messages
121
Reaction score
155
Rating - 0%
0   0   0
Hive minds,
It's less than one month for thanksgiving, and we are heads down busy wrapping up reef-pi 3.0. Its mostly feature frozen (no new things) from now on. I just wrapped up the last bit of new things and that demands a new beta release. So,
reef-pi 3.0.0-beta is out now: https://github.com/reef-pi/reef-pi/releases/tag/3.0.0-beta
This is by far the biggest changeset (highest amount of code) we have done for reef-pi., Here is the summary of key things, copying as it is from the release notes, with some explanations:

  • Timer module improvements:
    • Ability to rigger macro: Yes, users can now trigger macros periodically.
    • Support weekly & monthly schedules: We;ll be able to say things like every Monday, in timer module.
  • Control system:
    • Temperature module supports calibration
    • ph module can control equipment: Calcium reactor, CO2 injectors etc.
    • Hysteresis support in temperature and ph based controls: reef-pi can now act exactly same as heater's inetrnal thermostat. Makes it suitable for chiller and other equipment
    • Temperature and ph module can use macro instead of equipment as control target: Useful if you want to control multiple equipment. Just model them as a single macro.
  • Drivers
    • Jacks can be reversed: We are moving the active high/low option from light channel to jacks. Similar to outlet and inlets, jacks can also be reveresed. This has exactly same effect as light channel high/low. So we are not really adding/deleting any feature, just moving it to a more semantically correct place.
    • kasa smartplug & powerstrip support: Control hs300 powerstrip, hs100/hs110 smart plugs,. This driver also exposes the current monitoring as analog inputs that you can use as fake ph probes.
    • File driver: This is a nifty feature where an arbitrary file can be used to provide a value. Think of an external script writing a single value in a text file and reef-pi can now seamlessly integrate with it, by reading that file periodically and treating as analog input (ph)
  • New PWM profiles:
    • Sine: Typical sine curve for a given start-> end period
    • Arbitrary interval profile: Specify pwm values at fixed interval for a given start->end period. This is a generic version of the current 2 hour interval profile,. User can now use 1 hour or 15 min or any other fixed interval.
    • Random profile: generate incremental random values for a given time period and intensity range. I expect this to be useful for wavemakers
    • Composite profile: Allows combining above three profile (and fixed value profile). Think of pulse mode wavemaker profile can be implemented with an alternate diurnal and fixed interval profile.
  • Internationalization:
    • Chinese language support
    • Portugese language support
    • Dutch language support
  • Other:
    • reef-pi db subcommand: A new reef-pi db list/show/update/create/delete command that can work directly with the database., The controller has to be turned off for this. This can be used to investigate and fix reef-pi during troubleshooting.


We still have a few things to sort out, the pwm profiles UI is still not done yet. Michale is been working on it. Internationalization in not uniform yet (since we added quiet a bit of new things recently). We could really use your help in getting all the language support and above everything testing the beta release if possible. I have tried my best to test each of these bits, but I can certainly use more. I definitely wont be able to test all the possible software combination, let alone the hardware variations. So, if you have some free time or a test build , please give it a shot and let us know what you think. If everything goes well, we'll wrap up the UI bits, fix any critical bugs we found and ship 3.0 right before thanksgiving.

I will be definitely running this by tonight (cst) and provide feedback.
 

PaulJ2303

Community Member
View Badges
Joined
Sep 30, 2018
Messages
76
Reaction score
172
Rating - 0%
0   0   0
Thanks @Ranjib i think you may have answered my question in your patch notes.

I've just replaced my temp sensor ... the old one was getting a tiny rust spot on the bottom.
I replaced it like for like with a new DS18B20 .... the problem is, the temperature reading is different by about 2 degrees.
I've checked the temp of the tank with a calibrated photography thermometer and it's definitely out.
so my question is can i put an offset into pi so the temp readout is correct ?

I think i spotted in the patch notes for pi 3.0 the ability to calibrated the temperature is that what i need ?
 

Schreiber

Leviathan
View Badges
Joined
Jun 28, 2016
Messages
468
Reaction score
593
Location
Knoxville
Rating - 0%
0   0   0
Woo-hoo! Thanks @Ranjib & @Michael Lane (and I'm sure many others) for the awesome new features! I'll be trying this out first free night I get, probably Friday.

Also, with the pH probe ability to control equipment now, does that extend to dosing pumps? Or is that further on the future?
 
Last edited:

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
Hive minds,
It's less than one month for thanksgiving, and we are heads down busy wrapping up reef-pi 3.0. Its mostly feature frozen (no new things) from now on. I just wrapped up the last bit of new things and that demands a new beta release. So,
reef-pi 3.0.0-beta is out now: https://github.com/reef-pi/reef-pi/releases/tag/3.0.0-beta
This is by far the biggest changeset (highest amount of code) we have done for reef-pi., Here is the summary of key things, copying as it is from the release notes, with some explanations:

  • Timer module improvements:
    • Ability to rigger macro: Yes, users can now trigger macros periodically.
    • Support weekly & monthly schedules: We;ll be able to say things like every Monday, in timer module.
  • Control system:
    • Temperature module supports calibration
    • ph module can control equipment: Calcium reactor, CO2 injectors etc.
    • Hysteresis support in temperature and ph based controls: reef-pi can now act exactly same as heater's inetrnal thermostat. Makes it suitable for chiller and other equipment
    • Temperature and ph module can use macro instead of equipment as control target: Useful if you want to control multiple equipment. Just model them as a single macro.
  • Drivers
    • Jacks can be reversed: We are moving the active high/low option from light channel to jacks. Similar to outlet and inlets, jacks can also be reveresed. This has exactly same effect as light channel high/low. So we are not really adding/deleting any feature, just moving it to a more semantically correct place.
    • kasa smartplug & powerstrip support: Control hs300 powerstrip, hs100/hs110 smart plugs,. This driver also exposes the current monitoring as analog inputs that you can use as fake ph probes.
    • File driver: This is a nifty feature where an arbitrary file can be used to provide a value. Think of an external script writing a single value in a text file and reef-pi can now seamlessly integrate with it, by reading that file periodically and treating as analog input (ph)
  • New PWM profiles:
    • Sine: Typical sine curve for a given start-> end period
    • Arbitrary interval profile: Specify pwm values at fixed interval for a given start->end period. This is a generic version of the current 2 hour interval profile,. User can now use 1 hour or 15 min or any other fixed interval.
    • Random profile: generate incremental random values for a given time period and intensity range. I expect this to be useful for wavemakers
    • Composite profile: Allows combining above three profile (and fixed value profile). Think of pulse mode wavemaker profile can be implemented with an alternate diurnal and fixed interval profile.
  • Internationalization:
    • Chinese language support
    • Portugese language support
    • Dutch language support
  • Other:
    • reef-pi db subcommand: A new reef-pi db list/show/update/create/delete command that can work directly with the database., The controller has to be turned off for this. This can be used to investigate and fix reef-pi during troubleshooting.


We still have a few things to sort out, the pwm profiles UI is still not done yet. Michale is been working on it. Internationalization in not uniform yet (since we added quiet a bit of new things recently). We could really use your help in getting all the language support and above everything testing the beta release if possible. I have tried my best to test each of these bits, but I can certainly use more. I definitely wont be able to test all the possible software combination, let alone the hardware variations. So, if you have some free time or a test build , please give it a shot and let us know what you think. If everything goes well, we'll wrap up the UI bits, fix any critical bugs we found and ship 3.0 right before thanksgiving.
Can someine running 3.0 alpha just upgrade to 3.0 beta without problems, or does this entail a while new configuration to be done?
 
OP
OP
Ranjib

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
Thanks @Ranjib i think you may have answered my question in your patch notes.

I've just replaced my temp sensor ... the old one was getting a tiny rust spot on the bottom.
I replaced it like for like with a new DS18B20 .... the problem is, the temperature reading is different by about 2 degrees.
I've checked the temp of the tank with a calibrated photography thermometer and it's definitely out.
so my question is can i put an offset into pi so the temp readout is correct ?

I think i spotted in the patch notes for pi 3.0 the ability to calibrated the temperature is that what i need ?
Yes. You'll need to apply a single point calibration with -2 or +2 depending upon whether its reading above or below the expected value.
 
OP
OP
Ranjib

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
Can someine running 3.0 alpha just upgrade to 3.0 beta without problems, or does this entail a while new configuration to be done?
I think so. Nothing I can think of that will break the old data. If it does break please let me know, I have shipped a new sub command (reef-pi db) that is capable of altering/viewing the raw database, and we should be able to use it to selectively fix things even if the controller is not up.
 
OP
OP
Ranjib

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
Woo-hoo! Thanks @Ranjib & @Michael Lane (and I'm sure many others) for the awesome new features! I'll be trying this out first free night I get, probably Friday.

Also, with the pH probe ability to control equipment now, does that extend to dosing pumps? Or is that further on the future?
Yes and No. Let me explain:


After using the dosing pumps for one year (since 2.0), I have learned I only change the speed/pwm during calibration or other type of tweaks, i.e. I never changed the pwm/speed value once the dosing regimen is fixed/calibrated. Actual dosing is good old timer based switch on/off. My 3.0 setups, uses a potentiometer for calibration and the dosing unit is directly powered by a 12V 1A power supply, which I then put on timer. Similar to ATO. This is a simple but more robust solution for me.

If you are trying to dynamically set the PWM value during dosing and the pumps are modeled as dosing pump then No.. you need to longer workaround, but it's doable. I'll talk about it later (it involves switching pwm profiles using macro and triggering the macro with timers).

I'm open to feedback from all of you regarding what type of enhancements you think will be good for the dosing module. I already have one (using volume, like ml or cc in the UI and let reef-pi auto-calculate the regimen) that I think we'll be able to ship after 3.0 (since it only needs UI code, no controller changes), but happy to hear more.
 

burningbaal

Active Member
View Badges
Joined
Aug 13, 2019
Messages
232
Reaction score
257
Location
Near Seattle
Rating - 0%
0   0   0
Question on ATO with reef-pi:
I'm keenly interested in redundancy for the ATO, maybe I'm especially paranoid, but we've all heard the horror stories.

I'm thinking I want four level sensors, with the logic a bit...special:
  1. High sensor: If this is ever wet while the return pump is on, make sure ATO pump is off and raise alarm
  2. Low sensor: if this is ever dry (especially while not running a water change macro or something), raise an alarm
  3. Middle pair of sensors: If high-sensor and both of these are all dry, turn on ATO. If high-sensor is dry and both of these are wet, turn off ATO.
Now the logic is a bit interesting, and maybe doesn't nestle into reef-pi as-is, but that I'm less worried about (I can modify the source code in a fork or something). My question is in wiring the middle sensors. I kinda need something that only changes the output when both inputs have changed, not a typical logic gate, it's kind of tracking a null (and not changing the output) until the actual state is changed. Or maybe I can actually have 4 ATO sensors on the reef-pi?

I've Michael Lane's goby hat, so I'm thinking maybe I put two sensors on the unassigned GPIO ports? Maybe if I make the high/low sensors mechanical sensors, I can just connect them to the 5V and one GPIO? when they get signal, they're wet (or vice versa)?

Right now, I'm using a kamoer (ebay) ATO, so the reef-pi is just switching it on/off with the 110v. It does have a high-sensor, but when I move ATO control fully into the rpi, I want to add this redundancy, and some kind of mini pcb board combining the two middle sensors seems like the best choice, but I don't know what I'm doing with hardware...
 

Schreiber

Leviathan
View Badges
Joined
Jun 28, 2016
Messages
468
Reaction score
593
Location
Knoxville
Rating - 0%
0   0   0
Yes and No. Let me explain:


After using the dosing pumps for one year (since 2.0), I have learned I only change the speed/pwm during calibration or other type of tweaks, i.e. I never changed the pwm/speed value once the dosing regimen is fixed/calibrated. Actual dosing is good old timer based switch on/off. My 3.0 setups, uses a potentiometer for calibration and the dosing unit is directly powered by a 12V 1A power supply, which I then put on timer. Similar to ATO. This is a simple but more robust solution for me.

If you are trying to dynamically set the PWM value during dosing and the pumps are modeled as dosing pump then No.. you need to longer workaround, but it's doable. I'll talk about it later (it involves switching pwm profiles using macro and triggering the macro with timers).

I'm open to feedback from all of you regarding what type of enhancements you think will be good for the dosing module. I already have one (using volume, like ml or cc in the UI and let reef-pi auto-calculate the regimen) that I think we'll be able to ship after 3.0 (since it only needs UI code, no controller changes), but happy to hear more.

Gotcha! If definitely be interested in learning more about switching the PWM profiles in the future. I'd hate to give up a few equipment slots, especially for bulky power supply plugs that typically occupy the space of 2 plugs.
 

Creating a strong bulwark: Did you consider floor support for your reef tank?

  • I put a major focus on floor support.

    Votes: 65 39.4%
  • I put minimal focus on floor support.

    Votes: 36 21.8%
  • I put no focus on floor support.

    Votes: 58 35.2%
  • Other.

    Votes: 6 3.6%
Back
Top