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

DanTheReefer

Active Member
Review score
+0 /0 /-0
View Badges
Joined
Dec 2, 2019
Messages
343
Reaction score
355
Review score
+0 /0 /-0
DFCEBB32-6B15-4532-A37B-2F77ADF31C47.jpeg

I noticed these Neptune liquid level sensors have a familiar connector. How difficult would they be to add to reef-pi ATO?
 

Sral

Active Member
Review score
+0 /0 /-0
View Badges
Joined
May 2, 2022
Messages
361
Reaction score
429
Review score
+0 /0 /-0
Location
Germany
I've done some more test; the problem seems to be the cable (even if during my test on breadboard with double lenght cable everything works fine) I'm now using PCA9507 to expand my I2C line, what IC can I use to improve the cable run?
Nice IC, if I had known the PCA9507 before I would have used it instead of my current solution.

I'm using an Adafruit ISO1540 to isolate my Pi's 3.3V against the I2C's 5V. Currently that's slightly stupid, because both are fed by the same 5V DC/DC converter :grinning-face-with-sweat:
Afterwards I hook up my SDA/SCL lines to a USB socket and latch an Adafruit LTC4311 I2C extender onto it. It basically does what your PCA9507 does a swell, it is a dynamic pull-up which shorts the lines to VCC, exactly what the PCA9507 has on the A-side. Everything is connected using header pins and header cables, as you can see in my build thread.

So the PCA9507 should be fine, if you have a good connection and cables. Personally I'm using shielded USB-A cables. Not the cheapest option, but it seems to work. I can get a seemingly stable I2C connection to my SCD30 over 1m distance.

I would suggest to check shielded cables, like a Ethernet cable and to try placing the PCA9507's A-side onto the side of the cable leading to the sensor.
 

Simonv92

Community Member
Review score
+0 /0 /-0
View Badges
Joined
Oct 21, 2014
Messages
80
Reaction score
66
Review score
+0 /0 /-0
Location
Italy
Nice IC, if I had known the PCA9507 before I would have used it instead of my current solution.

I'm using an Adafruit ISO1540 to isolate my Pi's 3.3V against the I2C's 5V. Currently that's slightly stupid, because both are fed by the same 5V DC/DC converter :grinning-face-with-sweat:
Afterwards I hook up my SDA/SCL lines to a USB socket and latch an Adafruit LTC4311 I2C extender onto it. It basically does what your PCA9507 does a swell, it is a dynamic pull-up which shorts the lines to VCC, exactly what the PCA9507 has on the A-side. Everything is connected using header pins and header cables, as you can see in my build thread.

So the PCA9507 should be fine, if you have a good connection and cables. Personally I'm using shielded USB-A cables. Not the cheapest option, but it seems to work. I can get a seemingly stable I2C connection to my SCD30 over 1m distance.

I would suggest to check shielded cables, like a Ethernet cable and to try placing the PCA9507's A-side onto the side of the cable leading to the sensor.
Thank you for your answer, I'll try LTC4311 and shielded cable :)
 
Cyber Monday

robsworld78

Well-Known Member
Review score
+0 /0 /-0
View Badges
Joined
Feb 14, 2020
Messages
893
Reaction score
1,180
Review score
+0 /0 /-0
Location
Edmonton, Canada
Is there any chance you could elaborate on how you are pulling the switch to ground? I have a different feeder I want to use but I need to figure out how to bypass the manual feed button by pulling it to ground via reef-pi.

Thanks in advance......
Maybe start a new thread and if possible post some pictures of the internals and we can maybe point out some things to test it. I can explain how to pull it to ground but we need to figure out how the feeder works and where you would make the connections.
 

robsworld78

Well-Known Member
Review score
+0 /0 /-0
View Badges
Joined
Feb 14, 2020
Messages
893
Reaction score
1,180
Review score
+0 /0 /-0
Location
Edmonton, Canada
DFCEBB32-6B15-4532-A37B-2F77ADF31C47.jpeg

I noticed these Neptune liquid level sensors have a familiar connector. How difficult would they be to add to reef-pi ATO?
Wow I can't believe that's priced how it should be. Based on the ruler my guess is it's analog, unfortunately the Pi doesn't have any analog pins so if you wanted to know the actual water level you would need to add a ADS1015 ADC to your system, reef-pi has a driver for it. Of course you would need to figure out the wiring, if someone hasn't done it before on a forum it could be difficult getting it right. If you were successful you would get an analog value from the ADS1015 which you would use as a reference. If it is analog you could still connect it to a digital pin on the Pi and it would either read on or off but anyone's guess as to where that might be on the ruler.

 

