Wednesday, January 7, 2015

12 Channel Relay + 2 Channel Dimmer control by IR Remote and keyboard

as extension to IR(infrared) Remote Control Relay Board with PIC 12F675 Microcontroller i have done this quite a useful project after too many requests. by using this hardware user have option to turn up to 12 relay on and off and two loads (like fan or motor) can be controlled with adjustable speed in case of motor , or adjustable intensity in case of a bulb.


this project is directly involved with high voltage AC which may cause sever damage. proceed with caution.
i will not be responsible for any risk involved,  you are on you own.








IR protocol 

IR protocol is same as previous projects . we use NEC protocol please refer to this link to know more about NEC protocol

Hardware



Remote Control for This Board

Schematic 


the main PCB contains all the components  except dimmer triac , they are mounted on separate removable module kind of pcb which can be inserted either one of them , both of them or none of them as per requirements if dimmer functionality is required. 

as parts availability was primary concern so whole schematic is designed around very basic components , the system is built around only one microcontroller PIC16F877A which is quite cheap in terms of cost and performance. but as this part is available in most part of the world easily it is a good choice. 

there are total 12+2 switch button on the main board. 12 switches can be used to turn any relay on and off and other 2 switches are used to control dimmers from 0 (off) to level 5(max) each time you press associated button dimmer will increase one step to max. 

all the relay and both of the dimmers can be controlled by the NEC protocol based remote. 

Zero Crossing Detector 

as all triac based AC application require some sort zero crossing detector , i have implemented a very simple transistor based Zero crossing detector which give really nice output, but it require pulsating  DC input , which come from the System power Power transformer and few diodes.  

this particular design always require a transformer based power supply for the triac operation , if are using only relay and not using Traic dimmers then only you can opt for SMPS or any other power supply with current design.

it is possible to have the whole system including Dimmer to work with SMPS. but that will require separate  isolated zero crossing detector .

Main PCB part1
Main PCB part2
Removeable dimmer module schematic
Software 
whole source is written in c , with
HI-TECH C Compiler for PIC10/12/16 MCUs  V9.83
all the latest source files, PCB gerber, Schematic PDF are available on github.    or you can download from this direct link (may not be latest) .
www.github.com/circuitvalley

