Srpski jezik

Project is published on English


SCH: dimmer_sch.gif


On this link you can download pdf PDF arhivu of whole project published in magazine infoElektronika on Serbian language.


not freeware (email)

Similiar projects
  • none
Smart IR light dimmer - IRPS01
Revision: 5.7
Date: 12.03.2004.
This project is published
in magazine InfoElektronika #59

This device is constructed for IR REMOTE Controll of LIght Bulbs, with two independent chaNnels (bulbs), and for remote controller can be usead any Philips RC5 device from TV, VCR or audio...

Button functions on RC5 remote controll for IRPS01 device

Picture of device IRPS01
This device's mott is contradictory a little bit: "it should be simple, but very powerful". It uses all privileges of modern microcontrollers: small power consumption, small pin count, internal RC oscillator... The device that we present is a bit of deja-vu, but it is done in completely new way. It can also be upgraded with just a little bit of imagination... It regulates light in your house in sipliest way, with only one button on itself and with a remote controller. Let your light bulbs last longer and extend your comfort by using this device for soft remote turning-on/off of them.

Device characteristics:

Supply voltage: ~80V-240V AC / 50Hz
Command: Taster TS1 on device case, or (Philips) RC5 remote controller
Number of channels: it is possible to connect two light bulbs up to 100W and control them independantly
Light bulbs threatment: soft turning on/off (SOFT - Start, SOFT – Down) !!!
Special comfort: Sleep timer for 1-9min
Output power by channel: in basic version - 150W; with some adjustments - up to few kW

(!) Very high modularity and flexibility, thanx to the software in microcontroller itself, so that new functions can be implemented.

Picture 1 - Electrical SCHematic
For details please click on picture, or on this link bitmap

Device description:

Dimmer that we present here has some of this attributes:

  • simple
  • reliable
  • functional
  • saves power
  • inteligent

Lets present hardware first:

Picture 2 - PCB for IRPS01 device
(Download a zip archive)

We tried to use maximum of hardware and software and, as long as physics let us, to apply all of our experience so that we could acheive high quality of this device. After few months of developing and testing, we present you the IRPS01 device.

Device's hardware is very simple. Heart of the system is Flash microcontroller PIC12F629, which costs very low, about a few euros. We already wrote about it's characteristics, so we wont get into that now. For additional informations you should visit

Principle of regulation:

Phase regulation is applied here, using triacs as output drivers. Regulation graphics and principles are shown on picture 2.

Taster is used for setting one of the bulbs. Infra-red (IR) receiver we used is hybrid SFH506 realised by company Vishay by the name TSOP1736. Led diode V1 shows certain states of regulator and indicates receiving of infra-red signal from remote controller. Detection of zerocrossing is done by single resistor of 1Mohm. Device's power supply is the simpliest possible and is managed by elements R3, D1, D2, C1 and C2. Resistor's (R3) function is to limit electrical current through zenner-diode (D2), which stabilizes voltage at 5V. Diode D1 is used for half-wave rectification of alternating voltage, while condenser C2 and electrolite condenser C1 are doing final filtration of rectified voltage. As this power supply gives the most optimal relation between heating of resistor R3 and current which is provided by this supply, it is very important to use exact values for elements shown on schematics. Oscillator, whic is necessary for working of microcontroller, is also present, but it is implemented in small microcontroller's structure.

Picture 2 - Phase regulation

Zerocrossing detector:

Interesting part of hardware is, of course, ZC (zerocrossing) detector. It is managed by single resistor (R4). Yet, its basic function is to limit current which is going in microcontroller. There are 'clamping' diodes inside the microcontroller on almost every pin, which lead overvoltage peaks to supply so that they could not damage the microcontroller. We used them to convert sinusoidal alternating voltage into quazi-square voltage so that we can generate interrupt signals on every falling/rising edge of this voltage.

