PWM circuits. PWM controller


The PWM controller is designed to regulate the rotation speed of the polar motor, the brightness of the light bulb or the power of the heating element.

Advantages:
1 Ease of manufacture
2 Availability of components (the cost does not exceed $ 2)
3 Wide application
4 For beginners, once again practice and please yourself =)

Once I needed a "device" to adjust the speed of rotation of the cooler. For what exactly I do not remember. From the beginning I tried through a regular variable resistor, it got very hot and it was not acceptable for me. As a result, after digging around on the Internet, I found a circuit on the already familiar NE555 chip. It was a circuit of a conventional PWM controller with a duty cycle (duration) of pulses equal to or less than 50% (later I will give graphs of how it works). The circuit turned out to be very simple and did not require tuning, the main thing was not to screw up with the connection of diodes and a transistor. The first time I assembled it on a breadboard and tested it, everything worked with half a turn. Later, I already spread a small printed circuit board and everything looked neater =) Well, now let's take a look at the circuit itself!

PWM controller circuit

From it we see that this is an ordinary generator with a duty cycle regulator assembled according to the scheme from the datasheet. We change this duty cycle with resistor R1, resistor R2 serves as protection against short circuit, since the 4th output of the microcircuit is connected to ground through the internal key of the timer and at the extreme position of R1 it will simply close. R3 is a pull-up resistor. C2 is the frequency setting capacitor. The IRFZ44N transistor is an N channel mosfet. D3 is a protective diode that prevents the field device from failing when the load is interrupted. Now a little about the duty cycle of the pulses. The pulse duty cycle is the ratio of its repetition period (repetition) to the pulse duration, that is, after a certain period of time there will be a transition from (roughly speaking) plus to minus, or rather from a logical unit to a logical zero. So this time interval between pulses is the same duty cycle.


Duty cycle at the middle position R1

Duty cycle at the extreme left position R1


Duty cycle at the extreme right position R

Below I will give printed circuit boards with and without the location of parts


Now a little about the details and their appearance. The microcircuit itself is made in a DIP-8 package, small-sized ceramic capacitors, 0.125-0.25 watt resistors. Diodes are conventional rectifiers for 1A (the most affordable is 1N4007, they are everywhere in bulk). Also, the microcircuit can be installed on a socket, if in the future you want to use it in other projects and not unsolder it again. Below are pictures of the details.



Pulse-width modulation (PWM) is a signal conversion method in which the pulse duration (duty cycle) changes, while the frequency remains constant. In English terminology, it is referred to as PWM (pulse-width modulation). In this article, we will understand in detail what PWM is, where it is used and how it works.

Application area

With the development of microcontroller technology, new opportunities have opened up for PWM. This principle has become the basis for electronic devices that require both adjustment of output parameters and maintaining them at a given level. The pulse-width modulation method is used to change the brightness of light, the speed of rotation of engines, as well as to control the power transistor of pulse-type power supplies (PSU).

Pulse-width (PW) modulation is actively used in the construction of LED brightness control systems. Due to the low inertia, the LED has time to switch (flash and go out) at a frequency of several tens of kHz. Its operation in a pulsed mode is perceived by the human eye as a constant glow. In turn, the brightness depends on the duration of the pulse (the open state of the LED) during one period. If the pulse time is equal to the pause time, that is, the duty cycle is 50%, then the brightness of the LED will be half of the nominal value. With the popularization of 220V LED lamps, the question arose of increasing the reliability of their operation with an unstable input voltage. The solution was found in the form of a universal microcircuit - a power driver operating on the principle of pulse-width or pulse-frequency modulation. A circuit based on one of these drivers is described in detail.

The mains voltage supplied to the input of the driver microcircuit is constantly compared with the in-circuit reference voltage, forming a PWM (PFM) signal at the output, the parameters of which are set by external resistors. Some microcircuits have an output for supplying an analog or digital control signal. Thus, the operation of the pulse driver can be controlled using another SHI converter. Interestingly, the LED does not receive high-frequency pulses, but a current smoothed by a choke, which is an indispensable element of such circuits.

The massive use of PWM is reflected in all LCD panels with LED backlighting. Unfortunately, in LED monitors, most of the SHI converters operate at a frequency of hundreds of Hertz, which negatively affects the vision of PC users.