Sral

Active Member
Review score
+0 /0 /-0
View Badges
Joined
May 2, 2022
Messages
361
Reaction score
429
Review score
+0 /0 /-0
Location
Germany
DFCEBB32-6B15-4532-A37B-2F77ADF31C47.jpeg

I noticed these Neptune liquid level sensors have a familiar connector. How difficult would they be to add to reef-pi ATO?
As @robsworld78 mentioned it’s not straight forward if you don’t know the internals. E.G. what contact is ground, VCC and data lines. Next, what kind of data is used, e.g. is it a digital interface like I2C or SPI, is it semi-digital giving a PWM signal or an analog voltage.

Both PWM and analog are easy to read into reef-Pi, e.g. using the ADC circuit (ADS1015) that rob mentioned. If it’s digital it’s a lot more difficult if you don’t know the protocol.

that’s also what I’m worried about, since the Connector has 4 contacts … typically you would only need 3 (VCC, signal and GND) for either PWM or analog signal. 4 contacts looks more like a digital interface like I2C.

depending on the price you could simply buy and open it up to see if the connections on the cable give you some info.
 
Corals.com
OP
Ranjib

Ranjib

7500 Club Member
Review score
+0 /0 /-0
View Badges
Joined
Apr 16, 2016
Messages
9,678
Reaction score
16,720
Review score
+0 /0 /-0
Location
Pleasant Hill, Concord
On another note. I have fully 3d printed a rollermat that is now controlled by Pi.

right now I’d like setup it up a timer to activate the motor until I get the float switch fully dialed into position.
This is awesome . You plan to opensource the design ? I’d love to build one
 
OP
Ranjib

Ranjib

7500 Club Member
Review score
+0 /0 /-0
View Badges
Joined
Apr 16, 2016
Messages
9,678
Reaction score
16,720
Review score
+0 /0 /-0
Location
Pleasant Hill, Concord
Wow I can't believe that's priced how it should be. Based on the ruler my guess is it's analog, unfortunately the Pi doesn't have any analog pins so if you wanted to know the actual water level you would need to add a ADS1015 ADC to your system, reef-pi has a driver for it. Of course you would need to figure out the wiring, if someone hasn't done it before on a forum it could be difficult getting it right. If you were successful you would get an analog value from the ADS1015 which you would use as a reference. If it is analog you could still connect it to a digital pin on the Pi and it would either read on or off but anyone's guess as to where that might be on the ruler.

We should be able to integrate these things using the Esp32 driver right ?
 
OP
Ranjib

Ranjib

7500 Club Member
Review score
+0 /0 /-0
View Badges
Joined
Apr 16, 2016
Messages
9,678
Reaction score
16,720
Review score
+0 /0 /-0
Location
Pleasant Hill, Concord
DFCEBB32-6B15-4532-A37B-2F77ADF31C47.jpeg

I noticed these Neptune liquid level sensors have a familiar connector. How difficult would they be to add to reef-pi ATO?
Chances are you can hook them up with Esp32 and use ph module (analog input ) for monitoring and control
 
Tidal Gardens

DanTheReefer

Active Member
Review score
+0 /0 /-0
View Badges
Joined
Dec 2, 2019
Messages
343
Reaction score
355
Review score
+0 /0 /-0
Wow I can't believe that's priced how it should be

I was surprised too!

Based on the ruler my guess is it's analog, unfortunately the Pi doesn't have any analog pins so if you wanted to know the actual water level you would need to add a ADS1015 ADC to your system, reef-pi has a driver for it.
Yeah I was thinking analog... one of the things I noticed was when users pair to Apex they have to specify the size of the LLS they are adding, I feel like if it were I2C, etc, the size would be built in and it would just send across the measured depth - I also feel like the top would be a little bulkier since I assume it would need to have a circuit built in.

that’s also what I’m worried about, since the Connector has 4 contacts
I'm concerned about that too - I guess it's possible there's contacts to maintain compatibility with other Apex Fluid Monitoring Module devices.

We should be able to integrate these things using the Esp32 driver right ?
Awesome. I think I'll buy one to see if I can figure out what's going across the jack. Hopefully buzzing it out with a multimeter is adequate to get started.
 

robsworld78

Well-Known Member
Review score
+0 /0 /-0
View Badges
Joined
Feb 14, 2020
Messages
893
Reaction score
1,180
Review score
+0 /0 /-0
Location
Edmonton, Canada
As @robsworld78 mentioned it’s not straight forward if you don’t know the internals. E.G. what contact is ground, VCC and data lines. Next, what kind of data is used, e.g. is it a digital interface like I2C or SPI, is it semi-digital giving a PWM signal or an analog voltage.

