Introduction: Diy Super Simple Fan Dimmer With Arduino and Bluetooth 4 Home Automation

Picture of Diy Super Simple Fan Dimmer With Arduino and Bluetooth 4 Home Automation

Its a nice,clean,cheap , reliable digtal dimmer
which dimms the light or fan using the pwm of ac using an Arduino

Step 1: How Its Different From Others

all dimmers i saw with arduino and other microcontrollers were detecting the zero crossing and then firing the pulse to control the duty cycle of AC sine wave.
but its a bit different from the regular
we are not using Arduino to detect the zero crossing .

Step 2: Why This

Because ist Cheap and easy
the code is tooo simple.
so we can implement this in home automation
which is a big deal .
The digital dimmers are kinda nasty. and are not that simple

Step 3: Components Required

Picture of Components Required

1. Arduino or any other microcontroller you use
2. Relays 5v ( relay with octocuplers are best and safe recommend )
3. A fan regulator( Important ! Buy the cheap one which has potentiometer, which doesn't have steps )
4. resistors
5. Zero-pcb
6. connecting wires
7. basic tools like soldering iron,wires,a bit understanding of electronics.

Step 4: Working of a Triac Cicuit

Picture of Working of a Triac Cicuit

i am assuming you guys know working of a Triac circuit .
or Google it?

Step 5: The Trick With Triac

Picture of The Trick With  Triac

As we move the potentiometer the change in resistor changes the Duty cycle of the sine wave
it automatically detects the zero crossing and fire it accordingly.
______________________
Get to work now.
Open the regulator.
desolder the poteiometer from the circuit.
Different circuits use diff pots based on their RC circuits.
Now

important
(i had a 200k pot in mine)

so we will Divide the value in no of steps we want for the fan to be using

in my casei used
1-100k ohm resistor and other 30 k ohm resistor
and connected them in series
so the value is equivalent to full value of the potentiometer we just got out.

----------------------------------------
Now add Relays on places of keys K1 k2 K3


Step 6: Role of Microcontroller.

Picture of Role of Microcontroller.

Now the role of Microcontroller is to basically switch the relay circuit and will put the relay on on state ,based on the instructions from Bluetooth or ir or whatever source you use

which will vary the value od resistors
and will eventually slow or speed up your fan . and light brightness .

______________________
idea about the CODE .
code is simple as turning on led light. ??
set conditions according to input .
set relay pin hight or low accordingly

Step 7:

Picture of

i used it in an Bluetooth based cheap home automation projet .. you can use it as per requirement .

here is connection to board now add relay in place of led in the circuit

Step 8: Bluetooth Code 4 Arduino

void setup() {
Serial.begin(9600); pinMode(2,OUTPUT); pinMode(3,OUTPUT); pinMode(4,OUTPUT); pinMode(5,OUTPUT); // put your setup code here, to run once:

}

void loop() { if(Serial.available()) { char key=Serial.read(); switch(key) { case 'A':digitalWrite(2,HIGH); break; case 'B':digitalWrite(2,LOW); break; case 'C':digitalWrite(3,HIGH); break; case 'D':digitalWrite(3,LOW); break; case 'E':digitalWrite(4,HIGH); break; case 'F':digitalWrite(4,LOW); break; case 'G':digitalWrite(5,HIGH); break; case 'H':digitalWrite(5,LOW); break; default:break } }

}

Comments

About This Instructable

232views

3favorites

License:

Bio: learn alot and save the universe
More by Johermohit:DIY  LCD Keypad Shield for Arduino UnoDiy super simple fan dimmer with arduino and bluetooth 4 home automationAdding Led Indicator to Old Soldering Iron
Add instructable to: