RC5 BASED HOME REMOTE CONTROL

RC5 BASED HOME REMOTE CONTROL


I have dream't of having a remote control for my switch board. It became plausible when i was exposed
to the world of  micro-controllers.  
The device installed in my room

 Thanks to Avinash Gupta(extremelectronics) with his remote decoder library which motivated me build this device that controls 3 lights & 1 fan. The speed of the fan can also be controlled.The project  i made uses locally available Chineese DVD player remote control similar to the one below.

 There are ten different speeds for the fan. The circuit is pretty simple & is divided into three parts :

1) power supply and PWM reference signal module
2)Micro-controller module
3)Load drive module

All these modules are integrated into a single PCB,The PCB layout is also given.

Working:
Functional diagram


It would be better if i explain this module by module.

Power Supply and PWM Reference Signal Module:

module 1






The diodes D2 and D2 act as a half wave rectifier.The output is filtered by C1 and regulated by regulator 7805 to give 5 V .This ripple free regulated o/p is used to power the MCU.

The bridge BR1 is used to generate reference signal for controlling the fan speed using PWM. Every time the AC cycle crosses the zero value the MCU timer is triggered by the zcross signal using the external interrupt .
Have a look into the below pic :


(a) . is the input AC signal at the o/p of BR1
(b).  is the signal at zcross
(c)   is the timer o/p to the drive module.
(d).  is the AC o/p to the fan.

Changing the time the timer should be on changes the part of the AC cycle fed into the fan which effectively changes the speed of the fan.


Micro-controller Module :
This is the brain of the device.It does all the logic.It receives the IR signal using TSOP1738 IR sensor.Decodes this signal and  performs the required tasks.A 16 MHz crystal oscillator is use3d to clock the MCU.(substituting with other frequency oscillator can make the system non-functional) . It reads the zcross signal from the module 1 and synchronizes itself with the AC cycle to provide accurate timing pulses to the drive module to control the fan speed.The light control is very simple,it just toggles the state of the pin on receiving the command to make the light switch on and off.

Sig1 through 4 are control signals to the drive module.
Further details about the MCU operations can be understood from the 'C' code at the end of this page.




Load Drive Module :
This is the module that deals with the switching of the AC current.So be careful while wiring this module.Solid state switching is done through the use of TRIACS and the the TRIACS are interfaced to the MCU using opto-DIACS.

Load 1 through load 3 are lights and load 4 is a fan.There are no snubber circuits used to prevent the false triggering of TRIACS because i din't have much problem with false triggering. If you feel you want to make the device perfect,its better to add a snubber circuit.
Here is a sample snubber circuit : 





Operation Details :

Remote control key details : 

Key ‘1’  :  light1
Key  ‘2’ :  light2
Key ‘3’ :   light3
‘enter’ :   fan on/off
Up arrow : increase speed
Down arrow : decrease fan speed

PCB Design : 
The PCB for this project is designed using proteus isis PCB design.All the moddules are integrated into one PCB.Below is the layout
to have a complete insight into  component placements and jumpers please download the file below and open it using a proteus isis PCB design.
             
Inside my device.






To download the source code(IR remote library is from extreme electronics)




10 comments:

  1. Dear your project 3 on/off switches with fan speed control, While xtream electronics projects is fan speed control only, without of 3 on/off switches

    ReplyDelete
    Replies
    1. The code has been modified a bit to include fan control and switch control so that we can replace our switch boards.

      Delete
  2. is given code including fan speed control with on/off?

    ReplyDelete
  3. The given code is with speed control and on off.

    ReplyDelete
    Replies
    1. Dear,the code file under name "myFirmware.hex" is empty,There is no code,the file under name "fan.hex" having code,can i use it for switches and fan speed,

      Delete
  4. This comment has been removed by the author.

    ReplyDelete
  5. This comment has been removed by the author.

    ReplyDelete
  6. Dear friend, have you proteus file

    ReplyDelete
  7. can we change the address of rc5,eg:0x00 or other

    ReplyDelete
    Replies
    1. It has been long since I did this, but from what I remember you can change the address. Also I am not often checking the blog, so in case you have any queries please email me at dheeptuck@gmail.com

      Delete