Showing posts with label projects. Show all posts
Showing posts with label projects. Show all posts

Interfacing SPI TFT with Arduino.

By // 20 comments:
Hey fellas!
It's been long since our last blog...but worry not! Here I'm back again with something new to try this time around. This blog will let you know how to interface a 1.8 inches SPI TFT with arduino. The task may get a bit tricky if someone just starts without taking a few things in consideration. So here we go!




Now what's with this "SPI" term? Why not just a TFT?
Well, that's because like you all must have known, there are 2 modes of transferring data, SERIAL & PARALLEL. When there are separate multiple data buses for data transfer, that's a Parallel Data Bus TFT or more generally known as a normal TFT. These types of displays will have a comparatively large no. of pins to connect (quite obvious), as 8 or 16 pins are for data bus alone and then the other ones too.
They generally take up all the space on an UNO or even may require a shield as well.

When there is a single data bus to transfer all the data, all the data is streamlined in a series and then pushed towards the receiving end. This type of TFT is called an SPI TFT, where SPI stands for SERIAL PERIPHERAL INTERFACE. Now we know what that un-abbreviated form says!

Also remember that this 1.8 inches SPI TFT has different pin connections on an UNO (or similar) board and the MEGA board. On MEGA, the SPI pins lie at 50,51,52 and 53. 

First of all, list of required items is as follows:
* Arduino UNO (or similar) x 1
* 1k ohm resistances x 5
* One-2-One connectors x 8

The TFT library comes pre-installed in Arduino version 1.0.5 and later.

Make the connections as mentioned below-

Reset
8
Dc (A0)
9
Cs
10
SDA
11 (UNO) or 51 (MEGA)
SCL
13 (UNO) or 52 (MEGA)
BKL
3.3v
Vcc
5v
Gnd
Gnd


Now instead of making the first 5 connections directly to Arduino, put a resistor of 1k or similar value between the TFT pin and the Arduino pin. That’s because the IO ports are 3.3v tolerant while the Vcc required is 5v. It is quite possible because of it’s non-standard chinese manufacturing.

Now, open the IDE and run the any sketch except the “BitmapLogo”. This sketch uses the SD card function and requires you to hook up the TFT with an SD card as well, which is definitely not a part of this article.

I’m putting a demo sketch that I ran successfully-

#include <TFT.h>  // Arduino LCD library
#include <SPI.h>

// pin definition for the Uno
#define cs   10
#define dc   9
#define rst  8

// pin definition for the Leonardo
// #define cs   7
// #define dc   0
// #define rst  1

// create an instance of the library
TFT TFTscreen = TFT(cs, dc, rst);

// char array to print to the screen
char sensorPrintout[4];

void setup() {

  // Put this line at the beginning of every sketch that uses the GLCD:
  TFTscreen.begin();

  // clear the screen with a black background
  TFTscreen.background(0, 0, 0);

  // write the static text to the screen
  // set the font color to white
  TFTscreen.stroke(255, 255, 255);
  // set the font size
  TFTscreen.setTextSize(2);
  // write the text to the top left corner of the screen
  TFTscreen.stroke(255, 0, 0);
  TFTscreen.text("IoT Freaks!\n ", 20, 0);
  TFTscreen.stroke(0, 255, 255);
  TFTscreen.text("Sensor value\n ", 12, 25);
  // ste the font size very large for the loop
  
}

void loop() {

  // Read the value of the sensor on A0
  String sensorVal = String(analogRead(A0));

  // convert the reading to a char array
  sensorVal.toCharArray(sensorPrintout, 4);

  TFTscreen.stroke(255, 255, 0);
  TFTscreen.setTextSize(5);
  TFTscreen.text(sensorPrintout, 34, 50);
  delay(550);
  TFTscreen.stroke(0, 0, 0);
  TFTscreen.text(sensorPrintout, 34, 50);
}

This sketch requires a sensor at pin A0 to read it's value and then display it as text on  the TFT. So put any analog value sensor such as a potentiometer, an LDR, an IR pair or whatever you have.





Viola! I’m pretty much sure you’ll have it done then……

Be sure to buy the stuff mentioned in this blog by clicking on the link below-
http://www.ebay.in/usr/4d_innovations?_trksid=p2053788.m1543.l2754

