73CHNO1O61C41 P4635

Arduino Based Intelligent Indoor Humidifier (2017)

 This project was done by my student and me. The aim of this project is to maintain the indoor humidity level to protect the drying skin in the lack of humidity. This is only one way because it can increase the humidity level inside the room. If there is over humidity. It cannot effort to reduce the humidity level. But such kind of system is convenient for research lab which maintains the humidity and temperature. In this project we used AM2302 humidity and temperature sensor which is more accurate than DHT11. 16x2 LCD to display the humidity level and temperature. We used Arduino UNO here. Below here is the complete circuit diagram. Instead of transistor for relay driving, we used relay driver module which is Active LOW. So you may see in the program to turn on the relay driver module, we send the LOW signal from Arduino. If the humidity level is under 35% RH, the device will turn on the Humidifier, just simple. Source code is described between the photos. Have fun! 

PROGRAM SOURCE CODE

 #include <DHT.h>
#include <LiquidCrystal.h>
#define DHTPIN 8     // what pin we're connected to
#define DHTTYPE DHT22   // DHT 22  (AM2302)
#define hygro 13

int maxHum = 35;

DHT dht(DHTPIN, DHTTYPE);
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
void setup()
{
  pinMode(hygro, OUTPUT);
  lcd.begin(16, 2);
  dht.begin();
}

void loop() {
  // Wait a few seconds between measurements.
  delay(2000);

  // Reading temperature or humidity takes about 250 milliseconds!
  // Sensor readings may also be up to 2 seconds 'old' (its a very slow sensor)
  float h = dht.readHumidity();
  // Read temperature as Celsius
  float t = dht.readTemperature();
 
  // Check if any reads failed and exit early (to try again).
  if (isnan(h) || isnan(t)) {
    lcd.print("sensor failed!");
    return;
  }
 
  if(h < maxHum )
 
  {
      digitalWrite(hygro, LOW);
  } else {
     digitalWrite(hygro, HIGH);
  }
  lcd.setCursor(0,0);
  lcd.print("Humidity: ");
  lcd.print(h);
  lcd.print("%");
  lcd.setCursor(0,1);
  lcd.print("Temp: ");
  lcd.print(t);
  lcd.print(" C");

}

 

 

Auto-Manual two ways water tank filling system with  HC-Sr04

This project was done by my candidate. In this project,  12V battery and DC motor pump is used. In auto mode, water level will be adjusted according to the pre-written program. In manual mode microcontroller would not control anything, at this mode user must press SW2. Water level is shown in both auto and manual mode. Arduino pro mini328 is used in this project.

 

 

PID controlled thermostat with Arduino for plant fertilization chamber

This project was done by my candidate with my guidance. It is arduino based thermostat which use PID control system. Arduino pro mini 328 is used in this project. In this project we use only one way that is low to high temperature. Not for reducing temperature if the desire set point is greater than the process value temperature. PID control could not fully apply because we didn't use SCR here and use only digitalWrite command. The project would be more appropriate if we used SCR and PWM commands. I've drawn the circuit with Proteus software. In this software Nokia5110 is not found. I use Nokia7110 lcd in circuit instead of 5110. Actually we'ed used nokia 5110 lcd. Thank you .

 

 

 

 Program source code here

#include <PID_v1.h>

#include<LCD5110_Basic.h>

#define PID_OUTPUT 3

LCD5110 myGLCD(8,9,10,11,12);

extern uint8_t SmallFont[];

doubleSetpoint, Input, Output;

doubleKp=2, Ki=5, Kd=1;

PID myPID (&Input, &Output, &Setpoint, Kp, Ki, Kd, DIRECT);

void setup()

{

myGLCD.InitLCD();

myGLCD.setContrast(70);

pinMode(13,OUTPUT);

pinMode(3,OUTPUT);

digitalWrite(13,HIGH);

  Input=analogRead(A0);

Setpoint=analogRead(A1);

myPID.SetMode(AUTOMATIC);

}

void loop()

