Blogroll

Powered by Blogger.

Thursday, 24 December 2015

Circuit to interface HC-05 bluetooth module to Arduino uno

by realfinetime electronics  |  in HC-05 at  09:37
Household equipment such as bulb or fan controlled using your android device is an interesting project which most hobbyists want to do. A communication should be there between the android device and household equipment through some microcontroller boards such as Arduino uno. Bluetooth is a simple method to establish a communication between android device and household equipment. Here, I am using a HC-05 bluetooth module to communicate with android device. HC-05 is connected to Arduino uno to receive the data sent from android device. Depending on the data received from android device, we can use this Arduino uno to control our household equipment.
Connections are done as shown in the following diagram. Connections can be summarized as,
  1. 5V pin of Arduino uno is connected to the VCC terminal of HC-05 bluetooth module.
  2. Gnd pin of Arduino uno is connected to the Gnd terminal of HC-05 bluetooth module.
  3. RX pin of Arduino uno is connected to the TX terminal of HC-05 bluetooth module.
  4. TX pin of Arduino uno is connected to the RX terminal of HC-05 bluetooth module.

After completing the circuit, upload the following program to your Arduino board. Disconnect RX and TX pins connected to Arduino uno for successful uploading. Otherwise, uploading will be failed. After successful uploading, reconnect the RX and TX pins.

char junk;
String inputString="";

void setup()
{
  while (!Serial);
  Serial.begin(9600);
}

void loop()
{
  if(Serial.available())
  {
    while(Serial.available())
    {
      char inChar = (char)Serial.read(); //read the input
      inputString += inChar;             //make a string of the characters coming on serial
    }
    Serial.println(inputString);
    while (Serial.available() > 0)  
    { 
      junk = Serial.read() ; 
    } 
    inputString = "";
  }
}

Now, open the serial monitor from Arduino IDE. Nothing will be displayed in the serial monitor. Still, you must keep the serial monitor open until the remaining steps also get completed.

Next steps will be in your android device. Install Bluetooth Terminal application in your android device from Google Play Store.

After installing, open Bluetooth Terminal application and connect your android device to bluetooth device HC-05.
Select your bluetooth device from a list of available devices.
If connection goes successful, your Bluetooth Terminal will be as shown below.
Now, type letters in the text box and send.
Letters sent from your android device will be displayed in the serial monitor of Arduino.

Wednesday, 16 December 2015

Programming ATtiny44 / ATtiny84 using Arduino uno

by realfinetime electronics  |  in Digital Electronics at  02:53
We had already seen the circuit for programming ATtiny45 / ATtiny85 using Arduino uno in my previous post. ATtiny45 / ATtiny85 has fewer number of analog and digital pins. So, for bigger applications, we have to go for microcontrollers having more analog and digital pins. ATtiny44 / ATtiny84 is an example of such kind of microcontrollers. Here, we will see a method for programming ATtiny44 / ATtiny84 using Arduino uno.

Circuit is done as shown in the following diagram. An LED should be connected to the 13th pin of ATtiny44 / ATtiny84 to test the program.

Step 1 :

Disconnect the capacitor from the circuit (Capacitor connected between RESET and GND pin of Arduino uno).
Select Arduino Uno board from Tools menu.















Upload the ArduinoISP sketch to your Arduino uno.

Step 2 :

After uploading the ArduinoISP, connect the capacitor in the circuit (Capacitor connected between RESET and GND pin of Arduino uno). Then, open Blink program from your sample programs.

Change the digital pin number from 13 to 0.

Select ATtiny board from Tools menu.

When ATtiny board is selected, a Processor sub-menu will appear under Tools menu. Select your processor from Processor sub-menu. My processor is ATtiny44.

Upload the modified Blink program to your ATtiny44 / ATtiny84. If uploading is successful, LED connected to ATtiny44 / ATtiny84 will start blinking.

Monday, 7 December 2015

Split video screen to play two videos together using Kdenlive in ubuntu 14.04

by realfinetime electronics  |  at  19:47
In certain situations, we will have to split our video screen to play two videos together side by side. Many software are there to make such videos. Here, we will see the video demonstration of splitting our video screen using kdenlive video editor in ubuntu 14.04.


Sunday, 6 December 2015

Interface 16 switches to arduino uno using only 5 digital pins (HEF4067BP)

by realfinetime electronics  |  in Microcontroller at  20:11
Under certain situations, we will have to interface many switches to our arduino uno. Simplest method to interface switches to arduino uno is to connect the switch directly to any one of the digital pin or analog pin of arduino uno. But, if we have to interface many switches to arduino uno, previous mentioned method is not advisable because, only 14 digital pins and 6 analog pins are available in arduino uno. If we connect switches to all these pins, we could not use this arduino uno board for any other purposes. Then, we have to go for some other methods which use minimum pins of arduino to interface maximum number of switches.

Circuit given below shows a simple method to interface 16 switches to arduino uno using only 5 digital pins. A HEF4067BP multiplexer/demultiplexer IC should be connected in between switches and arduino uno as shown in the diagram.