The vendor's offering interesting and working hardware at quite handy rates. Go give it a try! :)

So until my next blog, this is it. As always, any problem you face and wish to discuss it, the comment boxes are always down there and you can reach me as well at iotfreaks@gmail.com

For more of these interesting stuff, like my page-
https://www.facebook.com/iotfreaks/

And our community,
https://www.facebook.com/projectsdunia/

Learn How To Make A Digital Voltmeter Using Arduino

By // 12 comments:
Arduino is very popular and easy to use. With Arduino, we can do lot's of projects and experiment. So today we add one more projects in our Arduino project list. In this article, we are going to make a digital voltmeter.using an Arduino board. In this project, we measure the input voltage range between 0 to 50V by using the voltage divider. It is very simple to use Arduino as a voltmeter. Arduino UNO has  5 analog pin to read the input analog value. If we have an idea about reference voltage then we can easily measure the input voltage. Here we will use 5V as a reference voltage.
Block Diagram
arduino based dc voltmeter circuit diagram
Block Diagram of DC Voltmeter
Component Required 
  1. 1 * Arduino Board(In this article we use Arduino UNO)
  2. 1 * LCD Module(Here we will use 16 * 2 LCD Module)
  3. 1 * 100K Resistor 
  4. 1* 10K Resistor
  5. 1 * 5K Potentiometer
  6. Some jumper wires
  7. Breadboard 
Circuit Diagram
Circuit diagram of this projects is very simple and easy to understand. Here we use a 16 * 2 LCD module to display the voltage. Read this article to learn How To Interface LCD With Arduino UNO.
arduino based DC Voltmeter circuit
Circuit Diagram
A voltage divider circuit is used here to divide the input voltage by the range  of Arduino board. As we all know that Arduino is compatible with till 5v only. Above this voltage, our Arduino may be damaged.
Analog input pin on the Arduino board measure the input voltage and convert it into digital format by using inbuilt ADC(analog to digital converter) that can be processed  by Arduino and then display it on LCD. In this project, we fed input voltage to analog pin A0 of Arduino by using the voltage divider circuit. A simple voltage divider circuit is made by using one 100kohm and one 10kohm resistor to make the 1:11 divider. Thus, by using this voltage divider circuit we can measure the voltage up to 55V.                      
         Voltage divider output  Vout  = Vin * ( R2/(R1+R2) )
It is good if you use this voltmeter project to measure the voltage within range 0v to 35v. Because large voltage may be damaged your Arduino board. 

Code 
In this project, we use inbuilt liquid crystal library for the display of voltage value and analogRead() function to read the input voltage at the analog pin A0. Here our reference voltage is 5V, hence we multiply read value with 5 and then divide it with 1024 to obtain the actual voltage. Then by using the voltage divider formula we can decrease this value within the range of Arduino board voltage.


Video Demonstration 

Automatic Street Light Controller Circuit Using LDR And 555 Timer IC

By // 54 comments:
We are living in the world where everything goes to be automatic from your washing machine to your ceiling fan. Street lights are one of those examples of the automatic world. Automatic street light are those light which needs no manual operation to gets turn ON and turn OFF. Did you ever try to make such kind of street lights that gets turn ON and turns OFF automatically? In this article, we are going to make automatic street light using LDR and 555 timer IC.

List of Components  
  1. 555 Timer IC
  2. LDR
  3. LED
  4. Potentiometer
  5. Resistor 1* 1k ohm 
  6. Resistor 1* 220 ohm
  7. 9V Battery
  8. Printed Circuit Board(PCB) Or BreadBoard 
Circuit Diagram
A very simple circuit diagram of automatic street light is given below. 
automatic street light controller circuit using ldr
Automatic Street Light Controller Circuit

Principle and Working of Automatic Street Light Controller

555 Timer IC is the main part of the circuit that works as a comparator. All the working of this circuit depends on the working of the 555 timers Ic.To know more about 555 times IC read this article Working of 555 Timer IC. In this circuit pin, 3 produce output which has just two states high and low. Output goes to high when  trigger pin  is at a lower level than the 1/3rd level of the power supply voltage and output goes low when trigger pin 2 is at above then 1/3rd  of the power supply voltage. In this circuit pin, 4,6 and 8 are connected to the power supply. Here we use LDR to detect the presence of light which is formed a potential divider circuit with the help of 1k ohms resistor. LDR is a special type of resistor whose value depends on the light. Read this article to know How LDR Works. The output of this divider circuit is given to trigger pin of the 555 timer IC. 

