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

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
Most if not all humidity sensors don't like to be in >80%rh environments for very long. The sensor gets saturated after a while and gets stuck at 100% even when the humidity drops down. It usually gets back to normal operation after drying out in a dry environment for a few hours. Can this be what has happened?

There's a heating element in the sensor but I don't know how it's currently set up. Always on or just on for a few seconds before reading (which probably isn't enough to dry it out properly). For a very humid environment I think the possibility to tweak the time the heating element is on together with time between readings is crucial. From what I've read the heating element should be turned off for some time before a measurement is taken. But I'm not completely sure.
Yes , we just have to improve the driver code to run the internal heater at periodic interval. In my setup I am running it at 1 min interval, and didn’t realize this was an absolute necessary. I guess it depends on the setup. Here’s my 1 month chart from that data
FB8F5116-EB14-4D5F-8FF0-4B76140AFFC3.jpeg
 

Mandelstam

Well-Known Member
View Badges
Joined
Oct 29, 2017
Messages
688
Reaction score
1,066
Location
Malmö, Sweden
Rating - 0%
0   0   0
Yes , we just have to improve the driver code to run the internal heater at periodic interval. In my setup I am running it at 1 min interval, and didn’t realize this was an absolute necessary. I guess it depends on the setup. Here’s my 1 month chart from that data
FB8F5116-EB14-4D5F-8FF0-4B76140AFFC3.jpeg

I think when you're within the range your graph is showing it's not really a big issue if you use the heater or not. It's when the sensor is in an environment that's above 80% for long periods of time that it can become stuck and show too high readings.

I'm soon about to start my build thread for a reef-pi that will control a tropical vivarium I'm setting up. It will be constantly between 70-100% humidity in there so we will see how it goes. My plan is to have a second sensor and rotate them but if the sensor reaches saturation too quickly that will be a pain in the butt lol. Best scenario is of course if there's a way to keep it from reaching that saturated state from the start. Combination of heating element and maybe putting it in front of a fan or something.

Found this study comparing unheated sensors to heated ones in a high humidity environment and the heated sensor had a cycle like this: Heating 1 min, waiting 4 min, measuring 1 min. Basically one reading every 5-6 min. I know that Adafruit in their example code only heats the sensor for like a few seconds and makes a reading directly after. I have my doubts about that cycle being very efficient in battling condensation etc.

"The HCS internal working cycle consists of three phases: measuring - heating - waiting (before undertaking further measurements). The working cycle lasts 6 min: 1 min for measuring, 1 min for heating and 4 min for waiting, in order not to undertake the measuring just after heating."

"The heated capacitive sensor has resulted to be more effective in recording RH daily fluctuations. In fact, the heating cycle, allowing the desorption of water from the dielectric material, provides a RH measurement which is accurate and with a lower time response with respect to the capacitive sensor without heating cycle. This result should encourage the use of the heated capacitive sensor when indoor environmental conditions are characterized by such high RH values."
 

Mandelstam

Well-Known Member
View Badges
Joined
Oct 29, 2017
Messages
688
Reaction score
1,066
Location
Malmö, Sweden
Rating - 0%
0   0   0

92Miata

Valuable Member
View Badges
Joined
Feb 26, 2020
Messages
1,523
Reaction score
2,358
Location
Richmond, VA
Rating - 0%
0   0   0
reef-pi uses a common driver framework called HAL, which makes it easy to add new driver. This should be fairly easy to integrate, but it requires some coding.
If your design and code is opensource, I'd be more than happy to develop the driver for you. It will be nice to collaborate and so that we can provide some feedback on the esp32 API as well, i think it will be beneficial for the users.
I need to do some cleanup and remove a whole bunch of hard-coding - but yeah - it'll go up on github.
 

DeeEmm

New Member
View Badges
Joined
Sep 20, 2020
Messages
24
Reaction score
27
Location
RADelaide
Rating - 0%
0   0   0
We are unlikely to support architectures other than raspberry pi. The pin map , i2c bus and several other hardware interfacing aspects differ across architecture and supporting all of them will greatly increase our maintenance burden.

