Introduction: BlueSense - DIY Smart Room Automation Using Bluetooth
Your Smart Room dream is just one touch away! Introducing "BlueSense" -- the Smart Room Automation System that one can use to control the appliance in the room using smartphones. The range of operation for BlueSense is around 8 meters! perfect for a Smart house.
Snapchat and Instagram: @chitlangesahas
I want to connect with you guys on a deeper level, I love answering comments but after a while, it gets difficult to keep track of comments and so I would love to answer any questions you guys have over Snapchat and Instagram. Here is my username for both: @chitlangesahas
--------------------------------------------------------------------------------------
Its Smart ! Yes! The BlueSense Automation is a Smart technology with temperature and status indication on a LCD interface. Ongoing processes are printed on the LCD panel. The system can be controlled with smartphones having Bluetooth.
Why Bluetooth for automation?
Smartphones are always with us all the day, they come with Bluetooth technology. So... Smart room is in your pocket!
Perfect gift for Old citizens!
The BlueSense is designed in a way that its perfect for old citizens who spend most of the time in their rooms and have difficulty to walk even short distances. Now they won't have to call someone to turn on the Fans! #LifeMadeEasy
The Interactive App: (Invented with MIT app Inventor)
The App I coded has an interactive control panel with big Icons of the respective appliances. Why? Many of our grandparents don't know to read, so I chose to opt for Icons of the appliances to be controlled. Even some have to put on their spectacles so the Big Icons solve the problem.
Snapchat and Instagram: @chitlangesahas
I'd love to connect with you guys on Snapchat and Instagram, I document the experience, learning lessons and also answer questions on those platforms. Looking forward to connect! Here is my username for both: @chitlangesahas
-----------------------------------------------------------------------------------------
Features at a Glance:
1) Temperature Indication
2) LCD Interface
3) Connection Status Indication
4) Wireless Bluetooth Technology
5) Interactive app (Coded by me)
-------------------------------------------------------------------------------
What inspired this project?
It was winter... mid December 2015, I was in bed... sick. It was night, I was "trying" to sleep. Oh no! The lights had to be switched off :( In that condition walking up to the switches seemed like climbing a mountain.
This night inspired me and BlueSense was born...
--------------------------------------------------------------------------------
If you like this project you can reward me by using your shutter clicking skills by sharing my work to all your friends and voting me. In return, I'll cook up more Instructables to share with you. Any suggestions or queries are welcome in the comments. Thanks for your support!
Step 1: Watch the Video!
Here's the HD video showing the working of the " 'BlueSense' Room Automation using Bluetooth."
Step 2: Bill of Materials
Here's the list of materials you need to build the project.
1) Arduino Pro Mini x1
3) A Copper Clad PCB
4) Ferric Chloride (for etching)
5) 1N4007 Diodes x3 (Relay Kickback protection)
6) BC 547 NPN transistor x 3
7) Old charger 5 Volts x 1
8) PCB Drill
9) Soldering Iron
10) Clothes Iron
Step 3: Overall Plan...
Take a look at our Plan.
1) The Arduino Pro Mini was used to make the overall design compact. It will be the CPU which recieves data from bluetooth module, analyses it, and does the needful operation.
2) The data from Smartphone is received by Bluetooth Module and fed into the Pro Mini.
3) Pro Mini, will turn On/Off the Relays depending on the User commands. The relay in turn operates the Load connected.
Step 4: A Word About the Materials and Design...
Leave your breadboards! Go for the PCB's! In this project we are going for a professional approach for the build.
Why Make a PCB and not use Breadboard?
PCB's are more reliable for long term use. The connections on the breadboard become loose and may come off accidentally. Breadboards should be used while prototyping while PCBs serve well in long term.
Arduino Pro Mini: We will be using the Pro Mini. Its a small chip that fits perfectly on the PCB saving space and money. Although programming these tiny boards is different procedure. (will be covered in next steps).
5 Volt Relay : Though costly, these relay will add to a compact unit. A 5V relay can be powered directly from the Arduino power rail, thus eliminating the need to provide separate rails(tracks).
Removable Parts : All parts (Arduino, LCD, LM35 sensor , HC05 BT module) are mounted on resp. female connectors. Just in case something gets wrong and the parts get damaged, there's always an option to swap them.
Temperature Sensor: Half of the display was left blank, so I thought to add a LM35 sensor which displays current temperature of the room. The temperature sensor has to be kept out(of the casing) (using jumpers) so that it shows the correct temperature.
Step 5: About the App (Invented With MIT App Inventor)
I coded the app using the MIT app inventor. Download and install the app on your smartphone to use it.
# Features:
* More Interactive than ever : Other apps don't have an Interactive control panel like mine. The app is so user friendly that even those who cant read can use it.
* Specially Designed for Old age citizens : The control is so easy and useful for aged people. Specially those who spend most of the time in their room.
* Big Icons of respective Controls: The app has Big Buttons where you have to touch to control the appliances.
* Instructables Robot at Startup! Touch it to proceed.
## The app was invented using MIT app Inventor. If any one wants it to be customized to their needs, drop a request in the comments, I will take a look:)
Step 6: Download the App
Here's the app file : download and install it on your smartphone.
Attachments
Step 7: Print the PCB Layout (Artwork)
To start with, print the PCB layout and other necessary eagle files. The PCB artwork should be printed on a glossy paper (Magazine paper).
1) Download the files
2) Download the eagle software from Cadsoft.
3) Install the software and open the files.
4) Print the artwork on the glossy paper.
# Note : Print the artwork on full darkness mode. Check printer setting and disable the "Eco-mode". I recommend the Photo paper for the printing. Any glossy paper will do the job but for better quality use the Photo-paper.
Attachments
Step 8: Toner Transfer .. (Making PCB)
This is the first step to make the PCB, Toner transfer is a method to make professional PCBs at home.
1) Take a cloth Iron
2) Turn it on and heat to the maximum power.
3) Place the artwork on the PCB with the toner side facing down.
4) Using optimum pressure, apply heat to the PCB.
You will be working with very hot surfaces, be cautious!
## The Use the Iron not more than 45 Seconds, otherwise it will damage the copper clad.
Remember to clean the copper surface thoroughly so that there is no grease on the surface.
Step 9: Soak the PCB
Now that we have transferred the toner to the PCB (Hopefully!) , Soak the PCB in water.
1) Take some cold water in a beaker .
2) Put the PCB in.
3) Wait for a while
4) Now when its done, rub off the paper very gently.
5) The art work should be printed on the surface.
# Be careful while rubbing the paper off the PCB, sometimes the tracks come off with the paper.
Check for imperfections, if anything has come off, use a PCB marker to repair.
Step 10: Etching the PCB Board
Time for some Etching!
1) Take 50 gm of Ferric chloride (Etching agent)
2) Heat some water in a beaker and mix both of them.
3) Put the PCB in the solution and wait until the board etches. (Copper layer should disappear)
4) After done, pull out the PCB and wash it with plenty of water to neutralize the FeCl3 .
5) Using Acetone, rub off the masking layer ( black toner).
6) Check the continuity for the layers. (sometimes the thin parts of the tracks dissolve while etching)
# Be cautious ! You will be working with corrosive chemicals, Use gloves while handling and wear old clothes.
Step 11: Assemble the Circuit
After successfully making the PCB time for its assembly.
1) Drill the pads with a PCB drill
2) Solder the components one by one onto the PCB
3) Use female connectors to mount the Arduino, LCD and Bluetooth module.
# Use appropriate drill bits to drill the pads. Ex. Don't drill a 5mil hole with 10 mil Bit!
## Make sure to use female connectors to mount the vital components on the PCB. This makes it easier to debug and replace them, just in case they burn out.
"Proper preparation prevents poor performance"
P.S : I don't have many photos of the PCB assembly. It was difficult to take pictures while soldering. But the process is very basic, I hope you understand.
Step 12: Wait! Jumpers Are Yet to Be Soldered!
In the eagle files, I forgot to route the power supply for the LCD panel. I had to solder the jumpers to LCD. Following are the unrouted pins and resp connections.
LCD
Pin 1 ===> GND
Pin 2 ===> + 5 V
Pin 3 ===> Middle pin of Variable Resistor (Wiper)
Bluetooth Module : Arduino pro mini
State ===> Digital Pin 10
Sorry for that mistake!
Step 13: Upload the Sketch
Now the tricky part...
We have upload the code (download the files below) to the Arduino pro mini.
There are two options : 1) Purchase a pro mini programmer
2) Use an Arduino Uno for programming The Pro Mini
I did not have a Pro mini Programmer so I went with the second option. Use an Arduino Uno for programming The Pro Mini. Follow the steps...
1) Take the Uno and Gently remove the Atmel IC chip (Atmel 328P) from the IC base.
2) Wire the Uno And Promini as the schematic shows
Arduino Uno to Pro Mini
Vcc ==> Vcc
Gnd ==> Gnd
Rx ==> Rx
Tx ==> Tx
Reset ==> Reset
3) Open the sketch in Arduino IDE
4) Go to Tools >> Board >> Arduino Pro or Pro Mini
5) Click on Arduino Pro or Pro Mini
6) Select the correct Port
7) Upload the Sketch to the Board
8) You are done!
## Important : Check the baud rate of your bluetooth module. By default it should be 9600 but I dont know why I had to make it 19200. So if the 9600 doesn't work for you too, try 19200
simply replace
Serial.begin(9600) to Serial.begin(19200)
Here is the Code:
#include <LiquidCrystal.h> LiquidCrystal lcd(12, 11, 5, 4, 3, 2); int FAN = 13; int SWITCH = 6; // Switch on 6 int LIGHT = 7; // Light on 7 int State = 10; // State pin for bluetooth at D10 int BluetoothInput; int BluetoothStatus; float tempC; int reading; int tempPin = 0; void setup(){ Serial.begin(9600); lcd.begin(16, 2); // Begin the 16 x 2 LCD pinMode(FAN, OUTPUT); pinMode(LIGHT, OUTPUT); pinMode(SWITCH, OUTPUT); pinMode(State, INPUT); analogReference(INTERNAL); }
void loop(){
{ BluetoothStatus = digitalRead(State); if (BluetoothStatus == HIGH ){ lcd.setCursor(0,0); lcd.write(" Connected"); reading = analogRead(tempPin); tempC = reading / 9.31; Serial.println(tempC); lcd.setCursor (4,1); lcd.print( tempC); lcd.setCursor(10,1); lcd.print("*C"); delay(1000); delay(10); lcd.clear(); } else { lcd.setCursor(0,0); lcd.write(" Disconnected"); reading = analogRead(tempPin); tempC = reading / 9.31; Serial.println(tempC); lcd.setCursor (4,1); lcd.print( tempC); lcd.setCursor(10,1); lcd.print("*C"); delay(1000); delay(10); lcd.clear(); }} { while ( Serial.available()>0){ BluetoothInput = Serial.read(); lcd.clear(); if ( BluetoothInput == 'A'){ //// The FAN controll Serial.println("The FAN is ON"); lcd.setCursor(0 , 1); lcd.write(" The FAN is ON"); delay(1000); lcd.clear(); digitalWrite(FAN, 1); } if ( BluetoothInput == 'a'){ Serial.println("The FAN is off"); lcd.setCursor(0, 1); lcd.write(" The FAN is OFF"); delay(1000); lcd.clear(); digitalWrite(FAN, 0); } if (BluetoothInput == 'B'){ // Tubelight Controll Serial.println("Light ON"); lcd.setCursor(0,1); lcd.write(" Light ON"); digitalWrite(LIGHT, 1); // turn on light. delay(1000); lcd.clear(); } if (BluetoothInput == 'b'){ Serial.println(" Light is OFF"); lcd.setCursor(0,1); lcd.write(" Light is OFF"); digitalWrite( LIGHT, 0); // turn off Light delay(1000); lcd.clear(); } if (BluetoothInput == 'C'){ lcd.setCursor(0,1); lcd.write(" Switch is ON "); digitalWrite(SWITCH, 1); delay (1000); lcd.clear(); } if (BluetoothInput == 'c'){ lcd.setCursor(0,1); lcd.write(" Switch is OFF"); digitalWrite(SWITCH, 0); delay(1000); lcd.clear(); } } } }
Attachments
Step 14: Features of the Code
The code I wrote has some special features worth mentioning here:
1) Temperature Indication : The temperature readings form LM35 are calculated and outputted to LCD as degree Celsius.
2) Status Indication : The Status is also shown , the LCD shows "Connected " when phone is paired to bluetooth module else it shows "Disconnected".
3) Multiple Control possible : For the time being, I have added three relay for controlling 3 appliances. Still more relays can be added by modding the code.
4) LCD Interface : For utilizing all the pins I added a LCD for displaying different Status.
Step 15: Power!
Now that we have assembled our circuit, how do we power it? Simple solution is to use the 5Volt SMPS board from an old mobile phone charger.
1) Carefully break open the charger
2) De-solder all wires
3) Solder the Line wires to charger PCB
4) Solder 5V output wires to the Charger PCB
5) Job Done!
Step 16: Installing the PCB in the Room
Now once we are ready with the PCB assembly, time has come for the real world application of the project. Installing the PCB in the Room.
1) Open the existing electric panel and take a note of the wires.
2) Unscrew all connections (make sure the mains and the inverter(if any) are turned off.)
3) Connect all connections to the PCB.
4) Check for shorts or loose wires (loose line wires can cause sparking)
5) Using your own creativity, mount the LCD in the panel.
6) Put everything back in place.
7) Follow the connection diagram for the installation of the PCB.
Remove all the Unnecessary switches from the electric board panel. This will make space for our components.
## IMPORTANT : This step involves interaction with live wires, carelessness can prove to be fatal. Be cautious!
If you are not familiar with electrical wiring, better hire an electrician for the installation.Also be sure to insulate the back of the main pcb with foam tape to avoid shorts.
Step 17: Mounting the LCD
This step varies from board to board because electrical board sizes may vary . Use your skills to mount the LCD to the panel and then put everything back.
Remove all the Unnecessary switches, this will make place for the LCD to fit in properly.
# Don't apply much pressure or try to file the LCD PCB it could get damaged.
Step 18: Done!
We just created a smart automation system for your "Smart room". Congratulations!
Step 19: Time to Say Good Bye!
Hey friends , time to say goodbye to all of you. We had a great time. If you love this project perhaps you like some of my others. Do check them here . Also tell me what do you think of this project, Any suggestions or questions ? Post them in the comments , I will be glad to answer them. Good Bye !
Participated in the
Hack Your Day Contest
Participated in the
Raspberry Pi Contest 2016
Participated in the
Hand Tools Only Contest 2016
Participated in the
Full Spectrum Laser Contest 2016
9 Comments
7 years ago
what put here ? transistor ? or what ?
Reply 7 years ago
Oh no! the LCD potentiometer!
Reply 7 years ago
hello i 'm using hc-09 bluetooth but he dont work i connected to android phone but he doesn't write connected on lcd
Reply 7 years ago
hahahahahaha
can i don't use the state pin on bluetooth?
7 years ago
If you're looking for more appliance connections, you could also use a shift register for the lcd to drop the IO count
7 years ago
Great idea!! Ya voted for you!! :-)
7 years ago
Cool dude
I love this.
But you could have used i2c lcd to limit the no. of digital pins used. Because normal lcd uses 6 digital pins whereas i2c display uses only 2 digital pins. so that you can connect some more applications.
I gonna make one for me.
Reply 7 years ago
That a good Idea! Will try ... Thanks!
BTW I2C module wasn't available in my place. Online order takes time so I went with the old method.
Reply 7 years ago
sorry that's not applications that's appliances