WHAT'S NEW?
Loading...
Showing posts with label arduino projects. Show all posts
Showing posts with label arduino projects. Show all posts

Hello, 

Arduino also works on manual commands by the user who controls it and may turn on/off or control the output digital pins and hence the device connected at that pin.





Mostly, alphabet/numeric keys from the computer keyboard are used to give commands to the Arduino to control the output pins through the serial communication.

Let’s get started with the Arduino serial communication project.

Things you will need:

1. Arduino Uno
2. Breadboard
3. Arduino Cable
4. LED 5V (red, yellow or green)
5. Jumper cables
6. Resistor – 220 ohm

Step 1: Making the Circuit


You may connect the LED or skip this step as the Arduino Uno R3 (a common development board) comes with inbuilt LED at pin 13. But, we shall make the circuit so as to understand the pins connections and get hands-on experience.


1. Fix the LED on the breadboard such that the two legs of the LED do not short.

2. Connect the pin 13 of the Arduino to the positive terminal (the longer leg) of the LED with jumper cable.

3. Connect the Gnd of the Arduino to the negative terminal (the shorter leg) of the LED with jumper cable.

4. Connect the 220 ohm resistor between pin 13 and the positive of the LED so as to protect the LED from getting damaged.

Step 2: Uploading the Code


Enter the following code into the Arduino IDE or paste it. The code would be called by the Arduino to check whether the value entered by us matches with the variable in the code. If it does, the corresponding operation would be performed.

int led = 13; // Pin 13
    
void setup()
{
    pinMode(led, OUTPUT); // Set pin 13 as digital out
    
    // Start up serial connection
    Serial.begin(9600); // baud rate
    Serial.flush();
}
    
void loop()
{
    String input = "";
    
    // Read any serial input
    while (Serial.available() > 0)
    {
        input += (char) Serial.read(); // Read in one char at a time
        delay(5); // Delay for 5 ms so the next char has time to be received
    }
    
    if (input == "on")
    {
        digitalWrite(led, HIGH); // on
    }
    else if (input == "off")
    {
        digitalWrite(led, LOW); // off
    }
}

Now, connect the Arduino to the computer via the USB cable provided and choose the correct COM port.  Click on the upload button from the toolbar. And, wait till the software says “Done Uploading”.

Step 3: LED Control from Computer


Once the code is uploaded, it is time to check the LED output as we desire it to be. If we command it to turn on, it should be turned on and if we command it to turn off, it should be turned off.

Open the serial monitor from the Arduino software (Tools>Serial Monitor), it may appear in a new window. You may also open it by using commands : Ctrl+Shift+M. The serial monitor would be initially blank and has an input box on the top.

Enter the term “on” and hit enter.
Whoa! Did you see that? The LED just turned on immediately without delay.

Now, enter the term “off” and hit enter.
Oh, now the LED just turned off. So you get the idea that you may control the output pins from your computer and Arduino works as you wish.

Congratulations! You have just completed your Arduino Project – simple, fun and easy.

Add another commands for example “yes”, “no” etc or even command multiple LED with just a little update in the code.


Stay Hungry! Stay Foolish!




Hello, 


Arduino development board looks cool but the possibilities of it are even cooler and endless only if you know how to get started with Arduino and create fun and interesting toys and projects. Not only the circuits in many Arduino projects are easy to connect but are fun to play with.




Before this, you should read :


Let’s get started with the Arduino LED Blinking Project

Things you will need:

1. Arduino Uno
2. Breadboard
3. Arduino Cable
4. LED 5V (red, yellow or green)
5. Jumper cables
6. Resistor – 220 ohm

Step 1: Making the Circuit



You may or may not connect the circuit as the Arduino Uno R3 (a common development board) comes with inbuilt LED at pin 13. But, we shall make the circuit so as to understand the pins connections and get hands-on experience.

Arduino LED Blinking Circuit Connections


1. Fix the LED on the breadboard such that the two legs of the LED do not short.

2. Connect the pin 13 of the Arduino to the positive terminal (the longer leg) of the LED with jumper cable.

3. Connect the Gnd of the Arduino to the negative terminal (the shorter leg) of the LED with jumper cable.

4. Connect the 220 ohm resistor between pin 13 and the positive of the LED so as to protect the LED from getting damaged.

Step 2: Uploading the Code



Although, you may find this code easily in the Arduino IDE (Arduino software) in File>Examples>Basics>Blink, you shall also copy the below code and paste it to the sketchbook.

int led = 13;

// the setup routine runs once when you press reset:
void setup() {      
         
  // initialize the digital pin as an output.
  pinMode(led, OUTPUT);    
}

// the loop routine runs over and over again forever:
void loop() {

  digitalWrite(led, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);               // wait for a second

  digitalWrite(led, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);               // wait for a second
}

Now, connect the Arduino to the computer via the USB cable provided and choose the correct COM port. Then, click on the upload button from the toolbar. And wait till the software says 'Done Uploading'.

