Help please with Co2 project

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
fallendemon
 
Posts: 22
Joined: Fri Apr 04, 2014 1:48 pm

Help please with Co2 project

Post by fallendemon »

Ok so let me start off by saying that I know a little bit about programming the Arduino. I have built a temperature controller and now I would like to build a Co2 controller. I am willing to pay someone for help with this. This is the temp controller I have built:

Code: Select all

#include <EEPROM.h>
#include <LiquidCrystal.h>// include the library code
int tempPin = A0;  // make variables// thermistor is at A0
int led =13; // led is at pin
float temp;  // make a variable called temp
float settemp; // make a variable called temp
int swtu = 7;  // switch up is at pin 7
int swtd = 6;   // switch down is at pin 6
LiquidCrystal lcd(12, 11, 5, 4, 3, 2); // lcd is at 12,11,5,4,3,2

void setup() {
  pinMode (led,1);  // make led or pin13 an output
  Serial.begin (9600); // set the serial monitor tx and rx speed
  lcd.begin(16, 2); // set up all the "blocks" on the display
  lcd.setCursor(0,0); // set the cursor to colum 0 row 0
  lcd.print("Welcome"); // display Welcome for 1 second
  lcd.clear(); // clear the lcd
  EEPROM.read (1); // make the eeprom or atmega328 memory address 1
}

void loop() {

  int tvalue = analogRead(tempPin);  // make tvalue what ever we read on the tempPin
  float temp = (tvalue / 6.388888888889); // the math / conversion to temp
  lcd.setCursor (0,0); // set the cursor to 0,0
  lcd.print ("TEMP ");
  lcd.print (temp);  // Print the current temp in f
  lcd.print (' °F');
  Serial.println (temp);  // print the temp it the serial monitor
  settemp = EEPROM.read(1); // read the settemp on the eeprom

  delay (250); // wait for the lcd to refresh every 250 milliseconds
 
  if             // if we se the switch up pin reading on 1 or 5 volts
    (digitalRead(swtu)== 1 )
  {
    settemp ++  // add one to the settemp, the settemp is the ideal temperature for you
   

      ;
  EEPROM.write (1,settemp); /* write the most recent settemp in eeprom data stoage
  so that if the power is disconnected, you settemp is saved!*/
}
  

else{// other wise do nothing

}

if
(digitalRead (swtd) == 1)// if we detect a 1 on the other switch pin
{
  (settemp --);// subtract one fromm the settemp
 EEPROM.write (1,settemp); /* write the most recent settemp in eeprom data stoage
  so that if the power is disconnected, you settemp is saved!*/
}
else {
// else, do nothing
}

if (temp > settemp) // if the temperature exceeds your chosen settemp
{
  digitalWrite (led, 1); // turn on the led
}
else // if that doesn't happen, then turn the led off
{
  digitalWrite (led,0);
}



lcd.setCursor (0,1); // set the cursor to 0,1
lcd.print ("SET TEMP "); // Print set to and your ideal temperature in f
lcd.print (settemp);
lcd.print (' °F');
Serial.println(settemp);  // Print the settemp in the serial montior

delay (250); // wait 250 milliseconds

}
I am wanting to do the SAME exact thing only with a Co2 sensor. It will monitor and control the ppm level of Co2. Like I said I am somewhat knowledgeable when it comes to Arduino. Also I am willing to pay someone to guide me through everything. Thanks.
Attachments
Temp Controller_bb.jpg
Temp Controller_bb.jpg (764.27 KiB) Viewed 1217 times

User avatar
Franklin97355
 
Posts: 23910
Joined: Mon Apr 21, 2008 2:33 pm

Re: Help please with Co2 project

Post by Franklin97355 »

It really helps if you let us know what exact sensor (with link to datasheet) you plan to use and what you want the controller to do and how you want to interface with it.

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Help please with Co2 project

Post by adafruit_support_rick »

Feel free to post your offer on our Jobs board
http://adafruit.com/jobs/

User avatar
fallendemon
 
Posts: 22
Joined: Fri Apr 04, 2014 1:48 pm

Re: Help please with Co2 project

Post by fallendemon »