Because this diodes are low current, resistor of 1M ohms limits current to value of about hundred µA so that we can prevent destruction of device. Interrupt routine is processed at every zerocrossing. Graphic illustration of this principle is shown on picture 3.

Picture 3 - Zero cross detection  

Triac driving:

Picture 4 - possible improvement for driving of stronger consuming devices (1500W)

Major problem in developing this device was current for triac driving. Because power supply for this device is designed with resistor, supply current that we are handling is about a few mA. If we tried to drive triac with long-duration signals, current consumption would be exceeded. That is the reason why the triac is fired with short-duration signals (app. 20 µs). This duration is enough for correct firing of triac when there is enough voltage on its pins (A1 and A2). Nature of triac functioning enables auto-off when voltage is zerocrossing. This principle demands usage of triac with sensitive gate (5mA), as, for example, TIC206M, or TIC216M. Possible way to improve driving capacity is to change existing output stage with circuit shown on picture 4. This way enables usage of high current gate triacs (for example, BTA16-600). This way we successfully drove 1600W quartz heater.


Everything that we avoided in hardware design on purpose, we compensated in microcontroller's firmware. It developed into complex firmware with lot of options. We will explain them shortly. Basic characteristic which we woud like to highlight is presence of soft-start algorhythm. When user initiate turning on/off of light bulb, it drives in more than hundred steps from zero to full voltage. In that way we acheived gradual heating of light bulb, so it should last much longer.

In addition, we installed principle of inteligent zerocrossing detection, that reduces fake triac firing, which approved device stability. This method, with addition of serial choke of 220uH, successfully removes all potential interruptions made by electrical drill connected parallel to same electrical plug with this regulator.

Remote control protocol that we embedded is popular biphase RC5. It is common with most of remote controllers. This protocol was developed by Philips. This way we avoided making of our remote controller. Device also has a sleep timer, which enables automatic turning off of both light bulbs after time that was set by user (1-9min). One button on remote control provides locking of IRPS01 device, so that other remote controllers can be used in the same room.

If there is no remote controller near by, you can regulate one light bulb with button (TS1) on device's case. Short press - soft turning on/off of light bulb; longer press - continual regulation from minimum to maximum, and vice versa.

LED indicator, with RC5 code receiving, blinks in the rhythm of receiving sequence. This is useful when checking if remote controller is in function, and if RC5 compatible. If sleep timer is ON, LED indicator will blink every second. If the device is locked, LED indicator lights continually. You can find complete functions of buttons on RC5 remote controller for this device on this link.

Making the device:

PCB dimensions are 43x36 mm. It has all components included, except the choke, which could not fit into PCB. It has 220uH, nominal current 3A, and it was the best tested in practical use. This device can be tested without it, but it it neccessary for suppressing voltage disturbances in main electrical supply which is generated by phase regulation (for example, hum in radio devices).

Choke that was used in prototype (220uH/3000mA)

Microcontroller needs to be putted last on PCB.

NOTE: PIC12F629 has to be programmed with appropriate firmware before putting on PCB. Firmware is not freeware. If you are interested, you can contact us.

It is recommended to build fuse of 2A in, for safety reasons. At the end you should check all of the connection one more time, because all of components can be destroyed by single error in connections. Don't forget the only short-cutter which connects microcontroller's pin 6 with TSOP1736 hybrid.

Picture 6 - Principle of connecting light bulbs and main supply to IRPS01 device

NOTE: Device is not galvanically isolated from main supply, and can be dangerous! It should have good isolation from direct touch.

For the end:

Device that we described here hasn't been exploited yet. It was tested in a few places, and prototype still works in my home more than 3 years. Possibilities of this device are very high, and it is still under upgrading phase. For all unclearances and questions you can contact us.

Firmware is not freeware and, if you are interested in ordering HEX or source file, you can contact us at this adress:

© 2014 all rights reserved by ePraktikum design by Pinky Poslednja promena: 06 Jan 2014. 12:01:02