The Arduino microcontroller can also operate in PWM controller mode. To do this, call the AnalogWrite () function with the values ​​\u200b\u200bbetween 0 and 255 indicated in brackets. Zero corresponds to 0V, and 255 to 5V. Intermediate values ​​are calculated proportionally.

The ubiquity of devices operating on the PWM principle has allowed mankind to move away from linear-type transformer power supplies. As a result, an increase in efficiency and a decrease in the weight and size of power sources by several times.

The PWM controller is an integral part of a modern switching power supply. It controls the operation of the power transistor located in the primary circuit of the pulse transformer. Due to the presence of a feedback circuit, the voltage at the PSU output always remains stable. The slightest deviation of the output voltage through the feedback is fixed by a microcircuit, which instantly corrects the duty cycle of the control pulses. In addition, a modern PWM controller solves a number of additional tasks that improve the reliability of the power supply:

  • provides the mode of soft start of the converter;
  • limits the amplitude and duty cycle of the control pulses;
  • controls the input voltage level;
  • protects against short circuit and overtemperature of the power switch;
  • puts the device into standby mode if necessary.

The principle of operation of the PWM controller

The task of the PWM controller is to control the power switch by changing the control pulses. When operating in the key mode, the transistor is in one of two states (fully open, fully closed). In the closed state, the current through the p-n junction does not exceed a few μA, which means that the dissipation power tends to zero. In the open state, despite the high current, the resistance of the p-n junction is excessively low, which also leads to insignificant heat losses. The greatest amount of heat is released at the moment of transition from one state to another. But due to the short time of the transition process compared to the modulation frequency, the power loss during switching is negligible.

Pulse width modulation is divided into two types: analog and digital. Each of the types has its own advantages and can be implemented in circuitry in different ways.

Analog PWM

The principle of operation of an analog SHI modulator is based on comparing two signals whose frequency differs by several orders of magnitude. The comparison element is an operational amplifier (comparator). A sawtooth voltage of a high constant frequency is applied to one of its inputs, and a low-frequency modulating voltage with a variable amplitude is fed to the other. The comparator compares both values ​​and generates rectangular pulses at the output, the duration of which is determined by the current value of the modulating signal. In this case, the PWM frequency is equal to the frequency of the sawtooth signal.

Digital PWM

Pulse width modulation in digital interpretation is one of the many functions of the microcontroller (MC). Operating exclusively with digital data, the MK can generate either a high (100%) or low (0%) voltage level at its outputs. However, in most cases, to effectively control the load, the voltage at the output of the MK must be changed. For example, adjusting the speed of rotation of the engine, changing the brightness of the LED. What to do to get any voltage value in the range from 0 to 100% at the output of the microcontroller?

The issue is solved by using the method of pulse-width modulation and using the oversampling phenomenon, when the specified switching frequency is several times higher than the response of the controlled device. By changing the duty cycle of the pulses, the average value of the output voltage changes. As a rule, the whole process takes place at a frequency of tens to hundreds of kHz, which makes it possible to achieve smooth adjustment. Technically, this is implemented using a PWM controller - a specialized microcircuit, which is the "heart" of any digital control system. The active use of PWM-based controllers is due to their undeniable advantages:

  • high signal conversion efficiency;
  • work stability;
  • saving energy consumed by the load;
  • low cost;
  • high reliability of the entire device.

There are two ways to get a PWM signal at the pins of the microcontroller: hardware and software. Each MK has a built-in timer that is able to generate PWM pulses on certain pins. This is how the hardware implementation is achieved. Getting a PWM signal using software commands has more options in terms of resolution and allows you to use more pins. However, the software method leads to a high loading of the MK and takes up a lot of memory.

It is noteworthy that in digital PWM the number of pulses per period can be different, and the pulses themselves can be located in any part of the period. The output signal level is determined by the total duration of all pulses per period. It should be understood that each additional pulse is a transition of the power transistor from the open state to the closed state, which leads to an increase in losses during switching.

An example of using a PWM controller

