Tuesday 27 August 2019

Bluetooth Home Automation

It is the Bluetooth operated Home Automation System. In which you can switch ON or OFF home appliances by using Bluetooth.
As shown in the above image it is the wiring chat of the circuit that is required. It consists of 1) Power Supply Circuit.
2) Microcontroller Atmega328p.
3) Bluetooth module HC05.
4) Electromagnetic switch (Relay).


Download "Bluetooth terminal (BT) App" from Playstore. Once it is Install Pair it with "HC05" now as the controller has been programmed such that once "BT" send "0" it will turn "ON" "Relay A". If "1" is send from "BT" it Will turn "OFF" "Relay A". Similarly if "3" is send from "BT" it will turn "ON" "Relay B" turn "OFF" by sending "4".
So once BT sends any signal it will be Detected by HC05 and given to microcontroller which will magnetize or demagnetize Relay according to Program.

Saturday 20 April 2019

AC Fan speed control using Raspberry Pi and HC-05

In this article I have Control the speed of FAN using bluetooth and Raspberry Pi.

Using Android Mobile we can control the Speed of Fan. I have programmed Raspberry Pi such that
If i send "0" by Bluetooth terminal, FAN will turn OFF.
If i send "1" by Bluetooth terminal, FAN will maintain the 30% speed of its maximum Speed.
If i send "2" by Bluetooth terminal, FAN will maintain the 50% speed of its maximum Speed
If i send "3" by Bluetooth terminal, FAN will maintain its maximum Speed.

Hardware requirement :-
1) HC-05 Bluetooth Module
2) Raspberry Pi
3) Triac
4) Jumper Wire
5) 1K Ohm Resistor
6) 100 Ohm Resistor
7) MOC3021 Opto Isolator.

HC-05 is the bluetooth Module used for the bluetooth Communication between Mobile Device and Raspberry Pi.

Triac is use to control the current.

Circuit Diagram :-





In the above circuit 
Transmitter of HC-05 is connected to the Receiver of Raspberry Pi.
Receiver of HC-05 is connected to the Transmitter of Raspberry Pi.
Vcc of HC-05 is connected to +5V DC
Gnd of HC-05 is connected to Ground 
Output is taken from Pin Number 11 of Raspberry Pi. Pin11 is operated as PWM.


Program for speed Control


Friday 22 March 2019

Four way traffic light control using Raspberry Pi

From few days I was learning Raspberry Pi. So in this article i have made small traffic light control project using Raspberry Pi B+ Model. This is the four way signal so A,B,C,D are the name of respective ways. And i have also made Circuit schematic for real time Operation of Same. So has divided in two parts.
1)Prototype Circuit Model
2)Real time circuit Schematic

1) Prototype Circuit Model
  • Hardware requirement :-

1)Raspberry Pi B+ Model.
2)Bread board.
3)RED, GREEN, YELLOW LED's.
4)Jumper Wires.
5)100 Ohm resistors.
  • Schematic:-

In the above image as there are total 12 LED's, 3 for each way Red, Yellow, Green.
100 Ohm Resistor is use to limit the current in the LED to safe value and All the cathode terminal of LED is connected to common ground.
RED light of A is connected to pin no 7
YELLOW light of A is connected to pin no 11
GREEN light of A is connected to pin no 13
RED light of B is connected to pin no 15
YELLOW light of B is connected to pin no 29
GREEN light of B is connected to pin no 31
RED light of C is connected to pin no 33
YELLOW light of C is connected to pin no 35
GREEN light of C is connected to pin no 37
RED light of D is connected to pin no 40
YELLOW light of D is connected to pin no 38
GREEN light of D is connected to pin no 36
  • Program from operation is

