Presentation

A gradator is a device of the electronics of power intended to modify an electrical signal with an aim of varying his tension and his effective intensity of exit and of thus modifying the power in the load. This device is used on alternating voltages (often sinusoidal) : it is an alternate-alternate direct converter.
Principle
The gradator uses a triac to vary the effective stress at exit of the assembly.
For the equipment of strong power the gradateurs can be realized by groups of thyristors assembled in antiparallel, or possibly, by associations thyristor-diodes in the case of connection with polyphase networks.
Gradator by dephasing (with phase)
It provides an alternating voltage, of variable effective value and fixed frequency (that of the network) by modulation of the angle of starting of the semiconductors (thyristors, triacs).
Pace of the signals: (in single-phase current)
Note : the gradator by dephasing is also used in electrothermics for the systems with low cold resistances. Starting is done with null tension, then the tension is increased gradually (by phase). After some alternations, the whole wave trains are applied.
Elimination of the continuous component
In the applications of fusion of glass by plunging electrodes, the gradator functions in phase, in order to ensure the limitation of the current. If a continuous component appears, there are abnormal rise in the temperature of the electrodes and premature wear of those. The component continues originates in : a disparity of direct voltage drop to the state passing of the thyristors, a nonidentical angle of conduction of the thyristors
Example of system allowing the elimination of the continuous component



Mode all or nothing (static contactor)
It is the simplest mode of the order. It applies to the control systems of temperature. The load circuit alternatively is cut then supplied with the regulator. To avoid the phenomena of electric parasites, commutation is made in the passing by zero of the supply voltage. The control signal provided by the regulator is of the logical type.
The switch authorizes the passage of the current during a more or less long time of the half-period. This time is defined by the cyclic report ⁄ ratio which is the report ⁄ ratio of the time of closing divided by the half-period, it thus lies between 0 and 1. When it is equal to 0 the output voltage is almost null and when it is equal to 1 the output voltage is the same one as that of the entry (of the network). The control signal, called angle of lag to the opening, must be synchronous with the terminal voltage of the switch.
Gradator by whole wave trains
He allows the adjustment of energy, by sending of whole frequency and amplitude, wave trains of equal to those of the network, separated by complete absences from tension. Its principal scope of application is electrothermics. It has the advantage of not creating radioelectric disturbances and of not degrading the power-factor of the installation. The control signal provided by the regulator is of the analogical type (0-10V; 4-20mA…)

Pace of the output signals
certain manufacturers use
fast cycles (period fixes 400ms)
slow cycles (period fixes 40s): for the resistive loads of strong thermal inertia in the installations located in end of line
syncopated cycles (variable period): for the resistive loads of weak thermal inertia
The switch authorizes the passage of the current for one length of time T1 corresponding to an integer of half-periods of the sector. Then it crosses during the remainder of the T2 period of operation. One regulates the transfer of energy while varying proceeded the T1 ⁄ T2.This report ⁄ ratio is reserved for the machines with strong inertias such as the furnaces, the heating (in this case thermal inertia). It makes it possible to be freed from the problems of power-factor caused by technology phase but, on the other hand, it introduces disturbances of low frequencies very causing on the network of the effects such as flicker or flicker.
In the applications of lighting, they are sometimes called dimmers.
Various examples of assembly of gradator
A gradator of light is an apparatus which one uses to vary the luminous intensity of a lamp. The variation can be operated in a manual way, with a simple rheostat of power (little recommended because of the important heating losses) or with a small electronic circuit controlled by a simple potentiometer (advised).
This variation can be realized in an automatic way, over short periods, about a few seconds (plays of light) or over long periods, about several minutes (simulators of twilight). Lastly, it is possible for certain gradateurs, to receive a tension of order which dictates the desired luminous intensity: for example 0V for a minimal luminosity, and +5V for a maximum luminosity. But some is the type of gradator, the general principle remains the same one.

General principle

A gradator of light functions according to this principle. One uses a special component called triac, which is used as electronic switch. This electronic switch with need for an order to activate itself (to close itself), but does not need order to decontaminate itself (to open), because it is decontaminated all alone with each time the tension that one asks him to commutate disappears. If you know already that the tension of our network sector 230 V is alternate and that the alternative term means in the context present that the polarity changes without stop, and that between the changes of polarities it is one moment when the tension sector is null, then should include/understand to you the continuation without too much difficulty.

Detection of the passage by zero of the wave sector

