Sunday, 23 October 2016

Using internal pull-up resistor in arduino

In this post, we will discuss how to use internal pull-up resistor in arduino uno. It's quite simple.
No need of using external pull-up resistor.

What is pull-up resistor?

First, we will find what pull-up resistor is and why it is used.

In many microcontroller, there are no internal pull-up resistor. For example: In 8051, there are four IO ports. Port0 has no internal pull-up resistor. Therefore, it requires external pull-up resistor.

In arduino, the moment we define any pin as input it will attain tri-state. Tri-state is  a state between logic low and logic high. We must remove this condition. Some microcontrollers have built-in internal pull up resistor while some has not.

Tuesday, 18 October 2016

Interfacing accelerometer with arduino uno

Interfacing accelerometer with arduino uno


Introduction:

In this post, we are going to interface accelerometer with arduino. Accelerometer is a sensor used for detecting motion or change in coordinates. We have three coordinates i.e X, Y and Z axis. It's a five-pin device out of which are for power supply Vcc and Ground. The output of the sensor is in analog.
This sensor required three analog pins. We can provide Vcc and ground directly from the analog pins.
So, we are using five analog pins. Three for axis and two for providing power to the module.

Components required:

  1. Arduino Uno
  2. ADXL335 (accelerometer)
  3. USB type B cable for interfacing with computer.
Connections:

Make connections as follows:

ADXL335                                    Arduino
Vcc                                               A0
X                                                  A1
Y                                                  A2
Z                                                  A3
Gnd                                              A4

Friday, 14 October 2016

Smart street light using arduino

Introduction:


This project is about smart street light using arduino. This project consists of 3 analog IR (infrared) sensors. By default, the intensity of street light is set to 50 percent. We are using high intensity led as they have extra brightness. This project also features harnessing the solar and wind energy.
We are using a solar panel of  9 Volt, 2.5 watts and for wind mill, we are simply using a 12 volt dc motor.

Components required:
  1. Atmega 8a (based on arduino ng board)
  2. 8 high-intensity led
  3. Relay
  4. Perfboard
  5. 7805
  6. connecting wires
  7. solar panel (9 volt, 2.5 watt)
  8. Relay
  9. 12 volt DC motor.

Saturday, 8 October 2016

Temperature on GUI using visual studio and arduino

In this post, first we will interface LM35 with arduino uno and then  upload this data through serial communication. With the help of visual studio we can make computer gui application and though this gui application, we can do lot of stuffs like temperature logger, humidity monitoring. The

Stuff we require:

  1. Arduino uno with usb cable
  2. LM35
  3. Jumper wires
  4. Visual Studio (I had used VS 2012)
Make connections as follows:

How to interface temperature sensor, lm35 with arduino
LM35 interfacing with arduino



Simply provide, Vcc and GND to temperature sensor (LM35) and it's output should be connected to A0 of arduino. You can connect it to any channel from A0 to A5.

Friday, 30 September 2016

Temperature updation on thingspeak using sim900


In this post we are going to discuss how to upload temperature on thingspeak channel using sim 900 and arduino uno. As I had already uploaded the data on thingspeak channel using sim 900 and terminal software.

Introduction:

This project is a wireless temperature logger on thingspeak channel using gsm module and arduino.
For temperature sensor, we are using lm35, that gives output in millivolt which can be easily calibrated in  terms of  °C. We have to use adc module, since it's an analog sensor. Once the raw data is converted into temperature, we can upload the data.

Now, we are ready to upload the data on thingspeak channel. Thingspeak provides api for uploading of data. Before this, we have to use activate GPRS on sim900. We also to provide APN for accessing the internet. After activating the GPRS, we have to use GET like this:

GET http://api.thingspeak.com/update?api_key=KTQXXXXXXXXXXXXX&field1=data

Saturday, 24 September 2016

Internet of things: Data uploading on thingspeak using sim900

In this post, we are going to upload data on thingspeak using sim900 module.

Things required:

  1. SIM 900 module
  2. USB-TTL converter
  3. Terminal software
  4. Account on thingspeak
  5. 12 volt adapter for powering gsm module
First of all, make connections as follows:

GSM                                           USB-TTL

RX        ==============>    TX
TX        ==============>    RX
GND     ==============>   GND

Tuesday, 30 August 2016

How to enter AT mode in HC-05 bluetooth module

Using HC-05 in AT mode

Hello guys, In this post we will cover how to change password, name or mode (master or slave) in HC-05 module. 

Things required:

1. Arduino Uno board
2. Jumper wires
3. HC-05
4. Little bit patience :p

Note: Use can USB-TTL instead of arduino uno board. In this case, arduino uno board is simply used as USB-TTL converter.

Steps to follow:

First of all, upload a blank program to arduino.

/* Arduino Program */

void  setup(){

}