import RPi.GPIO as GPIO #include GPIO library
import time #include Time library
GPIO.setmode(GPIO.BOARD) #Raspi mode set as board mode
GPIO.setup(7,GPIO.OUT) #making pin number 7 as output pin for RED of 'A' way
GPIO.setup(11,GPIO.OUT) #making pin number 11 as output pin for YELLOW of 'A'
GPIO.setup(13,GPIO.OUT) #making pin number 13 as output pin for GREEN of 'A'
GPIO.setup(15,GPIO.OUT) #making pin number 15 as output pin for RED of 'B'
GPIO.setup(29,GPIO.OUT) #making pin number 29 as output pin for YELLOW of 'B'
GPIO.setup(31,GPIO.OUT) #making pin number 31 as output pin for GREEN of 'B'
GPIO.setup(33,GPIO.OUT) #making pin number 33 as output pin for RED of 'C' way
GPIO.setup(35,GPIO.OUT) #making pin number 35 as output pin for YELLOW of 'C'
GPIO.setup(37,GPIO.OUT) #making pin number 37 as output pin for GREEN of 'C'
GPIO.setup(40,GPIO.OUT) #making pin number 40 as output pin for RED of 'D'
GPIO.setup(38,GPIO.OUT) #making pin number 38 as output pin for YELLOW of 'D'
GPIO.setup(36,GPIO.OUT) #making pin number 36 as output pin for GREEN of 'D'
while 1: #to make while loop infinite
GPIO.output(13,1) #making pin number 13 high
GPIO.output(15,1) #making pin number 15 high
GPIO.output(33,1) #making pin number 33 high
GPIO.output(40,1) #making pin number 40 high
time.sleep(20) #delay of 20 seconds
GPIO.output(11,1) #making pin number 11 high
GPIO.output(29,1) #making pin number 29 high
time.sleep(5) #delay of 5 seconds
GPIO.output(31,1) #making pin number 31 high
GPIO.output(7,1) #making pin number 7 high
GPIO.output(13,0) #making pin number 13 low
GPIO.output(15,0) #making pin number 15 low
GPIO.output(11,0) #making pin number 11 low
GPIO.output(29,0) #making pin number 29 low
time.sleep(20) #delay of 20 seconds
GPIO.output(29,1) #making pin number 29 high
GPIO.output(35,1) #making pin number 35 high
time.sleep(5) #delay of 5 seconds
GPIO.output(15,1) #making pin number 15 high
GPIO.output(37,1) #making pin number 37 high
GPIO.output(33,0) #making pin number 33 low
GPIO.output(35,0) #making pin number 35 low
GPIO.output(29,0) #making pin number 29 low
GPIO.output(31,0) #making pin number 31 low
time.sleep(20) #delay of 20 seconds
GPIO.output(35,1) #making pin number 35 high
GPIO.output(38,1) #making pin number 38 high
time.sleep(5) #delay of 5 seconds
GPIO.output(33,1) #making pin number 33 high
GPIO.output(36,1) #making pin number 36 high
GPIO.output(40,0) #making pin number 40 low
GPIO.output(35,0) #making pin number 35 low
GPIO.output(38,0) #making pin number 38 low
GPIO.output(37,0) #making pin number 37 low
time.sleep(20) #delay of 20 seconds
GPIO.output(38,1) #making pin number 38 high
GPIO.output(11,1) #making pin number 11 high
time.sleep(5) #delay of 5 seconds
GPIO.output(40,1) #making pin number 40 high
GPIO.output(38,0) #making pin number 38 low
GPIO.output(11,0) #making pin number 11 low
GPIO.output(7,0) #making pin number 7 low
GPIO.output(36,0) #making pin number 36 low
2)Real time circuit schematic.
  • Hardware requirement :-

1) Raspberry Pi B+ Model.
2)MOC3021 Optocoupler.
3)BT139 Triac.
4)Resistors.
5)Bulbs.
In the above schematic there is optocoupler MOC3021 used for the isolation of Raspberry Pi from Main AC supply and Triac BT139 is the used as switch to turn ON and OFF different colour bulbs.