{

myGLCD.clrScr();

    Input =analogRead(A0);

myPID.Compute();

Setpoint=analogRead(A1);

myGLCD.setFont(SmallFont);

float temp1= Input*(0.48);

float temp2= Setpoint*(0.48);

myGLCD.print("PID CONTROLLER",CENTER,2);

myGLCD.printNumI(temp1,CENTER,10);

myGLCD.print("PV =",LEFT,10);

myGLCD.print("deg C",RIGHT,10);

myGLCD.printNumI(temp2,CENTER,25);

myGLCD.print("SP =",LEFT,25);

myGLCD.print("deg C",RIGHT,25);

if (temp2>temp1)

 {

digitalWrite (PID_OUTPUT,HIGH);

    }

else {digitalWrite(PID_OUTPUT,LOW);

    }

delay (1000);

  } 

Arduino Leonardo Clone!s

Ar Hah, I bought Arduino Leonardo clone for my experiments and projects. It cost only 9$, very good board with

accessories.

 

 

7Segment Interfacing

Here is 7 segment program testing. It is only to show 3 digit, not a counter.

 

My First Program(Hello World)

Source code

int led = 13;

void setup()

{                
pinMode(led, OUTPUT);     
}

void loop() {
  digitalWrite(led, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(100);                     // wait 100 Milli second

  digitalWrite(led, LOW);   // turn the LED off by making the voltage LOW
  delay(100);                     // wait 100 Milli second

}

 

 

I bought this board on July 27, 2013, Arduino Board

 

Hall Effect Sensor Test

// constants won't change. They're used here to set pin numbers:


const int hallPin = 12;     // the number of the hall effect sensor pin
const int ledPin =  13;     // the number of the LED pin
// variables will change:
int hallState = 0;          // variable for reading the hall sensor status

void setup() {
  // initialize the LED pin as an output:
  pinMode(ledPin, OUTPUT);      
  // initialize the hall effect sensor pin as an input:
  pinMode(hallPin, INPUT);     
}

void loop(){
  // read the state of the hall effect sensor:
  hallState = digitalRead(hallPin);

  if (hallState == LOW) {     
    // turn LED on:    
    digitalWrite(ledPin, HIGH);  
  }
  else {
    // turn LED off:
    digitalWrite(ledPin, LOW);
  }
}

 

LPG Gas Detector With MQ-5 Sensor

This LPG gas detector was built with MQ-5 gas sensor. I used 10K Ohm load resistor here.

 

 

Arduino Based Thermostat Box

This project was done by my candidate with Arduino Pro-Mini 328, 5V, 16MHz. The temperature range is limited between room temperature and 50Degree Centigrade. It was based on LM35DZ linear temperature sensor. Two analogue inputs for arduino making decision and operation.  One is from voltage divider and the another is from LM35Dz temperature sensor. The device works well. The device photo and source codes are provided.

Pro-Mini 328 Photo

Figure (1) Complete circuit diagram

 

Figure (2) Perspective View of Arduino based thermostat box

 

Figure(3) Internal Circuit Array Photo

 ------- ###  PROGRAM SOURCE CODES  ###------

 

# include <LiquidCrystal.h>

LiquidCrystal lcd(12,11,5,4,3,2);

int analogPin0 = 0;

int analogPin1 = 1;

int readValue1 = 0;

int readValue2 = 1;

float temperature1, temperature2;

void setup ( )

{

pinMode(13,OUTPUT);

lcd.begin(16,2);

}

Void loop( )

{

// lcd clear, reading analogue voltages, converting to temperature unit

lcd.clear (  );

readValue1 = analogRead(A0);

readValue2 = analogRead(A1);

temperature1=  (readValue1*0.0049);

temperature2=  (readValue1*0.0049);

temperature1 = temperature1*100             //10mV/Deg C conversion

temperature2 = temperature2*100

 

 

// setting cursor and display on lcd

lcd.setCursor(0,0);

lcd.print (“Tmp:Box(C)= ”);

lcd.setCursor(12,0);

lcd.print(temperature1,DEC);

lcd.setCursor(0,1);

lcd.print (“Tmp:Set(C)= ”);

lcd.setCursor(12,1);

lcd.print(temperature2,DEC);

// Logical operations

If(temperature1>=temperature2 || temperature1==50)

{

digitalWrite(13,0);

}

else if (temperature2>50)

{

digitalWrite(13,0);

}

Else

{

digitalWrite(13,1);

}

Delay(1000);

}

 

 

 

Arduino Pro-mini 328 Based Simple low cost Light meter

This project was also done by one of my candidates. It was mainly dependent upon voltage divider circuit and LDR which has the resistance of 1M Ohm at darkest and 0.2k Ohm at bright light. According to the voltage divider equation, the analogue voltage couldn't swing very much even in 0 to 5V. So the device could measure in low light measurements. It got huge difference in bright light when compared with standard device Extech LT300 lux meter. But it is worth to use in raw measurements of light. Source codes and circuit diagrams are also provided here.

 

Figure (1) Circuit diagram

 

Figure (2) Perspective view

 

Figure (3) Standard Lux meter Extech LT-300

 

 Figure (4) Internal circuitry array

 

%%%%%-------- Program source code -------------%%%%%

 

// include the library code:
#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

void setup() {
  // set up the LCD's number of columns and rows:
  lcd.begin(16, 2);
  // Print a message to the LCD.
}

void loop()

{
  lcd.clear();
 // set the cursor

int sensorValue = analogRead(A0);
 lcd.setCursor(0, 0);
 lcd.print("lux =");


//converting the digital signal to light unit and display on lcd

  sensorValue = sensorValue*6.8;
 lcd.setCursor(5, 0);
 lcd.print(sensorValue,DEC);
 delay(500);
}

 

 

 

 

Arduino Pro-Mini Based Digital DC Volt Meter

This project was also done by one of my candidates. This device does not have protection for wrong measurements. It was also done with Arduino Pro-mini 328. It based on the voltage divider mainly. All the resistors in this voltage divider used 1k Ohm. Due to the tolerances of the resistors, the multiplication factor in this project varies by the experimental results. It was designed to measure dc voltage up to 40V.Parallel switches are set up for arduino to know which voltage level is being measured.

 

 Figure (1) Complete circuit diagram

 

Figure (2) Perspective View

 

Figure(3) Internal circuitry array photos

 ####---------------- Program Source Code ---------------------- ####

 

// include the library code:
#include <LiquidCrystal.h>
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

void setup() {

//declare input pins

pinMode(6, INPUT);

pinMode(7, INPUT);

pinMode(8, INPUT);

pinMode(9, INPUT);
 // set up the LCD's number of columns and rows:
lcd.begin(16, 2);
}

void loop()

{
float sensorValue = analogRead(A0);
 sensorValue = sensorValue*0.0049      // ADC 10bit resolution

if digitalRead(6)==HIGH)

{

lcd.Clear( );

sensorValue = sensorValue*1;

lcd.print(sencorValue, DEC);

}

else if digitalRead(7)==HIGH)

{

lcd.Clear( );

sensorValue = sensorValue*1.978;

lcd.print(sencorValue, DEC);

}

 

else if digitalRead(8)==HIGH)

{

lcd.Clear( );

sensorValue = sensorValue*4.925;

lcd.print(sencorValue, DEC);

}

else if digitalRead(9)==HIGH)

{

lcd.Clear( );

sensorValue = sensorValue*12.6;

lcd.print(sencorValue, DEC);

}

else

{

lcd.Clear(  );

lcd.print(“System Error”);

}

delay(100);                   //sampling time in ms
}

 

 

 

Android & Arduino based switching

This project was done by me, my brother and my student. We made it very simple way for switching system. We used RN-41 bluetooth module from sparkfun electronics. We used ready made Android app from Techbitar website. So thank you very much Hazim Bitar. Here is his website,    http://www.techbitar.com

 In this project, three lamps and one auxiliary socket were included. Here we didn't use regulator IC.

 Complete Circuit Diagram

 

Photo of the project