void  loop(){

}

Saturday, 27 August 2016

Password protected system with AVR using DTMF

Password protected system using DTMF

Hello guys, this project is about password protected system using DTMF module. By using a predefined number we can make output either high or low by using the three digit code.
The codes can be changed in the program.

Components required:

  • Atmega 16A
  • USBasp programmer
  • AVRdudes (for burning hex file)
  • AVRStudio 4
  • Compiler used: GCC
  • DTMF module
  • 3.5 mm audio jack

FOR OUTPUT LOW CODE IS str1="248"
FOR OUTPUT HIGH CODE IS str2="842"

Connections are as follows:

Q0-PD0
Q1-PD1
Q2-PD2
Q3-PD3

Output is from: PB0.

Saturday, 25 June 2016

Interfacing GPS module with computer using terminal software

In this post, we will learn how to interface GPS module with laptop/ computer using terminal software like Bray's terminal.

Stuff required:


  1. GPS module
  2. 12V 2A dc adapter
  3. USB-TTL converter
  4. Female to female jumper wire
First of all, power up the GPS module using 12 volt adapter. 
Download any terminal program. I am using bray's terminal.

Friday, 24 June 2016

List of projects

List of projects:

1. Line follower robot
2. Android controlled home automation system
3. Fire fighting robot
4. Hand gesture based robot
5. GSM based temperature monitoring system
6. Android controlled robot
7. Smart blind stick with audio processor module
8. Smart street light


DIY dtmf module and interfacing with arduino uno


In this post, we are going to make dtmf module and interface it using arduino.

DIY dtmf module with arduino uno
My prototype

Theory of  DTMF:
Full form of dtmmf is dual tone multi frequency. The DTMF telephone keypad is laid out in a 4×4 matrix of push buttons in which each row represents the low frequency component and each column represents the high frequency component of the DTMF signal. Pressing a key sends a combination of the row and column frequencies. For example, the key 1 produces a superimposition of tones of 697 and 1209 hertz (Hz). Initial pushbutton designs employed levers, so that each button activated two contacts. The tones are decoded by the switching center to determine the keys pressed by the user.

Tuesday, 21 June 2016

Simulate program in proteus

In this post, we will cover how to simulate program files in proteus.

Proteus is a simuation software used for simulating analog/ digital circuits as well as for simulating embedded based projects. It can used for simulating 555 based, transistor based circuits. It's a very good tool for hobbyists, students and professionalists. This is not a freeware however one can download the trial version from the official website or simply purchase it.

Step 1: First of all, choose the components from the library by simply right clicking on grid area.

Search component in proteus library
Components from libraries
Step 2: In keywords box, type atmega 16 and  select appropriate components from the listed item.

How to make a new project in AVR Studio 4

Steps for making a new project in AVR Studio 4:


Step 1: From file menu click on project. Under project select project wizard
project wizard in avr studio 4
Project Wizard

                   Step 2: Click on new project then click next



new project in avr studio
New project

Wednesday, 1 June 2016

Interfacing 4-wire resistive touch screen with arduino

To interface the 4-wire resistive touch screen with arduino check out my instructables. Here is the link


Check out the video:


Sunday, 22 May 2016

DIY audio amplifier using lm386

In this post, we will make a diy audio amplifier using lm386.

LM386 is low voltage audio amplifier and it's gain is in the range of 20 to 200

Parts required:


  1. LM386
  2. Breadboard/ perfboard/ stripboard
  3. 10k pot
  4. 8 Ω speaker
  5. 9 volt battery
  6. 220 uF capacitor
  7. connecting wires
Circuit diagram:

fritzing circuit diagram audio amplifier
Circuit Diagram
In this circuit, pot of 10k is used for controlling the volume. Gain in this circuit is 20. You can also also power supply of 5 volt. This is the basic circuit having gain equals to 20 and there is no bass in this circuit. You can give audio input from mobile/laptop.

Hope you had enjoyed the tutorial.

Stay tuned for more updates !!






Monday, 16 May 2016

How to burn hex files in avr microcontrollers

In this post we will learn, how to burn hex file in avr microcontroller using programmer and burner software.

List of components/software:

1. USBasp programmer
2. Target circuit board having microcontroller (mine have atmega8)
3. Avrdudes (Burner software)

Prerequisites:
USBasp driver installed in your system.
If it is not installed, then read instructions about installation from my previous post.
USBasp driver installation

Default fuse byte for atmega8a is: HFUSE = 0XC9 and LFUSE = 0X1F
This corresponds to internal rc oscillator having frequency 1 MHz

HFUSE = 0XC6 and LFUSE = 0XE4
This corresponds to internal rc oscillator having frequency 8 MHz

Tuesday, 10 May 2016

Temperature controlled dc fan

In this post, we will control the speed of dc fan based on the temperature.

