Hi All,
Hoping someone might be able to point me into the right direction in regards to how best to program for a certain scenario.
I am not after someone to code this for me, but just want to get a better idea of how to understand how i can achieve my objective.
Anyway basically i am looking at conditioning an air stream, to achieve a set humidity within the stream of air. My current setup is that an air source (aquarium pump) moves air through a splitter, which runs two separate streams, one stream of air goes strait to a T piece which joins into a measurement chamber (which will have a DHT style temperature and humidity sensor within it), the second stream of air runs through a bubbler, which connects to the T piece of the measurement chamber.
On the Direct to measurement chamber line, i have attached a proportional valve, which requires a very small amount of movement to adjust the flow of air through the bubbler, and increase the humidity. Basically the theory is that air will follow the easiest path, which is normally not through the bubbler (as it has to move water in part), however when i adjust the valve on the direct line, the flow of air becomes harder down that line, and it gets diverted to the bubbler where it increases the temperature.
Anyway my question is, i can control the valve with a servo, to adjust the amount of air through each stream. But what is the best way to have the system determine the amount the valve should be required to be opened to adjust the humidity to the appropriate value. In essence, rather than an on off system, how is the best way to code it so that if the humidity is close to the set valve (say 50%) it would open the valve only a little bit to keep it within range, but if the humidity was 60% it would close the servo (or move it to 90) to bring the humidity back down quicker.
Appreciate any thoughts on how to handle the response to the sensor, so that the output of the device is proportional to the sensor value. I.e. if it is set at 50% and reads 51 it won't open the valve up fully and the reading drop rapidly to 40, rather open it a tiny bit, and let it drop to 50.
Thanks!