My lab is using an okolabs microscope (i have no idea which one but included the image of the chamber currently around it that has temperature control already) but I have to integrate co2 and humidity controllers for it as my project. I am pretty confused on what exactly I'm supposed to be doing.
Requirements Summed Up (that I can remember):
integrate co2 and humidity controls and supply into petri dish holder (i have about a 1-2 inch height maximum)
the petri dish holder slide thing is about 3x6 inches (2d)
My idea right now if just to make a box around the petri dish holder and somehow find a way to control for co2 and humidity with sensors and stuff like that?
Clearly, you need to discuss the project details with your supervisor, and make certain that you understand them before proceeding.
There is not enough information in your post for Arduino forum members to help, but if you want to hire someone to do the work, ask a moderator to move the post to the Jobs and Paid Consultancy forum section (use the flag button lower right of post).
That sounds like quite a project. What is the deadline for your first test?
Please understand up front, a sensor cannot control anything. You need to research how you can control the CO2 and humidity based on results of the sensors. Include in your research how quickly the CO2 and humidity changes must be responded to. Will your CO2 and humidity be heavier than air so they sink into the petri dish holder or will you have to force them in? Can you put the sensors into the holder or just monitor the gasses coming from the holder?
My first deadline for a "plan" (he said i just need a sketch on some paper) is Tuesday morning.
This is for delicate zebra fish embryos, so I believe I would have to sink CO2 and humidity into the petri dish holder.
I can put the sensors into the holder. (either or works!)
Are the embryos producing CO2?
In that case you can inject clean air to replace the air in the dish.
Humidifiyng of that air could be done by contacting the air with temperature controlled water (vapour pressure is dependent on water temperature).
This can be forced through a sterile filter if needed.
Have you researched Okolabs?
They seem to be well involved with the sort of project you are proposing.
Why don't you use their expertise?
They do these environmental chambers as you pictured as well as gas mixing.
Or do you want to carry out some specific modifications to an existing chamber?
Don't under-estimate the amount of effort it will take to get something working reliably.
A microcontroller like the Arduino boards can do all the tasks of monitoring and controlling parameters like CO2 and humidity levels. The process is simply sensor input, some instructions and outputs to valves etc.
Additionally, you might have to include calibration, no easy task.
Without calibration against known standards, any results you finally get will be questionable.
The cost of CO2 and humidity sensors depends on the required accuracy and stability. Commercial, calibrated sensors will probably be required, and the price increases quite rapidly as the accuracy requirements tighten. Electromechanical flow controllers are not cheap.
I suggest to plan on 6 months (minimum) of full time effort for a project like this.
Using air to get rid of CO2 would also mean that you do not need a high pressure CO2 cylinder.
So you do not need any safety measures to prevent suffocation (above a few percent CO2 can cause headache, nausiness, loss of conciousness and death).
You will have to have some mechanical, fan, method of air circulation or else all your CO2 will pool up in the lowest part of device.
edit:
The best design will have a totally separate chamber to mix air and CO2 to the standard you desire, then allow the correct mixture to pass into the growing chamber. If you try to do the mix in the actual grow chamber, you will most likely kill the little buggers.
I have a pseudocode for the LabVIEW breakdown I plan on implementing:
BEGIN PROGRAM
//--------------------------------------------------------------------
// 1. INITIALIZATION
//--------------------------------------------------------------------
Set SYSTEM_RUNNING = TRUE
Set SERIAL_CONNECTED = FALSE
Set LOG_FILE_OPEN = FALSE
Set FAULT_STATE = FALSE
Set VALVE_STATE = OFF
Set PREVIOUS_VALVE_STATE = OFF
Set CO2_value = 0
Set RH_value = 0
Set TEMP_value = 0
Set CO2_lower_limit = user defined value
Set CO2_upper_limit = user defined value
Set RH_low_warning = user defined value
Set RH_high_warning = user defined value
Set TEMP_low_warning = user defined value
Set TEMP_high_warning = user defined value
Set LOOP_DELAY_MS = user defined value
Set TIMEOUT_LIMIT = user defined value
Initialize UI indicators
Initialize alarm indicators to FALSE
Initialize graphs/charts
Initialize data buffers if needed
Open serial communication to microcontroller
IF serial open successful THEN
SERIAL_CONNECTED = TRUE
ELSE
SERIAL_CONNECTED = FALSE
FAULT_STATE = TRUE
Display "Serial connection failed"
END IF
IF SERIAL_CONNECTED == TRUE THEN
Open log file
IF log file opens successfully THEN
LOG_FILE_OPEN = TRUE
Write log file header:
Timestamp, CO2, RH, TEMP, ValveState, FaultState, AlarmFlags
ELSE
LOG_FILE_OPEN = FALSE
Display "Log file failed to open"
END IF
END IF
Send command to microcontroller: VALVE_OFF
Set VALVE_STATE = OFF
Set PREVIOUS_VALVE_STATE = OFF
//--------------------------------------------------------------------
// 2. MAIN WHILE LOOP
//--------------------------------------------------------------------
WHILE SYSTEM_RUNNING == TRUE
//----------------------------------------------------------------
// 2A. CHECK STOP BUTTON / USER CONTROLS
//----------------------------------------------------------------
Read Stop Button
IF Stop Button pressed THEN
SYSTEM_RUNNING = FALSE
EXIT LOOP
END IF
Read Manual Override Control
Read Manual Valve Command
Read User Threshold Inputs
Update:
CO2_lower_limit
CO2_upper_limit
RH_low_warning
RH_high_warning
TEMP_low_warning
TEMP_high_warning
LOOP_DELAY_MS
//----------------------------------------------------------------
// 2B. ACQUIRE SENSOR DATA FROM MICROCONTROLLER
//----------------------------------------------------------------
IF SERIAL_CONNECTED == TRUE THEN
Read serial data packet from microcontroller with timeout
IF valid packet received THEN
Parse packet into:
CO2_value
RH_value
TEMP_value
Set SENSOR_DATA_VALID = TRUE
Clear communication fault indicator
ELSE
Set SENSOR_DATA_VALID = FALSE
Set FAULT_STATE = TRUE
Display "Invalid or missing sensor data"
END IF
ELSE
Set SENSOR_DATA_VALID = FALSE
Set FAULT_STATE = TRUE
END IF
//----------------------------------------------------------------
// 2C. UPDATE FRONT PANEL / USER INTERFACE
//----------------------------------------------------------------
Update numeric indicator for CO2_value
Update numeric indicator for RH_value
Update numeric indicator for TEMP_value
Update trend chart for CO2_value
Update trend chart for RH_value
Update trend chart for TEMP_value
Update valve status indicator using VALVE_STATE
Update serial connection indicator using SERIAL_CONNECTED
Update fault indicator using FAULT_STATE
//----------------------------------------------------------------
// 2D. EVALUATE SENSOR WARNINGS / ALARMS
//----------------------------------------------------------------
Set RH_LOW_ALARM = FALSE
Set RH_HIGH_ALARM = FALSE
Set TEMP_LOW_ALARM = FALSE
Set TEMP_HIGH_ALARM = FALSE
Set CO2_SENSOR_FAULT = FALSE
IF SENSOR_DATA_VALID == TRUE THEN
IF RH_value < RH_low_warning THEN
RH_LOW_ALARM = TRUE
END IF
IF RH_value > RH_high_warning THEN
RH_HIGH_ALARM = TRUE
END IF
IF TEMP_value < TEMP_low_warning THEN
TEMP_LOW_ALARM = TRUE
END IF
IF TEMP_value > TEMP_high_warning THEN
TEMP_HIGH_ALARM = TRUE
END IF
IF CO2_value is outside physically reasonable range THEN
CO2_SENSOR_FAULT = TRUE
FAULT_STATE = TRUE
END IF
ELSE
RH_LOW_ALARM = FALSE
RH_HIGH_ALARM = FALSE
TEMP_LOW_ALARM = FALSE
TEMP_HIGH_ALARM = FALSE
END IF
Update alarm indicators on UI
//----------------------------------------------------------------
// 2E. CONTROL LOGIC FOR CO2 VALVE
//----------------------------------------------------------------
IF Manual Override Control == ON THEN
IF Manual Valve Command == ON THEN
VALVE_STATE = ON
ELSE
VALVE_STATE = OFF
END IF
ELSE
// automatic mode
IF SENSOR_DATA_VALID == TRUE AND FAULT_STATE == FALSE THEN
IF CO2_value < CO2_lower_limit THEN
VALVE_STATE = ON
ELSE IF CO2_value > CO2_upper_limit THEN
VALVE_STATE = OFF
ELSE
// hysteresis hold region
VALVE_STATE = PREVIOUS_VALVE_STATE
END IF
ELSE
// safe default if data is invalid or system faulted
VALVE_STATE = OFF
END IF
END IF
//----------------------------------------------------------------
// 2F. SEND COMMAND TO MICROCONTROLLER
//----------------------------------------------------------------
IF SERIAL_CONNECTED == TRUE THEN
IF VALVE_STATE == ON THEN
Send serial command: VALVE_ON
ELSE
Send serial command: VALVE_OFF
END IF
END IF
Set PREVIOUS_VALVE_STATE = VALVE_STATE
//----------------------------------------------------------------
// 2G. LOG DATA
//----------------------------------------------------------------
IF LOG_FILE_OPEN == TRUE THEN
Get current timestamp
Build log record:
timestamp
CO2_value
RH_value
TEMP_value
VALVE_STATE
FAULT_STATE
RH_LOW_ALARM
RH_HIGH_ALARM
TEMP_LOW_ALARM
TEMP_HIGH_ALARM
SENSOR_DATA_VALID
Manual Override Control
Write log record to file
END IF
//----------------------------------------------------------------
// 2H. HANDLE COMMUNICATION FAULTS / SAFETY
//----------------------------------------------------------------
IF SERIAL_CONNECTED == TRUE AND SENSOR_DATA_VALID == FALSE THEN
Increment communication failure counter
ELSE
Reset communication failure counter
END IF
IF communication failure counter > TIMEOUT_LIMIT THEN
FAULT_STATE = TRUE
VALVE_STATE = OFF
IF SERIAL_CONNECTED == TRUE THEN
Send serial command: VALVE_OFF
END IF
Display "Communication timeout - valve forced OFF"
END IF
//----------------------------------------------------------------
// 2I. LOOP DELAY
//----------------------------------------------------------------
Wait LOOP_DELAY_MS milliseconds
END WHILE
//--------------------------------------------------------------------
// 3. SHUTDOWN SEQUENCE
//--------------------------------------------------------------------
Set VALVE_STATE = OFF
IF SERIAL_CONNECTED == TRUE THEN
Send serial command: VALVE_OFF
END IF
Update valve status indicator to OFF
IF LOG_FILE_OPEN == TRUE THEN
Write "Program stopped safely" to log file
Close log file
END IF
IF SERIAL_CONNECTED == TRUE THEN
Close serial communication
END IF
Reset UI state if needed
Display "System shutdown complete"
END PROGRAM