After completing the circuit, upload the following program to your arduino board.

int val = 0;         // variable to store the read value

int A_zero = 8;       
int A_one = 9;
int A_two = 10;
int A_three = 11;

int z = 12;

void setup()
{
  
  pinMode(z, INPUT);      // sets the digital pin "z" as input

  pinMode(A_zero, OUTPUT);      // sets the digital pin "A_zero" as output
  pinMode(A_one, OUTPUT);       // sets the digital pin "A_one" as output
  pinMode(A_two, OUTPUT);       // sets the digital pin "A_two" as output
  pinMode(A_three, OUTPUT);     // sets the digital pin "A_three" as output
  
  Serial.begin(9600);

}

void loop()
{
  // Select address 0000  
  digitalWrite(A_zero, LOW);    
  digitalWrite(A_one, LOW);     
  digitalWrite(A_two, LOW);     
  digitalWrite(A_three, LOW);   
  if(digitalRead(z)==1)
  {         
    Serial.println("Switch pressed is 1");  
    delay(50);
  }

  // Select address 0001  
  digitalWrite(A_zero, HIGH);   
  digitalWrite(A_one, LOW);     
  digitalWrite(A_two, LOW);     
  digitalWrite(A_three, LOW);  
  if(digitalRead(z)==1)
  {         
    Serial.println("Switch pressed is 2");  
    delay(50);
  }

  // Select address 0010  
  digitalWrite(A_zero, LOW);   
  digitalWrite(A_one, HIGH);     
  digitalWrite(A_two, LOW);     
  digitalWrite(A_three, LOW);  
  if(digitalRead(z)==1)
  {         
    Serial.println("Switch pressed is 3");
    delay(50);  
  }

  // Select address 0011  
  digitalWrite(A_zero, HIGH);   
  digitalWrite(A_one, HIGH);     
  digitalWrite(A_two, LOW);     
  digitalWrite(A_three, LOW);  
  if(digitalRead(z)==1)
  {         
    Serial.println("Switch pressed is 4");
    delay(50);  
  }

  // Select address 0100  
  digitalWrite(A_zero, LOW);   
  digitalWrite(A_one, LOW);     
  digitalWrite(A_two, HIGH);     
  digitalWrite(A_three, LOW);  
  if(digitalRead(z)==1)
  {         
    Serial.println("Switch pressed is 5");
    delay(50);  
  }  

  // Select address 0101  
  digitalWrite(A_zero, HIGH);   
  digitalWrite(A_one, LOW);     
  digitalWrite(A_two, HIGH);     
  digitalWrite(A_three, LOW);  
  if(digitalRead(z)==1)
  {         
    Serial.println("Switch pressed is 6");
    delay(50);  
  }  

  // Select address 0110  
  digitalWrite(A_zero, LOW);   
  digitalWrite(A_one, HIGH);     
  digitalWrite(A_two, HIGH);     
  digitalWrite(A_three, LOW);  
  if(digitalRead(z)==1)
  {         
    Serial.println("Switch pressed is 7");
    delay(50);  
  }  

  // Select address 0111  
  digitalWrite(A_zero, HIGH);   
  digitalWrite(A_one, HIGH);     
  digitalWrite(A_two, HIGH);     
  digitalWrite(A_three, LOW);  
  if(digitalRead(z)==1)
  {         
    Serial.println("Switch pressed is 8");
    delay(50);  
  }  

  // Select address 1000  
  digitalWrite(A_zero, LOW);   
  digitalWrite(A_one, LOW);     
  digitalWrite(A_two, LOW);     
  digitalWrite(A_three, HIGH);  
  if(digitalRead(z)==1)
  {         
    Serial.println("Switch pressed is 9");
    delay(50);  
  }  

  // Select address 1001  
  digitalWrite(A_zero, HIGH);   
  digitalWrite(A_one, LOW);     
  digitalWrite(A_two, LOW);     
  digitalWrite(A_three, HIGH);  
  if(digitalRead(z)==1)
  {         
    Serial.println("Switch pressed is 10");
    delay(50);  
  }

  // Select address 1010  
  digitalWrite(A_zero, LOW);   
  digitalWrite(A_one, HIGH);     
  digitalWrite(A_two, LOW);     
  digitalWrite(A_three, HIGH);  
  if(digitalRead(z)==1)
  {         
    Serial.println("Switch pressed is 11");
    delay(50);  
  }

  // Select address 1011  
  digitalWrite(A_zero, HIGH);   
  digitalWrite(A_one, HIGH);     
  digitalWrite(A_two, LOW);     
  digitalWrite(A_three, HIGH);  
  if(digitalRead(z)==1)
  {         
    Serial.println("Switch pressed is 12");
    delay(50);  
  }

  // Select address 1100  
  digitalWrite(A_zero, LOW);   
  digitalWrite(A_one, LOW);     
  digitalWrite(A_two, HIGH);     
  digitalWrite(A_three, HIGH);  
  if(digitalRead(z)==1)
  {         
    Serial.println("Switch pressed is 13");
    delay(50);  
  }

  // Select address 1101  
  digitalWrite(A_zero, HIGH);   
  digitalWrite(A_one, LOW);     
  digitalWrite(A_two, HIGH);     
  digitalWrite(A_three, HIGH);  
  if(digitalRead(z)==1)
  {         
    Serial.println("Switch pressed is 14");
    delay(50);  
  }

  // Select address 1110  
  digitalWrite(A_zero, LOW);   
  digitalWrite(A_one, HIGH);     
  digitalWrite(A_two, HIGH);     
  digitalWrite(A_three, HIGH);  
  if(digitalRead(z)==1)
  {         
    Serial.println("Switch pressed is 15");
    delay(50);  
  }

  // Select address 1111  
  digitalWrite(A_zero, HIGH);   
  digitalWrite(A_one, HIGH);     
  digitalWrite(A_two, HIGH);     
  digitalWrite(A_three, HIGH);  
  if(digitalRead(z)==1)
  {         
    Serial.println("Switch pressed is 16");
    delay(50);  
  }
}
If uploading is successful, open your serial monitor. Serial monitor will print the number of the switch pressed as shown in the following image.
Watch the video demonstration here.