Both PWM and analog are easy to read into reef-Pi, e.g. using the ADC circuit (ADS1015) that rob mentioned. If it’s digital it’s a lot more difficult if you don’t know the protocol.

that’s also what I’m worried about, since the Connector has 4 contacts … typically you would only need 3 (VCC, signal and GND) for either PWM or analog signal. 4 contacts looks more like a digital interface like I2C.

depending on the price you could simply buy and open it up to see if the connections on the cable give you some info.
It's highly unlikely it would be I2C or SPI, neither of those would ever be used like that in a true commercial product. I think Apex uses CAN bus for all their extensions but it's unlikely the sensor would be that especially based on the price of this sensor.
 
Top Shelf Aquatics
OP
Ranjib

Ranjib

7500 Club Member
Review score
+0 /0 /-0
View Badges
Joined
Apr 16, 2016
Messages
9,678
Reaction score
16,720
Review score
+0 /0 /-0
Location
Pleasant Hill, Concord
Hello everyone,
i have cut the next major release of reef-pi. Here is the announement post:

key highlight is the esp32 integration. I intend to work on guides as r2r post under reef-pi sub forum. ESP32 integration is on the list , but feel free to share anything that can be of use. I plan to consolidate the adafruit guides along with all the new things that happened since then, but keep the same module specific formats.

happy thanks giving
ranjib
 
OP
Ranjib

Ranjib

7500 Club Member
Review score
+0 /0 /-0
View Badges
Joined
Apr 16, 2016
Messages
9,678
Reaction score
16,720
Review score
+0 /0 /-0
Location
Pleasant Hill, Concord
This is my main display tank. It’s been running for little more than a year now. Entirely on reef-pi, all equipment control, temperature , ato controller , ph monitor . Pump and light is controlled by manufacturer controller.
41E12145-026F-45A9-8C0A-B455EFD152C4.jpeg
 
OP
Ranjib

Ranjib

7500 Club Member
Review score
+0 /0 /-0
View Badges
Joined
Apr 16, 2016
Messages
9,678
Reaction score
16,720
Review score
+0 /0 /-0
Location
Pleasant Hill, Concord
dashboard of my reefer 300xl, notice the temperature swing due to bad heater. It went long before I could get the time to investigate and address it.
1C67F0C0-6528-473E-81D9-65131EDA48CE.jpeg


and corresponding grafana dashboard, that has long term retention
reefer-300xl-tempswing.png


