- Joined
- Apr 16, 2016
- Messages
- 9,848
- Reaction score
- 17,081
- Location
- Pleasant Hill, Concord
- What state or country do you live in
- California
It’s been a long electro magnetic night
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Im afraid it wont. The circuit you linked requires and analog input pin, pi does not have any. You are right, the current reef-pi ph code is tied to AtlasScientific circuit (their i2c protocol to be specific), but we can revisit that, change it to support something else if theres a compelling reason. I did a fair amount of research before going with atlas scientific probes/circuit. My finding was getting a marine aquarium compatible probe that will be used for continuous monitoring is not cheap. Atlas was the only supplier with some reputation. I do agree its expensive :-( .I am busy sourcing parts for my build as I go. The Atlas PH kits are pretty expensive here in SA. I found these available locally at a much better price. Could anyone comment whether they will work with the code that is being developed? Or must I wait to get an Atlas kit?
https://www.botshop.co.za/product/ph-probe-module/
https://www.botshop.co.za/product/ph-probe-electrode-bnc-connector/
Hi,I've casually seen this thread a few times over the past year, but have not looked into as much as I should have. I started really reading through it just today and I purchased a Raspberry Pi zero and the 16 channel 12 bit PWM board. I should have them tomorrow...can't wait!
The lighting is what has me the most excited, but I also have a few questions about it (sorry if some of these have already been answered - its a long thread):
- Is the program capable of addressing all 16 channels?
- I see that you set your lighting levels based upon 2 hour increments - does the lighting smoothly transition between each 2 hour increment?
- Does it use all 4096 levels of dimming or is it limited to 100 (1% increments)?
- I currently have 3 lights (left, center, right) with 5 channels of leds each, can I set the middle light to start each channel 15 minutes after the left? (Ex. the Blue channel of the left light starts ramping from 0 at 8:00AM, the center starts ramping at 8:15AM, the right starts ramping up at 8:30AM)
- Is it possible to incorporate clouds/lightning?
- Is it possible to do an acclimation period?
- Is it possible to have the lighting change based upon the season?
Hi,
Thank your for your interest in reef-pi.
Let me know if you have any questions
- You can control all 16 channels via reef-pi
- The two our increments are not enforced at once , but linearly in a minute by minute interval. I’ts smooth and does not cause any sudden change.
- The ui only allows 1-100% level, which the mapped to 0-4095 range. So , we do take advantage of the entire range, but in discrete 100 intervals. We can certainly revisit this if need be.
- We don’t have support for acclimation yet, it planned for 2.0 release , something I am working towards now
- The three lights 15 minute interval thing can be done either via setting a thresholds Or using a time to control the on /off of individual channels (assuming they can be wired up via a relay)
- No support for storm /cloud simulation yet. You can use the api to do pretty much anything custom you want, but you have to write some code. This won’t be supported via ui at least by 2.0 release
Do you have any images of these 5 channel led lights.. I am going to build some in the near future and interested ..I've casually seen this thread a few times over the past year, but have not looked into as much as I should have. I started really reading through it just today and I purchased a Raspberry Pi zero and the 16 channel 12 bit PWM board. I should have them tomorrow...can't wait!
The lighting is what has me the most excited, but I also have a few questions about it (sorry if some of these have already been answered - its a long thread):
- Is the program capable of addressing all 16 channels?
- I see that you set your lighting levels based upon 2 hour increments - does the lighting smoothly transition between each 2 hour increment?
- Does it use all 4096 levels of dimming or is it limited to 100 (1% increments)?
- I currently have 3 lights (left, center, right) with 5 channels of leds each, can I set the middle light to start each channel 15 minutes after the left? (Ex. the Blue channel of the left light starts ramping from 0 at 8:00AM, the center starts ramping at 8:15AM, the right starts ramping up at 8:30AM)
- Is it possible to incorporate clouds/lightning?
- Is it possible to do an acclimation period?
- Is it possible to have the lighting change based upon the season?
These aren't the best but here you go. The second one shows the blue channel on.Do you have any images of these 5 channel led lights.. I am going to build some in the near future and interested ..
We can change the update frequency (like per second) , but i doubt how meaningful this is. Given there is only 4096 level, for a 8 hour photo period, you are applying intensity values 8x3600 times. So, most of the time there is nothing really to change, may be a middle ground is better. There is also the risk of thrashing cpu . I think I can make it configurable, and ship with 1 minute interval, and users can change that to suit their needs.Great to know I can do all 16 and that the update is minute by minute - can this be updated to be once per second? My thought there (and with #3 is that with only 100 levels of dimming, a noticeable change in dimming level will be seen if the dimming level is small). This would come in to effect when the dimming is just starting to come up from 0 at the beginning of the day, as well as at the end of the day. It also would come into effect in the future when clouds are added (although this would probably necessitate dimming updates of several times per second to have smooth clouds) and when using LEDs as moonlights, especially when trying to simulate moon cycles.
As far as the lights starting at different times, it looks like you are talking about having relays start at different times - I was wanting to have the PWM channels controlling this (an example of what I'm doing currently - and would like to replace with this- is left blue channel start ramping from 0 to 70% at 8:00AM taking 2 hours to get to 70%, the center blue channel would do the same but start at 8:15AM, and the right blue channel would start at 8:30AM. This also happens with my white, OCW, and violet channels for each light.
If I were to try to start coding some of this custom stuff myself, could you point me to the files/functions that would need to be changed?
THANKS!
Just to give an example of this, you can use theWe can change the update frequency (like per second) , but i doubt how meaningful this is. Given there is only 4096 level, for a 8 hour photo period, you are applying intensity values 8x3600 times. So, most of the time there is nothing really to change, may be a middle ground is better. There is also the risk of thrashing cpu . I think I can make it configurable, and ship with 1 minute interval, and users can change that to suit their needs.
When i say programming, i dont mean you have to change reef-pi code. reef-pi is API driven, and you can use a simpler language like python or javascript/node js to tell reef-pi anything custom you want, including most of the things you have mentioned here: https://reef-pi.github.io/additional-documentation/api/
Just thought I’d say: You are awesome, Ranjib!! Your work on this project and the amount of time and effort you spend helping everyone is simply amazing!
Thank you so much.Hi Ranjib,Im afraid it wont. The circuit you linked requires and analog input pin, pi does not have any. You are right, the current reef-pi ph code is tied to AtlasScientific circuit (their i2c protocol to be specific), but we can revisit that, change it to support something else if theres a compelling reason. I did a fair amount of research before going with atlas scientific probes/circuit. My finding was getting a marine aquarium compatible probe that will be used for continuous monitoring is not cheap. Atlas was the only supplier with some reputation. I do agree its expensive :-( .
I am learning electronics, and once my chops are good enough, I'll certainly attempt to address this. From my discussion with @theatrus , it looks like we should be able to use a dedicated micro controller and to roll our own ph circuit (that does the analog voltage to ph conversion along with voltage isolation. But thats a distant future

We went through these things before going with atlas scientific ezo. You have to do the calibration code, temperature compensation etc. And once added the ancillary circuit (ADC not DAC) its not clear if the price difference will be too much. Note, you need an analog to didgital conversion cheap (like mcp3008) not a dac (digital to analog conversion, the chip you linked). Another thing to note is, in this route you are using Pi's CPU for the actual computation (voltage value -> ph value, calibration etc). EZO circuit does all this for us,. since it has a full blow MCU(micro controller). The pH probe is pretty much same priced. And among all of these brands, I'll prefer atlas scientific. Although, i think we can use BRS double or single junction probe as well. Since this was the first ph build for me , i didnt risk anything and went with the atlas scientific probe., I'll certainly test out the same circuit with BRS probes as well (and I expect it to work).Hi Ranjib,
While searching for a cheaper PH alternative I came to following websites some time ago:
https://www.dfrobot.com/product-1025.html#.VsmkkzNIq0c (note, this probe is NOT for continous monitoring!)
Following this site I came to:
https://www.dfrobot.com/wiki/index.php/Gravity:_12-Bit_I2C_DAC_Module_SKU:_DFR0552 (I2C ADC interface with connections and programming info)
https://github.com/Arduinolibrary/DFRobot_Gravity_I2C_12_Bit_DAC_Module/raw/master/DFR0552 Gravity 12-Bit I2C DAC Module (V1.0) Schematic.pdf (I2C schematic)
https://www.dfrobot.com/product-1074.html (industrial PH Probe) or https://de.aliexpress.com/item/Taiw...strie-online-ph-elektrode-PH/32879301297.html
Waiting now for a CNC machine to make PCB's (so far PWM PCB with 16 outputs and MCP23017 I2C I/O interface designed, I know MCP23017 is not supported by Reef-Pi). Next step will then be the PH interface![]()
Nope. This is like the pH probe gives analog signal and you need the ancillary circuit for it to work with (the one you linked). This is high precision probe though. After using ds18b20, i really didnt feel that we need to check other things, its cheap, stable, and precise enough for most reef tanks (+/- 0.5). The fact that this probes voltage to temperature conversion logic is in linux kernel (one wire driver) make it wiring less hassle, without involving any extra circuit. I do have plans to incorporate temperature calibration logic for ds18b20 as well.Thanks Ranjib!
I'm not there yet, but is it possible to use this for temp sensor?
https://www.adafruit.com/product/3290
https://www.adafruit.com/product/3328
my 3 ds18b temp probes are all within half a degNope. This is like the pH probe gives analog signal and you need the ancillary circuit for it to work with (the one you linked). This is high precision probe though. After using ds18b20, i really didnt feel that we need to check other things, its cheap, stable, and precise enough for most reef tanks (+/- 0.5). The fact that this probes voltage to temperature conversion logic is in linux kernel (one wire driver) make it wiring less hassle, without involving any extra circuit. I do have plans to incorporate temperature calibration logic for ds18b20 as well.
Ranjib,Hi,
Thank your for your interest in reef-pi.
Let me know if you have any questions
- You can control all 16 channels via reef-pi
- The two our increments are not enforced at once , but linearly in a minute by minute interval. I’ts smooth and does not cause any sudden change.
- The ui only allows 1-100% level, which the mapped to 0-4095 range. So , we do take advantage of the entire range, but in discrete 100 intervals. We can certainly revisit this if need be.
- We don’t have support for acclimation yet, it planned for 2.0 release , something I am working towards now
- The three lights 15 minute interval thing can be done either via setting a thresholds Or using a time to control the on /off of individual channels (assuming they can be wired up via a relay)
- No support for storm /cloud simulation yet. You can use the api to do pretty much anything custom you want, but you have to write some code. This won’t be supported via ui at least by 2.0 release
Absolutely,Ranjib,
Thank you for all of your work on this, this is a fantastic project as it stands and has great potential for future features.
I am just beginning with all of this. My end goal is to replace my current setup - Reef Angel Plus. The Reef Angel has a lot of features that I like that I am trying to replace with this. Advanced PWM is one of those features.
As far as "advanced PWM" what would be great to have is: being able to dim to all 4096 levels (vs 4096/100), control of when lighting starts to ramp up from 0 and down to 0 by a set time (ex starting at 8:05AM, ending at 7:34PM) for each channel individually. Down the road it would also be great to have automatic seasonal time adjustments, weather simulation, moon cycles, etc.
I know there is a lot to Reef Pi that you are trying to incorporate/improve. Like I said, I'm used to the Reef Angel (Arduino), so I'm struggling a little to understand the code. Are these a possibility for Reef Pi 2.0? Could you point me in the right direction to understand the code better? I would like to understand the logic behind the PWM calculations and how that is sent to the PCA9685 board.
Thanks!!


