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
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
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 |
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
Many Many thank sir g !
ReplyDeleteHello Sir,
ReplyDeleteIt 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
Hello Sir,
ReplyDeleteIt 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
i did not understand what you are trying to ask by saying " where all the 6 channels in one time to Dim is."
Deletebut still you can have 6 channels only if you like just forget about reset of the channels , no problem.
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
ReplyDeleteHello 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
ReplyDeleteMany Many thank sir........
ReplyDeleteMr. 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.
ReplyDeleteThanks
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
ReplyDeletesir where connect P9
ReplyDeleteP9 is for in circuit programming of the Microcontroller.
DeleteThanks
ReplyDeletesir how can we attach eeprom to microcontroller for last stage memory ?
ReplyDeletethe microcontroller has internal eeprom and all the data automatically saved in the internal eeprom, and retrieved at startup
DeleteOK
ReplyDeletesir 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.
ReplyDeleteThanks
Eagle can not open gerber Files, i don't know about sprint or protel,
Deleteyou 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.
Lot of Thanks
ReplyDeletesir can I simulate this complete circuit in multisim 13
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteHello Sir,
ReplyDeleteLow Cost ?
2 Channel Relay + 1 Channel Dimmer control by IR Remote and keyboard
pic 16f676 possible ... Please let me
Thanks
Nayan rohman
With 16F676 does not have many gpio, it may be possible to do it, but it may require extra circuitry
ReplyDeleteMany Many thanks sir
ReplyDeleteSir,
ReplyDeletesorry sir .... next project Please ..Please..Please...2 Channel Relay + 1 Channel Dimmer control by IR Remote and keyboard....Please ?
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.
ReplyDeleteif display is flickering , it seems to be clock related issue, microcontroller has internal PLL to multiply the crystal clock to achieve maximum clock rate.
Deleteif 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.
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
ReplyDeletesir can i edit the program in mikroc
ReplyDeleteno , you need Hi-tech c compiler , which can be easily used with MPLAB
DeleteThanks
ReplyDelete2 Channel Relay + 1 Channel Dimmer control by IR Remote and keyboard 16f676
ReplyDeleteHello 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 ...???
Deleteif you don't what other channels just have them disconnected.
Deletei 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 .
2 Channel Relay + 1 Channel Dimmer ... project Please Sir
ReplyDeleteyou can use it as 2 relay and 1 dimmer , just ignore the circuit which is for other relay and other dimmer
DeleteHello Mr. Gaurav Singh, Does the hex file include nec protocol also? Can use DVD remote to control the system?
ReplyDeleteyes 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.
DeleteBeautifull projects given by you Mr. Gaurav...!!!! I have implemented this on other pic controller. Everything is working fine... Thanks.....
ReplyDeleteKrunal Thummar- Gondal(Gujarat) krunal_c_thummar@yahoo.com
Hi Mr Gaurav,
ReplyDeleteCan 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.
here you can find the remote schematic which will work for sure
Deletehttp://www.circuitvalley.com/2013/09/nec-protocol-ir-infrared-remote-control.html
simulation not working in proteus
ReplyDeletethank you Gaurav,
ReplyDeletecan you tel me its double layer pcb?
Yes it is double layer PCB. If you want you can make a single layer PCB.
DeleteIt will work with single layer also.
thank you , how i can make single layer PCB ,
ReplyDeleteif you have Single PCB can you send me?
single layer PCB will we requiring complete new PCB layout with few PCB jumpers here and there.
DeleteI do have few bare board available i can give them away for no cost.
but as you can understand with your location shipping going to be pain. What i really don't want to have. sorry
Good day Mr.Gaurav, thank for supporting this page up till this time, else where the author would have abandoned the article.
ReplyDeleteMy question is, Can the dimmer section work on AC ELECTRIC FAN
THANKS IN ADVANCE FOR YOUR ANSWER
Yes ofcourse, it is designed for AC dimming, i Have tested it with AC load
DeleteAWASOME !!
ReplyDeleteHow do i built dimmer with triac and transistor by pwm for 16f877a..
could u pl update....
Dear friend,can you arrange the set of pcb for above project,if yes
ReplyDeletethen the cost of dimmer and irlf board,
Thanks
Hi friend, I checked main.c file and found the dimmer speed goes up to 9 steps inplace of 5 Steps, how to increase the steps, please explain briefly,because I am very weak in softwares
ReplyDeletetnx gurav...for your good project..
ReplyDeletecould u plaese how the PIN of the PORT has been assign in this code here, i could not find in your 'main', 'hardware' and 'keyboard' C file.
As you assign in your 4-channel ON/OFF like //#define RELAY2 GPIObits.GPIO1//
But how the all pin here in 12-channel is being assigned and by which line and process.
tnx
Hi Gaurav Sir,
ReplyDeleteWould you pl let me know with the line "// T2CONbits.TOUTPS =4; //postsacler is /10 so 204.8us * 10 to 2.048 ms",
How 'TOUTPS' would be coming to '4' to get '1:10".
As per me what i know this would be 9 (=1001 = 1:10 POSTSCALER as per Datasheet) or may be I am something missing what I dont know. Is that sir??
I am looking forward your reply in which my doubt can be cleared...
Thnk You for good tutorials.