Hi Ranjib, thanks for the clarification. Maintaining several projects of my own, I understand your reasoning. I'll get a RPi3B on order.

The issue with EMBD is however not limited to other architectures, but also applies to the RPi. The main problem being that EMBD has been unmaintained since 2017.

The problem that I have come across on my search for a solution for my own issue with the Orange Pi is that EMBD can break when using later kernels, which then becomes an issue when upgrading to a later OS or using newer RPi versions. This is one of the problems I have with the Orange-Pi, which is otherwise pin compatible with the RPi and should work. There is even some evidence of this issue on the RPi platform here within the forums.

It might be worth reviewing the use of EMBD as at some point it will hold the project back. There are other better / more complete libraries that work with GO.

/DM
 

DeeEmm

New Member
View Badges
Joined
Sep 20, 2020
Messages
24
Reaction score
27
Location
RADelaide
Rating - 0%
0   0   0
...Point in case EMBD broke with the RPi kernel 4.9 and was repaired by someone external to the EMBD project. I also note that you too have pull requests for RPi4 support.
 
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
...Point in case EMBD broke with the RPi kernel 4.9 and was repaired by someone external to the EMBD project. I also note that you too have pull requests for RPi4 support.
I had to fork embd and apply pi4 specific patches for 3.5 release. I am planning to remove the embd dependency and use periph or go-rpio or just roll our own,, going forward. I have tried to minimize external dependencies.. even for embd we only use the gpio bits. pwm and i2c are all from reef-pi/rpi.
 
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 need to do some cleanup and remove a whole bunch of hard-coding - but yeah - it'll go up on github.
Awesome :-p . It will super cool to have an open api for hardware developer. It will be more sophisticated than 0-10v control signal, and can be done over IP :-). Think about that, any controller and any sensor can interact with each other, similar to our main electricity .

We have quiet a few open hardware developers among us, i think we should make an attempt.
 

Yov

Community Member
View Badges
Joined
May 24, 2020
Messages
51
Reaction score
44
Rating - 0%
0   0   0
I think when you're within the range your graph is showing it's not really a big issue if you use the heater or not. It's when the sensor is in an environment that's above 80% for long periods of time that it can become stuck and show too high readings.
.....

I have it in a Terrarium setup so Yes its between 70-100% I have no idea how to change the heating interval i think this is an isue for @Ranjib to sort out? XD

What i do know is that i do have a more " correct" reading with the new update. (beatuiful 3 day interval below with 3 spikes of spraying every day!). Ofcourse i do not have 96.21% atm. This would be more 86.21% this time of day. So the sensor works but is 10 knots to high up!
1600758189465.png


I would not recomend it to be near a fan, this would affect the reading to much! i printed a "cage" for it so it is not directly in the misting. and placed it al the way up to the glas and close with the lamps (hotest spot in the terrarium).

sensor 1.png
sensor 2.png
sensor 3.png

sensor 4.png

i can not "Hot swap" my current setup. but i like the Idea of printing 2 cages with a "plug" type of connector to switch out the sensors faster! I am not sure how much the frog's would like me to be in the top back corner of the terrarium every week... but with my current setup i could make this work!
 
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 think when you're within the range your graph is showing it's not really a big issue if you use the heater or not. It's when the sensor is in an environment that's above 80% for long periods of time that it can become stuck and show too high readings.

I'm soon about to start my build thread for a reef-pi that will control a tropical vivarium I'm setting up. It will be constantly between 70-100% humidity in there so we will see how it goes. My plan is to have a second sensor and rotate them but if the sensor reaches saturation too quickly that will be a pain in the butt lol. Best scenario is of course if there's a way to keep it from reaching that saturated state from the start. Combination of heating element and maybe putting it in front of a fan or something.