41 comments:

  1. Hello Sir,

    It is also possible to make a 6 channel type instead of 12 channel type but where all the 6 channels in one time to Dim is.
    Please let me now what is possible.
    Many thanks,
    Frans1977

    ReplyDelete
  2. Hello Sir,

    It is also possible to make a 6 channel type instead of 12 channel type but where all the 6 channels in one time to Dim is.
    Please let me now what is possible.
    Many thanks,
    Frans1977

    ReplyDelete
    Replies
    1. i did not understand what you are trying to ask by saying " where all the 6 channels in one time to Dim is."

      but still you can have 6 channels only if you like just forget about reset of the channels , no problem.

      Delete
  3. Hi Gaurav I have made your "12 Channel Relay + 2 Channel Dimmer control by IR Remote and keyboard" project but its not working, when i load .Hex file into programming software(PicPGM) it shows Config Bits not set, Also confirm me which Mcu is used 16F877A or 16F887, Please send me your project files or Compiled .hex file on My mail "Tariqpvz@gmail.com", Thanks

    ReplyDelete
  4. Hello Gaurav which remote you have used For"12 Channel Relay + 2 Channel Dimmer control by IR Remote and keyboard" please post your remote details or Image too if possible, Thanks

    ReplyDelete
  5. Mr. Gaurav,can you send me a sample pc. for production after minor changes like 10 steps for dimmer, if you can so please tell me at: nareshjain7760@gmail.com.
    Thanks

    ReplyDelete
  6. sir how can we change dimmer steps from 5 to 10 (1 for lowest,F for full shows on display ),what will changes in programe

    ReplyDelete
  7. Replies
    1. P9 is for in circuit programming of the Microcontroller.

      Delete
  8. sir how can we attach eeprom to microcontroller for last stage memory ?

    ReplyDelete
    Replies
    1. the microcontroller has internal eeprom and all the data automatically saved in the internal eeprom, and retrieved at startup

      Delete
  9. sir I have Protel pcb,eagle cad,sprint layout,but i failed to import gerber file properly,please let me know in which software you made gerber files.
    Thanks

    ReplyDelete
    Replies
    1. Eagle can not open gerber Files, i don't know about sprint or protel,

      you need some gerber viewer, you can try "online gerber viewer"

      or kicad can open gerber file , but they all are viewer you can not edit gerber file with them.
      i never needed gerber editing for my self.

      Delete
  10. sir can I simulate this complete circuit in multisim 13

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

    ReplyDelete
  12. Hello Sir,

    Low Cost ?
    2 Channel Relay + 1 Channel Dimmer control by IR Remote and keyboard
    pic 16f676 possible ... Please let me

    Thanks
    Nayan rohman

    ReplyDelete
  13. With 16F676 does not have many gpio, it may be possible to do it, but it may require extra circuitry

    ReplyDelete
  14. Sir,

    sorry sir .... next project Please ..Please..Please...2 Channel Relay + 1 Channel Dimmer control by IR Remote and keyboard....Please ?

    ReplyDelete
  15. sir i have faced problem with dimmer, dimmer is not working , Display flickering continuesly, i checked the crystal and Zero Cross circuit thoroughly but i have not found any mistake.please suggest me which area to check.

    ReplyDelete
    Replies
    1. if display is flickering , it seems to be clock related issue, microcontroller has internal PLL to multiply the crystal clock to achieve maximum clock rate.
      if pll is not locking may be you need to check for crystal , i may not be starting correctly. try to change crystal and capacitors around it.

      you can check with keys , if keys are working for relays. keys will work regardless of the pll lock.

      Delete
  16. sir i request to check the seven segment connections to micro,where as i think the connection should be pin no.24 to SEG B,pin 25 to SEG A,pin 28 to SEG E and pin 29 to SEG D

    ReplyDelete
  17. sir can i edit the program in mikroc

    ReplyDelete
    Replies
    1. no , you need Hi-tech c compiler , which can be easily used with MPLAB

      Delete
  18. 2 Channel Relay + 1 Channel Dimmer control by IR Remote and keyboard 16f676

    ReplyDelete
    Replies
    1. Hello Sir 2 Channel Relay + 1 Channel Dimmer control by IR Remote and keyboard 16f676 ..Please your project files or Compiled .hex file !!!!!!!!!! Sir i am waiting Please Please Please ...???

      Delete
    2. if you don't what other channels just have them disconnected.
      i am not going to port this to 16F676 , if you really want do it your self.or hire embedded freelancer to do it.

      all the project file are there in the github and hex also .

      Delete
  19. 2 Channel Relay + 1 Channel Dimmer ... project Please Sir

    ReplyDelete
    Replies
    1. you can use it as 2 relay and 1 dimmer , just ignore the circuit which is for other relay and other dimmer

      Delete
  20. Hello Mr. Gaurav Singh, Does the hex file include nec protocol also? Can use DVD remote to control the system?

    ReplyDelete
    Replies
    1. yes it use NEC protocol , if your DVD player remote has NEC protocol like most of the IR devices then i will work wit you device also.

      Delete
  21. Beautifull projects given by you Mr. Gaurav...!!!! I have implemented this on other pic controller. Everything is working fine... Thanks.....
    Krunal Thummar- Gondal(Gujarat) krunal_c_thummar@yahoo.com

    ReplyDelete
  22. Hi Mr Gaurav,

    Can I build my own remote and not use IR remotes of other devices to control? If I was using say for example a DVD remote wouldn't it interrupt with the operation of the DVD device itself??
    If so do i design the remote using a microcontroller? Do you have the schematic for the remote? Sorry for the trouble. I am trying to learn about microcontroller based circuits and designing them. Do you have any recommendation of any books or resources to learn more about microcontroller programming using C and not assembly.

    ReplyDelete
    Replies
    1. here you can find the remote schematic which will work for sure
      http://www.circuitvalley.com/2013/09/nec-protocol-ir-infrared-remote-control.html

      Delete