In this circuit, we use a simple LED to know how the whole circuit works. You can also connect as much led as you want by using the transistor or you can connect a Relay to control high voltage electrical bulbs. 

You must use caution while connecting Relay to this circuit because its may be danger and as different bulb have different wattage.

Video Demonstration of Automatic Street Light Controller



Arduino Distance Measurement Using Ultrasonic Sensor

By // 3 comments:
We all know about the ultrasonic sensor and also wanted to play with it, but don't know how ultrasonic sensor works. So In this article, we will see  how to use an ultrasonic sensor with your projects. The ultrasonic sensor is very popular among arduino hobbyist and there are so many projects which you will be able to do at the end of this article.

Description of HC-SR04 Ultrasonic Sensor
ultrasonic sensor
Ultrasonic Sensor can measure the distance from 1" to 13 feet( 1 cm to up to 4metre) with accuracy up to 3mm. A hc-sr04 ultrasonic sensor has 4 pin GND, VCC, Echo and Trigger Pin. Trig pin generate an ultrasound by setting trig pin on the high state of 10 microseconds. Echo pin produce an output in a microsecond when ultrasound returns back from the object to echo pin.

We can calculate the distance by using simple formula Speed=(Distance/Time). The speed of the sound is 340m/s and thus by calculating ultrasound travel time we can calculate the object distance from the ultrasonic sensor.

Required Components
  1. 1 Arduino UNO board( Buy from here Arduino )
  2. 1 HC-SR04 ultrasonic sensor ( Buy from here sensor )
  3. Jumper wire
  4. Breadboard

Circuit Diagram
Ultrasonic sensor pin connected to arduino pin in a very simple manner as shown in the image below. Here we use a voltmeter as a reference because we can't place a real object before the LDR. So when we increase or decrease the voltage level of voltmeter then its corresponding value also changed.
Arduino           Ultrasonic sensor
Vcc                      Vcc
Pin 5                   Trig
Pin 4                   Echo
Gnd                     GND 
ultrasonic_sensor circuit
Circuit
Source code
Here first we define the trig pin and echo pin of the ultrasonic sensor and they are pin no 5 and pin no 4 respectively. Here we define Trig pin as output and Echo pin as an input. After that, we defined three long variable name duration, cm and inches. In the loop first we set the Trig pin Low for few microsecond and after that, we set it in the high state for 10 microseconds. We read the travel time by ultrasound by using the pulseIn() function.
ultrasonic sensor source code
Source Code
For getting the exact distance we multiply .034 in duration and then divide it by 2 because ultrasound travels forward and backward. At the end we use Serial.print() function to print the value in the virtual terminal.You can download the source code by clicking on the link.

Video Demonstration 


Hope you like this tutorial on the ultrasonic sensor. If you have got any problem using the ultrasonic sensor or its proteus simulation then feel free to comment below or if you have any suggestion about this tutorials and let me know by your valuable comments. 

Arduino-based Automatic Temperature Fan Speed Controller

By // 37 comments:
In many small or large industry, you may have seen such a lot of fan that speed is control according to the temperature of the place. Thus, during this article, we have presented a demo of that application. It's assumed that you have an idea of how to read reading from the temperature sensor IC. In industry
temperature range will be more than 100 oC  but here we will work on the very low range.
Block diagram of Temperature control FAN

block diagram of temperature control fan using arduino board
Block Diagram
Required Components 
  1. Arduino UNO board (buy from here arduino )
  2. Temperature sensor IC LM35( buy from here LM35 sensor )
  3. DC Fan
  4. resistor 1* 1K
  5. 16*2 LCD Display
  6. Power supply  
  7. Diode(1N4007) 
Circuit Diagram 
In this application, we use an arduino board to control the speed of the fan and a 16*2 LCD display to display the status of the fan. Here we use a diode in parallel with FAN to prevent it from the damage and a 9V battery to provide power to the fan.

