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

theatrus

Valuable Member
View Badges
Joined
Mar 26, 2016
Messages
2,223
Reaction score
3,632
Location
Sacramento, CA area
Rating - 0%
0   0   0

DeeEmm

New Member
View Badges
Joined
Sep 20, 2020
Messages
24
Reaction score
27
Location
RADelaide
Rating - 0%
0   0   0
just bumping this.

Finally getting around to testing the input triggering a macro but in testing I have found that I am not getting a reliable signal.

Then I found this comment...



Are the pins set with the internal Pull-DOWN enabled?

Meaning that I need to raise input potential to trigger the input?

/DM


Are the any guides for connecting inputs? I cannot see anything in the documentation

/DM
 

Carlo Rios

New Member
View Badges
Joined
Aug 14, 2020
Messages
13
Reaction score
8
Location
US
Rating - 0%
0   0   0
Reef-Pi works with DS18B20 1-wire digital temperature probes. There are a lot of probes, but they're a crap-shoot how well they work especially at the common import pricing. Most of the sensor ICs contained in these probes are fake:


Previously, the "Drok" probes from Amazon (with the 10ft red silicone jacket) were the go to probes,; they used good steel caps (some sensors were not at all stainless steel), good quality cables, and real sensor ICs.

I wanted to do some value add screening on sensors since a lot of people had problems with sensors in general, so I bought a new lot of Drok probes from Amazon (20 or so) and... ended up having Drok cables with fake sensors AND with out of spec temperature performance (1C out with self-heating). (See: https://www.reef2reef.com/threads/r...controller-boards.499890/page-34#post-7998672 )

Most people use the fake sensors as its all there is available, and most actually do actually work, but you may have to try a few to sort out ones which are good in your setup yourself, and verify the temperature performance is correct (which you shouldn't have to do, but here we are). I want to make some better probes with actual Maxim chips, but its going to take a bit longer to qualify them. I'd subscribe to the thread if you're interested.
Funny I had just purchased a set of Drok" probes from Amazon and they are giving me problems. It looks like I just buy original chips and make my own or buy some Adafruit to see if those are any good but I think I'll just build my own seems to be the best route for me this way It will be legit. Tan is for the info guy and again keep up the excellent work.
 

Des Westcott

Well-Known Member
View Badges
Joined
May 29, 2018
Messages
646
Reaction score
1,035
Location
Durban - South Africa
Rating - 0%
0   0   0
just bumping this.




Are the any guides for connecting inputs? I cannot see anything in the documentation

/DM

Im using one of Michael Lane's hats which uses the pull-ups built into the Pi if that helps. I have no additional resistors on any of my 3 x ATO systems and they work great.
 

Des Westcott

Well-Known Member
View Badges
Joined
May 29, 2018
Messages
646
Reaction score
1,035
Location
Durban - South Africa
Rating - 0%
0   0   0
I'm getting strange "Temp sensor failure" Alerts for all 3 of my temps since last night. They seem to have dropped out at roughly the same time. Been on 3.5 for 5 days now.

Seems like all 3 sensors are just unavailable. My Temp setups don't have any Sensors listed anymore and I can't find any to edit existing ones or set up new.
 

Des Westcott

Well-Known Member
View Badges
Joined
May 29, 2018
Messages
646
Reaction score
1,035
Location
Durban - South Africa
Rating - 0%
0   0   0
I'm getting strange "Temp sensor failure" Alerts for all 3 of my temps since last night. They seem to have dropped out at roughly the same time. Been on 3.5 for 5 days now.

Seems like all 3 sensors are just unavailable. My Temp setups don't have any Sensors listed anymore and I can't find any to edit existing ones or set up new.

Reloading and Rebooting reef-pi didn't help anything, But I have now done a hard power cycle and it seems to have made things work again.....
 

theatrus

Valuable Member
View Badges
Joined
Mar 26, 2016
Messages
2,223
Reaction score
3,632
Location
Sacramento, CA area
Rating - 0%
0   0   0
Reloading and Rebooting reef-pi didn't help anything, But I have now done a hard power cycle and it seems to have made things work again.....

I suspect one of the sensor probes "latched up" and held the bus, so none of the remaining sensors could respond. Killing the power fixed it of course.

You could use a Raspberry Pi GPIO pin to control the power to the sensors so you can at least soft restart it when it does fail. Normally, the Maxim sensors shouldn't do this (they can only hold the bus for short bursts).
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,848
Reaction score
17,081
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0

robsworld78

Well-Known Member
View Badges
Joined
Feb 14, 2020
Messages
985
Reaction score
1,325
Location
Edmonton, Canada
Rating - 0%
0   0   0
Reloading and Rebooting reef-pi didn't help anything, But I have now done a hard power cycle and it seems to have made things work again.....

I never liked a single bus for multiple sensors especially as there's lots of junk, anything can happen. A few months ago I looked into multiple buses and to my surprise it's really easy to setup, just need to change the config.txt file. Then you can connect one sensor to one pin, if one goes down the others won't. The beauty is all sensors show up in reef-pi from as many buses as you want, I've tested 3.

 

DeeEmm

New Member
View Badges
Joined
Sep 20, 2020
Messages
24
Reaction score
27
Location
RADelaide
Rating - 0%
0   0   0
https://raspberrypihq.com/use-a-push-button-with-raspberry-pi-gpio/#:~:text=Connecting the Raspberry Pi's general,pin 1 using a resistor. does this help? you can also search for how to connect float switches to pi. or check the design of dfrobot's photoelectric sensor breakout board.

It's more of a software question than a how to connect the wiring question.

- If the software uses the internal pull UP resistor, I will need to ground the input to give it a state change
- If the software uses the internal pull DOWN resistor, I will need to raise the input to vcc (with a current limiting resistor) to give it a state change
- If no internal pullups are set in software than I can use an external pull up or pull down resistor and the above cases will apply, (except that the on and off signal will only be correct in one case.)

BTW, I'm not using any hats / shields breakout boards, I want to connect direct to the GPIO

The physically connecting part is easy.

But what Reef Pi does with the result is unclear.

From your example I assume that you are using the internal pull-down? Is that correct?

/DM
 

Des Westcott

Well-Known Member
View Badges
Joined
May 29, 2018
Messages
646
Reaction score
1,035
Location
Durban - South Africa
Rating - 0%
0   0   0
I suspect one of the sensor probes "latched up" and held the bus, so none of the remaining sensors could respond. Killing the power fixed it of course.

You could use a Raspberry Pi GPIO pin to control the power to the sensors so you can at least soft restart it when it does fail. Normally, the Maxim sensors shouldn't do this (they can only hold the bus for short bursts).

Well it happened again that I lost all my temp sensors. Luckily there was someone at home and I asked them to do a "Widows reset" - turn everything off and then back on again and it seems to have corrected itself again. I'm seeing feeds back in AIO. When it happened last night, the heaters were off, so my temp dropped about 2 degrees C, this time it looks like the heaters were on and the temp rose by nearly 1.5 degrees C, despite getting alerts that he temp was out of range (0 deg C)

So my question is :- Is this likely a hardware issue or software? What steps can I take to prevent it happening again? Replace sensors? Create a backup SD? Do a clean install and keep as a spare?

I've had no problems with this for a year, now it's done this twice in less than 24 hours.
 

DeeEmm

New Member
View Badges
Joined
Sep 20, 2020
Messages
24
Reaction score
27
Location
RADelaide
Rating - 0%
0   0   0
Suspect that the water sealing crimp on a sensor has given out. Replace would be my call.


Sounds likely if a DS18B20 sensor is being used as the bus controller is integrated, if it gets wet then the whole bus will go down.

It surprises me that there is no watchdog / bus check implemented. It should be possible to monitor the bus status before transmitting / receiving to detect bus issues. Some automatic recovery may then be possible with an auto reboot. Even if bus status is not available to the Pi, it should be easy to set up a simple change monitor function. the DS18B20 has a 12 bit resolution I would expect that the value would be different every time you read it.

Other solutions might be to allow for more than one input parameter into the ATO function, a second identical redundant I2C network could then be used. A failure in one network would then not result in a loss of control. (if sensor1 < temp OR sensor2 < temp then heater ON)

OR use of a hardware watchdog such as a CAT1161 timer or even something like the 'Super-Watchdog'.


I think that some form of system integrity checking is critical for any control system, especially one where it is possible to end up with a situation like Des has with temp increases due to a failed temp sensor / control bus.

/DM
 

theatrus

Valuable Member
View Badges
Joined
Mar 26, 2016
Messages
2,223
Reaction score
3,632
Location
Sacramento, CA area
Rating - 0%
0   0   0
I think that some form of system integrity checking is critical for any control system, especially one where it is possible to end up with a situation like Des has with temp increases due to a failed temp sensor / control bus.

Strongly agree. At the minimum, we should look at using multiple 1-wire buses if the Linux kernel driver supports it, which prevents one failed sensor dominating the bus. That would be simple for most people to build into their setups. I haven't dug into the kernel driver to see if it supports that, or how special the devicetree support in the RPi kernel is (which the RPi kernel is many levels of special :))
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,848
Reaction score
17,081
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Strongly agree. At the minimum, we should look at using multiple 1-wire buses if the Linux kernel driver supports it, which prevents one failed sensor dominating the bus. That would be simple for most people to build into their setups. I haven't dug into the kernel driver to see if it supports that, or how special the devicetree support in the RPi kernel is (which the RPi kernel is many levels of special :))
kernel supports multiple 1 wire gpio pins, if thats what you are asking,
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,848
Reaction score
17,081
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
It is :) Probably the best recommendation for reliability would be enabling multiple pins?
I dont know.. i have to think about this, specifically the failure conditions. I hear your suggestions.. but i dont know yet if thats all we have to consider. More research on my end i guess :)
 
Back
Top