List of components:

1. Arduino Uno
2. LM 35 temperature sensor
3. LCD 16*2
4. 10k potentiometer
5. ULN 2003
6. DC motor
7. Breadboard/ perfboard

First of all, we will monitor the temperature by using lm35 i.e. temperature sensor. It's scale factor is +10mV/°C which means with increment in temperature by 1° Celsius, the voltage is rise by 10 mV.
We can read adc count by analogRead(A0); // we are using channel A0

This will give us a digital count of adc which varies from 0 to 1023, we have to convert these count into voltage and then into temperature. First of all, we will convert into voltage:
In arduino uno, adc is of 10-bit.
Resolution = Vref/(2^n-1), where n is bit (in our case it's 10)
Resolution = 5000 / 1023, ( Verf = 5000 mV and 2^10 is 1024 minus 1 is 1023)

Resolution = 4.887 mV
Now, we have to convert voltage into temperature:
Temperature (in °C) = Voltage (in mV) / 10.0
With this temperature monitoring is over.

LCD interfacing is simple since we have library for the same with proper documentation.

Now coming to pwm part. In arduino, we can control output voltage by pulse width modulation (pwm).
Duty Cycle = Ton / (Ton + Toff)
Duty Cycle = Ton / T

Duty Cycle (in %age) = (Ton / T)*100

In arduino, for pwm we have analogWrite function :

In arduino uno, we have six pwm channels viz, pin no. 3, 5, 6, 9, 10 and 11.

analogWrite(pin no, value)

Pin no may be 3, 5, 6, 9, 10 and 11
Value varies from 0 to 255 since pwm resolution is of 8-bit (2^8-1)

0 for 0% duty cycle                  0 volts
64 for 25% duty cycle              1.25 volts            if(val<=40.0)
127 for 50% duty cycle            2.50 volts            if(val>40.0 && val<=50.0)
192 for 75% duty cycle            3.75 volts            if(val>50.0 && val<=60.0)
255 for 100% duty cycle          5.00 volts            if(val>60.0)

where val is temperature in °C

Vavg = Duty Cycle  * 5.0 volts
temperature controlled dc fan proteus simulation
Schematic of temperature controlled fan
Download the source code from the link below:


Stay tuned for more updates !!





Thursday, 5 May 2016

Driver for usbasp programmer

How to install usbasp driver in your pc/laptop?

https://drive.google.com/file/d/0B4Px6Drl6Zz_aGlDZnY0YmV6SUk/view?usp=sharing

Download driver from the above link. Extract the file, now you have two folders:

 windows-8-and-windows-10-usbasp-drivers-libusb_1.2.4.0-x86-and-x64-bit and  Win-Driver.
Former is for windows 8 and windows 10 while latter is for windows 7.

Open device manager after connecting the programmer you can see the yellow triangular icon which indicates that no driver is installed.

Device Manager
Right click on usbasp, you have two options of installing the driver, click on browse my computer for installation of driver.
Broswe
Browse the following directory in your computer:

E:\PROJECTS\8051_kit_programmer\AVRUPro+\Win-Driver. 
After extraction, you have two files. Let's suppose you have usbasp_driver folder in E drive.
Browse E:\usbasp_driver\Win-Driver if you are using Windows 7.

After selecting it will ask for driver installation, click on install this driver anyway.
Installing the driver
If the driver is installed successfully, you can check its status in device manager.
Post-installation
This post was for installing usbasp driver in windows 7. If you are using windows 8 or 10.

If you want to install usbasp driver in windows 8/10. You can do it by disabling driver signature option. You can google it for the detailed procedure.

Stay tuned for more updates !!








Tuesday, 3 May 2016

Interfacing SIM900 with arduino uno

In this post, we will learn how to interface SIM900 with arduino uno.

First of all, insert sim in sim socket of GSM module. Power it up by 12V 2A dc adapter.

Now, we have to make connections as follows:

Arduino Side                       GSM module
Tx                =====>          Rx
Rx                =====>          Tx
GND            =====>          GND

The source code is given below:

    boolean bOK = HIGH;

    void setup()
    {
    Serial.begin(4800);
    delay(1200);
    }
    void loop()
    {
 
    if(bOK==1)
    {
    Serial.println("AT+CMGF=1"); // sets the SMS mode to text
    delay(1500);
    Serial.print("AT+CMGS=\""); // send the SMS number
    Serial.print("+9199XXXXXXXX"); // +91 for india
    Serial.println("\"");
    delay(1000);
    Serial.print("Hello World "); // SMS body
    delay(500);

    Serial.write(0x1A);
    Serial.write(0x0D);
    Serial.write(0x0A);
    bOK=LOW;
    }
    }

The source code is self-explanatory.

Thanks for visiting this blog.

Stay tuned for more projects !!