The wave sector is alternate: the tension goes up according to a sine wave, goes down again, passes by a zero value, then goes up but with an opposite polarity. This is why one so often represents it by a curve of the type of that which follows, with positive halfs-wave located above the axis horizontal marked by the value 0 V, and the negative halfs-wave located below this same axis:
Compared to an arbitrary reference, the electric tension is positive, then negative, then positive, etc, with a change which is carried out hundred times a second. A complete cycle (a positive half-wave plus a negative half-wave) thus occurs fifty times a second. In fact famous the 50 hertz represents the periodicity of this signal. As one can note it on the following curve, the wave briefly passes by a zero value, that one calls passages by zero:
Now let us fix quite precise and regular temporal reference marks in time. For questions of facility, let us say that these benchmarks correspond to the precise moment where the tension of the sector passes by zero volt. We thus have hundred benchmarks a second, which one could extremely well use as control command of lighting of a bulb, knowing in addition that when the tension sector passes by again by zero 10 ms later, the bulb dies out automatically because the switch placed in its circuit is of electronic type and commandable, triac kind.
Let us look at what that gives on a graph, slightly increased on the axis of times (horizontal axis) to allow us to see there well clearly. The following graph shows the wave sector in its green color, to which one sees added a red curve which represents a control signal.
At the place where the red curve is pile-hair on the horizontal axis 0 V, the lamp is extinct, and when the red curve assembles to the top of the horizontal axis 0 V, the lamp ignites. Note that as of the moment when the wave sector passes by 0 V, the control signal is decontaminated. In other words, the small push to the top of the red curve corresponds to the firing order of the lamp. So now one filled the zone of the curve of evolution of the tension of the sector 230 V, over the period of time during which the lamp is lit, that is to say between the moment when the firing order is given and the moment when the sector passes by again by the value 0 V, here what that gives.
As one can see it, the time of lighting is short, and in addition to that it occurs at the end of each alternation, where the tension applied to the lamp is not any more very high. The lamp thus ignites little. Let us see now what occurs if the control command is less late, that is to say if it occurs earlier compared to the passage by 0 V of the wave sector. The following curve shows an order firing which takes place at the time when the tension sector is with its maximum, right in the middle of alternation.
Under these conditions, the lamp ignites for one length of time equivalent to half of the total duration of an alternation, and so like presently one filled the zone of the curve of evolution of the tension of the sector 230 V, over the period of time during which the lamp is lit, here what that gives.
In an instinctive way is perceived that the lamp will light more. So now the spark control of the lamp with place a short moment after the extinction (passage by 0 V), the ignition retard is short, it is what watch the following curve.
Even proceeded of filling that herebefore, the full zones in green show the periods of time visualize during which the lamp is lit.
Under such a mode, the illumination of the lamp is almost with its maximum. One can thus guess the continuation : by modifying the delay about lighting compared to each passage by zero of the wave sector, one can modify with his liking the luminous intensity of the lamp. Any gradator of light rests on this principle altogether rather simple, but which presents however the disadvantage of being able to cut the wave sector at any moment, which can cause important parasites in the entourage. Fortunately, there exist means of attenuating the interference caused by adding a filter especially designed for this spot.

Operation of the simple gradateurs

The simple gradateurs are satisfied to delay the ordering of the triac by a simple network RC (resistance + condensing). Resistance is in fact a potentiometer cables in variable resistor, by which the power is on which charges the condenser. If the adjustment of the potentiometer corresponds to a low ohmic value, the condenser takes care more quickly, and the tension which goes up on its terminals more quickly reached the tension minimal necessary for déclancher the triac (in fact, the threshold of release of the triac is spillplate artificially by a diac, that one can compare to a switch which is closed when the tension on its terminals reached 32V approximately): the lamp ignites quickly after the passage by 0 V of the wave sector and shines extremely. So on the other hand the adjustment of the potentiometer corresponds to a high ohmic value, the condenser takes care less quickly, and the tension which goes up on its terminals more slowly reached the minimal tension necessary for déclancher the triac: this one starts later, the lamp ignites tardily and lights less.

Operation of the automatic gradateurs

The principle of the ignition retard of the bulb is preserved, but the value of this delay is made variable with an adequate electronics. The realization of an automatic gradator is less simple than that of a simple gradator (manual), because it is necessary to add a detection circuit of the passage by zero additional volt, and some electronic components for a synchronized ordering of the triac.

Operation of the ordered gradateurs

