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

elysics

Valuable Member
View Badges
Joined
Jan 15, 2020
Messages
1,695
Reaction score
1,607
Rating - 0%
0   0   0
Hi Elysics

I haven’t been fiddling with the i2c baud rate it’s on 10000 and for the issue to occur on two Robo tank boards on two different tanks with v6.0 and not 5.3 or older tells me it has to be a software glitch as Ranjib had stated in the GitHub post.

No dosing pump or any other functionality runs at the time of the dip. I’ve also run everything with only the ph probe connected and everything else unplugged or off and still the same thing.

When you say fiddling with the i2c value do you mean setting it lower than 10000?
When you say "everything else unplugged", do you mean that literally? The robotank board, the PI, and the pH Board with the pH Probe connected together and powered on with no other cable going anywhere and no other equipment powered on in the same room or at least vicinity?

Especially the solenoid as @Sral pointed out (turned off as in disconnected from a power source)
 

iamdan

Community Member
View Badges
Joined
Jul 1, 2022
Messages
89
Reaction score
67
Location
Western Australia
Rating - 0%
0   0   0
Hi Elysics, Yes i mean that literally, Unplugged and removed. Only the Pi with the Robotank board with it's inbuilt ph probe on board.

1683374557020.png


I did manage a week or two after that old pic was taken to remove further interferences - namely it was the co2 solenoid causing interference as they do. However 6.0 still shows the graph like this.
 

Sral

Valuable Member
View Badges
Joined
May 2, 2022
Messages
1,015
Reaction score
943
Location
Germany
Rating - 0%
0   0   0
@iamdan that's good news, what exactly did you do to remove the interference ?

Now it looks like only the error every 61 minutes remains. I personally can't tell why that happens, yet. I could adapt @robsworld78's code for flowmeter and pH, but make it disregard errors. If that works it tells us if its an I2C error.
 

iamdan

Community Member
View Badges
Joined
Jul 1, 2022
Messages
89
Reaction score
67
Location
Western Australia
Rating - 0%
0   0   0
Just mounting the robo tank and some other bits into an ikea metal cabinet as a makeshift faraday cage :squinting-face-with-tongue::squinting-face-with-tongue::squinting-face-with-tongue::squinting-face-with-tongue:

I've already run robs code i found on another post somewhere few months ago and had one of my colleagues at work who is a programmer to modify the code as you stated funnily enough and had the readings be consistently read properly on modified and unmodified code. I've just changed laptops so don't know where my saved screenshots/logs went from that.

This exact issue happens on two robo tanks on opposite ends of my house on separate systems and only with 6.0. Even happens on the extra ph modules rob makes i have plugged into i2c port on his controller as i have extra probes monitoring my co2 going into my calcium reactor etc etc.

Running a lower version screws with some of my automations and other things i have running in reef-pi etc.
 
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 have also tried running reef-pi on another rpi 4 and connecting the pins of the separate i2c probe of rob's direct to the pins on the rpi4 and same issue in v6.
And the issues goes always with 5.3 ?
 

Sral

Valuable Member
View Badges
Joined
May 2, 2022
Messages
1,015
Reaction score
943
Location
Germany
Rating - 0%
0   0   0

Dave's Reef

Active Member
View Badges
Joined
Nov 4, 2018
Messages
102
Reaction score
148
Rating - 0%
0   0   0

robsworld78

Valuable Member
View Badges
Joined
Feb 14, 2020
Messages
1,029
Reaction score
1,293
Location
Edmonton, Canada
Rating - 0%
0   0   0
So I've posted about Issues before with running multiple temp sensors I run 3 now because that's what I can get to work but I would like to run 6 but can never get them to work long term if I'm lucky I can get 5 to work for a few months before they start having issues. Is it possible to use one of these with reef pi?
https://www.ebay.com/itm/3339247256...tWFbdF3T8m&var=&widget_ver=artemis&media=COPY
Unfortunately that board you linked won't work, it requires an RS485 bus to connect to and special code.

