Diy Super Simple Fan Dimmer With Arduino and Bluetooth 4 Home Automation
by Johermohit in Circuits > Arduino
6637 Views, 5 Favorites, 0 Comments
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
How Its Different From Others
but its a bit different from the regular
we are not using Arduino to detect the zero crossing .
Why This
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
Components Required
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.
Working of a Triac Cicuit
or Google it?
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
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
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
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 } }
}