WHAT'S NEW?
Loading...

Arduino Wireless LED 230V AC/DC Devices with Smart Phone


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!

Automatic Lights On/Off with LDR


Hello, 

wouldn't it be cool if the lights could be automatically turned on when it is dark and turned off when it is bright?

The circuit is made with very few components and works nicely, responding to the light intensity on the LDR sensor, also known as Light Dependent Resistor.


There is no coding required as there is no microcontroller in the circuit.

Things you'll need:

1. Breadboard
2. LED (red, green or blue)
3. NPN Transistor (BC547)
4. LDR sensor
5. Resistance (100k ohm)
6. Battery 9V & battery cap
7. Jumper cables

Working Principle of LDR:


Light Dependent Resistor

A Light Dependent Resistor (LDR) or a photo resistor is a device whose resistivity is a function of the incident electromagnetic radiation. Hence, they are light sensitive devices. They are also called as photo conductors, photo conductive cells or simple photo cells. They are made up of semiconductor materials having high resistance.

A light dependent resistor works on the principle of photo conductivity. Photo conductivity is an optical phenomenon in which the materials conductivity (hence resistivity) reduces when light is absorbed by the material.

When light falls i.e. when the photons fall on the device, the electrons in the valence band of the semiconductor material are excited to the conduction band. These photons in the incident light should have energy greater than the band gap of the semiconductor material to make the electrons jump from the valence band to the conduction band. 

Hence when light having enough energy is incident on the device more & more electrons are excited to the conduction band which results in large number of charge carriers. The result of this process is more and more current starts flowing and hence it is said that the resistance of the device has decreased. This is the most common working principle of LDR.


Step 1: Making the Circuit

Circuit Diagram of the project

1. Connect the BC547 transistor on the breadboard carefully noting the emitter, base and the collector terminals.

2. Connect the negative terminal of the battery to the emitter terminal of the transistor and to the one end of the LDR sensor.

3. Connect the other end of the LDR sensor to the base terminal of the transistor.

4. Connect one end of the 100k ohm resistance to the base terminal of the transistor and the other end of the 100k ohm resistance to the positive of the LED (the longer leg).

5. Connect the negative of the LED (the shorter leg) to the collector terminal of the transistor.

6. Connect the positive terminal of the battery to the positive of the LED.

Step 2: The Dark Sensor LED


Now, turn off the lights or simply cover the LDR sensor with your hand such that it is dark on the sensor surface. You should now see the LED glowing. Turn the lights back on or remove your hand from the sensor, you should now see the LED turned off.

Repeat this while slowly moving your hand towards and away from the LDR sensor, you shall notice that the brightness of the LED is increased or decreased in proportion to the darkness that is around the LDR sensor.




Stay hungry! Stay foolish!