Monday, 28 May 2018


In this tutorial I’ll show how you can create your own LED Cube 3x3x3. I’m sure you’ve already seen some similar projects to this one but you never took action and made your own. Now it’s time to make your own!

Materials needed 
Coding link:https://drive.google.com/file/d/0B3Qwr02BGNW8MTVmNDdGTktocnc/view


Monday, 21 May 2018

Aurdino LCD project for measuring distance



ARDUINO LCD PROJECT FOR MEASURING Distance 

Introduction: Arduino LCD Project for Me

Hello:)
May be you don't know how to use an ultrasonic sensor to measure the distance with an LCD display, so in this instructable I decided to make you happy and help you getting started. This sensor is very popular among the Arduino Geeks. In this project the ultrasonic sensor read and write the distance between the sensor and the object in front of it in the LCD display, It’s really simple.
My goal is to help you understand how this sensor works and then you can use this example in your own projects.

Step 1: Parts Required

Picture of Parts Required
- 1x LCD Display (I made this project with JHD162A)
- Some wires

Step 2: Connect the Components

Picture of Connect the Components

Step 3: Upload the Code

Picture of Upload the Code
sketch to your Arduino and watch the measurement.
For more projects about the HC-SR04 ultrasonic ranging sensor visit my GitHub repository Good luck.
Link for coding https://cdn.instructables.com/ORIG/FTG/1UXQ/IADH8BAP/FTG1UXQIADH8BAP.ino

Sunday, 20 May 2018

Flame sensor is interfaced to arduino to detect Flame. Led and buzzer are interfaced to arduino to indicate the flame.
Hard ware components required:-
1) Flame sensor (Analogue Output)
2)Arduino
3)Bread board
4)LED
5)Buzzer
6)Connecting wires
Flame sensor interfacing to Arduino
Flame sensor to Arduino
vcc -> vcc
gnd -> gnd
A0 -> A0
Led interfacing to Arduino
LED +ve is connected to 9th pin of Arduino
LED -ve is connected to gnd pin of arduino
For detailded description regarding led interfacing refer the below link
https://www.instructables.com/id/LED-blinking-using-Arduino/
Buzzer interfacing to Arduino
Buzzer +ve is connected to 12th pin of Arduino
Buzzer -ve is connected to GND pin of Arduino

STEP 2: PROGRAMMING

#include<SoftwareSerial.h>
int sensorPin = A0; // select the input pin for the LDR
int sensorValue = 0; // variable to store the value coming from the sensor
int led = 9; // Output pin for LED
int buzzer = 12; // Output pin for Buzzer
void setup() {
// declare the ledPin and buzzer as an OUTPUT:
pinMode(led, OUTPUT);
pinMode(buzzer,OUTPUT);
Serial.begin(9600);
}
void loop()
{
Serial.println("Welcome to TechPonder Flame Sensor Tutorial");
sensorValue = analogRead(sensorPin);
Serial.println(sensorValue);
if (sensorValue < 100)
{
Serial.println("Fire Detected");
Serial.println("LED on");
digitalWrite(led,HIGH);
digitalWrite(buzzer,HIGH);
delay(1000);
}
digitalWrite(led,LOW);
digitalWrite(buzzer,LOW);
delay(sensorValue);
}
Results are displayed on the serial window.
When there is Flame the LED and Buzzer automatically ON and when there is no flame amount Arduino automatically turns off LED and Buzzer.
Here based on our room condition the threshold value we took was 100 for the Flame sensor.
When we place a Flame Near Flame Sensor Arduino automatically turns onthe LED and Buzzer. When we remove Flame from the flame sensor Arduino automatically Turns Off LED and buzeer.

Saturday, 19 May 2018

How to connect 16*2 led display to aurdino

Toestablish a good communication between human world and machine world, display units play an important role. And so they are an important part of embedded systems. Display units - big or small, work on the same basic principle. Besides complex display units like graphic displays and 3D dispays, one must know working with simple displays like 16x1 and 16x2 units. The 16x1 display unit will have 16 characters and are in one line. The 16x2 LCD will have 32 characters in total 16in 1st line and another 16 in 2nd line. Here one must understand that in each character there are 5x10=50 pixels so to display one character all 50 pixels must work together. But we need not to worry about that because there is another controller (HD44780) in the display unit which does the job of controlling the pixels. (you can see it in LCD unit, it is the black eye at the back ).
this tutorial we are going to interface a 16x2 LCD with ARDUINO UNO. Unlike normal development boards interfacing a LCD to a ARDUINO is quite easy. Here we don’t have to worry about data sending and receiving. We just have to define the pin numbers and it will be ready to display data on LCD.

Components Required