Step 3: LED Blinking



You may now observe the behavior of the LED on the breadboard, the LED turns on and off after a fixed interval of time of one second.



The time interval may be varied by altering the delay();  value and consequently the behavior of the LED may be changed.

Congratulations! You have just completed your Arduino Project – simple, fun and easy.

Watch it blink all day, add different colors LED or connect multiple LEDs at once.







Stay Hungry! Stay Foolish!

Hello, 

it has been good so far to control the LED with your Smartphone but what's next? Wouldn't it be amazing to control a 230V AC/DC appliance we use at our homes with a touch from your Smartphone?

This is also a great and cheap final year engineering project for Electrical Engineering, Electronics and communication Engineering students.

In this article, you will find the arduino tutorial for wireless arduino LED lights and the source code for the wireless arduino bulb project.


I would recommend using arduino uno development board R3 for this arduino project as that is the simplest and newest version in arduino module and arduino boards.


Here's the arduino tutorial for you.

Things you'll need:

1. Arduino Board (Uno R3 or any other board)
2. BT HC-05 Module (dummy works fine)
3. Android phone (v2.3 or higher)
4. 230 V AC Bulb 
5. AC Bulb holder
6. SPDT relay 6V
7. BC 547 NPN Transistor
8. 330 ohm Resistance
9. 1N4007 Diode
10. Breadboard
11. Jumper cables

Components required for this project


Relay pins marked for connections


The Medium of communication between Arduino and the Android application is Bluetooth so you will need an android application installed in your smart phone that will be used to send the data over Bluetooth to Arduino. You may download the app from play store (Arduino Bluetooth, Arduino RC etc) or the better option would be to go ahead and create your very own Android application to talk to your Arduino.

Arduino and android projects are getting more attraction in market as both platforms, arduino and android have made it simple for any non tech person to make his/her own arduino project and learn from many free arduino tutorials and how to arduino's online.

It is a great arduino project idea, arduino uno project idea for arduino beginners and arduino projects and arduino tutorials seeking enthusiasts.


Step 1: Making the Circuit



1. Connect the 6V relay on the breadboard such that the 3 pins of the relay are on one half of the breadboard and the remaining two on the second half.

2. Connect the BC 547 NPN transistor on the breadboard.

3. Connect the Collector pin of the transistor to the pin 3 of the relay.

4. Connect the Base of the transistor to the 330 ohm resistance and the other end of the resistance to the pin 13 of Arduino board.

5. Connect the Emitter pin of the transistor to the ground of the Arduino.

6. Connect pin 1 of the relay to the +5 V of the Arduino.

7. Connect the diode across pins 1 and 3 of the relay to ensure unidirectional current. Check the polarity of the diode. Positive of the diode to pin 3 and negative of diode to pin 1.

8. Connect the Vcc of the Bluetooth Module to the 3.3 V of the Arduino and the Ground of the Bluetooth Module to the Ground of the Arduino.


Primary Circuit of the project


Note: Do not connect the Tx and Rx pins of the Bluetooth Module to the Arduino board. Wait till you upload the code.


Step 2: Uploading the code



Connect your Arduino board to your computer/laptop and open the Arduino Software and paste the following code:

int led = 13; // Pin 13
     
void setup()
{
    pinMode(led, OUTPUT); // Set pin 13 as digital out
     
    // Start up serial connection
    Serial.begin(9600); // baud rate
    Serial.flush();
}
     
void loop()
{
    String input = "";
     
    // Read any serial input
    while (Serial.available() > 0)
    {
        input += (char) Serial.read(); // Read in one char at a time
        delay(5); // Delay for 5 ms so the next char has time to be received
    }
     
    if (input == "on")
    {
        digitalWrite(led, HIGH); // on
    }
    else if (input == "off")
    {
        digitalWrite(led, LOW); // off
    }
}


Now, upload this code to your Arduino board and check it using serial monitor.

When you type "on", the relay should be energized and you should hear a 'click' sound and when you type "off", the relay should be de-energized and again, you should hear a 'click' sound. If you hear the relay in operation as per the command given, the circuit is fine and you may now connect the 230V AC bulb to the relay.


Step 3: Smart phone Based 230V AC Bulb


1. Now, connect the bulb to the holder and the two required wires for phase and neutral to the holder points.

2. Connect one wire from the holder to the N.O. of the relay and the other wire from the holder to the socket.(using a plug is advised for safety)

3. Connect pin 2 of the relay to the other socket pin to complete the circuit.

4. Connect the Tx of the Bluetooth Module to the Rx of the Arduino board.

5. Connect the Rx of the Bluetooth Module to the Tx of the Arduino board.


6. Open the application in your Smartphone and search for nearby Bluetooth devices, pair up with HC-05 with the code '0000' or '1234'.


Final Circuit of the project

Give commands via pressing buttons, you may also add gestures or even use smart phone's accelerometer sensor to give commands.


Stay hungry! Stay foolish!