This type of gradator is not much more complicated than the automatic gradator. Its principle of general operation always rests on the ignition retard of the bulb, but the order part is a little different, in the sense that it calls upon a circuit that one could classify in the converters lasted tension.

Gradator bulb with incandescence 230 volt

The assembly presented here, based on the use of a triac, makes it possible to vary the luminous intensity of a bulb with incandescence alternative model 230 V, whose power will not have to exceed 400 W. It is not appropriate for an inductive load, such as transformer or engine. Two almost identical assemblies in fact are proposed, one without suppression and the other with. Even with suppression, these assemblies are simple to realize.
Version without suppression

Operation
Potentiometer RV1, in partnership with the C1 condenser, makes it possible to determine the delay of the impulse of release which will arrive at the triac, through the diac 32V. Simply imagine that RV1 and C1 constitute a network of load, in which the condenser (C1) takes care through a resistance (RV1). If the resistance of load (RV1) has a raised value, the condenser (C1) will spend more time to take care than if this resistance has a low value.
The diac can as for him be regarded as a switch which is closed when the tension on its terminal exceeds 32V. So on the right pin of the diac there is 0V, this last will start to lead when the tension on its left pin, that is to say that presents on the C1 condenser, reaches 32V. The charging voltage which arrives on C1 is alternate, since that it comes from the sector 230V. It is thus easy to imagine that the process of load and conduction of the diac will be repeated at the rate ⁄ pace of the frequency of the sector, that is to say 50 times a second.
Version with suppression

Operation
The C1 condenser associated with the L1 self-service constitute a low-pass filter which lets pass the 50 Hz but which strongly attenuates the high frequencies. The commutation of the triac indeed generates rather abrupt impulses, which cause a parasitic radiation on a broad beach of frequencies. To realize it, it is enough to put the gradator in median position, and to pose beside him, a radio operator receiver fixed on a program of the band AM