more i look at this graph, more i feel guilty :-( . Anyhow, no corals were lost, and now its fixed. When this problem initially started, i suspected the heater is not able to keep up .. since the temp control chart was showing heater is 100% time on. The internal thermister was turning off the heater, and that went undetected. Although, this was easily preventable, as the kasa hs300 provides current draw numbers and reef-pi can read this as analog sensor. Those number would make it abundantly clear that the 300w heater was barely drawing any current most of the time (when i manually checked, it was 1w ).
I hope i'll remember to add these learnings in the temperature controller guide (that not just temperature swing , but also the current draw of the heater can be used for early detection of failures)
 
Top Shelf Aquatics

Simonv92

Community Member
Review score
+0 /0 /-0
View Badges
Joined
Oct 21, 2014
Messages
80
Reaction score
66
Review score
+0 /0 /-0
Location
Italy
Hi All! I'm having trouble with an SHT31D reading, I was testing all on breadboard and everything works fine.
I've now moved the controller on a PCB and with the same lenght of cable I'm unable to read the data from my sensor.
I always have this error:

ph subsystem: Failed read probe:Sump TemperatureError:CRCs doesn't match: CRC from sensor (0xFF) != calculated CRC (0xA4)

I2C bus seems to works fine because I can detect the sensor at address 44 (68 on reef-pi) but I have comunication problems...
Also an LTC4311 didn't help me...
What can I try to do?
Thanks all!
 

zab34

Active Member
Review score
+0 /0 /-0
View Badges
Joined
Jan 23, 2012
Messages
335
Reaction score
67
Review score
+0 /0 /-0
Location
Orlando
This is awesome . You plan to opensource the design ? I’d love to build one
Unsure at the moment. I am sure there is some room for Improvement. Ideally I would have designed it to be more easily scalable for people’s various needs.
Right now I am going to let it run for the next month and see if I encounter any major issues.
 

robsworld78

Well-Known Member
Review score
+0 /0 /-0
View Badges
Joined
Feb 14, 2020
Messages
893
Reaction score
1,180
Review score
+0 /0 /-0
Location
Edmonton, Canada
Hi All! I'm having trouble with an SHT31D reading, I was testing all on breadboard and everything works fine.
I've now moved the controller on a PCB and with the same lenght of cable I'm unable to read the data from my sensor.
I always have this error:

ph subsystem: Failed read probe:Sump TemperatureError:CRCs doesn't match: CRC from sensor (0xFF) != calculated CRC (0xA4)

I2C bus seems to works fine because I can detect the sensor at address 44 (68 on reef-pi) but I have comunication problems...
Also an LTC4311 didn't help me...
What can I try to do?
Thanks all!
Some noise must be getting in the lines somewhere, maybe it's some equipment nearby, some LED drivers can emit noise. If you have one turned on see if it works better when its off or unplugged. You also might have to power cycle the Pi to get the I2C working again if it's hung up. How long is the cable? Try and keep it under a foot and if you can get shielded cable that will help. If you don't have for a quick fix try wrapping the cable in aluminum foil used for cooking. Even though you can read the address there could still be problems. Your best bet might be to get an ESP32, connect a DHT22 to it, you should be able to find example code on the web and then have the data sent to reef-pi using the new driver. DHT22 uses a digital pin so there will be no issues with long cables.
 
AquaCave Logo Banner

Jason Judd

Community Member
Review score
+0 /0 /-0
View Badges
Joined
Jul 8, 2018
Messages
29
Reaction score
13
Review score
+0 /0 /-0
Has anyone had issues with auto top off hanging? In the UI the toggle for on and off becomes unresponsive. And the actual Auto top off is not operating. I cleared up my database and rebuilt everything wondering if I had an issue in there. However with only the three basic Auto top offs that I'm using I'm still seeing the same issue.

ATO1: Standard Auto top off turning on a pump to pump in freshwater
ATO2: used on my protein skimmer overflow connected to a macro that turns off the protein skimmer and sends a text when the Overflow gets full
ATO3 (appears to be the culprit, all ATO stopped working in the same hour this teiggerd): used to detect high water on the main tank. When activated it temporarily shuts down part of the system and sends me a text. Typically the high water comes because of algae trapped on filter. Cycling the system often shifts the algae enough to get me going temporarily. It triggers once every couple of months and prevents an overflow spillage event.

Here's the image of the ATO, although it could be random that the ATOs stopped within an hour of this triggering. (I'll have to figure out uploading a photo a bit later today...)

Any thoughts?
 

Simonv92

Community Member
Review score
+0 /0 /-0
View Badges
Joined
Oct 21, 2014
Messages
80
Reaction score
66
Review score
+0 /0 /-0
Location
Italy
Some noise must be getting in the lines somewhere, maybe it's some equipment nearby, some LED drivers can emit noise. If you have one turned on see if it works better when its off or unplugged. You also might have to power cycle the Pi to get the I2C working again if it's hung up. How long is the cable? Try and keep it under a foot and if you can get shielded cable that will help. If you don't have for a quick fix try wrapping the cable in aluminum foil used for cooking. Even though you can read the address there could still be problems. Your best bet might be to get an ESP32, connect a DHT22 to it, you should be able to find example code on the web and then have the data sent to reef-pi using the new driver. DHT22 uses a digital pin so there will be no issues with long cables.
Hi Rob, thank you for your answer.
I’ve done some test:
I’m running a board with multiple PCA9507 as I2C extender; if I connect the sensor with 20cm of cable everything works fine.
If I run the full cable (around 2mt) to the same connector the sensor doesn’t work.

I’ve then tested the sensor attached to the outlet expansion board (which is connected to the cpu board by a bus extended by P82B96D): the PCA9685 that drives the output works without a problem, SHT31D connected to the same bus with 20cm of cable doesn’t work…

I was testing everything on a prototype board with very long cable (about 5 meters) and everything was working fine so I tought that with shorter cable I’ll not have any problem… could it be something related to the pullman-up resistor value? On my board I have 2.2K pull-up…
Let me know if tou have any idea, I’ll keep as last chance the use of the ESP32 only to read this sensor…
Thank you!
 

Does it matter to you whether your fish are captive-bred or wild caught?

  • I only buy captive bred fish.

    Votes: 94 14.4%
  • It matters, but I will buy either captive-bred or wild-caught.

    Votes: 457 70.2%
  • I think wild-caught fish are the better option.

    Votes: 16 2.5%
  • I don’t care where the fish were bred.

    Votes: 84 12.9%
Your Reef
Top