Solar Minty + DHT22 + Waterproof DS18B20 + PH Probe
Moderators: adafruit_support_bill, adafruit

Solar Minty + DHT22 + Waterproof DS18B20 + PH Probe

by andyx on Sat Jul 09, 2011 4:38 pm

Solar powered Temperature corrected PH meter with Ambient Temperature and Humidity.

Display Shows Outside Temp and Humidity on top with PH and Water temp on bottom.

272159_1948075784893_1332523133_31900834_1264920_o.jpg
272159_1948075784893_1332523133_31900834_1264920_o.jpg (134.8 KiB) Viewed 8064 times


278651_1948087905196_1332523133_31900853_6437217_o.jpg
278651_1948087905196_1332523133_31900853_6437217_o.jpg (68.04 KiB) Viewed 8064 times
What is better than an Arduino? An Arduino with a laser!
User avatar
andyx
 
Posts: 40
Joined: Tue Aug 03, 2010 4:55 pm
Location: Dania Beach, Florida

Re: Solar Minty + DHT22 + Waterproof DS18B20 + PH Probe

by adafruit on Sat Jul 09, 2011 7:57 pm

Intense! do you have a writeup, diagrams or code? would be an awesome example to show people what can be done with arduino!
User avatar
adafruit
 
Posts: 11683
Joined: Thu Apr 06, 2006 3:21 pm
Location: nyc

Re: Solar Minty + DHT22 + Waterproof DS18B20 + PH Probe

by andyx on Sat Jul 09, 2011 8:15 pm

I'll write something up with more info about it.
What is better than an Arduino? An Arduino with a laser!
User avatar
andyx
 
Posts: 40
Joined: Tue Aug 03, 2010 4:55 pm
Location: Dania Beach, Florida

Re: Solar Minty + DHT22 + Waterproof DS18B20 + PH Probe

by adafruit on Sat Jul 09, 2011 8:47 pm

awesome!
User avatar
adafruit
 
Posts: 11683
Joined: Thu Apr 06, 2006 3:21 pm
Location: nyc

Re: Solar Minty + DHT22 + Waterproof DS18B20 + PH Probe

by andyx on Sun Jul 10, 2011 5:21 pm

This is a work in progress project which uses a Solar charging MintyBoost to power an Arduino with a Proto Screw Shield on it. Attached is a 2X16 LCD using the I2C Backpack, a DHT22 Temperature and Humidity Sensor, a Waterproof DS18B20 Sensor and a 5V analog PH Probe/Adapter.

LCDI2C_bb.jpg
LCDI2C_bb.jpg (45.97 KiB) Viewed 8030 times


LCDI2C_schem.jpg
LCDI2C_schem.jpg (75.08 KiB) Viewed 8030 times


Code: Select all | TOGGLE FULL SIZE
/*
Sketch combining DHT22, DS18B20 OneWire, LCD I2C and Analog PH 5V
Nothing very creative, but they all coexist no problem.
Make sure you visit each of these sensor's tutorials and get the required libraries.
*/

#include <Wire.h>
#include <LiquidCrystal.h>
#include <OneWire.h>
#include <DallasTemperature.h>
#include "DHT.h"

#define DHTPIN 11
#define DHTTYPE DHT22

DHT dht(DHTPIN, DHTTYPE);

#define ONE_WIRE_BUS 10
OneWire oneWire(ONE_WIRE_BUS);

DallasTemperature sensors(&oneWire);

int sensorPinPH = A0;

LiquidCrystal lcd(0);

void setup() {
 
  dht.begin();
 
  lcd.begin(16, 2); 
  lcd.setBacklight(HIGH);
  lcd.setCursor(8, 0);
 
  sensors.begin();
}

void loop() {
 
  float h = dht.readHumidity();
  float t = (dht.readTemperature()*9.0/5.0)+32.0;
  float sensorValue = 0;
  lcd.setCursor(0, 0);
  lcd.print(t);
  lcd.setCursor(8, 0);
  lcd.print(h);

  lcd.setCursor(0, 1);
 
  sensors.requestTemperatures();
   
  sensorValue = 7.0 - (2.5 - analogRead(sensorPinPH) / 204.8) / (0.257179 + 0.000941468 * sensors.getTempCByIndex(0));
  lcd.print(sensorValue);

  lcd.setCursor(8, 1);
  lcd.print((sensors.getTempCByIndex(0)*9.0/5.0)+32.0);
 
  delay(500);
}
What is better than an Arduino? An Arduino with a laser!
User avatar
andyx
 
Posts: 40
Joined: Tue Aug 03, 2010 4:55 pm
Location: Dania Beach, Florida

Re: Solar Minty + DHT22 + Waterproof DS18B20 + PH Probe

by adafruit on Mon Jul 11, 2011 1:08 pm

nice work! we'll post this up on our blog!
User avatar
adafruit
 
Posts: 11683
Joined: Thu Apr 06, 2006 3:21 pm
Location: nyc

Re: Solar Minty + DHT22 + Waterproof DS18B20 + PH Probe

by senojcet on Mon Jul 11, 2011 2:29 pm

What pH probe did you use? What is the BNC connector adapter board that you used? Thanks!
senojcet
 
Posts: 3
Joined: Mon May 26, 2008 6:03 pm

Re: Solar Minty + DHT22 + Waterproof DS18B20 + PH Probe

by andyx on Mon Jul 11, 2011 8:44 pm

The adapter is a 1130 - pH/ORP Adapter from Phidgets.

The probe is a 3550 - ASP200-2-1M-BNC pH Lab Electrode.

Note that when using this sensor, formulas shown in the manual, need to be tweaked a bit. They use a 1000 analog input range, so adjust the formulas to work with the Arduino's 1024 analog input range.
What is better than an Arduino? An Arduino with a laser!
User avatar
andyx
 
Posts: 40
Joined: Tue Aug 03, 2010 4:55 pm
Location: Dania Beach, Florida

Re: Solar Minty + DHT22 + Waterproof DS18B20 + PH Probe

by tmaros on Fri Jul 20, 2012 7:41 am

Hi!

It's an old post, but I hope someone could help me anyway. I'm trying to do aquarium controller, which should measure pH as well. I'm interfacing Arduino via LCD and buttons. I would like to have temperature compensated pH measurements, but also it would be nice to have calibration via LCD. My question is where did these "magic numbers" (in the quote) come from?
sensorValue = 7.0 - (2.5 - analogRead(sensorPinPH) / 204.8 ) / (0.257179 + 0.000941468 * sensors.getTempCByIndex(0));
lcd.print(sensorValue);

What is the meaning of 0.257179 or 0.000941468?
The equation is linear, but which numbers are supposed to stay the same and which should be changed when doing calibration?
tmaros
 
Posts: 3
Joined: Sat May 05, 2012 12:01 pm

Re: Solar Minty + DHT22 + Waterproof DS18B20 + PH Probe

by ciscomonkey on Fri Aug 02, 2013 11:17 am

Really old post now, but it comes from the formula provided for reading the probe: http://www.phidgets.com/docs/1130_User_ ... ing_the_pH
ciscomonkey
 
Posts: 1
Joined: Wed Mar 07, 2012 4:52 pm