• 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.

elysics

Active Member
View Badges
Joined
Jan 15, 2020
Messages
135
Reaction score
132
Very small annoyance with a current behaviour: When i manually dose extra to correct some value, i use the calibration menu of the dosing pumps. There isn't another option, is there? Anyway, when i do that, the amount i manually dosed doesn't show up in the usage statistics in the dashboard. Which makes sense if it's for calibration, doesn't make sense for manual dosing to keep track of how much of a chemical is actually going into the tank.
 
Top Shelf Aquatics

BenB

Community Member
View Badges
Joined
Jun 11, 2019
Messages
77
Reaction score
122
Adding analog sensors with ADS1115

Michael Lane has been working on a new ADS1015/ADS1115 driver for reef-pi.

This brings new possibilities to Reef-Pi:
  • PH/Orp probes
  • Pressure sensors
  • Flow sensors
  • Etc.
Any analog sensor can be used as long as the analog signal is in between 2.0V to 5.5V.

ADS1115 16-Bit ADC - 4 Channel with Programmable Gain Amplifier

ADS1115.png


ADS1115 Features:
  • Resolution: 16 Bits
  • Programmable Sample Rate: 8 to 860 Samples/Second
  • Power Supply/Logic Levels: 2.0V to 5.5V
  • Low Current Consumption: Continuous Mode: Only 150µA Single-Shot Mode: Auto Shut-Down
  • Internal Low-Drift Voltage Reference
  • Internal Oscillator
  • Internal PGA: up to x16
  • I2C Interface: 4-Pin-Selectable Addresses
  • Four Single-Ended or 2 Differential Inputs
  • Programmable Comparator
I had an ADS1115 board so I tried if my PH probe is working. So I made a “How to guide” maybe it will be of use for others. I used a Raspberry Pi 2 Model B with Reef-Pi version 3.5.

Add driver under Configuration/Drivers
1.png


Configure the Driver:
2.png

Name: PH
Type: ads1115
Address: standard is 72
Gain: 2/3, 1, 2, 4, 8 or 16

An Adafruit tutorial has this guidance.
# Choose a gain of 1 for reading voltages from 0 to 4.09V.
# Or pick a different gain to change the range of voltages that are read:
# - 2/3 = +/-6.144V (High Gain, Sensitive to noise)
# - 1 = +/-4.096V
# - 2 = +/-2.048V
# - 4 = +/-1.024V
# - 8 = +/-0.512V
# - 16 = +/-0.256V (Low Gain, Not Sensitive to Noise)
# See table 3 in the ADS1015/ADS1115 datasheet for more info on gain.

Reboot (Configuration/Admin)

Add analog input under Configuration/Connectors
3.png


Configure the connector
4.png

Name: PHpin0
Pins: 0 (depends what pin you use on the ADS1115 board)
Driver: PH
Reload (Configuration/Admin)

Add the probe under pH
5.png


Configure the PH probe
6.png

Name: PH
Analog input: PHpin0
Check frequency: 10
Ph status: Enabled
The other settings are not mandatory.

Calibration
The first readings will be high:
7.png

Therefore you need to calibrate!

To be able to calibrate you first have to disable the Ph status
  • 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 (Midpoint)
  • Push Run
  • Rinse probe
  • Put in 10 calibration fluid
  • Set cal value to 10 (Second Point)
  • Run
  • Enable probe
  • Rinse probe and check both 7 and 10 and make sure it’s close.
Enjoy!
 

BenB

Community Member
View Badges
Joined
Jun 11, 2019
Messages
77
Reaction score
122
Adding analog sensors with ADS1115

Michael Lane has been working on a new ADS1015/ADS1115 driver for reef-pi.

This brings new possibilities to Reef-Pi:
  • PH/Orp probes
  • Pressure sensors
  • Flow sensors
  • Etc.
Any analog sensor can be used as long as the analog signal is in between 2.0V to 5.5V.

ADS1115 16-Bit ADC - 4 Channel with Programmable Gain Amplifier

ADS1115.png


ADS1115 Features:
  • Resolution: 16 Bits
  • Programmable Sample Rate: 8 to 860 Samples/Second
  • Power Supply/Logic Levels: 2.0V to 5.5V
  • Low Current Consumption: Continuous Mode: Only 150µA Single-Shot Mode: Auto Shut-Down
  • Internal Low-Drift Voltage Reference
  • Internal Oscillator
  • Internal PGA: up to x16
  • I2C Interface: 4-Pin-Selectable Addresses
  • Four Single-Ended or 2 Differential Inputs
  • Programmable Comparator
I had an ADS1115 board so I tried if my PH probe is working. So I made a “How to guide” maybe it will be of use for others. I used a Raspberry Pi 2 Model B with Reef-Pi version 3.5.

