ShivamGautam
Published © Apache-2.0

Smart LED Light

A Bluetooth Controlled ugly clone of Philips Hue.

IntermediateFull instructions provided1 hour878
Smart LED Light

Things used in this project

Hardware components

Microchip ATtiny84
×1
Itead HC-05 Bluetooth Module
×1
7805 5V Voltage Regulator
×1
220VAC to 7VDC Converter
×1
General Purpose Transistor NPN
General Purpose Transistor NPN
×1
Male Pin Header
×1
Resistor 1k ohm
Resistor 1k ohm
×1
Resistor 100 ohm
Resistor 100 ohm
×1
LED (generic)
LED (generic)
×2
14 pin IC Base
×1

Software apps and online services

Arduino Bluetooth Controller
Arduino IDE
Arduino IDE

Hand tools and fabrication machines

Soldering iron (generic)
Soldering iron (generic)

Story

Read more

Schematics

Gerber Files

Gerber Files for PCB fabrication

Schematic

Schematics

Code

Code to be uploaded

Arduino
upload using Arduino as ISP
#include <SoftwareSerial.h>  //Software Serial Port 
#define RxD 9 
#define TxD 10  
#define DEBUG_ENABLED  1  
SoftwareSerial blueToothSerial(RxD,TxD);  
int led = 3;  
void setup() {  
pinMode(RxD, INPUT);  
pinMode(TxD, OUTPUT);  
setupBlueToothConnection();   
pinMode(led,OUTPUT);  
digitalWrite(led,HIGH);  
}  
void loop() { 
int count=0;  
char recvChar;  
while(1){  //check if there's any data sent from the remote bluetooth shield  if(blueToothSerial.available()){  
    recvChar = blueToothSerial.read();    
    if(recvChar == 1){  
    digitalWrite(led,HIGH);
    }   
    else{  
    digitalWrite(led,LOW);
    }  
      }    
     } 
 }  
void setupBlueToothConnection() {  
blueToothSerial.begin(9600); //Set BluetoothBee BaudRate to default baud rate 38400  
blueToothSerial.print("\r\n+STWMOD=0\r\n"); //set the bluetooth work in slave mode  
blueToothSerial.print("\r\n+STNA=HC-05\r\n"); //set the bluetooth name as "HC-05"  
blueToothSerial.print("\r\n+STOAUT=1\r\n"); // Permit Paired device to connect me  
blueToothSerial.print("\r\n+STAUTO=0\r\n"); // Auto-connection should be forbidden here   
delay(2000); // This delay is required.  //blueToothSerial.print("\r\n+INQ=1\r\n"); //make the slave bluetooth inquirable   
blueToothSerial.print("bluetooth connected!\n");   
delay(2000); // This delay is required.  
blueToothSerial.flush(); 
}

Credits

ShivamGautam

ShivamGautam

4 projects • 9 followers
Software developer, web developer, MIC programming, IoT

Comments