One of the implementation options for a simple PWM controller has already been described earlier in. It is built on the basis of a microcircuit and has a small strapping. But, despite the simplicity of the circuit, the regulator has a fairly wide range of applications: control circuits for the brightness of LEDs, LED strips, adjusting the speed of rotation of DC motors.

Read also

Great solution for digital power control!

BTA100

Are available

Buy in bulk

The device is designed to adjust the load power up to 10000 W in AC circuits with a voltage of 220 V. The device is built on the basis of a powerful triac BTA100 and is designed to control the power of electric heaters, lighting devices, collector and asynchronous AC motors, etc. The use of this triac allows you to reduce the size of the cooling radiator. Due to the wide adjustment range and high power, the regulator will find wide application in everyday life.

Specifications

Peculiarities

  • Smooth adjustment over the entire power range.
  • Large adjustment power
  • Wide operating voltage range
  • Zero crossing detector
  • Button control
  • Possibility of separating the control board from the power section
  • Installed radiator

Principle of operation

The power controller uses the PWM control principle with a zero-crossing phase control detector

Device design

The power regulator is designed as a built-in control panel with a separate power module.

Articles

Scheme

Contents of delivery

  • Control module - 1 pc.
  • Power module - 1 pc.
  • Instruction - 1 pc.

What is required for assembly

  • To connect you will need: wire, screwdriver, side cutters.

Preparation for operation

  • Connect an incandescent lamp to the OUTPUT terminals.
  • Connect the power cord to the IN 220V terminals.
  • Connect the plug to the 220V network.
  • By pressing the buttons on the control panel, check the change in the brightness of the lamp.
  • Verification completed. Happy operation.

Operating conditions

  • Temperature -30C to +50C. Relative humidity 20-80% non-condensing.

Precautionary measures

  • The module and terminals are under dangerous voltage of 220V.
  • Observe safety measures, do not touch the contacts of the printed circuit board while the module is connected to the 220V network.

Questions and answers

  • Good afternoon. I am going to purchase a digital PWM power regulator 220V / 10kW (45A) from you and use it as a soft starter for a snow blower with a 3 kW commutator motor. In this regard, I have a few questions about this regulator: 1. Will the regulator work correctly, in the sense that the adjustment will be smooth and without jerks? 2. How many contacts close the control buttons of the regulator? The question is dictated by the idea to place the control device in a transparent sealed case, and duplicate the switch with a waterproof joystick. 3. Is there enough heatsink area for the rated power or will a cooling fan be required? 4. Is the radiator energized? Can it be left outside the waterproof case? Sincerely, Sergey.
    • 1. There should be no jerks, the restructuring step is 1%. However, each case must be tested individually. 2. Each button closes two contacts. 3. The specifications indicate the peak power of the device. Rated power is 7-8 kW.
  • 1. Control panel included? 2. Is it possible to set it to a certain percentage and turn it off, so that the set percentage would be maintained after the power is turned off?
    • 1. Control panel included. 2. You cannot turn off the control panel. 3. When the power is turned off, the settings do not go astray.
  • Hello, can you find out more precisely where the phase is connected, and where zero, and the output too. It's just that the heater, where you need to adjust the power, is part of the heaters and they have a common zero
    • The ZERO bus must be connected to the two middle contacts.
  • Hello! Please tell me, does the case of the control triac have galvanic isolation from the electrical network? If this regulator is built into the metal case of the device, does its radiator need to be isolated from the case?
    • That's right, the radiator of the device must be isolated from the case.
  • Good afternoon. Which regulator controls the primary winding of a transformer? Thank you.
    • According to reviews, they are regulated using MK071M. Haven't tried it yourself.

Another review on the topic of all sorts of things for homemade products. This time I will talk about the digital speed controller. The thing is interesting in its own way, but I wanted more.
For those interested, read on :)

Having in the household some low-voltage devices such as a small grinder, etc. I wanted to slightly increase their functional and aesthetic appearance. True, this did not work out, although I still hope to achieve my goal, perhaps another time, I’ll tell you about the thing itself today.
The manufacturer of this regulator is Maitech, or rather, this name is often found on all kinds of scarves and blocks for homemade products, although for some reason I did not come across the site of this company.

Due to the fact that I did not end up doing what I wanted, the review will be shorter than usual, but I will start, as always, with how it is sold and sent.
The envelope contained an ordinary ziplock bag.