Thank you for replying. I am wanting to use the MG811 Co2 sensor. Here is a link to the data sheet on the sensor: http://www.jameco.com/Jameco/Products/P ... 082898.pdf

All I am wishing to accomplish is have it connected to an LCD 16X2 screen and have two buttons one for adjusting the desired ppm level up and other for down. When the desired level is reached it will trigger a relay. I have accomplished this with a temperature sensor as described in by above mentioned post. However I am lost when it comes to the Co2 sensor. I even posted the code for my temperature controller. I want it exactly like that except it will be Co2 and not temperature. Thanks again.

User avatar
Franklin97355
 
Posts: 23910
Joined: Mon Apr 21, 2008 2:33 pm

Re: Help please with Co2 project

Post by Franklin97355 »

That sensor only has one pin to turn it on and on that goes high when a preset level is reached so adjusting it in software is not going to work without some additional hardware. Are there not other sensors you could use?

User avatar
fallendemon
 
Posts: 22
Joined: Fri Apr 04, 2014 1:48 pm

Re: Help please with Co2 project

Post by fallendemon »

I am open to suggestions. Like I said I don't know too much about this particular project. The MG811 sensor comes with a circuit board. Maybe this is required to adjust it in the software. I am really stumped though and in need of this project. I am growing peppers and other vegetables in an indoor hydroponics garden and need to control the Co2 levels in the grow room. The temp controller I built works awesome. I just need the same exact thing only in Co2.

User avatar
fallendemon
 
Posts: 22
Joined: Fri Apr 04, 2014 1:48 pm

Re: Help please with Co2 project

Post by fallendemon »

Anyone willing to help me out?

User avatar
Franklin97355
 
Posts: 23910
Joined: Mon Apr 21, 2008 2:33 pm

Re: Help please with Co2 project

Post by Franklin97355 »

How much and how often do you need to adjust the settings? How do you plan to raise or lower the CO2 levels?

User avatar
fallendemon
 
Posts: 22
Joined: Fri Apr 04, 2014 1:48 pm

Re: Help please with Co2 project

Post by fallendemon »

I'd like to adjust the levels in increments of 5. The co2 levels will be controlled by a Co2 tank with a regulator. I just need the hardware and software side of things. Just need the arduino to trigger a relay. In other words, You set the desired ppm of Co2 by push buttons and a relay will close until the desired level is reached. Exactly like how I have the temperature controller only using a Co2 sensor.

User avatar
Franklin97355
 
Posts: 23910
Joined: Mon Apr 21, 2008 2:33 pm

Re: Help please with Co2 project

Post by Franklin97355 »

Sorry I don't know how to do that with the sensor you linked to and do not know of a more suitable sensor. If you find something come back and let me know.

User avatar
fallendemon
 
Posts: 22
Joined: Fri Apr 04, 2014 1:48 pm

Re: Help please with Co2 project

Post by fallendemon »

Do you know how to do it with a different sensor?

smutersbaugh
 
Posts: 1
Joined: Sat Apr 05, 2014 11:52 pm

Re: Help please with Co2 project

Post by smutersbaugh »

I'm not sure if this will help, I'm just starting out with the Arduino. Are you sure you are looking at the Voltage? I was looking at a description of the MG811 Co2 Gas sensor, http://sandboxelectronics.com/?product= ... sor-module, and I notice it said "The output voltage of the module falls as the concentration of the CO2 increases."! So you want to watch for a voltage increase to trigger your valve or vice verse if you want to decrease the Co2 levels.

User avatar
fallendemon
 
Posts: 22
Joined: Fri Apr 04, 2014 1:48 pm

Re: Help please with Co2 project

Post by fallendemon »

All I am wanting to to is maintain the ppm levels of Co2.

User avatar
Franklin97355
 
Posts: 23910
Joined: Mon Apr 21, 2008 2:33 pm

Re: Help please with Co2 project

Post by Franklin97355 »

smutersbaugh's link looks like it might work and there is Arduino code on the site.

User avatar
maltesemants
 
Posts: 12
Joined: Wed Jan 02, 2013 2:06 pm

Re: Help please with Co2 project

Post by maltesemants »

Are you still looking for a solution?

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”