Wednesday, 18 November 2015

Circuit to control a buzzer using arduino uno

by realfinetime electronics  |  in Buzzer at  11:34
Buzzers are commonly used to produce beep sounds when some keys are pressed. Beep sound will help us to confirm the key press easily. Many ways are there to connect buzzers in a circuit. A simple circuit to connect a small buzzer to arduino uno is shown below.
After completing the circuit, upload the following program to your arduino board. If uploading is successful, beep sound will be heard from the buzzer in one second delay.
// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin 13 as an output.
  pinMode(13, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(13, HIGH);   // turn the buzzer on (HIGH is the voltage level)
  delay(1000);              // wait for a second
  digitalWrite(13, LOW);    // turn the buzzer off by making the voltage LOW
  delay(1000);              // wait for a second
}

Friday, 31 July 2015

Temperature on seven segment display using LM35 and arduino uno

by realfinetime electronics  |  in Seven Segment Display at  01:40
We had already seen the circuit to measure the temperature using LM35 and arduino in one of my previous blog. Here, we will see the video demonstration of working of LM35 using arduino uno. Temperature measured will be displayed in a 5 digit seven segment display. Here, we are bringing a hot soldering iron near LM35 to increase the temperature around LM35.

Watch the video demonstration here.

Monday, 27 July 2015

Simple LDR Circuit Designed using ULN2803

by realfinetime electronics  |  in uln2803 at  10:30
We all are familiar with light dependent resistor (LDR) which is widely used in many applications like cars, street lights etc. Many ways are there by which we can interface light dependent resistors. Here, we will see a simple circuit for interfacing light dependent resistors using ULN2803 chip. ULN2803 is a high voltage / high current darlington driver comprised of eight NPN darlington pairs.


Video demonstration of working of a light dependent resistor using ULN2803 is given below.
By making proper changes in circuit, we can reverse the working of circuit.

Wednesday, 15 July 2015

Easy Way to Make Slow Motion Videos using Kdenlive 0.9.6 in Ubuntu 14.04

by realfinetime electronics  |  in Videos at  22:31
Slow motion frames sometimes increase the beauty of your videos. Many software are there which helps us to make slow motion videos. I am an ubuntu user and searched for a suitable software to make slow motion videos. After a few searching, I got a method to make slow motion videos easily using kdenlive software in ubuntu. Watch the following video to make slow motion videos using kdenlive.

Sunday, 12 July 2015

Step by step procedures for making a simple music system using BT66T / UM66

by realfinetime electronics  |  in UM66 at  00:12
We had already seen the circuit for making 'Jingle Bell' music using BT66T / UM66 in one of my previous blog. But, some of the beginners in electronic circuits may get confused a bit while doing the circuit. Here, we will see the step by step explanation of the procedures for making a simple music system using BT66T / UM66. Circuit require six simple components. They are
  • a 10 K resistor
  • a Press button switch
  • a speaker (I am using a 4 Ohm, 3 Watts speaker)
  • a BT66T  -  Music IC
  • a 2SC9013  - Transistor
Circuit is done on a breadboard. Watch the following video demonstration to get the steps for completing the circuit.

Saturday, 11 July 2015

'Jingle Bells' music generated using BT66T / UM66

by realfinetime electronics  |  in UM66 at  21:10
BT66T is a simple IC which can be used to generate different melody musics. They are manufactured in different modes. Each mode is specific for a particular melody. One I purchased is specific for 'jingle bells'. Circuit for BT66T is simple and is done in my previous blog. Here, we will see the video demonstration of the same.

IMPORTANT NOTICE

All the circuits, published in this blog is only after testing and getting proper results in my private lab. When you try these circuits, you should check the supply voltage, polarity of components, presence of childrens nearby and shorts in the circuits. This website will not be responsible for any harm happened to you or your components caused by your carelessness.

For More Electronic Tips

Proudly Powered by Blogger.