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

brandon clow

Active Member
View Badges
Joined
Oct 22, 2017
Messages
121
Reaction score
151
Rating - 0%
0   0   0
Have you tried a 0 in the minutes field for on a 5 in the minutes field in the off timer? I believe all others should remain as a *
 

brandon clow

Active Member
View Badges
Joined
Oct 22, 2017
Messages
121
Reaction score
151
Rating - 0%
0   0   0
Have you tried a 0 in the minutes field for on a 5 in the minutes field in the off timer? I believe all others should remain as a *

I should mention that this could also be done by doing a turn on and then a turn off after so many seconds of runtime (all within the same timer)
 

burningbaal

Active Member
View Badges
Joined
Aug 13, 2019
Messages
232
Reaction score
252
Location
Near Seattle
Rating - 0%
0   0   0
Here's my timer config, then I just made a macro to turn on the timer and hit "run"...look ok?

Screenshot_20191028-190448_Chrome.jpg Screenshot_20191028-190502_Chrome.jpg
 
Last edited:

Michael Lane

Well-Known Member
View Badges
Joined
Aug 11, 2018
Messages
677
Reaction score
1,121
Rating - 0%
0   0   0
Is there a good way to obtain the raw mV value from a pH probe without having to delete the calibration file? Or is that the best way to go about it?
It may depend on the pH module, but I doubt the raw mV reading will be available. Usually, the mV will be processed through an analog to digital converter which will scale the voltage to a number (based on the ADC resolution).

On the other hand, if you are interested in obtaining the raw values, it will still available via the api at /api/phprobes/{id}/read once the next alpha release is cut. You may be able to see it on the calibrate modal (despite the current bug).
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,876
Reaction score
16,680
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Okay, starting to get mine together, my adj strip is running!

Two questions: with multiple temperature sensors, can you have it alert when they differ by more than, say 1 degree c? If not, I may just set up one to control 77-80 and the other alert and control 76-81?

Second: mechanical relays are more prone to failure than solid state, right? Solid state struggle with low loads. So maybe I could add a solid state relay in addition to the adj strip to control my heaters? Low likelihood of failure and not a low load..seem good?
Well f
Ahhhh, after digging through tons of posts, I finally pieced together how to do this, lol. I'll post the consolidated, & corrected instructions here for future pioneers with a few additions that could help. I'll replace any mentions of IP with a generic IP of 192.168.x.x, use your raspberry pi's IP instead. If you don't know it, go to the terminal & type ifconfig, then press enter.

  • Wire up your ph board and power up your raspberry pi. Once up,you should see the ph board regisetered as i2c addres 0x40 (64 in decimal). Type i2cdetect -y 1 into terminal & press enter. The default address for your board may be different (the @Michael Lane one is 45 with both jumpers attached). It will appear in this list.

    Screen Shot 2019-05-26 at 9.37.13 AM.png
  • Next download and install the 3.0 pre-alpha release. Make sure to delete the old database. In terminal, use the following commands:
  • sudo systemctl stop reef-pi.service
  • sudo rm -rf /var/lib/reef-pi/reef-pi.db
  • sudo systemctl start reef-pi.service
  • Once running , go ahead and create a new driver from the Configuration -> Drivers section, select phboard as type (pico board for pico base board users).
  • Make sure to click on the drop down and select the type, even if the one shown in the UI by default is the one you are using (i.e. do an explicit selection).
  • My UI gave an error if i had a space in the Name, may just be me though.
  • Your address is in decimal format. Look up a "Hex to decimal convertor" & type in your address from the i2cdetect command (e.g. 0x40) & convert it. 0x45 = 69.
  • Specify a name, keep it unique across different drivers.

    Screen Shot 2019-05-26 at 9.32.44 AM.png
  • Next, create a connector under analog input section and associate it with the new driver, specify channel as "0" and give it a name.

    Screen Shot 2019-05-26 at 9.36.13 AM.png
  • Next, create a pH monitor (if you dont see ph tab, then probably its not enabled, enable this module under Configuration -> Settings, and reload reef-pi).
  • Associate the ph monitor with the newly created analog input. And that's it, you should see your ph sensors reading. Note, without calibration it will emit sensor values in raw millivolts, which for me is around -8K.

    Screen Shot 2019-05-26 at 9.36.45 AM.png
  • Time to perform calibration (don't use the button, we've got to use a work around).
  • If you are using reference solution (like ph 7 and 10), keep them in tank temperature and immerse probe in them and note down the reading from the dashboard. It will take a few minute to stabilize the reading. For example, if you put it in 8.21 pH solution, you may get a reading fluctuating around -8768.
  • We'll be applying the calibration via API (due to UI still being worked on).
  • Go to your pi's file manager, right click, create a new file, name it calibration.json containing the calibration data in this format.
[
{"expected":8.21, "observed": -8768},
{"expected":8.12, "observed": -8189}
]
  • The example shows my two point calibration again my own tank water with reference reading taken from hanna ph checker.
  • DISABLE the pH monitor before continuing.
  • In terminal, type the following 2 commands (pressing enter after each)

    curl -c cookie.txt -X POST -d '{"user":"reef-pi", "password":"reef-pi"}' http://127.0.0.1/auth/signin
  • you will get a return of "null"- this is good.
    curl -X POST -d @calibration.json -b cookie.txt http://192.168.x.x/api/phprobes/1/calibrate
  • If you've had multiple attempts at creating a pH monitor, your pH monitor ID may not be 1. If you want to check, use the following command in terminal:
You can now go back to your UI, enable the pH probe, then watch the output to see if it's an actual pH value now!
thank you so much for writing this up. i'll refer this for 3.0 docs
 

Schreiber

Leviathan
View Badges
Joined
Jun 28, 2016
Messages
475
Reaction score
594
Location
Knoxville
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
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,876
Reaction score
16,680
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
475
Reaction score
594
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,628
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
475
Reaction score
594
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
118
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,876
Reaction score
16,680
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,811
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,811
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,876
Reaction score
16,680
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
151
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 ?
 

TOP 10 Trending Threads

WHAT AMOUNT OF LIVE ROCK AND SAND SHOULD BE PRIORITIZED FOR OPTIMAL BIODIVERSITY/FILTRATION?

  • 100% live rock + bagged sand

    Votes: 38 27.1%
  • 100% dry rock + 100% live sand

    Votes: 47 33.6%
  • 50/50 live/dry rock, 50/50 live/bagged sand

    Votes: 31 22.1%
  • 75% live rock, 25% live sand

    Votes: 14 10.0%
  • 25% live rock, 75% live sand

    Votes: 10 7.1%
Back
Top