The kit includes only a regulator with a variable resistor and a button, there is no hard packaging and instructions, but everything arrived intact and without damage.

There is a sticker on the back that replaces the instructions. In principle, more is not required for such a device.
The operating voltage range is 6-30 Volts and the maximum current is 8 Amps.

Appearance is quite good, dark "glass", dark gray plastic of the case, in the off state it seems generally black. In appearance offset, nothing to complain about. A transport film was glued on the front.
Installation dimensions of the device:
Length 72mm (minimum case opening 75mm), width 40mm, depth excluding front panel 23mm (with front panel 24mm).
Front panel dimensions:
Length 42.5, width 80mm

A variable resistor comes with a handle, the handle is of course rough, but it will do for use.
The resistance of the resistor is 100KΩ, the adjustment dependence is linear.
As it turned out later, 100KΩ resistance gives a glitch. When powered from a pulsed power supply unit, it is impossible to set stable readings, the interference on the wires to the variable resistor affects, because of which the readings jump +\- 2 characters, but it would be fine to jump, along with this, the engine speed jumps.
The resistance of the resistor is high, the current is small and the wires collect all the noise around.
When powered by a linear PSU, this problem is completely absent.
The length of the wires to the resistor and the button is about 180mm.

Button, well, there's nothing special. Normally open contacts, mounting diameter 16mm, length 24mm, no illumination.
The button turns off the engine.
Those. when power is applied, the indicator turns on, the engine starts, pressing the button turns it off, the second press turns it on again.
When the engine is off, the indicator also does not light up.

Under the cover is the device board.
The power supply and motor connection contacts are brought out to the terminals.
The positive contacts of the connector are connected together, the power switch switches the negative wire of the engine.
The connection of the variable resistor and the button is detachable.
Everything looks neat. The capacitor leads are a bit crooked, but I think that this can be forgiven :)

I will hide further disassembly under the spoiler.

More

The indicator is quite large, the height of the digit is 14mm.
The dimensions of the board are 69x37mm.

The board is assembled neatly, there are traces of flux near the indicator contacts, but in general the board is clean.
The board contains: a reverse polarity protection diode, a 5 Volt stabilizer, a microcontroller, a 470 microfarad 35 Volt capacitor, power elements under a small radiator.
Places for installing additional connectors are also visible, their purpose is not clear.

I sketched a small block diagram, just for a rough understanding of what and how it is switched and how it is connected. The variable resistor is turned on with one foot to 5 volts, the second to the ground. Therefore, it can be safely replaced with a lower denomination. There are no connections to the unsoldered connector in the diagram.

The device uses a microcontroller manufactured by STMicroelectronics.
As far as I know, this microcontroller is used in a fairly large number of different devices, such as ammeters.

Power stabilizer, when operating at the maximum input voltage, heats up, but not very much.

Part of the heat from the power elements is removed to the copper polygons of the board, on the left you can see a large number of transitions from one side of the board to the other, which helps to remove heat.
Also, heat is removed with the help of a small radiator, which is pressed against the power elements from above. This placement of the heatsink seems a little doubtful to me, since the heat is removed through the plastic case and such a heatsink does not help much.
There is no paste between the power elements and the radiator, I recommend removing the radiator and smearing it with paste, at least a little but it will get better.

A transistor is used in the power section, the channel resistance is 3.3mOhm, the maximum current is 161 Amperes, but the maximum voltage is only 30 Volts, so I would recommend limiting the input at 25-27 Volts. When operating at near-maximum currents, there is a slight heating.
A diode is also located nearby, which dampens the current surges from the self-induction of the motor.
10 amps, 45 volts are used here. There are no questions about the diode.


First inclusion. It so happened that I carried out the tests even before removing the protective film, because in these photos it is still there.
The indicator is contrasting, moderately bright, reads perfectly.

At first I decided to try on small loads and got the first disappointment.
No, I have no complaints about the manufacturer and the store, I just hoped that such a relatively expensive device would have engine speed stabilization.
Alas, this is just an adjustable PWM, the indicator displays% filling from 0 to 100%.
The regulator didn’t even notice the small motor, the day it is a completely ridiculous load current :)