Found this study comparing unheated sensors to heated ones in a high humidity environment and the heated sensor had a cycle like this: Heating 1 min, waiting 4 min, measuring 1 min. Basically one reading every 5-6 min. I know that Adafruit in their example code only heats the sensor for like a few seconds and makes a reading directly after. I have my doubts about that cycle being very efficient in battling condensation etc.

"The HCS internal working cycle consists of three phases: measuring - heating - waiting (before undertaking further measurements). The working cycle lasts 6 min: 1 min for measuring, 1 min for heating and 4 min for waiting, in order not to undertake the measuring just after heating."

"The heated capacitive sensor has resulted to be more effective in recording RH daily fluctuations. In fact, the heating cycle, allowing the desorption of water from the dielectric material, provides a RH measurement which is accurate and with a lower time response with respect to the capacitive sensor without heating cycle. This result should encourage the use of the heated capacitive sensor when indoor environmental conditions are characterized by such high RH values."
Thank you for sharing this. I'll try my best to incorporate this learning to build a better driver for sht31d. Its not an immediate priority. But i'll create a ticket to make sure we dont loose track and have these details.

Thank you again.
 

Yov

Community Member
View Badges
Joined
May 24, 2020
Messages
51
Reaction score
44
Rating - 0%
0   0   0
@Ranjib Suddenly the graph time /date error "jumped" from 17 september to today! 22 september. 17 sept graph is "Cured" now... strange...
1600775218464.png
 

Des Westcott

Well-Known Member
View Badges
Joined
May 29, 2018
Messages
646
Reaction score
1,025
Location
Durban - South Africa
Rating - 0%
0   0   0
Nice work,

But, is it intended to have the temperature graphs go from zero to some margin above the upper level now? Before i actually could see the swings, which was nice because tiny drops would tell me that the ATO was still functioning and the reservoir not empty, now it's all one unidentifiable blob. The same happens if i create a new temp sensor. Theres no 0-value in the graph, checking right now if theres one in the database, although there shouldn't be in my existing data.
1600242665593.png


edit: Nope, no 0 values in the db either

I've just upgraded to 3.5 and noticed this as well. A bit disappointed in this change as I very much liked the old "auto range" style almost as much as the older "specified range" that existed previous to it.

My temp typically swings by less than 2 degrees C and that is impossible to see in any meaningful way on a graph that shows 0-27 DegC
 
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've just upgraded to 3.5 and noticed this as well. A bit disappointed in this change as I very much liked the old "auto range" style almost as much as the older "specified range" that existed previous to it.

My temp typically swings by less than 2 degrees C and that is impossible to see in any meaningful way on a graph that shows 0-27 DegC
This is temporary measure to address the previous issue due to fixed range , i a, planning to make it customizable (with a few other things in chart/ui ) .
 

Mandelstam

Well-Known Member
View Badges
Joined
Oct 29, 2017
Messages
688
Reaction score
1,066
Location
Malmö, Sweden
Rating - 0%
0   0   0
I have it in a Terrarium setup so Yes its between 70-100% I have no idea how to change the heating interval i think this is an isue for @Ranjib to sort out? XD

What i do know is that i do have a more " correct" reading with the new update. (beatuiful 3 day interval below with 3 spikes of spraying every day!). Ofcourse i do not have 96.21% atm. This would be more 86.21% this time of day. So the sensor works but is 10 knots to high up!
1600758189465.png


I would not recomend it to be near a fan, this would affect the reading to much!

I'm also putting my reef-pi in a vivarium! Possible frogs too in the future.

Why do you think putting it in front of a fan would effect readings? I'm not talking about a fan blowing in air from outside, I mean an internal fan inside the vivarium in my case.

And yes, the heating/reading cycle is something for the devs to look into ;) You and me we just reap the rewards of their hard work haha!
 

theatrus

Valuable Member
View Badges
Joined
Mar 26, 2016
Messages
2,253
Reaction score
3,603
Location
Sacramento, CA area
Rating - 0%
0   0   0
I'm also putting my reef-pi in a vivarium! Possible frogs too in the future.

