Temperature and humidity control for an incubator using Reef-Pi

Litserv

Community Member
View Badges
Joined
May 3, 2020
Messages
62
Reaction score
60
Rating - 0%
0   0   0
I have an incubator that I use to incubate Testudo Hermanni eggs. For this I use a RPI with Reef-Pi.

While the temperature control works great for my aquarium, I have major problems with the incubator:
The temperature in the aquarium runs within the set hysteresis around the set point.
But the temperature in the incubator shows a fluctuation range of 2 - 3 degrees Celsius, although I have set 0.1 degrees Celsius as hysteresis.
A DS18B20 serves as temperature sensor.

I assume that the 'inertial mass' - air instead of water - is much too low and that is why the overshoots occur.

Therefore, I imagine a proportional control instead of a 2-point control for the temperature as a solution: The heating power adapts to the difference between the set temperature and the actual temperature. This can be done very well via PWM.

In Reef-Pi, a PWM connection should also be selectable under temperature control. Two parameters would be useful: offset and slope.

Can this be implemented in Reef-Pi?
Or is there another solution or a work-around?

I am grateful for any suggestion for a solution.
 

Sral

Valuable Member
View Badges
Joined
May 2, 2022
Messages
1,006
Reaction score
978
Location
Germany
Rating - 0%
0   0   0
At the moment I have not the time to dive deeper in the issues with the tested equipment PWM -> Power electricity. There can be more than one issue:
- Thyristor (controlling only one phase) instead of Triac (controlling both phases) to control the power
- missing sync of the PWM signal with the phases of the power electricity
- perhaps other issues...

I tried to get around the second issue by setting the RPi of PWM down to 1 instead of 100. But this didn't work.

So, when I have more time, than I'll dive deeper in the issues.

Not to forget to mention, I found an equipment which can detect the zero crossing and sending this to an Raspberry Pi or Arduino:
Amazon product

Curious.

I had to read up on Thyristors and Triacs since I'm not familar with them. Strange thing: both products you linked before say "Thyristor" in the pictures, but use a BT136S-600E ... which is a TRIAC if I'm not mistaken. If you tried both boards this should therefore not be an issue.

I think you can't sync the PWM with the AC mains frequency, since microcontroller PWM is typically in the kHz range. I would therefore not expect a board like this to even try doing so. I rather believe that the module has a microcontroller that reads the input duty cycle with a microcontroller (the 8legged IC has markings close to LTC15W20) and triggers the triac in phase with the mains frequency to reproduce the desired output.

1.) I assume a linear relationship between PWM duty cycle and mean output voltage.

2.) Further consideration (very simplified):

Power (P) = Voltage (V) * Current (A)
V = Resistance (R) * A
This leads to:
P = V^2 / R

3.) Result: Output Power is non-linear with PWM.

Am I right? Or what's wrong in my consideration?
1) I don't think that's a valid assumption. If PWM dims an LED you also decrease the mean voltage linearly, but the mean current is also linear, not nonlinear to the LED's I-V-curve. Same with a resistor: if you PWM dim the supply to a resistive heater you also decrease the mean voltage and mean current linearly. But the heating power also decreases linearly, not quadratically, since voltage and current are in phase and every time the maximum voltage is present one also has maximum current. Looking at the mean values can be misleading here.

Nonlinearity is a good idea though. If the mains AC is simply chopped directly with the same duty cycle one ends up with very little power change at duty cycles close to 0 and 100% and get's a very strong change in output power around 50%, since mains AC has most of it's power in the middle of the wave. Should look similar to a sigmoid
 
Upvote 0
OP
OP
L

Litserv

Community Member
View Badges
Joined
May 3, 2020
Messages
62
Reaction score
60
Rating - 0%
0   0   0
say "Thyristor" in the pictures, but use a BT136S-600E ... which is a TRIAC

Thanks for your hint. I didn't check, what type the BT136S is.


since microcontroller PWM is typically in the kHz range

I didn't know.

If PWM dims an LED you also decrease the mean voltage linearly

I have to think about your thougts. But have in mind: LEDs are Diodes, non-linear with V. Therefore, LEDs are controlled by A, not V! V is 'fixed' and specified by the actual LED. I agree, that I is linear with the PWM-signal, but V is constant. Therefore, the relationship between the PWM-signal and the emitted LED light power, determined by only I, is linear... That's the difference between LED and a heater.

PS: Please excuse my bad english; it's not my mothertongue...
 
Upvote 0

Sral

Valuable Member
View Badges
Joined
May 2, 2022
Messages
1,006
Reaction score
978
Location
Germany
Rating - 0%
0   0   0
Thanks for your hint. I didn't check, what type the BT136S is.
[...]
I didn't know.
[...]
I have to think about your thougts. But have in mind: LEDs are Diodes, non-linear with V. Therefore, LEDs are controlled by A, not V! V is 'fixed' and specified by the actual LED. I agree, that I is linear with the PWM-signal, but V is constant. Therefore, the relationship between the PWM-signal and the emitted LED light power, determined by only I, is linear... That's the difference between LED and a heater.

PS: Please excuse my bad english; it's not my mothertongue...
You're very excused and very welcome. English isn't my native language either :grinning-face-with-sweat:

Well ... that thought on LEDs is not entirely true either I believe, but is a helping guideline for designing circuits with LEDs, since their I-V-curve is exponential and they go up in smoke very quickly from the smallest change in voltage.

You could say the same for a resistive heater, BTW. It's controlled by the current, which fixes the voltage drop across it. I is linear with the PWM, but V is constant. Therefor the relationship between the PWM-signal and the created heat, determined by only I, is linear.

So there is no actual difference between an LED and a heater. In both cases, during each PWM pulse, the voltage and current is constant and determined by the power source and the load.
 
Upvote 0
Back
Top