Hardware: ARDUINO UNO, power supply (5v),  JHD_162ALCD(16x2LCD), 100uF capacitor.
Software: Arduino IDE (Arduino nightly).

Circuit Diagram and Explanation

In 16x2 LCD there are 16 pins over all if there is a back light, if there is no back light there will be 14 pins. One can power or leave the back light pins. Now in the 14 pins there are 8 data pins (7-14 or D0-D7), 2 power supply pins (1&2 or VSS&VDD or GND&+5v), 3rd pin for contrast control (VEE-controls how thick the characters should be shown), and 3 control pins (RS&RW&E).

In the circuit, you can observe I have only took two control pins, this gives the flexibility. The contrast bit and READ/WRITE are not often used so they can be shorted to ground. This puts LCD in highest contrast and read mode. We just need to control ENABLE and RS pins to send characters and data accordingly.The connections which are done for LCD are given below:
PIN1 or VSS to ground
PIN2 or VDD or VCC to +5v power
PIN3 or VEE to ground (gives maximum contrast best for a beginner)
PIN4 or RS (Register Selection) to PIN0 of ARDUINO UNO
PIN5 or RW (Read/Write) to ground (puts LCD in read mode eases the communication for user)
PIN6 or E (Enable) to PIN1 of ARDUINO UNO
PIN11 or D4 to PIN8 of ARDUINO UNO
PIN12 or D5 to PIN9 of ARDUINO UNO
PIN13 or D6 to PIN10 of ARDUINO UNO
PIN14 or D7 to PIN11 of ARDUINO UNO

The ARDUINO IDE allows the user to use LCD in 4 bit mode. This type of communication enables the user to decrease the pin usage on ARDUINO, unlike other the ARDUINO need not to be programmed separately for using it in 4 it mode because by default the ARDUINO is set up to communicate in 4 bit mode. In the circuit you can see we have used 4bit communication (D4-D7).

So from mere observation from above table we are connecting 6 pins of LCD to controller in which 4 pins are data pins and 2 pins for control
Code:/*
  LiquidCrystal Library - Hello World
 Demonstrates the use a 16x2 LCD display.  The LiquidCrystal
 library works with all LCD displays that are compatible with the
 Hitachi HD44780 driver. There are many of them out there, and you
 can usually tell them by the 16-pin interface.
 This sketch prints "Hello World!" to the LCD
 and shows the time.
  The circuit:
 * LCD RS pin to digital pin 12
 * LCD Enable pin to digital pin 11
 * LCD D4 pin to digital pin 5
 * LCD D5 pin to digital pin 4
 * LCD D6 pin to digital pin 3
 * LCD D7 pin to digital pin 2
 * LCD R/W pin to ground
 * LCD VSS pin to ground
 * LCD VCC pin to 5V
 * 10K resistor:
 * ends to +5V and ground
 * wiper to LCD VO pin (pin 3)
 Library originally added 18 Apr 2008
 by David A. Mellis
 library modified 5 Jul 2009
 by Limor Fried (http://www.ladyada.net)
 example added 9 Jul 2009
 by Tom Igoe
 modified 22 Nov 2010
 by Tom Igoe
 modified 7 Nov 2016
 by Arturo Guadalupi
 This example code is in the public domain.
*/
// include the library code:
#include <LiquidCrystal.h>
// initialize the library by associating any needed LCD interface pin
// with the arduino pin number it is connected to
const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
void setup() {
  // set up the LCD's number of columns and rows:
  lcd.begin(16, 2);
  // Print a message to the LCD.
  lcd.print("burada bro's");
}
void loop() {
  // set the cursor to column 0, line 1
  // (note: line 1 is the second row, since counting begins with 0):
  lcd.setCursor(0, 1);
  // print the number of seconds since reset:
  lcd.print(millis() / 1000);
}


Thursday, 17 May 2018

How to make clap switch

ABOUT THIS PROJECT

This video shows how to use KY-038 Sound Sensor using Arduino. It also shows how you can control LED by clap with the help of Arduino and Sound Sensor. We have shown only to control LED, but by using the same concept you can control any electronic device.
KY-038 Sound Sensor having 4 Pins:
  • AO – Analog Output
  • G – Ground
  • + – VCC
Codeint soundSensor=2;
int LED=4;
boolean LEDStatus=false;

void setup() {
 pinMode(soundSensor,INPUT);
 pinMode(LED,OUTPUT);

}

void loop() {

  int SensorData=digitalRead(soundSensor); 
  if(SensorData==1){

    if(LEDStatus==false){
        LEDStatus=true;
        digitalWrite(LED,HIGH);
    }
    else{
        LEDStatus=false;
        digitalWrite(LED,LOW);
    }
  }
 }