Operation
more powerful and effective assembly that precedents
Potentiometer RV1, in partnership with the C1 condenser, makes it possible to determine the delay of the impulse of release which will arrive at the triac, through the diac 32V. Simply imagine that RV1 and C1 constitute a network of load, in which the condenser (C1) takes care through a resistance (RV1). If the resistance of load (RV1) has a raised value, the condenser (C1) will spend more time to take care than if this resistance has a low value.
The diac can as for him be regarded as a switch which is closed when the tension on its terminal exceeds 32V. So on the right pin of the diac there is 0V, this last will start to lead when the tension on its left pin, that is to say that presents on the C1 condenser, reaches 32V. The charging voltage which arrives on C1 is alternate, since that it comes from the sector 230V. It is thus easy to imagine that the process of load and conduction of the diac will be repeated at the rate/rhythm of the frequency of the sector, that is to say 50 times a second.
Correction of hysteresis
This correction, which aims softening the beach of possible variation and at going further at the ends from the potentiometer, requires only some traditional components, namely of the diodes and resistances. The components added here for the correction of hysteresis are R 2, R 3, and the four D2 diodes in D5 of the 1N4007 type. Attention, two above mentioned resistances will have to badly dissipate not power, they will have to be models 2 W (or better 3 W), and they will have to be gone up with a small space of air between them and the printed circuit to facilitate the dissipation of the heat.
Filtering of the parasites sectors
The triac, which cuts out more or less the wave sector far from its passage by zero, produced harmonics which will result in superb parasites in the vicinity. The parasites will be all the more violent one whom the adjustment of the gradator will be in medium of adjustment, and will be less virulent with the positions of adjustment min and max. This is completely normal, and one cannot make differently with an assembly of this type (commutation with detection of the passage by zero of the wave sector, which makes it possible to avoid the parasites, is reserved for the order in all or nothing. It is necessary to prevent as far as possible that these parasites are propagated anywhere, and to even break the problem with the source.
For that, a filter sector for triac is established between the gradator and the sector 230 V. Here, it is made use of condensers and coils, and not of a filter sector done everything as one finds some on the arrival sector of certain equipment. The filter established here is thus consisted of the two self-servicees L2 and L3, the C2 condensers in C4, and resistance R4, the whole assembled out of low-pass filter.
The choice of the diac is easy to find: ask your retailer a diac 32V, and it will give you the component good. The choice of the triac, there exists a multitude of triacs, the small ones, the large ones, the very sensitive ones and the very powerful ones. Model TIC226 is a model very répendu, which makes it possible to commutate a few amps under a tension being able to reach 400V, and it has a sensitivity sufficient for this application.
Model of self-service suppression

The assemblies presented here are based on the use of a transistor double-base diode (UJT) and of a triac

These assemblies make it possible to vary in an automatic way, the luminous intensity of a bulb with incandescence alternative model 230 V, whose power will not have to exceed 400 W. the duration of lighting or extinction of the bulb is spread out over one duration ranging between a few seconds with ten minutes.
Food
First report: the food is done without transformer. One uses here a bridge of diodes (4 diodes - D1 with D4 - of 1N4007 type), a large resistance chutrice (R3, 12K ⁄ 7W) and zener diodes to lower and stabilize the supply voltage to a value of some 18V (two zeners - D5 and D6 - of 9V in series). R3 resistance will not dissipate 7W, but a safety margin is here of setting to limit the heating and to decrease the risk of breakdown related to a too important heating of this component.
Principle of operation
Thus let us leave the principle which reverser SW1 is in low position, that is to say in Extinction position, since one good moment already. Under these conditions, the C2 condenser of 100 uF discharged through R4 resistance and from potentiometer RV2. The terminal voltage of this C2 condenser is transmitted to the transmitter (yes, with the transmitter) of the transistor Q1 double-base diode, which is assembled out of multivibrator (out of oscillator, if you prefer), while passing by an amplifier of current made up of two transistors assembled in darlington (Q2 and Q3). The goal of this amplifier of current is to be able to exploit the terminal voltage of C2 all while discharging it least possible on this side, and thus from being able to be satisfied with a condenser of low value, compared to the time of temporization which one can obtain here.
The tension which one finds on the transmitter of Q1, and thus also on C1, is equal to the tension present at the terminals of C2, less the tensions of waste Base-Transmitter of the two Q2 transistors and Q3 (approximately 2 X 0,6 V, are approximately 1,2 V). At the same time, a tension come besides is applied to C1. It is the not stabilized tension of more than 300V about which we spoke presently, left straight of the bridge of diodes made up of D1 to D4. This tension charges the C1 condenser with 100 nF through the resistance of strong R2 value of 3,6 Megohms. C1 and R2 constitute a base of time, which in partnership with Q1, will make it possible to deliver impulses brêves with the triac through a small transformer. Owing to the fact that the tension brought back on C1 by R2 is not filtered, the signals (impulses) generated by Q1 and which will start the triac, are synchronized with alternations of the wave sector.
Let us see now what occurs when one rocks reverser SW1 towards the high position lighting, considering that potentiometer RV1 is in central position. At this moment, the C2 condenser of 100 uF starts to take care through R4 resistance and of potentiometer RV1. The tension on its terminals increases all gently but surely and this tension is transmitted to the transmitter of Q1, and thus on C1, since wiring was not modified since presently (one is not vicious at this point). That will result in to charge C1 more quickly, and thus to advance in time the starting of the impulse generated by Q1, compared to the passage by zero of the wave sector. In other words, compared to the wave sector, the triac goes déclancher earlier, and the lamp will receive a portion of more important wave sector, and thus will light more.
Stitching triac and UJT
Stitching triac on drawing of left and stitching UJT on drawing of right-hand side.

Assembly with thyristor
thyristor instead of a triac. What explains the small difference of connection of the thyristor and the bulb, which are found in a feeding circuit completely rectified.
Assembly with transformer
Assembly allowing to obtain the function of the first diagram, this time without transformer for release of the triac, but with a transformer of food to avoid the use of a large resistance of power.
Assembly for fluorescent tube
The assembly presented here, based on the use of a triac, makes it possible to vary the luminous intensity of a fluorescent tube.

Gradator bulb 12 volts with filament

The variation can be obtained using an adjustable potentiometer, or by an external continuous tension of value ranging between 0V and +5V.
Basic principle
The general operation of the system consists in generating a fixed frequency of variable cyclic report/ratio. The bulb supplied with such a signal will realize the alternating voltage and will ignite more or less, according to the report/ratio meanwhile of lighting and time of extinction. The frequency of operation of the oscillator is fixed a little at the tops of 20 Khz, in order to limit the risks of disturbances of audio apparatuses located in the vicinity. The selected frequency of 21 Khz makes it possible to at least limit the power lost in heat, by respecting the front evoked point right. The ordering of variation of luminosity is ensured by a continuous tension of value ranging between 0V and +5V, which opens possibilities of various orders, such as orders computerized, order by off-set external tension or orders by numerical potentiometer with memorizing of the position even assembly put not under tension.
Description
The oscillator is built around a AOP of the type LM358, is assembled out of sinusoidal oscillator: it is the circuit named U1: With on the electronic diagram. The sinusoidal signal can be observed in TP1, that is to say directly at the boundaries of the C1 condenser. It is transmitted to the inverseuse entry of the formed comparator of tension of another AOP of the type LM358, which takes the form of U1 here: B (U1: With and U1: B in fact are included in only one case with eight legs DIL8: the case is called U1 and the two parts which it contains are called has and B).
The noninverseuse entry of the comparator as for it is connected to the tension of order which determines the threshold of swing of the comparator. The weaker the tension of order is, and the shorter time of lighting is compared to the time of extinction, and the less the lamp is illuminated. The illumination of the bulb increases when the tension of order increases. In practice, it proves that the maximum luminosity is reached a little before the tension of order did not reach 5V, which in the majority of the cases should not present a critical problem.
Order 0V - 5V
Potentiometer RV1 makes it possible here to make function the assembly without external source of order. If you choose to control the gradator by an external continuous tension, conveyed for the connector J1, it will then be necessary you to place reverser SW1 in the adequate position, that is to say in low position on the diagram. Of course, potentiometer RV1 and reverser SW1 can both be removed if the order by external tension is the only desired one. Potentiometer RV1 can also be replaced by a numerical potentiometer, of type MAX5475 for example, which allows an order by two pushbuttons, a button for the Plus order which increment and another boutton for the order Less which decrement.
Food
This assembly is designed to function under a tension continues +12V, but functions perfectly between +9V and +18V. Of course, the choice of the bulb must be a function of the supply voltage used.

Assembly gradtor 24 volts bulb incadescence

The assembly presented here, based on the use of a triac, makes it possible to vary the luminous intensity of a bulb with incandescence model 24 V (max 150 W), and feeds under a supply voltage from 24 V alternate.
Potentiometer RV2 (50K flax) makes it possible to regulate the luminous intensity. Potentiometer RV1 (100K flax), of adjustable type, must be regulated once for very obtaining the complete extinction of the bulb when potentiometer RV2 is in position light min (cursor on the side of R2).

Assembly gradator 230 volts ordered by external continuous tension

This gradator was initially designed to work with a continuous tension of order ranging between 0 V (minimal luminous intensity) with +5 V (maximum luminous intensity), but an integrated adjustment allows to work with a tension of order ranging between 0 V and +10 V, all intermediate values being of course allowed.
The power pack
The gradator of which it is question called here upon active components, transistors and integrated circuit, which require a modest supply voltage, let us say of 12 V.
One sees well the bridge formed by the quatres D1 diodes in D4, but not of trace of the condenser of filtering. Normal, because we do not want to filter the food, all at least not at this place. We indeed need an alternating voltage rectified which goes up and especially which goes down up to zero volt, at the same rate/rhythm as the wave sector 230V. To be able to detect at which moment the wave sector is with its minimum, we will see the utility of that further.
Before the D5 diode (on its anode), we lay out of an alternating voltage doubling rectified, of frequency 100 Hz. After the D5 diode (on its cathode), we have a continuous tension, result of the filtering (smoothing) operated by the C1 condenser. To ensure the unit a correct operation, the tension continues available after D5 is stabilized by the regulator U1 voltage of the 78L12 type. The output voltage of the regulator 78L12 is a perfectly stable tension of +12V, which is thus used for the food of all the part orders of the gradator.
The detection of the passage by zero of the wave sector
The detection of the passage by zero volt of the wave sector is ensured by the Q1 transistor, which receives on its basis the rectified tension double alternation resulting from the bridge of diodes (D1 with D4), and which is not filtered, it is what we saw previously. This Q1 transistor is assembled in commutation (blocked or saturated), it leads when the tension presents on its basis is at least of 0,6V. As the tension that provided him through R1 0V with 16V approximately is varied (tension peak after rectification), it remains longer saturated than blocked. Actually, it is blocked only one very short moment, just at the moment when the wave sector passes by 0 V. At this time precise, the Q2 transistor becomes busy, thanks to the resistance of basic polarization R3.On can thus say that Q2 is busy only during the passages by zero of the wave sector. And when Q2 is busy, it discharges from a blow of only one, the C3 condenser. When the tension of alternate entry goes up, the Q1 transistor is found again saturated, and of Q2 is found with the mass via the junction transmitter - collector of Q1 bases it. What blocks it and makes it possible C3 to take care.
Passage by zero with the linear slope
It is advisable to say that the tension continues external of order is compared permanently with a local continuous tension which varies linearly, according to the shape of a tooth of saw. This tooth of saw evolves/moves between two values minimal and maximum, for example 0 V and +5 V. While taking these values given in example, the tension starts from 0 V, gradually assembles to +5 V, then once reached the high limit of +5 V, thus goes down again of only one blow in 0 V.Voici what the signal resembles the point test TP3, which is anything else only the evolution of the tension on the C3 condenser.
Note well that the brutal descent of the terminal voltage of C3, with its abrupt discharge by the Q2 transistor, with place every 10 ms, each passage by zero of the wave sector. We thus have 100 teeth of saw a second. The external tension of order, ranging between 0 V and +5 V, is compared with this evolutionary signal, which always leaves 0 V at the time of the passage by zero of the wave sector. If the external tension of order is worth +2,5 V, there will be equality between tension of order and value of the tooth of saw at the time when the latter will have achieved half of its rise. If the external tension of order is worth +1 V, there will be equality between tension of order and value of the tooth of saw at the time when the latter will have achieved 20% of its rise.
And if the external tension of order is worth +4 V, there will be equality between tension of order and value of the tooth of saw at the time when the latter will have achieved 80% of its rise. If knowing that one decides to send the impulse of order to the triac (spark control of the bulb) at the time when there is equality of the tensions, then the lamp will ignite more or less early according to whether the tension of order is more or less high. We come in fact to carry out a penny sytème delay ordered by a tension. The comparison of the saw tooth voltage with the external tension of order could have been simply realized with a simple comparator of tension, but I preferred to add a small stage of amplification (or of attenuation) which makes it possible to adapt the beach of the tension of order to a beach other than that of 0 V +5 V envisaged at the origin.
Note that the two AOP U2: With and U2: B are assembled so that the tension of order, when it increases, shortens the time lag to ensure a stronger lighting of the lamp.
Impulse ordering of the triac
The triac is not ordered by a continuous tension as it is the case in many simplified assemblies. The reason is imposed by the galvanic insulation desired between the control circuit and the triac and which is ensured by the transformer TF2, which cannot pass the D.C. current. As a recall, a triac once does not have a tension of permanent order it is started. An impulse is enough to start it, and it remains it until the current circulating between these two pins A1 and A2 descends below a certain value. What occurs every 10 ms, at the time of passage Pa zero of the wave sector. At exit of the AOP U2: B, the continuous signal obtained after swing is thus transformed into single impulse, thanks to the network differentiator C4/R10. The produced impulse causes the setting in conduction (saturation) of the Q4 transistor, which involves at once the passage of a current in the primary reel of TR2. The secondary of this transformer TR2 reflects this impulse on the trigger of the triac U3, which starts.
Filtering sector
A summary filter but nevertheless rather effective is implemented to limit the increase of the parasites produced by the triac, towards the network 230V. This filter is consisted of the L1 reel and the C5 condenser. The two components R13/C6 constitute famous network RC (snubber)

Assembly gradator functioning with a sensitive key

Gradator of light sector based on the integrated circuit specialized S576, able to light, extinguish or vary the luminous intensity of a lamp, by the simple touch of the finger on a sensistive small key.
The integrated circuit S576 is an one-way circuit, especially designed to carry out a gradator of light with order by sensitive key. The low tension necessary for its good performance is drawn from a food without transformer which lowers the 230V in a tension of 15V, by means of some components which can remain rather discrete. These components are R5, C3, D2, D3 and C4, to simplify, C3 limit the current and D2 limits the tension to its value of Zener, who is here of 15V. The detection of the touch is carried out by a small metal surface connected to the Sens entry (limits 5 of S576), through two resistances of strong value (R1 and R2 of 4M7) intended to protect the user in the event of defect on the level from the sector 230V.
The ordering of the triac is done via the exit limits 8 of the circuit of them. one sees a D1 diode here between exit 8 and the trigger (G) of the triac, it present on the diagram is proposed by the manufacturer.
There is a direction of connection, the phase is the neutral must be connected as indicated on the diagram. Notice concerning R5: I have to choose a resistance of 5 W.

Assembly gradator ordered by signal PWM

Gradator of light low tension is intended to supply an incandescent lamp, via a signal in all or nothing PWM.Il type is conceived around a microcontrolor associated with a transistor MOSFET with power. The adjustment of the luminous power is carried out with a local potentiometer or an external tension of order ranging between 0 V and +5 V or 0 V and +10 V.
General operation
The PEAK 12F675 does all. It integrates an analogical/numerical converter which enables us to know the tension of entry (of order), that it comes from potentiometer RV1 or outside (choice by SW1), and it generates in an entirely software way a signal PWM whose cyclic report/ratio is proportional to the measured tension.
procedure ADC_GetValue
const
bUseMPProc = false
begin
Out_Test2 : = 1
if bUseMPProc then
begin
AdcInNew : = ADC_Get_Sample(0) shr 3; ⁄⁄ keep 7 MSB from 10 bit acquired value
end
else
begin
bADCIntOccured := false
ADCON0.ADFM := 0 ⁄⁄ 0 = left justified, 1 = right justified
ADCON0.1 : = 1
PIR1.ADIF : = 1
repeat
delay_us(1)
until (PIR1.ADIF = 0)
AdcInNew : = ADRESH shr 1 ⁄⁄ get 7 MSB value
end
: = 0
end
begin
Main_Init
while true do
begin
⁄⁄ TMR0 Interrupt ?
if bT0IntOccured then
begin
Out_Test : = Out_Test xor 1
if iStepPWM < 127 then
inc(iStepPWM)
else
iStepPWM : = 0
Out_PWM : = (PwmDuty > iStepPWM)
bT0IntOccured : = false
end
⁄⁄ read actual analog value on GP0 ⁄ AN0 pin
ADC_GetValue
⁄⁄ if acquired analog voltage has changed, refresh PWM value
if AdcInNew <> AdcInOld then
begin
PwmDuty : = AdcInNew
AdcInOld : = AdcInNew
end
end
end
A code which my faith does not make in a perfect way very, counterpart of its simplicity. The frequency of signal PWM corresponds to the frequency of the interruptions of Timer0 divided by 127. With the values adopted here in the software code of the PEAK, we have a recurrence of the interruptions of 5 Khz, which leads to a frequency of signal PWM from some 40 Hz. It is certainly quite lower than than one can have with the solutions suggested hereafter! To note occasion consequently that the time taken by conversion A ⁄ N is definitely higher than what I waited (200 customs instead of some customs) and than this generosity prevents from having a high rate ⁄ pace of interruption (5 Khz instead of the 55 Khz awaited).
Section of power
It is ensured by only one component : transistor MOSFET of Q1 power ⁄ IRFZ44. This transistor does not claim almost any current on its grid and is able to commutate currents of several amps, which arranges us well in this case.
Food
The food of the PEAK is done under +5 V, via the regulator U2 voltage of the 78L05 type. The PEAK is thus well uncoupled (insulated) from the variations induced by commutations of the transistor of power.
Better diagram but a little expensive.
In this assembly, a PEAK (U1 ⁄ 12F675) is used for the analogical ⁄ numerical conversion of the tension of order, and a second PEAK (U2 ⁄ 16F628A) is used to generate signal PWM. Between the two, a direct connection to transfer the desired values (between 0 and 100%). Ca as lets foresee as one can use a 16F628 to not control the luminosity of a lamp starting from a continuous tension, but starting from coded signals, a such code RC5 of remote control TV, for example
Diagram still luxurious plux
Signals PWM delivered by the 18F2520 can be done on one, two or four exits:
simple mode (only one exit used, as it is the case here)
- in mode Half-bridge (two exits used, one being the complement - reversed signal - other)
- or in mode Full-Bridge (two or four exits used).
Frequency of signal PWM
The PEAK 16F88 used here having step badly of free lines of i ⁄ o, it seemed judicious to exploit them to indicate, at the time of starting, which frequency to adopt. Thus lines RB1 with RB7 define a binary word which is translated into a value of quite precise frequency PWM. These lines have integrated resistances pullup which are activated, that is to say which they are in a high logical state if one does not connect them to nothing and the logical state low if one connects them to the mass. To exploit these lines RB1 with RB7, you must connect to it switches, riders or bridges of welding which make junction with the mass. The diagram which follows watch the use of microswitches (interruptory miniatures with physical format DIL14) but for the printed circuit I chose a connector 2 * 7 pins which can receive removable riders, they are less expensive.

Gradator multichannel

This gradator of light multichannel allows to control in an individual way the rate of luminosity of 8 incandescent lamps 230 V (max 220 W by way) thanks to simple messages MIDDAY of the type NoteOn outlets of a main keyboard MIDDAY or a software sequencer (Cubase, Logic or other). With this intention, it is made use of a microcontrolor of the 18F2520 type (or 18F2420), which converts the received data MIDDAY (coming from a keyboard or a software sequencer) into impulses of release addressed to triacs.
Note: with the starting of the system, all the lamps are extinct or slightly lit (with the choice of the user), there is no recording (memorizing) last received orders MIDDAY. The reason in is simple, I designed this assembly to control it via a track MIDDAY of Cubase, with musics made up and played with this software. A function of memorizing could however be implemented if the need were felt some.
The diagram comprises the section food, the section of decoding of the data MIDDAY and the interface of power sector 8 ways.
Heart of the assembly
Based on a microcontrolor of the type PEAK 18F2520 or 18F2420 with minor modifications of the software code, the principal section of the circuit remains permanent on standby data MIDDAY and as of reception of a note, decodes it and determines which value luminosity to give to such or such exit point. The notes recognized by the circuit are fixed and nonmodifiable by the user. For each way, it is the swiftness of the note which determines the rate of illumination. The swiftness of a note MIDDAY can take 128 values, from 0 to 127. A value of swiftness of 1 corresponds toa rate of minimal illumination (0%), and a value of swiftness of 127 corresponds toa rate of maximum illumination (100%). The value of swiftness 0 is not taken into account because it accompanies sometimes an event of the type Note One to constitute an event of the Note type Off. While thus proceeding, one can slacken the keyboard or Off produce a Note in the sequencer at any moment, after the sending of the Note One with the value of the desired swiftness. The light of the channel concerned is not thus likely to die out in an unexpected way.
Food and detection passage by zero wave sector
The power pack makes it possible to provide a stabilized power of +5 V for the microcontrolor PEAK, and at the same time delivers impulses at the frequency of 100 Hz synchronized on alternations of the sector, via the two optocoupleurs U4 and U5. The regulation of +5 V is ensured by a traditional regulator voltage integrated of type 7805. One also finds the traditional bridge of diodes (D2 in D5) and the condenser of principal filtering (C3). The solution consisting in employing optocoupleurs directly fed on the sector through a resistance of strong value to deliver impulses 100 Hz was adopted, by taking care however to increase the width of the impulses provided (lasted close to 30 customs) with monostable of type CD4538. The width of the timing pulses 100 Hz is with final of 1 ms, value fixed by the C5 components and R6 and allows a correct operation with the interruptions of the PEAK.
Interface power 8 ways
The lamps are supplied through triacs current and cheap, and of the optocouplor are inserted between order and control circuit (microcontrolor) 230 V in order to ensure a good electric insulation. That is not obligatory, but makes it possible to prevent that one of the branches of the sector does not find on the food part low tension. The direct direct order (without insulation) is répendue for the low gradateurs cost based on microcontrolor, but there I did not want to make like that. Note that here, it is imperative to use optotriacs which do not have circuitery of detection of passage by zero of the wave sector.
Additional functions
Two functions more or less useful to activate or not according to your mood are available through riders JP1 and JP2.JP1/Mode debug, If rider JP1 is directed towards mass (RA4 in a logical state low), the software of the PEAK starts in standard mode. If rider JP1 is directed towards +5 V (RA4 in a logical state high), the software of the PEAK starts in débug mode. One consequently has additional logical signals on pins RB1 in RB3 and RC0 with RC3.RB1/Test_Clk: the logical state of this exit changes all the 79 customs, with each interruption of the timer 0.RB2/Test_100Hz: the logical state of this exit changes every 10 ms, with each detection of passage by zero of the wave secteur.RB3/Test_MIDI: an impulse brêve is available on this exit at the time of the reception of a byte of a screen MIDDAY.
For each message MIDDAY of the type One Notes, one has three impulses courtes.RC0 to RC3: these exits deliver in binary format the number of the note MIDDAY received. Value 1 for Do3, value 2 for Ré3 and value 8 for Do4. By connecting a decoder BCD/7 segments (CD4543 or SN7447 for example), one has a posting of the index of the last note reçue.JP2/Light One Start, if rider JP2 is directed towards mass (RA5 in a logical state low), the lamps are extinct during the powering of the system. If rider JP2 is directed towards +5 V (RA5 in a logical state high), the eight lamps ignite during the powering of the system, with a rate of luminosity from 20% to approximately 25%. That makes it possible to test the power part without having to send data MIDDAY.

execution time customer :
runtime server : 0.096 seconds