circuit diagram of arduino based temperature control fan
Circuit Diagram
Code
Again like our previous projects, code for this projects is also very simple. Here we use an analogRead() function to get the value of temperature sensor and store that value in the variable.When this value will exceed the min_temp value then the fan will start otherwise its always off. Download the file to get the source code of this projects along with its circuit diagram.
source code of arduino based temperature control fan
Source Code
Download
In the below link you will get all the file required for this projects.

Video Demonstration




How To Make a PC Control Robot

By // 9 comments:
Do you ever tried to control your robot using your PC or laptop? Controlling a robot using PC or laptop is often being a fun for the student or hobbyist. Thus during this article you will be tend to learn how to control your robot using your PC or laptop. Here it is assumed that you know How To Send Serial Data From Arduino To Laptop or PC and How To Receive and Send Serial Data Using Arduino Board. Thus lets begin to making this awesome DIY hack today with us.
controling a robot via PC using arduino board
Replica of robot

Component Required:

  1. Arduino UNO Board
  2. PC/Laptop
  3. L293D Motor Driver IC
  4. 2 Motor
  5. Serial Bluetooth Module
  6. 2 wheels
  7. Chassis
  8. Castor wheel
  9. Software (serial port software on your PC/laptop) 
Click here to see more projects on Arduino

Block Diagram:
Block diagram PC control robot using arduino
Block Diagram
Setup Connection For Robot:
circuit diagram of Pc control robot
Circuit Diagram
Here we use a L293D motor driver IC which is used for the controlling the rotation of the two motor connected to robot. Pin no 2,7,10,15 of L293D motor driver IC is connected to the pin no 9,8,7,6 of arduino board. Output pin 3,6,11,14  of the L293D motor driver IC is connected with the motor as shown within the Circuit Diagram Image.
L293D motor driver IC
L293D Motor Driver IC
For the connection of RX and TX read this article How To Receive and Send Serial Data Using Arduino Board 
NOTE:- Bluetooth Module should be removed while uploading the code from PC to Arduino board.

Code for PC Controlled Robot:

If you are beginner to arduino then download Arduino IDE from here How To Install Arduino Software On Windows. We use 9600 baud rate for the transmission of the data from PC/Laptop to Robot.Click here to Download the source code for PC controlled robot. 
code for the pc controlled robot
Arduino Code
We can control the robot using the following instruction 
'8' = Forward
'2' = Backward
'4' = Move Left
'6' = Move Right
'5' = Stop

Download:


Video:

  

If You have got any problem then be happy to comment in comment box or you can contact us at Facebook or Google+

Best Electronics Mini and Major Projects For Engineering Students

By // 37 comments:
Electronics & Communication(ECE) engineering play a vital role in our daily life. The engineering student is showing a lot of interest in this branch. Within the final year of engineering each student should complete their engineering project with innovative ideas. They need to use their all four-year knowledge on its project. There are so many choices for ECE student for his or her final year projects comes like  within the field of embedded, robotics, solar energy, security system etc.

ece final year projects

For there purpose here is listed a large number of projects ideas for ECE student. These are collect from numerous sources. If you are interested then you will select any one of below listed projects:

1: Password-Based Circuit Breaker

2: Intensity Control Based Street Light

3: Digital Tachometer 

4: Solar Battery charger Circuit

5: Bidirectional Visiting counter

6: RFID Based Attendance System 

7: Electrical Load control using PC

8: GSM Controlled Robot

9: GSM Based Security System

10: Fire Alarm with siren sound


11: Cell Phone Detector 

12: Energy Meter By Wireless Meter

13: Audio Amplifier using 555 Timer Circuit

14: Power Amplifier Circuit

15: Android-Based Home Automation System

16: Frequency Counter Circuit

17: Wireless Mobile Battery Charging  

18: Cell Phone Control Home Appliance

19: Fire Fighting Robot Vehicle 

20: GSM Based Energy Meter Reading

21: GSM Based Notice Board

22: Automatic Health Monitoring System

23: Touch Screen Based Home Appliance Control

24: GPS Based Vehicle Tracking System

25: Music Equalizer And Visualizer 

26: Voice Recognition Based Home Appliance Control

27: Self Balancing Bot

28: Gesture Control Robot

29: E- Glove

30: 3D Laser Scanner 

Hope you may be able to find out the basic ideas concerning your final year projects related to embedded system, robotics, solar energy, security system etc. If you have got any question concerning the final year engineering projects then feel free to contact us.