Why do you think putting it in front of a fan would effect readings? I'm not talking about a fan blowing in air from outside, I mean an internal fan inside the vivarium in my case.

And yes, the heating/reading cycle is something for the devs to look into ;) You and me we just reap the rewards of their hard work haha!

A lot of humidity sensors start to struggle near 80%+ RH since everything just condenses. A fan would probably affect the temperature reading as you're going to be actually pushing a little bit of evaporation cooling on the sensor?

TBQH I've never dealt with environments fully saturated with water so I may be totally guessing
 

Mandelstam

Well-Known Member
View Badges
Joined
Oct 29, 2017
Messages
688
Reaction score
1,066
Location
Malmö, Sweden
Rating - 0%
0   0   0
A lot of humidity sensors start to struggle near 80%+ RH since everything just condenses. A fan would probably affect the temperature reading as you're going to be actually pushing a little bit of evaporation cooling on the sensor?

TBQH I've never dealt with environments fully saturated with water so I may be totally guessing

You're probably right above the temp reading being affected by the evaporation... And maybe cooling it could cause further condensation issues too... Good point. I'm going to have separate temp sensors in the tank as well though so it wouldn't be too big of an issue in my case. But the fan cooling the sensor might be counter productive.

I guess I'll just have to play around with it when it's all set up and see how it behaves.
 

DeeEmm

New Member
View Badges
Joined
Sep 20, 2020
Messages
24
Reaction score
27
Location
RADelaide
Rating - 0%
0   0   0
I had to fork embd and apply pi4 specific patches for 3.5 release. I am planning to remove the embd dependency and use periph or go-rpio or just roll our own,, going forward. I have tried to minimize external dependencies.. even for embd we only use the gpio bits. pwm and i2c are all from reef-pi/rpi.

Yes, being dependent on other libraries always carries an element of risk. maintaining overall control by removing them is always preferably, but this comes at the expense of system compatibility. Not really an issue in this case.

Of course an alternate solution is to write your own HAL as a seperate controller (assuming something like a MVC architecture) which then makes it fairly trivial to utilise whatever libraries you wish, making it easy to change down the track should you need as it's all on one place. It also make it easy for others to modify the HAL and swap the libraries out for whatever other library they may need. (for example orange Pi :D ).

Of course it could be a massive headache to implement this half way through a project if the code has not been structured this way. (I've not looked at your source so not sure how it is structured)

I think I could possibly make the Orange Pi work by fixing the issue in the EMBD library, but I already have too many other projects on the go. So that's likely never going to happen, plus there's a high possibility that it would break again in future Reef-Pi updates so I've started a build using a RPi3B+

I've made a start - still a long way to go tho.

IMG_20200922_225423.jpg


If anyone is interested, I've documented what I've done so far...

 

DeeEmm

New Member
View Badges
Joined
Sep 20, 2020
Messages
24
Reaction score
27
Location
RADelaide
Rating - 0%
0   0   0
Is it possible to trigger a macro from an external input or sensor value?

I note that it's possible to create a simple driver using a text file to read an input into the system, but is it possible to use this in an if-this-then-that type of scenario. Or even do the same from an input from the GPIO.

I have a built in switch on the case I'm using and I'm thinking of using it to trigger things like feeding mode. So when the switch is pressed it can trigger a 'feed' macro or start a timer that calls a feed macro.

The macro would turn my power heads off, reduce return pump flow (more on that later), turn my roll filter off and optionally other stuff.

TIA

/DM
 

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%
Free Phyto Promo
Spend $39+ → free 16oz Phyto · Use code FREEPHYTO at checkout · $16.99 value · Densest 6-species blend · Free shipping on every order · 100% live arrival guaranteed Spend $39+ → free 16oz Phyto · Use code FREEPHYTO at checkout · $16.99 value · Densest 6-species blend · Free shipping on every order · 100% live arrival guaranteed
Shop Now Code: FREEPHYTO
Back
Top