Friday, September 28, 2012

Circuits made from necessity


 In SMPS circuits, it is necessary to know the inductance of the inductors and transformer windings. However, it is not possible to know the inductance without the use of a meter for measuring inductance (eg LCR meter). In earlier stage of my venture in SMPS circuit design, I could not procure an LCR meter for use. So, I made one using 16F88 PIC microcontroller for my own use, taking help from internet. It has been made sometime in 2008. I still use it.



Circuit 1

 Circuit 2                      

When I was in class six, my father introduced me to PIC microcontrollers and gave me a programmer. After one year, the programmer got damaged. I failed to procure a new one as programmers available here were expensive universal ones - programmers for PIC only were not available. So, I made programmers for myself, taking help from internet and this PICKIT2 clone is my latest one - made sometime in 2010. Circuit 1 is the prototype constructed first on verroboard and Circuit 2 is the one I made on PCB after modifying existing designs collected from internet. I am still using Circuit 2 for programming all 8-bit and 16-bit PIC microcontrollers for my use.

My mother complained that for morning prayer, getting up from bed and switching on the light becomes difficult for her and hence, she asked me whether I could make a remote controller to switch on lights without getting up from bed, which she saw in her sister's house (Chinese made). So, I made one to turn two lights on/off and to turn on/off and control speed of one fan using the existing remote of our Sony TV. Later on, I found that it has good commercial value as well.

It is made using a 12F675 PIC microcontroller. The microcontroller is powered off a non-isolated resistor-capacitor based auxiliary power supply. The microcontroller decodes the signal it receives from the IR sensor (PNA4602). The signal is given from the Sony TV remote. The protocol used by the remote is SIRC, so the microcontroller decodes the received signal according to the SIRC protocol. The microcontroller then turns on/off triacs for switching on/off, as well as using pulse skipping modulation for controlling speed of the fan. I made the code using mikroC compiler.

The SIRC protocol used in my remote controller:

The SIRC protocol uses a pulse width encoding of the bits. The pulse representing a logical "1" is a 1.2ms long burst of the 40kHz carrier, while the burst width for a logical "0" is 0.6ms long. All bursts are seperated by a 0.6ms long space period. The recommended carrier duty-cycle is 1/4 or 1/3.


  1. This comment has been removed by the author.

  2. very nice project,
    can u post schematic & code for REMOTE CONTROLLER FOR 2 LIGHTs and 1 FAN

  3. Hello Tahmid ,

    Very interesting, could you please help to make PIC programmer which you mentioned in this post ?
    I am looking for a low cost PIC programed to make own.
    I think the circuit board you mentioned is the exact one I am expecting.

    Thank you.

    1. I'll post it soon. In the meantime, you can search for "PICKIT2 clone" on Google and get loads of results. Of course, I slightly modified mine to simplify it. But there are loads of designs available online.


  4. Are able to kindly drop me the source & hex codes and schematic by email?
    My email id

  5. Hellow Tahmid,
    I'm in BSC (EEE) final year.
    My project choosen is three
    phase pure sine wave inverter without using microcontroller.
    So, i generate 120 degree 50 hz pulse to control 6 gates
    using ring counters. Now, i
    modified this signal into square 10KHz pwm. I
    want to present it in two ways:
    1. Converting 48 VDC into near AC voltage & then filter it before feed into transformer.
    2. Converting 220 VDC into AC & filter it for sine wave.
    I used irf3205 & ir2110 driver. Already find 110 Vac square wave. Please suggeste me to design three phase LC filter for sinusoidal output for 10 khz pwm with ckt. Can i used iron core transformer for this frequency?

  6. Could you make an article about your inductance meter? please.

  7. please can kindly send the schematic and source code for the LCR meter, I will greatly apreciate. Thanks for your kind gesture, I've been following your blog, you are really a gem.Thanks in advance.

  8. I had made a infrared decode circuit that could decode a lot of infrared remotes. The first, the circuit must be learned codes and this codes will be saved into eeprom of the atmeg8 microcontroller. And then, we can use the buttons on remote that we learned first to control any device that you want to on/off.
    Support many infrared remotes of TV, DVD such as: Sony, JVC, Panasonic, Toshiba, LC, Samsung .....

  9. Hello Tahmid ,
    can you look in to LM3405 IC a Led driver and explain it please

  10. Hai Tahmid..Can you please mail me the codes and schematics for REMOTE CONTROLLER FOR 2 LIGHTs and 1 FAN at

  11. Hi Tahmid , do you have any project/ project idea of multi channel remote with serial eeprom, plz mail me your REMOTE CONTROLLER FOR 2 LIGHTs and 1 FAN at "", is this project with status resume supported ?, Thanks

  12. Salaam Tahmid Vi,

    Can u help me to complete remote control project for Fan and light control.

    Please reply on


  13. Mr.Tahmid
    I'd like to ask you a problem involving arduino, a relay module and a nokia dysplay. If you could help me , please say me a correct channel to it. Thanks a lot. Paulo César- Brazil. Email:

  14. plase sectematic amnd code 1fan, 2 light control,

  15. nice article great post comment information thanks for sharin
    gclub casino

  16. This comment has been removed by the author.

    1. please 1fan 2 light circuit diagram and hex code ,


  17. hi dear its very nice and very helpful post for those who are new and thinking to start a blog site.Your posts are very helpful and creative. I have atlast opened a blog site being inspired from your articles clik here and see about inverter

  18. Please share me circuit and Code code for 12/24v mppt... Please email

  19. I found this is an informative blog and also very useful and knowledgeable. I would like to thank you for the efforts you have made in writing this blog

    buy modalert online
    buy artvigil online
    buy waklert online
    buy modvigil online
    buy vilafinil online

  20. Unë kurrë nuk kam parë një mrekulli si kjo në tërë jetën time, kam kërkuar një zgjidhje për të mbetur shtatzënë për më shumë se 8 vjet pas martesës, kam provuar gjithçka të mundshme, por asgjë nuk funksionoi derisa pashë një provë në internet se si Dr Fady ndihmoi shumë gra të merrnin. shtatzënë me magjinë e saj të fuqishme, shkrova dhe shpjegova situatën time, më premtoi se do të më ndihmonte dhe do të mbetem shtatzënë para 1 muaji, bëra gjithçka që më urdhëroi dhe shkova në spital për një mesazh dhe mjeku më konfirmoi që jam 5 vjeç ditë shtatzënë, deri tani kam sjellë në jetë djalin tim të pashëm, burri im tani është i lumtur dhe më jep gjithçka që kërkoj, falë Dr. Fady kontaktoni nëse keni nevojë për ndihmë.
    * Nëse dëshironi të mbeteni shtatzënë.
    * Nëse doni të ktheni të dashurin tuaj.
    * Nëse dëshironi të ndaloni abortin.
    * Nëse doni fuqi shpirtërore.
    * Nëse dëshironi të bëheni të famshëm.
    * Nëse dëshironi të kuroni ndonjë sëmundje. Si HIV/AIDS
    WhatsApp: +2349039422406