Add driver under Configuration/Drivers
1.png


Configure the Driver:
2.png

Name: PH
Type: ads1115
Address: standard is 72
Gain: 2/3, 1, 2, 4, 8 or 16

An Adafruit tutorial has this guidance.
# Choose a gain of 1 for reading voltages from 0 to 4.09V.
# Or pick a different gain to change the range of voltages that are read:
# - 2/3 = +/-6.144V (High Gain, Sensitive to noise)
# - 1 = +/-4.096V
# - 2 = +/-2.048V
# - 4 = +/-1.024V
# - 8 = +/-0.512V
# - 16 = +/-0.256V (Low Gain, Not Sensitive to Noise)
# See table 3 in the ADS1015/ADS1115 datasheet for more info on gain.

Reboot (Configuration/Admin)

Add analog input under Configuration/Connectors
3.png


Configure the connector
4.png

Name: PHpin0
Pins: 0 (depends what pin you use on the ADS1115 board)
Driver: PH
Reload (Configuration/Admin)

Add the probe under pH
5.png


Configure the PH probe
6.png

Name: PH
Analog input: PHpin0
Check frequency: 10
Ph status: Enabled
The other settings are not mandatory.

Calibration
The first readings will be high:
7.png

Therefore you need to calibrate!

To be able to calibrate you first have to disable the Ph status
  • 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 (Midpoint)
  • Push Run
  • Rinse probe
  • Put in 10 calibration fluid
  • Set cal value to 10 (Second Point)
  • Run
  • Enable probe
  • Rinse probe and check both 7 and 10 and make sure it’s close.
Enjoy!
I forgot to at a picture of the setup:
.
20201008_201240.jpg
 

elysics

Active Member
View Badges
Joined
Jan 15, 2020
Messages
135
Reaction score
132
I've always shied away from including a ph sensor due to the high cost for little perceived value, but with the ADC i could use cheap chinesium sensor+board kits for 20€ and maybe upgrade to a better probe later, how practicable is that?

Or would that be so useless that i shouldn't even bother?
 
Last edited:
Best reef aquarium LED lighting

Matevz Savarin

Active Member
View Badges
Joined
Dec 5, 2018
Messages
202
Reaction score
158
Anyone have any thoughts with this one? I may end up with other "Standard black boxes" but I just want to be prepared
I bought 3 amazon lights philzone, they have pwm led drivers, so all you need it to wire pwm and ground to pi..
I have one question about pwm. In the morning my blue channel is on 15% and it works, but in the evening I have them on 20%but they start to flicker.. helps if I increase percentage, but its too bright for moonlight.. Driver is set to 1000hz any ideas why this happens?

5716A30B-3844-468C-A90F-D40A4897AC17.jpeg
 

AbjectMaelstroM

Valuable Member
View Badges
Joined
Jul 21, 2019
Messages
1,149
Reaction score
1,413
Location
RVA
I bought 3 amazon lights philzone, they have pwm led drivers, so all you need it to wire pwm and ground to pi..
I have one question about pwm. In the morning my blue channel is on 15% and it works, but in the evening I have them on 20%but they start to flicker.. helps if I increase percentage, but its too bright for moonlight.. Driver is set to 1000hz any ideas why this happens?

5716A30B-3844-468C-A90F-D40A4897AC17.jpeg
Flicker is due to drivers not delivering enough power at the set %; the power delivery/pwm on these lights is pretty janky. The fact that it works on 15 but not at 20 is interesting. If you manually set to 20 does it still flicker? Or does it only flicker when it ramps down to 20% or 0%?

My viparspectra will flicker but only when ramping down from 1% to 0; the last 10-15 sec prior to lights cutting off (0) they'll flicker.
 

Matevz Savarin

Active Member
View Badges
Joined
Dec 5, 2018
Messages
202
Reaction score
158
They turn on at9%, but when percentage goes down by the hour or so from 35 to 20 they flicker, if I turn them on 25 its ok.. strange..in the morning its ok..
 
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
8,280
Reaction score
14,752
Location
Palo Alto, Bay Area
I've always shied away from including a ph sensor due to the high cost for little perceived value, but with the ADC i could use cheap chinesium sensor+board kits for 20€ and maybe upgrade to a better probe later, how practicable is that?

Or would that be so useless that i shouldn't even bother?
I am concerned about the quality of readings from such setup, but don’t have data to back this up. If you end up setting this up, It will be awesome if you share your findings.
 

theatrus

