logo elektroda
logo elektroda
X
logo elektroda

Ultrasonic PWM with soft start for speed control of a DC motor.

heniek07 2475 52
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
📢 Listen (AI):
  • #31 21605843
    jarek_lnx
    Level 43  
    @CosteC I had a teacher who taught that it's almost the same thing, only the output differs, meaning he didn't know about frequency compensation either. And this is the most important difference. An amplifier compensated for linear operation is slow.
    The very similar LM393 and LM358 circuits differ in that the former (comparator) has an OC output and will respond in 0.3us and the latter (amplifier) needs several tens of us to change state (SR 0.5V/us)
  • ADVERTISEMENT
  • #32 21605877
    CosteC
    Level 39  
    jarek_lnx wrote:
    @CosteC I had a teacher who taught that it's almost the same thing, only the output differs, which means he didn't know about frequency compensation either. And this is the most important difference. An amplifier compensated for linear operation is slow.
    The very similar LM393 and LM358 circuits differ in that the former (comparator) has an OC output and will respond in 0.3us and the latter (amplifier) needs several tens of us to change state (SR 0.5V/us)
    .
    And well... What your teacher claimed is quite a popular view. Only that there are more differences.
  • #33 21605904
    LEDówki
    Level 43  
    [postid:1f8b521018][/postid:1f8b521018]
    I can hear it and I'm not a teenager. 16 kHz is no mean feat.
    Once upon a time amplifiers were put in instead of comparators because they were scarce. Those who have access to literature with such prosthetics use an amplifier as a comparator. Perhaps in the basics of electronics there were such descriptions that an amplifier could be a comparator, but without the details that Jarek gave. The engineer knows them, the amateur pushes in a prosthesis and his circuit limps along.
  • ADVERTISEMENT
  • #34 21607262
    heniek07
    Level 20  
    At last some constructive criticism with educational value for amateur hobbyists like me, from which I learned something.
    Fellow jarek_lnx , amateurs use (want to use) WO as a comparator because they lack the knowledge - as I mentioned, because they are following something that has been developed.
    https://serwis.avt.pl/manuals/AVT1829.pdf
    From the elektroda.pl forum, from the first post:
    https://www.elektroda.pl/rtvforum/topic1047137.html#5295680
    Ultrasonic PWM with soft start for speed control of a DC motor. .
    Because I have done a PV panel controller myself before and it works.
    https://www.elektroda.pl/rtvforum/topic2948683-360.html#18131895
    They all work at lower frequencies and how was I to know they wouldn't cope at higher frequencies.
    Thank you Ci , for providing the schematic. I found the link, although my English is poor.
    https://bestengineeringprojects.com/pwm-dc-motor-speed-controller-circuit/#google_vignette
    If I can tune it to a higher frequency range (so that I don't hear the noises) it will be great. I have the rest already worked out. In my spare time, I will definitely work on this project. It will be one LM393 cube, PWM fill control to 0 to 100% and soft start. I care about the soft start because it does not block the ATX power supply with surges of current drawn.
    Thank you colleagues: jarek_lnx , CosteC , LEDs for "lectures". I think if any amateurs make it to this point in reading the thread, they will learn a lot.
    Thanks
    Greetings
    Heniek
  • #35 21607539
    jarek_lnx
    Level 43  
    The circuit in the diagram above will have rise and fall times of about 25 µs, so is suitable for about 1 kHz. Changing the LM358 to an LM393 will improve the slopes, but requires a resistor pulling up each OC output to plus and adding a MOSFET driver. And this is mainly the difference between the schematic from bestengineeringprojects.com

    On the linked bestengineeringprojects.com page the MOSFET driver with T1 and T2 is, if not wrong, at least suboptimal (low efficiency, cross currents).

    I would give one, better and simpler.
    Ultrasonic PWM with soft start for speed control of a DC motor. .
  • #36 21607585
    heniek07
    Level 20  
    jarek_lnx , so far I have only added the second half of the LM393 to my solution quickly. From preliminary calculations it should generate about 18 kHz.
    Electronic circuit diagram using a dual LM393 comparator and a MOSFET. .
    As for the MOSFET driver, to a non-professional it also seemed kind of odd - I haven't come across one on the web yet. In mine operating on collector resistor R1 (5 ohms) I measured the voltage drop with an oscilloscope. After counting it gave a current of about 0.3 A in the ipulse. I will leave it that way or slightly rework it.
    Thank you.
  • #37 21607597
    jarek_lnx
    Level 43  
    heniek07 wrote:
    For now, I have only added the second half of the LM393 to my solution as a quick fix
    Well

    If you would like, the softstart can still be modified because as it is now, it depends on the speed potentiometer setting and gives a delay.

    heniek07 wrote:
    After conversion it gave a current of about 0.3 A in the ipulse. I will leave it like that or slightly rework it.
    You can look at the edges at the gate and at the output, the rise and fall times should not be longer than 5% of the period so as not to increase the power loss in T3, but there is also no point in making it ultra fast because it increases the noise emission.
  • #38 21607939
    heniek07
    Level 20  
    1 Thank you jarek_lnx for the information. If you have a link to a simple soft start solution, please feel free to post. The existing solution satisfies me. I was more concerned with ensuring that when switching right-left the ATX power supply would not switch off, which I have achieved. The wiper motor has a worm gear and the acceleration of the whole mechanism is hardly noticeable.
    2 Today the frequency of my solution of about 17 kHz was tested. The tester was Filipek aged 3+. He heard nothing but the hum of the fans. I have to wait a little longer for the older grandchildren to visit. If they hear anything disturbing I will inform the forum community.
    Regards
    Heniek
  • #39 21609028
    heniek07
    Level 20  
    Ultrasonic PWM with soft start for speed control of a DC motor.
    Version 2. - thanks to advice from colleagues. Not yet soldered and tested.
    Schematic drawing of an unassembled PCB for a DC motor PWM speed controller with soft start. .
    Brief description based on:
    https://bestengineeringprojects.com/pwm-dc-motor-speed-controller-circuit/
    The left comparator acts as a generator of an almost sawtooth waveform (with non-linear slopes, as in the diagram of charging and discharging a capacitor through a resistor).
    https://bestengineeringprojects.com/wp-content/uploads/2022/05/pulse-width-modulation.jpg
    In this application it is of minor importance.
    Resistors R5, R6 and R8 are supposed to be equal to each other (R5 = R6 = R8).
    The frequency depends on C7 and R7. It can be calculated from the formula:
    f = 1/(1.388-C7-R7). For C7 = 2 nF and R7 = 20 kΩ - f = 18011 Hz
    The voltage on capacitor C7 varies from 1/3 to 2/3 of VCC.
    If any electronic engineers can help with anything else - I would appreciate it.
    Board:
    Ultrasonic PWM with soft start for speed control of a DC motor. .
    Component layout:
    Photo of a PCB with unassembled electronic components for a DC motor PWM controller. .
  • #40 21609120
    acctr
    Level 38  
    Soft start capacitor C4 will also affect the speed of the speed response. Also, a short break in the power supply will cause the soft start not to work.
    Just add a PNP secondary with RC circuit and diode, four elements and you have an independent soft start circuit.

    In what program do you draw the schematics and PCBs?
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #41 21609153
    heniek07
    Level 20  
    Mate acctr , thank you for the advice - I will certainly take it. If you can then outline the soft start circuit for me on paper in pencil and post a pic, it will take me half a day or a whole day before I can find a schematic or work it out. The boards are as I wrote earlier:
    The boards are done in ordinary Paint. A long time ago, I made a small project on the fly and it stayed that way. Then it was just copy paste. I know there are dedicated programs, but my penultimate board was made in 2022.
    Greetings
    Heniek
  • #42 21609223
    acctr
    Level 38  
    I have something like this in mind:
    Electronic circuit diagram with a transistor, potentiometers, capacitor, and diode. .
    The voltage at the emitter is about 0.7 V higher than the voltage at the base. The input resistance of the secondary is large, so changes in the divider with potentiometers do not significantly affect the operation of the RC timing circuit.
    The presence of the diode accelerates the discharge of the capacitor after a power failure.
    Helpful post? Buy me a coffee.
  • #43 21609360
    heniek07
    Level 20  
    Thank you!!! Will redesign in my spare time.

    Added after 8 [hours] 49 [minutes]:

    Hello forum community!
    I have a question, of course. Can the aforementioned emitter secondary look as I have drawn?
    Ultrasonic PWM with soft start for speed control of a DC motor. .
  • #44 21609920
    acctr
    Level 38  
    Yes, it looks good. You might still consider reducing the top 30 k resistor to 2.2-4.7 k and adding series resistors to the PR3, PR4 potentiometers and reducing the resistance of these potentiometers so that you have more accurate adjustment. Because, for example, you may find that you get the required parameters within a narrow range of rotation of the PR mounting potentiometers at the current values.
    For example, you would get the best values for the top PR4=4k and the bottom PR3=6k, in which case you would give a 3k3 resistor and PR 2k2 at the top and 5k1 and PR 2k2 at the bottom.
    Helpful post? Buy me a coffee.
  • #45 21610822
    heniek07
    Level 20  
    Fellow acctr , thanks again for the hints. I gave the resistor (now R10) even smaller. I don't know if I'm thinking correctly, but just to keep the last rising voltage spike small. As for the precision PR. The only parts shop in the area didn't have the values I was interested in at the time of purchase: 4.7 - 5k, even 10k. So I bought what was there. I set the 20k PRs to about 10k so that 1/3 of the supply voltage was deposited on each cascade, then tuned as needed and stayed that way. The accuracy was enough and I didn't include extra resistors on the board. When I will redesign the board and do the experiments - I don't know. (Huge holiday renovation works and lack of time.) The first described version works and there is nothing pressing to redesign. I am posting the schematic after the changes.
    Regards
    Electronic schematic diagram showing circuit modifications with resistors and potentiometers. .
  • #46 21610872
    Macosmail
    Level 35  
    jarek_lnx wrote:
    [I don't understand why people try to use amplifiers as comparators. What's the point in that?
    .

    I, for one of my recent projects, was looking for a comparator except that with a dual push-pull complementary output. This would have enabled me to make an elegant symmetrical hysteresis. But it turned out that the semiconductor industry has so far not seen the need to produce such components.... (except for very specialised - high speed - lvds - WAY to expensive and poorly available).
    We ended up with a popular operational amplifier and a negating gate.

    Electrical schematic showing an op-amp and a NOT gate used to create complementary push-pull outputs. .
    And on topic:
    The extreme on/off speed of the transistor is not so necessary because the limitation anyway is the rate of rise and fall of the current in a rather large motor index.
    For example, in automotive applications a 1K resistor in the gate of a traistor is used to control the primary winding of the ignition coil....
  • #47 21611070
    jarek_lnx
    Level 43  
    Macosmail wrote:
    The extreme on/off speed of the transistor is not so necessary because the limitation anyway is the rate of rise and fall of the current in a fairly large motor index.
    E.g. in automotive applications a 1K resistor in the gate of the traistor is used to control the primary winding of the ignition coil...
    Extreme at the nanosecond level, is detrimental because it generates more RF interference, but with a 1k resistor in the gate circuit and a frequency of ~20kHz the transistor would operate mainly in the linear region and would probably burn out.
  • #48 21611293
    CosteC
    Level 39  
    jarek_lnx wrote:
    with a 1k resistor in the gate circuit and a frequency of ~20kHz the transistor would operate mainly in the linear region and would probably burn out
    .
    Heh.
    For a simple, classically controlled bipolar transistor you are right. But look here: https://www.nxp.com/docs/en/data-sheet/MC3309...%20Motorola%20Power%20Darlington%20Transistor.
    Special driver + darlington type MJH10012. It will heat up a lot, but the automotiv even likes it.
  • ADVERTISEMENT
  • #49 21611326
    jarek_lnx
    Level 43  
    CosteC wrote:
    For a simple, classically controlled bipolar transistor you are correct
    I wrote about the mosfet.

    And as for ignition circuits I know there are some where the current is limited
  • #50 21611354
    Macosmail
    Level 35  
    Nowadays, new solutions tend to use a specialised IGBT.
    The STGB18N40LZT4, for example, has a built-in 1.6k series resistor, and in the actual application there is another external one.
    NGD8201B - this one does not have a built-in series resistor, but its default application is a 1k Rg resistor and the timing parameters are given for such. Of course, they are not impressive because it is a specialised transistor and they are only what they need to be.
    And it is also known that the self-induction voltage of a coil depends on the rate of current decay in the coil, yet the aim is not to use the fastest possible transistors because it is not the transistor that is the limitation here. The limitation is the inductance and capacitance between the windings on the secondary side.

    Ultrasonic PWM with soft start for speed control of a DC motor. .
    Here, however, I would increase this gate resistor :) To some 47-100Ω.
    You can pass the capacitor behind the resistor - I have marked it with an arrow. It will not jerk the power line so much.
  • #51 21611850
    heniek07
    Level 20  
    Thanks, guys! Unfortunately, I don't know if I'll be reworking anything at all. As a rule of thumb: if something works well, you don't have to mess it up. The circuit from the first version behaves correctly and I am satisfied with it. It works, the MOSFET does not heat up. I flicked the right-left switch for a minute at different motor speeds, about a minute, and not once did the short-circuit protection of the ATX power supply trip. Now, in addition, there is a lack of time. I'm still a bit tempted to check the new soft start solution, but that's future.
    As for the gate resistor. On YT a guy in Eastern was calculating this resistor and came up with a result of 22 Ω for a specific MOSFET transistor and 22 Ω on discharge through the discharge acceleration diode, so there is 11 Ω on discharge. This is slightly less than the proposal.
    https://www.youtube.com/watch?v=DsVYaysKxss
    When I make some experiments I'll write something up, but when will that be?
    Greetings
    Heniek

    Added at 7 [hours] 19 [minutes]:

    Hello forum community!
    After an extended evening, I am posting the board of the latest version of the regulator with soft start implemented on the emitter secondary. If anyone of Was finds time to check this version then please do.
    Ultrasonic PWM with soft start for speed control of a DC motor. Ultrasonic PWM with soft start for speed control of a DC motor. .
    There are also holes to reposition capacitor C2 as suggested by a colleague Macosmail . The board is visually checked once with component placement and ready for thermal transfer.
    Greetings
    Heniek.
    21. 07. 2025.
    I apologise to Mates for my mistake. I took the wrong element file for the design. All the boards were too small. I have replaced all of them. If anyone has downloaded the design of any tile beforehand, it should be enlarged to 115%.
  • #52 21613910
    heniek07
    Level 20  
    Hello!
    I still have a question for my colleague acctr , the author of the Soft Start on the emitter secondary, or any of you more experienced. Is it possible to increase the values of the PR4, PR2, PR3 divider to e.g. 75k, 50k, 75k. Will this improve the performance of the soft start. I understood that when the voltage on the base of T4 increases, it will stop conducting and the voltage will jump a little.
    Greetings
    Heniek
  • #53 21613998
    acctr
    Level 38  
    heniek07 wrote:
    Can the divider values of PR4, PR2, PR3 be increased to e.g. 75k, 50k, 75k. Will this improve the soft-start performance.
    .
    The function of this secondary is to separate the RC soft start timing circuit from the divider you normally set the motor speed with.
    So you can change their resistances, but this will not affect the soft start.
    heniek07 wrote:
    I understood that when the voltage on the base of T4 increases, it will stop conducting and the voltage will jump a little.
    .
    The voltage at the base will rise and at the emitter too, but not in a stepwise fashion, just in line with the capacitor charge curve.
    And if you wanted, for example, it to rise linearly, then instead of a resistor in the soft start you can give a current source on one transistor, diode and resistor.
    Helpful post? Buy me a coffee.
📢 Listen (AI):

Topic summary

The discussion centers on designing an ultrasonic PWM speed controller with soft start for a DC motor originally from a VAG automotive wiper, repurposed to drive a knot toaster shaft. The goal was to achieve smooth speed regulation without audible squeaks by operating the PWM frequency above human hearing (around 17-22 kHz). Initial designs using LM358 op-amps as comparators produced audible noise and slow switching edges, prompting suggestions to replace them with faster LM393 comparators and improve the MOSFET gate drive circuitry. The use of a low-pass LC filter was recommended to reduce current ripple and losses, though it may slow direction changes. Soft start implementation was discussed, including adding a PNP transistor with RC and diode for independent timing to prevent power supply trips during direction changes. Component reliability for automotive conditions was noted but deemed less critical for the indoor knot toaster application. Various PWM generation methods were compared, including dedicated ICs like UC3843 and TL494 for more stable speed control. Gate resistor values around 22-100 Ω were debated to balance switching speed and EMI. The final working solution uses a triangle wave generator with a comparator, soft start, and MOSFET switching at about 17 kHz, achieving silent operation and stable motor control. The project is an educational example of analog PWM design by an amateur, with ongoing refinements based on community feedback.
Summary generated by the language model.
ADVERTISEMENT