Control Gas Levels in Chamber

Job ID: 37134720

Budget: $250 – $750 USD

I have chambers where I need to control gas levels. I already have code written on Arduiono and RaspberryPi but it needs to be adapted to better and get to the levels more quickly. There is one place the gas enters into the chamber which is controlled by a solenoid. If the gas is too high then a fan kicks on allowing more room air to enter.

Inside the chamber there are two gas sensors. One sensor near the bottom and one near the top and the goal is to get the readings as close as possible. There is a fan that mixes the air so that the levels of the base are even throughout. Currently the code works where it waits to add more gas until there levels are equal. So it waits for the levels to equilibrate. It keeps on adding little puffs of the gas until it reaches the goal. We found this to be more accurate than PID for example.

We did that for a smaller aquarium for mice, however even then it took too long to get to the set gas level. I want to create a different algorithm. I want it to work like the following. It will add gas and keep track of how long the solenoid was open for. And then it will see how much the gas increased for the duration that it was open. Then it will open for a longer duration and do the same calculation. It will keep track for each at different levels like at 1% the gas it was open for 30 seconds and went to 3%. At 3% it was open for 45 seconds and went to 5.5% etc...So if we want to get to the correct level then we know approximately how long to keep it open for. It does this not for this sessions but it remembers it from previous sessions as well and keeps a record so that it can get more and more accurate. Before there is any data stored it will have a set sequence of durations the valve is open to start creating the algorithm.

It will be integrated with the current code which I will give you.