Attentive readers must have paid attention to the cross-section of the wires with which I connected the power to the regulator.
Yes, then I decided to approach the issue more globally and connected a more powerful engine.
Of course, it is noticeably more powerful than the regulator, but at idle its current is about 5 amperes, which made it possible to check the regulator in modes closer to the maximum.
The regulator behaved perfectly, by the way, I forgot to indicate that when turned on, the regulator smoothly increases the PWM filling from zero to the set value, ensuring smooth acceleration, while the indicator immediately shows the set value, and not like on frequency drives, where the real current is displayed.
The regulator did not fail, warmed up a little, but not critical.

Since the regulator is pulsed, I decided, just for the sake of interest, to poke around with an oscilloscope and see what happens at the gate of the power transistor in different modes.
The PWM frequency is about 15 kHz and does not change during operation. The engine starts at approximately 10% fill.



Initially, I planned to put the regulator in my old (rather already ancient) power supply for small power tools (more on that some other time). in theory, it should have become instead of the front panel, and the speed controller should have been located on the back, I didn’t plan to put a button (fortunately, when turned on, the device immediately switches to the on mode).
It had to be nice and neat.

But further disappointment awaited me.
1. Although the indicator was a little smaller in size than the front panel insert, it was worse that it did not fit in depth, resting against the racks for connecting the halves of the case.
and if the plastic of the indicator housing could be cut off, then it would not matter, since the regulator board interfered further.
2. But even if I would have solved the first question, there was a second problem, I completely forgot how my power supply was made. The fact is that the regulator breaks the minus supply, and I have a reverse relay, turning on and forcing the engine to stop, and a control circuit for all this. And with their alteration, everything turned out to be much more difficult :(

If the regulator was with speed stabilization, then I would still get confused and redo the control and reverse circuit, or redo the regulator for switching + power. And so it is possible and I will redo it, but already without enthusiasm and now I don’t know when.
Maybe someone is interested, a photo of the insides of my PSU, it was going to be about 13-15 years ago, almost all the time it worked without problems, once I had to replace the relay.

Summary.
pros
The device is fully functional.
Neat appearance.
Quality build
The kit includes everything you need.

Minuses.
Incorrect operation from switching power supplies.
Power transistor without voltage margin
With such a modest functionality, the price is too high (but everything is relative here).

My opinion. If you close your eyes to the price of the device, then in itself it is quite good, and it looks neat and works fine. Yes, there is a problem of not very good noise immunity, I think that it is not difficult to solve it, but it is a little frustrating. In addition, I recommend not to exceed the input voltage above 25-27 Volts.
More frustrating is the fact that I looked quite a lot of options for all kinds of ready-made regulators, but nowhere do they offer a solution with speed stabilization. Perhaps someone will ask why I do this. I will explain how a grinding machine with stabilization fell into the hands, it is much more pleasant to work than usual.

That's all, I hope it was interesting :)

The product was provided for writing a review by the store. The review is published in accordance with clause 18 of the Site Rules.

I plan to buy +23 Add to favorites Liked the review +38 +64

In some cases, for example, in flashlights or home lighting fixtures, it becomes necessary to adjust the brightness of the glow. It would seem that it’s easier: just change the current through the LED by increasing or decreasing. But in this case, a significant part of the energy will be consumed on the limiting resistor, which is completely unacceptable for autonomous power supply from batteries or accumulators.

In addition, the color of the glow of the LEDs will change: for example, white color when the current drops below the nominal value (for most LEDs 20mA) will have a slightly greenish tint. Such a change in color in some cases is completely useless. Imagine that these LEDs illuminate the screen of a TV or computer monitor.

In these cases, apply PWM - regulation (width - pulse). Its meaning is that it periodically lights up and goes out. In this case, the current remains nominal throughout the entire flash time, so the luminescence spectrum is not distorted. If the LED is white, then green shades will not appear.

In addition, with this method of power control, energy losses are minimal, the efficiency of circuits with PWM control is very high, reaching more than 90 percent.

The principle of PWM - regulation is quite simple, and is shown in Figure 1. A different ratio of the time of the lit and extinguished state is perceived by the eye as: like in a movie - frames shown separately in turn are perceived as a moving image. It all depends on the projection frequency, which will be discussed a little later.

Figure 1. The principle of PWM - regulation

The figure shows the signal diagrams at the output of the PWM control device (or master oscillator). Zero and one are indicated: a logical one (high level) causes the LED to glow, a logical zero (low level), respectively, extinction.

Although everything can be the other way around, since it all depends on the circuitry of the output key, turning on the LED can be done at a low level and turning it off, just high. In this case, a physically logical one will have a low voltage level, and a logical zero will be high.

In other words, a logical one causes some event or process to turn on (in our case, the LED lights up), and a logical zero should turn off this process. That is, not always a high level at the output of a digital microcircuit is a LOGICAL unit, it all depends on how a particular circuit is built. This is so, for information. But for now, we will assume that the key is controlled by a high level, and it simply cannot be otherwise.

Frequency and width of control pulses

Note that the pulse period (or frequency) remains unchanged. But, in general, the pulse frequency does not affect the brightness of the glow, therefore, there are no special requirements for frequency stability. Only the duration (WIDTH), in this case, of a positive pulse changes, due to which the whole mechanism of pulse-width modulation works.

The duration of the control pulses in Figure 1 is expressed in %%. This is the so-called "duty cycle" or, in English terminology, DUTY CYCLE. It is expressed as the ratio of the duration of the control pulse to the pulse repetition period.

In Russian terminology, it is usually used "duty cycle" - the ratio of the repetition period to the time of the impulse a. Thus, if the fill factor is 50%, then the duty cycle will be equal to 2. There is no fundamental difference here, therefore, you can use any of these values, to whom it is more convenient and understandable.

Here, of course, one could give formulas for calculating the duty cycle and DUTY CYCLE, but in order not to complicate the presentation, we will do without formulas. Last but not least, Ohm's law. There's nothing you can do about it: "You don't know Ohm's law, stay at home!" If anyone is interested in these formulas, they can always be found on the Internet.

PWM frequency for dimmer

As mentioned a little higher, there are no special requirements for the stability of the PWM pulse frequency: well, it “floats” a little, and that’s okay. PWM controllers have a similar frequency instability, by the way, quite large, which does not interfere with their use in many designs. In this case, it is only important that this frequency does not fall below a certain value.

And what should be the frequency, and how unstable can it be? Do not forget that we are talking about dimmers. In film technology, there is a term "critical flicker frequency". This is the frequency at which individual pictures displayed one after the other are perceived as a moving picture. For the human eye, this frequency is 48 Hz.

This is precisely the reason why the frame rate on film was 24fps (the television standard is 25fps). To increase this frequency to the critical one, film projectors use a two-bladed obturator (shutter) that overlaps each displayed frame twice.

In amateur narrow-film 8mm projectors, the projection frequency was 16 frames / sec, so the obturator had as many as three blades. The same purpose in television is served by the fact that the image is shown in half-frames: first even, and then odd lines of the image. The result is a flicker frequency of 50 Hz.

The operation of the LED in PWM mode is a separate flash of adjustable duration. In order for these flashes to be perceived by the eye as a continuous glow, their frequency must in no way be less than the critical one. Any higher, but no lower. This factor should be taken into account when creating PWM - controllers for lamps.

By the way, just as an interesting fact: scientists have somehow determined that the critical frequency for the eye of a bee is 800 Hz. Therefore, the bee will see the movie on the screen as a sequence of separate images. In order for her to see a moving image, the projection frequency will need to be increased to eight hundred fields per second!

To control the actual LED is used. Recently, the most widely used for this purpose are those that allow switching significant power (the use of conventional bipolar transistors for these purposes is considered simply indecent).

Such a need, (powerful MOSFET - transistor) arises with a large number of LEDs, for example, with, which will be discussed a little later. If the power is low - when using one or two LEDs, you can use low-power switches, and if possible, connect the LEDs directly to the outputs of the microcircuits.

Figure 2 shows a functional diagram of a PWM controller. Resistor R2 is conditionally shown as a control element in the diagram. By rotating its knob, you can change the duty cycle of the control pulses within the required limits, and, consequently, the brightness of the LEDs.

Figure 2. Functional diagram of the PWM controller

The figure shows three strings of LEDs connected in series with terminating resistors. Approximately the same connection is used in LED strips. The longer the tape, the more LEDs, the greater the current consumption.

It is in these cases that powerful ones will be required, the allowable drain current of which should be slightly more than the current consumed by the tape. The last requirement is met quite easily: for example, the IRL2505 transistor has a drain current of about 100A, a drain voltage of 55V, while its size and price are quite attractive for use in various designs.

PWM master oscillators

As a master PWM generator, a microcontroller can be used (most often in industrial conditions), or a circuit made on microcircuits with a low degree of integration. If it is planned to make a small number of PWM controllers at home, and there is no experience in creating microcontroller devices, then it is better to make a controller on what is currently at hand.

These can be logic circuits of the K561 series, integrated timer, as well as specialized circuits designed for. In this role, you can even make it work by assembling an adjustable generator on it, but this is, perhaps, "for the love of art." Therefore, only two schemes will be considered below: the most common on the 555 timer, and on the UC3843 UPS controller.

Schematic of the master oscillator on the timer 555

Figure 3. Schematic of the master oscillator

This circuit is a conventional square wave generator whose frequency is set by capacitor C1. The capacitor is charged through the circuit "Output - R2 - RP1-C1 - common wire". In this case, a high-level voltage must be present at the output, which is equivalent to the output being connected to the positive pole of the power source.

The capacitor is discharged along the circuit "C1 - VD2 - R2 - Output - common wire" at a time when a low-level voltage is present at the output - the output is connected to a common wire. It is this difference in the charge-discharge paths of the time-setting capacitor that provides pulses with adjustable width.

It should be noted that diodes, even of the same type, have different parameters. In this case, their electrical capacitance plays a role, which changes under the action of voltage across the diodes. Therefore, along with the change in the duty cycle of the output signal, its frequency also changes.

The main thing is that it does not become less than the critical frequency, which was mentioned a little higher. Otherwise, instead of a uniform glow with different brightness, individual flashes will be visible.

Approximately (again, the diodes are to blame), the frequency of the generator can be determined by the formula shown below.

The frequency of the PWM generator on the timer 555.

If we substitute the capacitance of the capacitor in farads and the resistance in ohms into the formula, then the result should be in hertz Hz: you can’t get away from the SI system! This assumes that the slider of the variable resistor RP1 is in the middle position (in the formula RP1 / 2), which corresponds to the output signal of the meander shape. In Figure 2, this is exactly the part where the pulse duration is 50%, which is equivalent to a signal with a duty cycle of 2.

PWM master oscillator on a UC3843 chip

Its scheme is shown in Figure 4.

Figure 4. Schematic of the PWM master oscillator on the UC3843 chip

The UC3843 chip is a control PWM controller for switching power supplies and is used, for example, in ATX format computer sources. In this case, the typical scheme for its inclusion has been somewhat changed towards simplification. To control the width of the output pulse, a control voltage of positive polarity is applied to the input of the circuit, then a PWM pulse signal is obtained at the output.

In the simplest case, the control voltage can be applied using a variable resistor with a resistance of 22 ... 100 KΩ. If necessary, control voltage can be obtained, for example, from an analog light sensor made on a photoresistor: the darker it is outside the window, the brighter it is in the room.

The control voltage affects the PWM output in such a way that when it is reduced, the output pulse width increases, which is not at all surprising. After all, the original purpose of the UC3843 chip is to stabilize the voltage of the power supply: if the output voltage drops, and with it the regulating voltage, then measures must be taken (increase the width of the output pulse) to slightly increase the output voltage.

Regulating voltage in power supplies is generated, as a rule, using zener diodes. More often than not, this or something similar.

With the ratings of the parts indicated on the diagram, the generator frequency is about 1 kHz, and unlike the generator on the 555 timer, it does not “float” when the duty cycle of the output signal changes - taking care of the frequency of switching power supplies.

To regulate a significant power, for example, an LED strip, a key stage on a MOSFET transistor should be connected to the output, as shown in Figure 2.

We could talk more about PWM controllers, but for now let's stop there, and in the next article we will look at various ways to connect LEDs. After all, not all methods are equally good, there are those that should be avoided, and there are simply plenty of errors when connecting LEDs.

Loading...Loading...