Valuable Member
View Badges
Joined
Mar 26, 2016
Messages
1,318
Reaction score
2,546
Location
Sacramento, CA area
I've always shied away from including a ph sensor due to the high cost for little perceived value, but with the ADC i could use cheap chinesium sensor+board kits for 20€ and maybe upgrade to a better probe later, how practicable is that?

Or would that be so useless that i shouldn't even bother?
From experience, the super cheap import sensors have terrible stability - you will probably need to figure in recalibration every week or so. I wouldn't use it as an active control element (CO2 dosing, calcium reactor), or make any changes based on the readings it gives you without some other test (which you shouldn't be doing anyway - don't chase pH directly). For some trends and basic monitoring with frequent calibration they'll work fine.
 
Corals.com

pais

New Member
View Badges
Joined
Jun 27, 2019
Messages
6
Reaction score
8
Hello, i've seen you implemented ADS1115 support in your project and that is a great thing. Only thing i want to ask is how many bits of data does the ADS1115 sends to the rpi via i2c ? Which is the format of that bits ? I've seen the reading from the pi is the bare fraction of voltage. I wanted also to point out that i tried the economic kind of analog ph-meter with very very poor results, i think for interference but im not sure.
 
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
8,280
Reaction score
14,752
Location
Palo Alto, Bay Area
Hello, i've seen you implemented ADS1115 support in your project and that is a great thing. Only thing i want to ask is how many bits of data does the ADS1115 sends to the rpi via i2c ? Which is the format of that bits ? I've seen the reading from the pi is the bare fraction of voltage. I wanted also to point out that i tried the economic kind of analog ph-meter with very very poor results, i think for interference but im not sure.
2 bytes. Here is the code: https://github.com/reef-pi/drivers/blob/master/ads1x15/channel.go#L105
 

Mandelstam

Well-Known Member
View Badges
Joined
Oct 29, 2017
Messages
674
Reaction score
1,097
Location
Malmö, Sweden
I've just finished getting my lights to work properly with reef-pi. They are led strips and controlled with a mosfet low side driver and pwm signal. When using the pwm from PCA9685 there was a high pitched humming getting louder and louder the more channels that were active. Theatrus helped me by pointing in the pwm frequency direction and after a bit of experimenting I got rid of the humming/noise by changing to hardware pi pwm and setting the frequency to 25kHz (above audible range). It's the same issue I was prepared for for my pwm controlled fans and had been planning to use the pi's 2 pwm channels for.

This is not a reef-pi issue really but the limitations on pwm frequency on the PCA9685 board (max 1kHz) is a bit of a bummer.

For my fans I think I'll just add another pi zero with reef-pi and run them off that.

Other than that a huge shout out to all the devs, setting up and running reef-pi has been a breeze if you don't count the noob mistakes from my part.
 

Zippyfear

Community Member
View Badges
Joined
Apr 30, 2019
Messages
84
Reaction score
151
Someone may have asked this, but - When I went from 3.4 to 3.5, the temp scaling seems to be gone, and it just goes from 0 to 80 now.. is there some way to get that back?
 
Best reef aquarium LED lighting

Schreiber

Active Member
View Badges
Joined
Jun 28, 2016
Messages
383
Reaction score
527
Location
Knoxville
I'm nearly done building my canopy for the new tank & am excited to try out 3.5!!! Thanks @Ranjib & @Michael Lane for all the incredible work!

One question I had before getting into it this weekend- Is there any sort of documentation for using the ADS1015 with Reef Pi? I'm super interested in the LUX meter aspect of it. I just finished building a hybrid T5/LED fixture & the bulbs for it should be arriving next week. I have no idea what to expect when I flip that switch & I'm trying not to bleach everything out.
 

Stephen2

Community Member
View Badges
Joined
Jul 31, 2014
Messages
42
Reaction score
25
Hi
Has anyone tried to connect a zetlight to the reef pi?
I saw it has a 3.5 mm input jack. Almost like the kessils
 

Smin

New Member
View Badges
Joined
Apr 25, 2019
Messages
21
Reaction score
17
Give me some time to test and reproduce this. If you are correct it’s a bug. I’ll get back to you shortly.
Hi Ranjib, just wondering if you managed to reproduce this? if not I'll have another go at setting it up and capture what is going on.
The alternative would be being able to have more setpoints during the day in the interval setting or having the lights fade between the setpoints automatically if either is possible?
 
Top Shelf Aquatics

Would you be shocked by today's reefing hobby if you had just returned after a long period of time?

  • Yes (tell us why in the thread)

    Votes: 178 52.7%
  • No

    Votes: 60 17.8%
  • Somewhat

    Votes: 96 28.4%
  • Other

    Votes: 4 1.2%

Online statistics

Members online
1,353
Guests online
3,680
Total visitors
5,033
Growcorals.com
Top