Hi Im very new to all of this so bare with me. My wife is after a controller which can control 240v appliances. Need to be turned on when temp gets too high and off when too cold. She also needs a humidity sensor so when it gets below a humidity level a 240v humidifier turns on and when it reaches max it turns off. Also same for a dehumidifier. A sensor what can tell when water level is gettin low and can start stop water tap. Is it possible to make such thing? If so can anyone point me in the right first step?
That's quite a hefty project for a newbie.
Yes, the Arduino - even a "simple" UNO is capable of being the brains of it all.
Sensor wise, I guess you would probably be looking at:
- LM35 Temperature Sensor.
- Humidity Sensor
- Water level sensor
The first two can be seen in action at http://www.instructables.com/id/Arduino-Temperature-Humidity/
The latter can be as simple as a couple of wires dipped in the water at different levels.
For the control side of things, you'd be wanting some kind of relay interface to the mains devices - what you would need depends on the current draw of the devices, but there are numerous relay examples around - one such is at http://openenergymonitor.org/emon/node/77
The water supply would need an electric valve. One example might be this: Ray's Hobby Projects: How to control Orbit 62035 valve. Not sure if it would suffice for your water pressure requirements or not, but it's a start.
Then there is just the logic to contend with - the programming of the Arduino to get the data from the sensors and make the decisions you need.
Right ok I've told the missis and now she thinkin what else would be useful for her. Basically she is a home environment teacher. With her new students she is growing tomatoes and cabbages indoors. She wants a system which can monitor humidity of room and adjust automatically and display it. Temp of room and adjust automatically with a heater. Take reading of water temp and display and turn water heater on.read the ph level and display. what else would i need to start putting it together. also is it possible to add more than one temp censor like two or 3 AND MAKING THEM TO SHOW A AVERAGE ROOM TEMP. SORRY ABOUT ALL THE QUESTIONS. REALLY INTERESTED JN MAKING THIS AND WOULD LIKE TO LEARN.
THANKS FOR ALL YOUR INPUT
This kind of project is possible using the Arduino, like majenko said, a UNO wil be able to do it.
Let see what you may need :
Input : Temp sensor.
Humidity sensor
PH sensor
Setting switches
Output : Contol Heater
Control Humidifier
Control De-Humidifier
Control Air Conditionning
Display the info ( Temp, PH, Humidity )
I don't how experience you are with electronics and electrical. If you are experience, well it should be not a problem, but if you are not experience, well it is not going to be easy. Playing with main is dangerous for someone with no experience in electrical.
I am just consern, that all. That mean you need to buy already made AC controller box to be control by a digital signal.
The programing is a different story...
Jafooli:
Right ok I've told the missis and now she thinkin what else would be useful for her. Basically she is a home environment teacher. With her new students she is growing tomatoes and cabbages indoors. She wants a system which can monitor humidity of room and adjust automatically and display it. Temp of room and adjust automatically with a heater. Take reading of water temp and display and turn water heater on.read the ph level and display. what else would i need to start putting it together. also is it possible to add more than one temp censor like two or 3 AND MAKING THEM TO SHOW A AVERAGE ROOM TEMP. SORRY ABOUT ALL THE QUESTIONS. REALLY INTERESTED JN MAKING THIS AND WOULD LIKE TO LEARN.THANKS FOR ALL YOUR INPUT
Is there a particular reason why she wants -you- to make it (that is, why she needs you, a beginner, to build something this complex)? Is she a part of state-funded school system? Does she (or her department) have a budget to work with? Does she not have access to the means to procure equipment from established educational suppliers?
I only ask these questions because the devices you are planning on building have been done to death by educational suppliers (of various sorts). One of the more well known suppliers of kits like these is Lego-Pitsco-Dacta (although they may or may not be known by that anymore, that used to be the Lego educational arm, and a precursor to the Lego Mindstorm kits; they used to sell interface kits for sensors and such that would hook into early personal computers for monitoring and graphing). On the higher end, you have companies like Edmund Scientific and Fishertechnik who make similar products (ES moreso in the case of sensors and other equipment that can interface to PCs, while Fishertechnik is more like a high-end cross between Erector/Meccano and Lego).
However, if this is a limited budget-type thing ("group-level homeschool", or sadly, because of cuts to education spending), then it is more understandable; I just wanted to let you know that this kind of an educational system has been done quite a lot by other companies, and while, given time, I do believe you can do what you intend to do (the Arduino - the system and the community - makes it fairly easy) - if budget isn't a great concern, and technical support will be needed (and guess who becomes that support if you build this device?), using available, established, and mature resources that have been tested and debugged to a high degree is often better from an educational standpoint (then again, the act of debugging issues -will- teach the students about real-world issues in data-logging, I suppose!).
Here's the potential bright-side, though: If you are intent and serious on doing this project, as you near completion of it, you might want to think about building a business plan to grow your system, because I am sure that if you can keep the costs down (say, to under $50.00 USD per student - so that each student could potentially have his own environmental monitoring kit if needed - which I am sure is a possibility), you might have educators beating your door down (heck, even if you priced it at around $250.00, you could still make a killing); this is because the "established systems" mentioned above are anything but inexpensive. Why that is, probably has to do with a number of factors (niche product, comparatively small market, inertia, brand/name recognition by established companies, etc); if you can establish yourself as a serious (but small) educational company in this field, and gain a following, you might create a good business (although it might be tough in this economy - which might also be a reason for this pursuit). The key, though, is to avoid burning out before you get started, if word gets out that your system works and performs better than competing systems at a fraction of the cost among the educational community your wife is part of.
Regardless - you would be wise to study other systems that already exist out there (particularly the software monitoring, data logging, and graphing), if for no other reason than to understand how to create an easy to use and understandable interface for the students...
First step - start looking at the aquarium controllers, basically all the components are there, except maybe for the humidity (and something like the sparkfun hih-4030 Breakout can make that easy) just requires a bit of code which is easily found right here...you'll have to modify a bit, but I think I remember seeing even a greenhouse controller here somewhere...
Ok great guys. Yeah due to government cuts there is no budget for such things Im afraid. It was one of her students which brought the subject to hand. The missis made a general comment while at home. I've had experience in 240v household and little bit 3phase industrial wiring at work but not qualified or anything.
I Will be making it at home. testing and running till Im confident. then brake it down and install in class room.
I've never had experience in electronics well apart from back at school making switches and lights etc. very basic.
I have got already a electric oil heater, humidifier, dehumidifier, exhaust fan and a inlet fan. also have got a ph pen and a ec meter and a hand held digital water thermostat
So I've been doing bit of research on web seen many vids using the arduino. so this is my base to start with but which arduino Will be the one? i would like the option in the future to be able to read the ph in water and be able to dose the water with ph down until the ph is achieved?
There are some very big open source projects working on exactly this problem, so I doubt that you need to more than find the open source team and follow instructions to make an environment control system or hydroponics system or whatever. There's nothing stopping you from designing and building your own from scratch if you want to, but it's quite ambitious and I think your sponsor would probably be happier to be part of a global team rather than watch you struggling on your own.
Perhaps one of the easier starting point would be one off the shields - ie the arduarium - then you just need to handle some ssr's and the humidity sensor
@Jafooli
I feel better that you have some experience working with main voltage. <-- The dangerous section. The electronic is safer. To start-up, you need a breadboard, some parts ( transistors, resistors, capacitors, Led's relays, diode, ect ) to connect them to the Ardiuno, doing basic experiments with the Arduino, get some basic sensors, a LCD display ( parallel type ), so you can lean how to display info, to use the analog pins, the digital pins and programing. The only thing is : money to buys the stuffs... in some peoples, it is a problem. And I call that going to take apart e-grabage ( TV, VCR, printers, etc ) which are a free source of parts. I hope you have tools to do the job.
Right ok so Im looking at the arduino uno as a base. I understand that i need sensors for the input of data. then need relays to actuate the 240VAC WHICH turn ON AND OFF appliances. is there a item that i could connect with the uno to make communication wireless either bt or wifi.
is there a item that i could connect with the uno to make communication wireless either bt or wifi.
Yes, but get something working wired first. Quit trying to jump in the deep end.
Very good point. I need to crawle afford i walk and run, just thinkin of other bits i would le to do in the future.
So I've got the arduino uno as the brain. Get ssrs for each 240v appliance. Been lookin at temp and humidity sensors so got that covered. I can't find any ph sensors nor any water level sensors.
As above i have been told it would help... alot if i had help from anyone on here but having a quick look i seam to be overlooking anyone else who has started or even finished a device which i would like to build. I don't just want to copy their design but want to learn how it all works and communicates. Can anyone give a link to someone who has started such project
once again many thanks. All you guys are great
I have an arduino that I use as a thermostat. It is connected to a temperature sensor and also a relay which will give current to an electric heater when it gets too cold.
Here's a basic arduino tutorial: Arduino Tutorial - Getting ready
A temperature sensor tutorial: Temperature sensor tutorial - Using the TMP36 / LM35
Here's a relay device for giving power to a 240v appliance: Information.com People Search | Free People Finder & White Pages - Locate Anyone
Here's some code for turning on pin 13 when it gets too cold:
//TMP36 Pin Variables
int sensorPin = 0; //the analog pin the TMP36's Vout (sense) pin is connected to
//the resolution is 10 mV / degree centigrade with a
//500 mV offset to allow for negative temperatures
/*
* setup() - this function runs once when you turn your Arduino on
* We initialize the serial connection with the computer
*/
void setup()
{
Serial.begin(9600); //Start the serial connection with the computer
//to view the result open the serial monitor
pinMode(13,OUTPUT);
}
void loop() // run over and over again
{
//getting the voltage reading from the temperature sensor
int reading = analogRead(sensorPin);
// converting that reading to voltage, for 3.3v arduino use 3.3
float voltage = reading * 5.0 / 1024;
// print out the voltage
Serial.print(voltage); Serial.println(" volts");
// now print out the temperature
float temperatureC = (voltage - 0.5) * 100 ; //converting from 10 mv per degree wit 500 mV offset
//to degrees ((volatge - 500mV) times 100)
Serial.print(temperatureC); Serial.println(" degress C");
// now convert to Fahrenheight
//SHORTCUT could be temperatureF = (180 * voltage) - 58
float temperatureF = (temperatureC * 9 / 5) + 32;
Serial.print(temperatureF); Serial.println(" degress F");
if(temperatureF < 68){ //THIS SENDS POWER TO THE RELAY WHICH
digitalWrite(13,HIGH); //WILL ACTIVIATE THE DEVICE
}else{
digitalWrite(13,LOW);
}
delay(1000); //waiting a second
}
Here's another one I'll throw in which uses a temp sensor library (I recommend not using this type of sensor, use the other kind.) This code keeps track of time so that it only works during the night hours. It also takes several temperature readings in a short amount of time, then averages them and makes a decision based on that. If it is cold it will turn on the pin for 6 minutes, then check the temperature again.
// Example using the LM335A library for reading temperatures
// Created by Jonathan Merrill, February 20, 2010.
// http://www.greenrobotics.net
// Released into the public domain.
#include <LM335A.h>
int value=100;
int value1 = 0;
int value2 = 0;
int value3 = 0;
int value4 = 0;
unsigned long now;
unsigned long then=0;
int seconds=0;
int minutes=0;
int hours=0;
LM335A InsideTemp(1); //pass the analog input pin number
void setup() {
Serial.begin(57600);
Serial.println("starting");
pinMode(13,OUTPUT);
pinMode(2,OUTPUT);
}
void loop() {
// delay(3000);
//user must call ReadTemp before any valid temp data is available
InsideTemp.ReadTemp();
// Serial.print("Fahrenheit: ");
now=millis();
if(now-then > 999){
seconds++;
then=now;
Serial.print("Seconds: ");
Serial.println(seconds);
Serial.print("Minutes: ");
Serial.println(minutes);
Serial.print("Hours: ");
Serial.println(hours);
Serial.println();
}
if(seconds>59){
minutes++;
seconds=0;
}
if (minutes>=60){
hours++;
minutes=minutes-60;
}
if (hours==24){
hours=0;
}
//functions to get the temperature in various unitsfs
/*
Serial.println(InsideTemp.Fahrenheit());
Serial.print("Celsius: ");
Serial.println(InsideTemp.Celsius());
Serial.print("Kelvin: ");
Serial.println(InsideTemp.Kelvin());
*/
if(hours >= 0 && hours < 7 ){
digitalWrite(2,HIGH);
value1=InsideTemp.Fahrenheit();
delay(200);
InsideTemp.ReadTemp();
value2=InsideTemp.Fahrenheit();
delay(200);
InsideTemp.ReadTemp();
value3=InsideTemp.Fahrenheit();
delay(200);
InsideTemp.ReadTemp();
value4=InsideTemp.Fahrenheit();
value= (value1+value2+value3+value4)/4;
Serial.println(value+14); //the 14 makes it accurate, calibrated
//if(value+14 > 74) summer setting
if(value+14 < 70){ //--------BELOW 69 DEGREES
digitalWrite(13,HIGH);
delay(360000); //6 minutes, 5 is 300,000
minutes+=6;
}else{
digitalWrite(13,LOW);
}
}else{
digitalWrite(2,LOW);
digitalWrite(13,LOW);
}
}
I hope none of this is for school kids who are not in an electrician or electronics program. Whatever happens, if the person hurt should not have been messing with 240V then it faults on the one who said "you can".
If it's just for home then go for it.
Water level sensor:
2 wires with air between the bare ends won't conduct even if 1 is in water. But if both are then they do.
What about a humidity sensor : two wire inside a sponge or towel / paper towel ? Might work...
And what about a PH sensor : connect a wire to a zinc and the other to copper. Place the place the metal close to each other. Insert in soil ? The more acid it is, a small ? voltage may produce between the two metal, just like a battery. When the PH is in the middle, zero voltage, and if it is alcalic <-- PH = lower than middle than you may have a voltage ? .... I am no chemist, but that might work...
On the topic of switching mains, you might want to outsource that piece, albeit at higher cost. See if you can find a 240V equivalent of this: IoT Power Relay - COM-14236 - SparkFun Electronics. I note that they do make a kit for a 240V version, but then you're stuck with the same liability.
humidity sensor - honeywell hih-4030 (but i notice the 5030 is now cheaper at digikey) vdd/gnd and an analog output, well documented here
pH is well documented here and on the aquarium boards - little more than a 15$ chinese origin probe and a relatively simple opamp circuit.
Water level sensors - ebay... search for "float sensor" you'll find something for any budget/condition... much safer than running two bare wires into some water... oi...
As for the high voltage side,
That's an american dj power strip with ssr's mounted on top... I've got 4 of these setups myself (although I do ratsnest and fit them inside)
But this will be my next design
Project box + some prettyness coming from frontpanelexpress - looks a lot neater. Though I like RJ45's better than serial cables...