Do you have any spare GPIO's on the Pi? If so you can connect a DS18B20 to different pins, like this is much better as if one goes bad it won't affect any of the others. If you're short on GPIO's you could maybe run 2 or 3 per pin.

To do this you connect them the same as GPIO 4 but you need to edit a configuration file on the Pi to enable the other pins. Here's how you do that.

Run the following command in the Pi SSH terminal window.

sudo nano /boot/config.txt

This will open a text file, scroll down to the bottom and you'll see the following line.

dtoverlay=w1-gpio

Add # in front of it to comment it out like this.

#dtoverlay=w1-gpio

Then add the following line under that for each GPIO you use, the number at the end is the GPIO number. 2nd line is using GPIO 22 as an example. You can add as many pins as you like.

dtoverlay=w1-gpio,gpiopin=4
dtoverlay=w1-gpio,gpiopin=22


After your finished press CTRL + S on keyboard to save and then CTRL + X to exit. Now power cycle the Raspberry Pi and it should work. There's nothing special to do in reef-pi, the dropdown will show all sensor ID's from all GPIO's.
 

Sral

Valuable Member
View Badges
Joined
May 2, 2022
Messages
1,015
Reaction score
943
Location
Germany
Rating - 0%
0   0   0
@davesreef that’s curious. As far as I know @Ranjib has tested with quite a lot of DS18B20 in parallel on the same pin, at least half a dozen. Although I’m not sure if he has run them long-term like you.

I would agree with @robsworld78, the amount of sensors should not be the problem itself. I would rather expect that the cables add too much capacitance and interference and that when one sensor goes bad it might start blocking communication to all sensors.
What pull-up value, supply voltage and total cable length are you using ?
Additionally you might test if one of sensors is bad, e.g. try removing them one at a time and see if you can narrow it down to one of the sensors.
The whole topology, e.g. how you connect all the lines, also has an influence since it can cause reflections.
 

elysics

Valuable Member
View Badges
Joined
Jan 15, 2020
Messages
1,695
Reaction score
1,607
Rating - 0%
0   0   0
So I've posted about Issues before with running multiple temp sensors I run 3 now because that's what I can get to work but I would like to run 6 but can never get them to work long term if I'm lucky I can get 5 to work for a few months before they start having issues. Is it possible to use one of these with reef pi?
https://www.ebay.com/itm/3339247256...tWFbdF3T8m&var=&widget_ver=artemis&media=COPY
Are you sure it's the sensor connection that's a problem and not the sensors themselves dying? If one of them breaks and they are all connected together on the same line, that can ruin communication for the rest
 

Sral

Valuable Member
View Badges
Joined
May 2, 2022
Messages
1,015
Reaction score
943
Location
Germany
Rating - 0%
0   0   0
So I've posted about Issues before with running multiple temp sensors I run 3 now because that's what I can get to work but I would like to run 6 but can never get them to work long term if I'm lucky I can get 5 to work for a few months before they start having issues. Is it possible to use one of these with reef pi?
https://www.ebay.com/itm/3339247256...tWFbdF3T8m&var=&widget_ver=artemis&media=COPY
Hmm, it’s definitely possible to make that board work, but it’s probably a bit of work to get the communication protocol right.

I do however think that either @robsworld78‘s suggestion with using 2 (or more) GPIO pins or using an ESP32 is likely the best choice here.

I could probably program the current ReefPi-ESP32 code to use one pin per sensor comparatively quick.
 

iamdan

Community Member
View Badges
Joined
Jul 1, 2022
Messages
89
Reaction score
67
Location
Western Australia
Rating - 0%
0   0   0
Hi All :)

I have a query about the reef-pi API - Specifically to do with pH readings, The below section, does that show the calibrated or non-calibrated ph reading?
1684133785506.png
 

Simonv92

Active Member
View Badges
Joined
Oct 21, 2014
Messages
161
Reaction score
104
Location
Italy
Rating - 0%
0   0   0
Hi all! I’m working on my controller; I have a Dc return pump with 0-10V input to control the speed. Everything works fine under Reef-Pi. Is there a way to create a macro that switch ON an outlet and then ramp up to the desired value the pwm outlet which control the speed? To have a slow start of the return pump… thank you!
 

elysics

Valuable Member
View Badges
Joined
Jan 15, 2020
Messages
1,695
Reaction score
1,607
Rating - 0%
0   0   0
Hi all! I’m working on my controller; I have a Dc return pump with 0-10V input to control the speed. Everything works fine under Reef-Pi. Is there a way to create a macro that switch ON an outlet and then ramp up to the desired value the pwm outlet which control the speed? To have a slow start of the return pump… thank you!
If you don't ever want fast changing pump speeds, you could just put a resistor and capacitor of fitting values on the signal line as a low pass filter. Then the signal will always ramp, in any direction.

Edit: oh if you still use pwm, probably best to also throw an opamp in to get a proper pwm to dc converter
 

Simonv92

Active Member
View Badges
Joined
Oct 21, 2014
Messages
161
Reaction score
104
Location
Italy
Rating - 0%
0   0   0
If you don't ever want fast changing pump speeds, you could just put a resistor and capacitor of fitting values on the signal line as a low pass filter. Then the signal will always ramp, in any direction.

Edit: oh if you still use pwm, probably best to also throw an opamp in to get a proper pwm to dc converter

Thank you for your reply! I already have an OP Amp circuit as shown in the image below.
I keep the PWM signal constant for every hour of the day.
My goal was to try to create a macro which does the following every time I want to restart the return pump:
- Set PWM output to 0
- Turn ON the Pump Outlet
- wait 5 sec
- increase by 10 the PWM value
- wait 5 sec
- increase by 10 the PWM value
- and so on until I reach the desired speed of the pump


Or at least, set the PWM value to reach and using a cap-resistor to slow down the ramp of the 0-10V signal
 

Attachments

  • download.png
    download.png
    89.4 KB · Views: 87

Sral

Valuable Member
View Badges
Joined
May 2, 2022
Messages
1,015
Reaction score
943
Location
Germany
Rating - 0%
0   0   0
Thank you for your reply! I already have an OP Amp circuit as shown in the image below.
I keep the PWM signal constant for every hour of the day.
My goal was to try to create a macro which does the following every time I want to restart the return pump:
- Set PWM output to 0
- Turn ON the Pump Outlet
- wait 5 sec
- increase by 10 the PWM value
- wait 5 sec
- increase by 10 the PWM value
- and so on until I reach the desired speed of the pump


Or at least, set the PWM value to reach and using a cap-resistor to slow down the ramp of the 0-10V signal
You could also use the existing resistor and capacitor. Either add 10MOhm in series to the PWM in, add another 300uF capacitor in parallel or add both a 1 M in series and a 47uF in parallel.

That way you increase your ramp duration from:
0.16M * 4.7uF = 0.75s
To:
10 M * 4.7uF = 47s
0.16 M * 300uF = 48s
1M * 47uF = 47s

So any change in the signal, e.g. from 0 to 100% or 60 to 20% will take a bit more than that time to arrive at the pump.

So you have a bit less than 100% ramp up in a bit more than 50s, or about 10% per 5s
 

Sral

Valuable Member
View Badges
Joined
May 2, 2022
Messages
1,015
Reaction score
943
Location
Germany
Rating - 0%
0   0   0
But mind what @elysics mentioned: If you build it with the additional resistor to increase the time constant:it works both ways. If you ever run into a situation where you want to shut the pump off immediately: you can't.

If you want a slow start, but a fast off you would need to build it slightly differently with a few more components (namely: 2 resistors, 2 capacitors and 1 diode per pump):
1684265900740.png


Basic functionality is this:
- the first RC (R16 and C24) smooths the PWM to a DC voltage and induces a ramp-up and down of 0,7s
- the second RC that I added will induce a slow ramp-up with something like R=10M and C=4,7µF, e.g. 47s
- the additional diode bypasses the large resistor for ramp-down only, giving you a shut-off time of about 1,4s
 

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.3%
  • 100% dry rock + 100% live sand

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

    Votes: 30 21.6%
  • 75% live rock, 25% live sand

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

    Votes: 10 7.2%
Back
Top